RIP configuration perfection strategy

Source: Internet
Author: User

You may be familiar with the RIP Protocol. This Protocol is widely used. This Protocol is applied in many networks. If you do not have RIP configuration, you don't have to worry about it. Next we will explain the configuration process in detail, so that everyone can learn it.

IP Address Configuration

You can use the interface command to enter the local configuration mode, and then use ip address to set the ip address of the interface, as shown below.

 
 
  1. testBJ#conf t  
  2. Enter configuration commands, one per line. End with CNTL/Z.  
  3. testBJ(config)#interface e0/1  
  4. testBJ(config-if)#ip address 172.16.1.2 255.255.255.0  
  5. testBJ(config-if)# 

To facilitate configuration and memory, you can also add descriptions for each port as follows. Use the description command in local port configuration mode.

 
 
  1. testBJ(config-if)#description connect to testSH  
  2. testBJ(config-if)#end  
  3. testBJ# 

Some networks are NBMANon-Broadcast MultiAccess and non-Broadcast multi-channel access), that is, Broadcast is not allowed to transmit data on the network. for such a network, RIP cannot rely on the broadcast route table. there are many solutions, the simplest is to specify the neighbor), that is, specify to send the route table to a specific router.

RIP Configuration

RIP configuration is the easiest. You only need two steps to configure it. First, specify the RIP Protocol and then declare the connected network number, as shown below.

 
 
  1. testBJ(config)#router rip  
  2. testBJ(config-router)#network 172.16.0.0  
  3. testBJ(config-router)#end  
  4. testBJ# 

The router rip command is used to specify the RIP Protocol. The network command declares the network number. Because RIP is a classless routing protocol, you do not need to declare the subnet numbers. repeat the preceding operations on each vro to create a network using the RIP route.

Test the RIP configuration correctness.

After RIP is configured, check whether the data can be correctly routed. In addition to using the connectivity test tool mentioned above, there are also the following commands:

Sh ip route is used to detect the route table;

Sh ip protocols is used to check the routing protocol status;

Debug ip rip is used to debug RIP Protocol information.

Use the sh ip route command to display the route tables of each vro.

 
 
  1. testBJ#sh ip route  
  2. Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP  
  3. D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area  
  4. N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2  
  5. E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP  
  6. i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2,  
  7. * - candidate default, U - per-user static route, o - ODR  
  8. Gateway of last resort is not set  
  9. 172.16.0.0/24 is subnetted, 4 subnets  
  10. R 172.16.4.0 [120/1] via 172.16.2.2, 00:00:12, Serial1/0  
  11. C 172.16.1.0 is directly connected, Ethernet0/1  
  12. C 172.16.2.0 is directly connected, Serial1/0  
  13. R 172.16.3.0 [120/1] via 172.16.1.3, 00:00:09, Ethernet0/1  
  14. [120/1] via 172.16.2.2, 00:00:22, Serial1/0 

The preceding figure shows the route information of the Beijing router. the English letter C starts with a directly connected network, with 172.16.1.0 and 172.16.2.0 connected to e0/1 and s1/0 respectively. the English letter R starts with the Routes learned by the RIP Protocol. There are 172.16.3.0 and 172.16.4.0, and there are two paths to 172.16.3.0 for selection, respectively through testSH and testTJ routers. by comparing the network topology, we can see that the actual situation is exactly the same as the design. the content in the brackets is the Management Distance and measurement value of the route item. The default Management Distance of the RIP configuration is 120, and the measurement value to reach the 3 and 4 subnets is 1, that is, it can be reached through one vro. run the same command on the other two routers. The result is as follows.

 
 
  1. testSH#sh ip route  
  2. Gateway of last resort is not set  
  3. 172.16.0.0/24 is subnetted, 4 subnets  
  4. R 172.16.4.0 [120/1] via 172.16.3.2, 00:00:13, Ethernet0/0  
  5. C 172.16.1.0 is directly connected, Ethernet0/1  
  6. R 172.16.2.0 [120/1] via 172.16.1.2, 00:00:11, Ethernet0/1  
  7. [120/1] via 172.16.3.2, 00:00:13, Ethernet0/0  
  8. C 172.16.3.0 is directly connected, Ethernet0/0  
  9. testTJ#sh ip route  
  10. Gateway of last resort is not set  
  11. 172.16.0.0/24 is subnetted, 4 subnets  
  12. C 172.16.4.0 is directly connected, Ethernet0/0  
  13. R 172.16.1.0 [120/1] via 172.16.3.3, 00:00:07, Ethernet0/1  
  14. [120/1] via 172.16.2.3, 00:00:19, Serial1/0  
  15. C 172.16.2.0 is directly connected, Serial1/0  
  16. C 172.16.3.0 is directly connected, Ethernet0/1 

