- RIP Fundamentals
- Configuring RIP Between R1 and R2
- Verifying RIP Configuration and Operation
- Lab Follow-up Tasks
Configuring RIP Between R1 and R2
Before configuring RIP, look at the existing IP routing table of both R1 and R2 to get an idea of the routes that each device currently has in its routing table. Display the IP routing table of a router using the following command:
Router#show ip route
To do this on R1, first resume your reverse Telnet session to R1 and, from privileged EXEC mode, enter the show ip route command as demonstrated in Example 8-1.
Example 8-1 IP Routing Table on R1 Before the Configuration of IP RIP
Termserver#1 [Resuming connection 1 to r1 ... ] R1#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is not set C 192.169.1.0/24 is directly connected, Loopback0 C 192.168.1.0/24 is directly connected, Ethernet0 R1#
At the top of the routing table, a legend displays the various routes that may exist in a routing table. Each route type corresponds to a letter. These letters appear next to the route in the routing table. Paying attention to these letters enables you to better understand how the router learned each route in the routing table.
Currently, the only routes that exist on R1 are routes to directly connected interfaces. The letter C preceding the actual route denotes a directly connected route to 192.168.1.0/24 through Ethernet0. In addition, you should see a route to 192.169.1.0/24 directly connected to Loopback0. These routes were created in the IP routing table when you assigned an IP address to each interface and brought the interface up and out of shutdown mode. Loopback interfaces come up out of shutdown mode upon creation and then are placed in the routing table. This was done in Chapter 7, "Router Interface Configuration." Essentially, this means that R1 knows how to route to its directly connected networks, but nothing else.
Next, observe the routing table on R2 by returning to the terminal server, resuming the connection to R2, and then displaying the IP routing table with the show ip route command, as shown in Example 8-2.
Example 8-2 IP Routing Table on R2 Before the Configuration of IP RIP
Termserver#2 [Resuming connection 2 to r2 ... ] R2#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, * - candidate default U - per-user static route, o - ODR Gateway of last resort is not set C 192.168.1.0/24 is directly connected, Ethernet0 C 192.168.2.0/24 is directly connected, Ethernet1 C 192.169.2.0/24 is directly connected, Loopback0 C 192.168.100.0/24 is directly connected, Serial0 R2#
As the output in Example 8-2 shows, R2 has directly connected routes off each of its configured interfacesEthernet0, Ethernet1, Loopback0, and Serial0. These also were created in the IP routing table when each interface on R2 was assigned an IP address and was brought out of shutdown using the no shutdown command on the interface.
Suppose that, from R1, you need to get to R2's network of 192.168.2.0. You can check to see if this works by initiating a ping from R1 to R2's Ethernet1 interface of 192.168.2.2. If the ping succeeds, you know that R1 can reach the destination network. To do this, return to R1 and, from privileged EXEC mode, use the following command:
Router#ping 192.168.2.2
Example 8-3 demonstrates this series of transactions.
Example 8-3 R1 Incapable of pinging 192.168.2.2
Termserver#1 [Resuming connection 1 to r1 ... ] R1#ping 192.168.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.2, timeout is 2 seconds: ..... Success rate is 0 percent (0/5)
A standard ping request sends five ICMP echo packets. Receiving an ICMP echo reply in response to the ICMP echo request indicates a successful ping. A successful reply is denoted by an exclamation mark (!). In Example 8-3, no reply was received, as indicated by the five periods (.); this indicates zero replies received to the five ICMP echo packets that were sent. As a result, the success rate was 0 percent, indicating the request failed and that R1 cannot get to the network 192.168.2.0.
It is possible that the ping failed because of physical connectivity problems. In addition, R1 is incapable of pinging R2's Loopback0 interface of 192.169.2.2, as shown in Example 8-4.
Example 8-4 R1 Incapable of pinging R2's Loopback0 Interface
R1#ping 192.169.2.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.169.2.2, timeout is 2 seconds: ..... Success rate is 0 percent (0/5) R1#
Example 8-5 demonstrates R1's attempt to ping R2's Ethernet0 interface of 192.168.1.2.
Example 8-5 R1 Successfully pings R2's Ethernet0 Interface
R1#ping 192.168.1.2 Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms R1#
R1 successfully can ping R2's Ethernet0 interface, but it cannot ping any of the other directly connected interfaces of R2. This result indicates that physical connectivity between R1 and R2 exists.
The reason that R1 cannot ping R2's Ethernet1 or Loopback0 interface is that it does not have a route to networks 192.168.2.0 and 192.169.2.0.
This also is verified by R1's routing table, as indicated earlier in Example 8-1. R1 had a route to its directly connected network of 192.168.1.0, but no route to 192.168.2.0 or 192.169.2.0. For this reason, you can ping R2's Ethernet0 interface from R1, but you cannot ping R2's Ethernet1 or Loopback0 interfaces.
NOTE
When you type the command ping 192.169.2.2, the router creates an IP packet with a destination IP address of 192.169.2.2. The router then looks in its routing table to determine what interface it should send the packet out to get to 192.169.2.2. Because the router does not have an entry in its routing table for the IP network 192.169.2.0 where 192.169.2.2 resides, the router discards the packet.
You can resolve this issue by configuring R1 with a static route to the destination networks of 192.168.2.0 and 192.169.2.0; or, you could configure a routing protocol between R1 and R2 that would advertise these routes. For purposes here, configure RIP between R1 and R2. Through RIP, R2 will advertise the routes of its directly connected networks of 192.168.2.0 and 192.169.2.0 to R1. After R1 has received these routes, R1 will be capable of pinging 192.168.2.2 and 192.169.2.2. In addition, you should be capable of Telnetting from R1 to R2 using the host table configured in Chapter 6, "General Router Configurations," which mapped R2's host name to its Loopback0 interface.
Configuring RIP requires the following steps:
Step 1 Enable the RIP routing process, which places you in router configuration mode via the Router#router rip command.
Step 2 Specify those networks that should be advertised using RIP via the Router(config-router)#network [network-number] command.
Begin the RIP configuration by resuming the reverse Telnet session to R1. On R1, you enter global configuration mode and start the RIP routing process. This places you in router configuration mode. Then use the network command to specify networks 192.168.1.0 and 192.169.1.0 to be advertised using RIP. Example 8-6 demonstrates this series of transactions.
Example 8-6 Starting the RIP Routing Process on R1 and Advertising Networks 192.168.1.0 and 192.169.1.0 Through RIP
Termserver#1 [Resuming connection 1 to r1 ... ] R1#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R1(config)#router rip R1(config-router)#network 192.168.1.0 R1(config-router)#network 192.169.1.0 R1(config-router)#end R1# %SYS-5-CONFIG_I: Configured from console by console R1#
To get an idea of how this should appear, look at the highlighted portion of the RIP configuration of R1 in Example 8-7.
Example 8-7 Running Configuration of R1 After Configuration of RIP
R1#show running-config Building configuration... Current configuration: ! version 11.2 no service password-encryption no service udp-small-servers no service tcp-small-servers ! hostname R1 ! enable password falcons ! no ip domain-lookup ip host R1 192.169.1.1 ip host R2 192.169.2.2 ip host R3 192.169.3.3 ip host R4 192.169.4.4 ip host R5 192.169.5.5 ip host R6 192.169.6.6 ! interface Loopback0 ip address 192.169.1.1 255.255.255.0 ! interface Ethernet0 description This interface connects to R2's E0 ip address 192.168.1.1 255.255.255.0 ! interface Serial0 no ip address shutdown ! interface Serial1 no ip address shutdown ! router rip network 192.168.1.0 network 192.169.1.0 ! no ip classless ! banner motd ^C This is Router 1 ^C ! line con 0 exec-timeout 0 0 password falcons logging synchronous line aux 0 line vty 0 4 password falcons login ! end
Next, you need to configure R2 with RIP and add networks 192.168.1.0, 192.168.2.0, and 192.169.2.0 to be advertised using RIP. Return to the terminal server, resume the connection with R2, and configure RIP with each of these network statements, as demonstrated in Example 8-8.
Example 8-8 Starting the RIP Routing Process on R2 and Advertising Networks 192.168.1.0, 192.168.2.0, and 192.169.2.0 Through RIP
Termserver#2 [Resuming connection 2 to r2 ... ] R2#configure terminal Enter configuration commands, one per line. End with CNTL/Z. R2(config)#router rip R2(config-router)#network 192.168.1.0 R2(config-router)#network 192.168.2.0 R2(config-router)#network 192.169.2.0 R2(config-router)#end R2# %SYS-5-CONFIG_I: Configured from console by console R2#
When a network is added to RIP, RIP not only advertises this network route, but it also sends updates on the interface corresponding to this network. R2 now broadcasts RIP advertisements to R1 through its Ethernet0 interface. This ensures that R1 receives the routes that it needs to get to R2's directly connected networks.
As done with R1, examine the RIP configuration on R2 as it appears in the running configuration in Example 8-9. As highlighted in the running configuration of R2, three networks on R2 are configured to be a part of the RIP routing process.
Example 8-9 Running Configuration of R2 After Configuration of RIP
R2#show running-config Building configuration... Current configuration: ! version 12.0 service timestamps debug uptime service timestamps log uptime no service password-encryption ! hostname R2 ! enable password falcons ! ip subnet-zero no ip domain-lookup ip host R1 192.169.1.1 ip host R2 192.169.2.2 ip host R3 192.169.3.3 ip host R4 192.169.4.4 ip host R5 192.169.5.5 ip host R6 192.169.6.6 ! ! ! interface Loopback0 ip address 192.169.2.2 255.255.255.0 no ip directed-broadcast ! interface Ethernet0 ip address 192.168.1.2 255.255.255.0 no ip directed-broadcast ! interface Ethernet1 description This interface does not connect with another IP device ip address 192.168.2.2 255.255.255.0 no ip directed-broadcast ! interface Serial0 description This interface connects to R3's S0 (201) ip address 192.168.100.2 255.255.255.0 no ip directed-broadcast encapsulation frame-relay no ip mroute-cache frame-relay map ip 192.168.100.3 201 broadcast frame-relay map ip 192.168.100.4 201 broadcast frame-relay lmi-type ansi ! router rip network 192.168.1.0 network 192.168.2.0 network 192.169.2.0 ! ip classless ! banner motd ^CCC This is Router 2 ^C ! line con 0 exec-timeout 0 0 password falcons logging synchronous transport input none line vty 0 4 password falcons login ! end R2#