RIP has the following key characteristics:
- RIP is a distance vector routing protocol.
- RIP uses hop count as its only metric for path selection.
- Advertised routes with hop counts greater than 15 are unreachable.
- Messages are broadcast every 30 seconds.
- RIP messages are encapsulated in a UDP segment, with source and destination ports of 520
RIP is a classful routing protocol. RIPv1 does not send subnet mask information in the update. Therefore, a router either uses the subnet mask configured on a local interface, or applies the default subnet mask based on the address class. Due to this limitation, RIPv1 networks cannot be discontiguous nor can they implement VLSM.
Administrative distance (AD) is the trustworthiness (or preference) of the route source. RIP has a default administrative distance of 120. When compared to other interior gateway protocols, RIP is the least-preferred routing protocol. IS-IS, OSPF, IGRP, and EIGRP all have lower default AD values.
Remember, you can check the administrative distance using the show ip route or show ip protocols commands.
Enabling RIP: router rip command
To enable a dynamic routing protocol, enter the global configuration mode and use the router command. To enter the router configuration mode for RIP, enter router rip at the global configuration prompt. This command does not directly start the RIP process. Instead, it provides access to configure routing protocol settings. No routing updates are sent.
If you need to completely remove the RIP routing process from a device, negate the command with no router rip. This command stops the RIP process and erases all existing RIP configurations. By entering the RIP router configuration mode, the router is instructed to run RIP. But the router still needs to know which local interfaces it should use for communication with other routers, as well as which locally connected networks it should advertise to those routers. To enable RIP routing for a network, use the network command in the router configuration mode and enter the classful network address for each directly connected network.
Router(config-router)#network directly-connected-classful-network-address
The network command:
- Enables RIP on all interfaces that belong to a specific network. Associated interfaces will now both send and receive RIP updates.
- Advertises the specified network in RIP routing updates sent to other routers every 30 seconds.
Note: If you enter a subnet address, the IOS automatically converts it to a classful network address. For example, if you enter the command network 192.168.1.32, the router will convert it to network 192.168.1.0.
In the figure, the network command is configured on all three routers for the directly connected networks. Notice that only classful networks were entered.
What happens if you enter a subnet address or interface IP address instead of the classful network address when using the network command for RIP configurations?
R3(config)#router rip
R3(config-router)#network 192.168.4.0
R3(config-router)#network 192.168.5.1
In this example, we entered an interface IP address instead of the classful network address. Notice that the IOS does not give an error message. Instead, the IOS corrects the input and enters the classful network address. This is proven with the verification below.
R3#show running-config
!
router rip
network 192.168.4.0
network 192.168.5.0
!
To verify and troubleshoot routing, first use show ip route (an R in the output indicates RIP routes) and show ip protocols. If you cannot isolate the problem using these two commands, then use debug ip rip to see exactly what is happening. Remember, before you configure any routing - whether static or dynamic - make sure all necessary interfaces are "up" and "up" with the show ip interface brief command.
Interpreting show ip route output
Using the information in the figure, let's focus on one RIP route learned by R1 and interpret the output shown in the routing table.
R 192.168.5.0/24 [120/2] via 192.168.2.2, 00:00:23, Serial0/0/0
The listing of routes with an R code is a quick way to verify that RIP is actually running on this router. If RIP is not at least partially configured, you will not see any RIP routes.
Next, the remote network address and subnet mask are listed (192.168.5.0/24).
The AD value (120 for RIP) and the distance to the network (2 hops) is shown in brackets.
The next-hop IP address of the advertising router is listed (R2 at 192.168.2.2) and how many seconds have passed since the last update (00:00:23, in this case).
Finally, the exit interface that this router will use for traffic destined for the remote network is listed (Serial 0/0/0).
If a network is missing from the routing table, check the routing configuration using show ip protocols. The show ip protocols command displays the routing protocol that is currently configured on the router. This output can be used to verify most RIP parameters to confirm that:
- RIP routing is configured
- The correct interfaces send and receive RIP updates
- The router advertises the correct networks
- RIP neighbors are sending updates
Most RIP configuration errors involve an incorrect network statement configuration, a missing network statement configuration, or the configuration of discontiguous subnets in a classful environment. An effective command used to find issues with RIP updates is the debug ip rip. This command displays RIP routing updates as they are sent and received. Because updates are periodic, you need to wait for the next round of updates before seeing any output.
Passive interface
As we have seen before, R2 is sending updates out FastEthernet0/0 even though no RIP device exists on that LAN. R2 has no way of knowing this and sends an update every 30 seconds. The passive-interface command prevents the transmission of routing updates through a router interface but still allows that network to be advertised to other routers. Enter the passive-interface command in router configuration mode.
Router(config-router)#passive-interface interface-type interface-number
This command stops routing updates out the specified interface. However, the network that the specified interface belongs to will still be advertised in routing updates that are sent out other interfaces.
In the figure, R2 is first configured with the passive-interface command to prevent routing updates on FastEthernet0/0 because no RIP neighbors exist on the LAN. The show ip protocols command is then used to verify the passive interface. Notice that the interface is no longer listed under Interface, but under a new section called Passive Interface(s). Also notice that the network 192.168.3.0 is still listed under Routing for Networks, which means that this network is still included as a route entry in RIP updates that are sent to R1 and R3.
Automatic Summarization
To aid the discussion of automatic summarization, the RIP topology shown in the figure has been modified with the following changes:
As you know, RIP is a classful routing protocol that automatically summarizes classful networks across major network boundaries.
In the figure, you can see that R2 has interfaces in more than one major classful network. This makes R2 a boundary router in RIP. Serial 0/0/0 and FastEthernet 0/0 interfaces on R2 are both inside the 172.30.0.0 boundary. The Serial 0/0/1 interface is inside the 192.168.4.0 boundary.
Because boundary routers summarize RIP subnets from one major network to the other, updates for the 172.30.1.0, 172.30.2.0 and 172.30.3.0 networks will automatically be summarized into 172.30.0.0 when sent out R2's Serial 0/0/1 interface.
Example:
In the example, R1 knows that subnet 172.16.1.0 belongs to the same major classful network as the outgoing interface. Therefore, it sends a RIP update to R2 containing subnet 172.16.1.0. When R2 receives the update, it applies the receiving interface subnet mask (/24) to the update and adds 172.16.1.0 to the routing table.
When sending updates to R3, R2 summarizes subnets 172.16.1.0/24, 172.16.2.0/24, and 172.16.3.0/24 into the major classful network 172.16.0.0. Because R3 does not have any subnets that belong to 172.16.0.0, it will apply the classful mask for a class B network, /16.
Example of RIPv1 Processing Updates
In the last figure, R2 receives an update from R1 and enters the network in the routing table. How does R2 know that this subnet has a /24 (255.255.255.0) subnet mask? It knows because:
- R2 received this information on an interface that belongs to the same classful network (172.30.0.0) as that of the incoming 172.30.1.0 update.
- The IP address for which R2 received the "172.30.1.0 in 1 hops" message was on Serial 0/0/0 with an IP address of 172.30.2.2 and a subnet mask of 255.255.255.0 (/24).
- R2 uses its own subnet mask on this interface and applies it to this and all other 172.30.0.0 subnets that it receives on this interface - in this case, 172.30.1.0.
- The 172.30.1.0 /24 subnet was added to the routing table.
Routers running RIPv1 are limited to using the same subnet mask for all subnets with the same classful network.
When sending an update, boundary router R2 will include the network address and associated metric. If the route entry is for an update sent out a different major network, then the network address in the route entry is summarized to the classful or major network address. This is exactly what R2 does for 192.168.4.0 and 192.168.5.0. It sends these classful networks to R1.
R2 also has routes for the 172.30.1.0/24, 172.30.2.0/24 and 172.30.3.0/24 subnets. In R2's routing update to R3 on Serial0/0/1, R2 only sends a summary of the classful network address of 172.30.0.0.
If the route entry is for an update sent within a major network, the subnet mask of the outbound interface is used to determine the network address to advertise. R2 sends the 172.30.3.0 subnet to R1 using the subnet mask on Serial0/0/0 to determine the subnet address to advertise.
R1 receives the 172.30.3.0 update on Serial0/0/0 interface, which has an interface address of 172.30.2.1/24. Since the routing update and interface both belong to the same major network, R1 applies its /24 mask to the 172.30.3.0 route.
RIPv1 automatically summarizes subnets to their classful address when sending an update out an interface that is on a different major network than the subnetted address of the route. Because RIPv1 is a classful routing protocol, the subnet mask is not included in the routing update. When a router receives a RIPv1 routing update, RIP must determine the subnet mask of that route.
RIPv1 automatically summarizes subnets to their classful address when sending an update out an interface that is on a different major network than the subnetted address of the route. Because RIPv1 is a classful routing protocol, the subnet mask is not included in the routing update. When a router receives a RIPv1 routing update, RIP must determine the subnet mask of that route.
- If the route belongs to the same major classful network as the update, RIPv1 applies the subnet mask of the receiving interface.
- If the route belongs to a different major classful network than the receiving interface, RIPv1 applies the default classful mask.
Is there a disadvantage to automatic summarization? Yes, when there are discontiguous networks configured in the topology.
Default Route
To provide Internet connectivity to all other networks in the RIP routing domain, the default static route needs to be advertised to all other routers that use the dynamic routing protocol. In many routing protocols, including RIP, you can use the default-information originate command in router configuration mode to specify that this router is to originate default information, by propagating the static default route in RIP updates. In the figure, R2 has been configured with the default-information originate command.
In the routing table for R1, you can see that there is a candidate default route, as denoted by the R* code. The static default route on R2 has been propagated to R1 in a RIP update. R1 has connectivity to the LAN on R3 and any destination on the Internet.
Nessun commento:
Posta un commento