When analyzing the above command output, make sure to refer to the topology at any time and leave the network topology, the above information does not make any sense. the flexibility of dynamic routing is reflected in the failure of a link, and the routing algorithm automatically switches to the loose link. for example, we disconnect the serial cable between testBJ and testTJ. After a while, check the route table, as shown below.

 
 
  1. testBJ#sh ip route  
  2. Gateway of last resort is not set  
  3. 172.16.0.0/24 is subnetted, 3 subnets  
  4. R 172.16.4.0 [120/2] via 172.16.1.3, 00:00:22, Ethernet0/1  
  5. C 172.16.1.0 is directly connected, Ethernet0/1  
  6. R 172.16.3.0 [120/1] via 172.16.1.3, 00:00:22, Ethernet0/1 

We found that subnet 2 of the serial link is disconnected, and all data packets destined for network 172.16.4.0 will go through the testSH router.

THE sh ip protocols command displays the status of the current routing protocol, as shown below.

 
 
  1. testBJ#sh ip protocols  
  2. Routing Protocol is "rip"  
  3. Sending updates every 30 seconds, next due in 19 seconds  
  4. Invalid after 180 seconds, hold down 180, flushed after 240  
  5. Outgoing update filter list for all interfaces is not set  
  6. Incoming update filter list for all interfaces is not set  
  7. Redistributing: connected, rip  
  8. Default version control: send version 1, receive any version  
  9. Interface Send Recv Key-chain  
  10. Ethernet0/1 1 1 2  
  11. Serial1/0 1 1 2  
  12. Routing for Networks:  
  13. 172.16.0.0  
  14. Routing Information Sources:  
  15. Gateway Distance Last Update  
  16. 172.16.2.2 120 00:00:05  
  17. 172.16.1.3 120 00:00:27  
  18. Distance: (default is 120) 

From the command output, we can see the RIP configuration. We can also find that the routers that exchange information with the current vro are testTJ172.16.2.2) and testSH172.16.1.3, the route information received last time is 5 seconds and 27 seconds ago, respectively. to learn more about route information exchange between routers, run the debug ip rip command. as shown in the following figure, after you enter the command, information about receiving or sending RIP broadcasts appears on the console.

 
 
  1. testBJ#debug ip rip  
  2. RIP protocol debugging is on  
  3. testBJ#  
  4. RIP: received v1 update from 172.16.2.2 on Serial1/0  
  5. 172.16.4.0 in 1 hops  
  6. 172.16.3.0 in 1 hops  
  7. RIP: received v1 update from 172.16.1.3 on Ethernet0/1  
  8. 172.16.4.0 in 2 hops  
  9. 172.16.3.0 in 1 hops  
  10. RIP: sending v1 update to 255.255.255.255 via Ethernet0/1 (172.16.1.2)  
  11. subnet 172.16.4.0, metric 2  
  12. subnet 172.16.2.0, metric  
  13. RIP: sending v1 update to 255.255.255.255 via Serial1/0 (172.16.2.3)  
  14. subnet 172.16.1.0, metric 1  
  15. RIP: received v1 update from 172.16.1.3 on Ethernet0/1  
  16. 172.16.4.0 in 2 hops  
  17. 172.16.3.0 in 1 hops  
  18. RIP: received v1 update from 172.16.2.2 on Serial1/0  
  19. 172.16.4.0 in 1 hops  
  20. 172.16.3.0 in 1 hops  
  21. testBJ#no debug all  
  22. All possible debugging has been turned off  
  23. testBJ# 

You can obtain the details of the RIP broadcast from the above RIP configuration information. the router first receives the information about subnet 3 and subnet 4 from testTJ, and then receives the information about subnet 3 and subnet 4 from testSH. here, the testTJ hop is taken to subnet 4 and the testSH hop is taken. Therefore, the routing table shows that the distance from testTJ to subnet 4 is a hop, so, there are two parallel routes in the route table. after a period of time, the current update time of the router reaches 30 seconds. Therefore, it broadcasts its route table information on two links. note: When a broadcast route is updated, RIP uses a horizontal split mechanism. The information learned from a port is not broadcast on this port, therefore, the current vrotesttestbj only sends route information for the subnet 172.16.1.0. use the no debug all command to end the display of debugging information. note that the debug command consumes vro resources, so do not use it on a busy communication router. Otherwise, the router will stop responding like a dead machine.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.