RIPv2 is defined in RFC 1723. Like version 1, RIPv2 is encapsulated in a UDP segment using port 520 and can carry up to 25 routes. Although RIPv2 has the same basic message format as RIPv1, two significant extensions are added.
The first extension in the RIPv2 message format is the subnet mask field that allows a 32 bit mask to be included in the RIP route entry. As a result, the receiving router no longer depends upon the subnet mask of the inbound interface or the classful mask when determining the subnet mask for a route.
The second significant extension to the RIPv2 message format is the addition of the Next Hop address. The Next Hop address is used to identify a better next-hop address - if one exists - than the address of the sending router. If the field is set to all zeros (0.0.0.0), the address of the sending router is the best next-hop address.
Enabling and Verifying RIPv2
By default, when a RIP process is configured on a Cisco router, it is running RIPv1. However, even though the router only sends RIPv1 messages, it can interpret both RIPv1 and RIPv2 messages. A RIPv1 router will just ignore the RIPv2 fields in the route entry.
The show ip protocols command verifies that R2 is configured for RIPv1 but receives RIP messages for both versions. Notice that the version 2 command is used to modify RIP to use version 2. This command should be configured on all routers in the routing domain. The RIP process will now include the subnet mask in all updates, making RIPv2 a classless routing protocol. When a router is configured for version 2, only RIPv2 messages are sent and received.
By default, RIPv2 (when sending updates out) automatically summarizes networks at major network boundaries, just like RIPv1. The only change resulting from the version 2 command is that R2 is now including the 192.168.0.0/16 network in its updates. This is because RIPv2 includes the 255.255.0.0 mask with the 192.168.0.0 network address in the update. Both R1 and R3 will now receive this redistributed static (redistributed static is default information originate but only for RIPv2) route via RIPv2 and enter it into their routing tables.
Disabling Auto-Summary
To modify the default RIPv2 behavior of automatic summarization, use the command no auto-summary in the router configuration mode. This command is not valid with RIPv1. Even though the Cisco IOS will let you configure no auto-summary for RIPv1, the command has no effect. You must also configure version 2 before the Cisco IOS will change the way it sends RIP updates.
Once automatic summarization has been disabled, RIPv2 will no longer summarize networks to their classful address at boundary routers. RIPv2 will now include all subnets and their appropriate masks in its routing updates. The command show ip protocols can be used to verify that "automatic network summarization is not in effect."
Now that we are disabled automatic summarization, what should we expect to see in the routing tables?
The routing table now contains the individual subnets. Notice that there is no longer a single summary route. Each subnet and mask has its own specific entry, along with the exit interface and next-hop address to reach that subnet.
RIPv2 and CIDR
One of the goals of Classless Inter-Domain Routing (CIDR) as stated by RFC 1519 is "to provide a mechanism for the aggregation of routing information." This goal includes the concept of supernetting. A supernet is a block of contiguous classful networks that is addressed as a single network. On the R2 router, we configured a supernet - a static route to a single network that is used to represent multiple networks or subnets.
Supernets have masks that are smaller than the classful mask (/16 here, instead of the classful /24). For the supernet to be included in a routing update, the routing protocol must have the capability of carrying that mask. In other words, it must be a classless routing protocol, like RIPv2.
The static route on R2 does include a mask which is less than the classful mask:
R2(config)#ip route 192.168.0.0 255.255.0.0 Null0
In a classful environment, the 192.168.0.0 network address would be associated with the class C mask /24, or 255.255.255.0. In today's networks, we no longer associate network addresses with classful masks. In this example, the 192.168.0.0 network has a /16, or 255.255.0.0, mask. This route could represent a series of 192.168.0.0/24 networks or any number of different address ranges. The only way this route can be included in a dynamic routing update is with a classless routing protocol that includes the /16 mask.
Using debug ip rip we can see that this CIDR supernet is included in the routing update sent by R2. Automatic summarization does not have to be disabled on RIPv2 or any classless routing protocol in order for supernets to be included in the updates.
Authentication
Most routing protocols send their routing updates and other routing information using IP (in IP packets). RIPv2, EIGRP, OSPF, IS-IS, and BGP can be configured to authenticate routing information. This practice ensures routers will only accept routing information from other routers that have been configured with the same password or authentication information. Note: Authentication does not encrypt the routing table.
Router(config)#key chain RIP_KEY
Router(config-keychain)#key 1
Router(config-keychain-key)#key-string cisco
Router(config)#int s0/0/0
Router(config-if)# ip rip authentication mode md5
Router(config-if)# ip rip authentication key-chain RIP_KEY
Nessun commento:
Posta un commento