Analysis of RIP routing protocols V1 and V2

Source: Internet
Author: User


Analysis plan of RIP routing protocols V1 and V2 is as follows: R1 connects to the Internet through a port and uses loopback to simulate the IP address of the host carrying the router R1: lo 0: 10. 1.1.1/24 f0/0: 192.168.0.1 www.2cto.com R2: lo 0: 10. 1.2.1/24 f0/0: 192.168.0.2 configuration: R1 R1 (config) # int lo 0R1 (config-if) # ip add 10.1.1.1 255.255.255.0R1 (config-if) # int f0/0R1 (config-if) # ip add 192.168.0.1 255.255.255.0R1 (config-if) # no shutR1 (config-if) # exit R1 (config) # router ripR1 (config-router) # network 10.0.0.0R1 (config-router) # network 192.168.0.0R2
R2 (config) # int lo 0R2 (config-if) # ip add 10.1.2.1 255.255.255.0R2 (config-if) # int f0/0R2 (config-if) # ip add 192.168.0.2 255.255.255.0R2 (config-if) # no shut www.2cto.com R2 (config-if) # exitR2 (config) # router ripR2 (config-router) # network 10.0.0.0R2 (config-router) # Check the route table of network 192.168.0.0 and find that the router does not learn the peer route. Only when the local directly connected route R1 is taken to access the R2 host, the source address is 10.1.1.0/24, and the destination address is 10.1.2.0/24. Because RIP publishes the 10.0.0.0 network segment, the selected data packet will assume that the destination address is on R1, therefore, it cannot be reached. To solve this problem, see whether the classless routing and classless routing protocols contain a network mask when declaring route information based on the routing protocol, the routing protocols can be divided into classless routing protocols. They do not carry subnet masks when declaring route information. They carry the network mask www.2cto.com when declaring route information. router data packets are sent out. 1. If the destination address is a member of the primary network directly connected to the router, the subnet mask configured on the router interface of the network will be used to determine the subnet of the destination address, for example, when the mask of the router interface 10.1.1.1 is 24 bits, the destination address of the received data packet will be 10.2.2.2, the vro considers the network mask of 10.2.2.2 to be 24 bits. If there is no IP address in the 10.0.0.0 CIDR block on the vro interface, the vro considers the network mask of the network segment to be 8 bits of the standard length.
② If the destination address is not A member of the primary network directly connected to the vro, The vro will only try to match the Class A, B, and C primary network numbers corresponding to the destination address. Therefore, the classless routing protocol automatically summarizes the routes on the VBR to analyze the above problems. Because r12001 is a classless routing protocol, in addition, there are no 10 CIDR blocks on the interfaces connected to R1 and R2. When the routes are published, only the 10.0.0.0/8 Route addresses are published, the entries saved in the route table are changed to 10.0.0.0/8. Therefore, when selecting R1, the IP address range 10.1.2.1/24 is considered to be caused by a local address selection error.
RIPv2 can solve this problem: R1 (config) # router ripR1 (config-router) # version 2R1 (config-router) # network 10.0.0.0R1 (config-router) # network 192.168.0.0 verify 255.r1 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 10.1.1.0/24 is directly connected, Loopback0R 10.0.0.0/8 [120/1] via 192.168.0.2, 00:00:01, FastEthernet0/0
# No auto-summary is configured (no address summary is performed). Therefore, the/8 mask is used.
C 192.168.0.0/24 is directly connected, FastEthernet0/0 R2 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masksC 10.1.2.0/24 is directly connected, loopback0R 10.0.0.0/8 [120/1] via 192.168.0.1, 00:00:01, FastEthernet0/0C 192.168.0.0/24 is directly connected, FastEthernet0/0 configure each vro without summarizing the addresses (no atuo-summary) verify that R1 10.0.0.0/24 is subnetted, 2 subnetsR 10.1.2.0 [120/1] via 192.168.0.2, 00:00:06, FastEthernet0/0 # has its own mask C 10.1.1.0 is directly connected, loopback0C 192.168.0.0/24 is directly connected, FastEthernet0/010.0.0.0/24 is subnetted, 2 subnets R2 running C 10.1.2.0 is directly connected, Loopback0R 10.1.1.0 [120/1] via 192.168.0.1, 00:00:13, fastEthernet0/0C 192.168.0.0/24 is directly connected, FastEthernet0/0
Version r12001 of the RIP Protocol has the classless routing protocol r12002 and the classless routing protocol r12002 carries a subnet mask when sending route updates, and supports discontinuous subnets, however, r12002 summarizes routes on the primary network border by default. Therefore, the subnet is allowed to advertise the boundaries of the primary network. However, you need to disable the routing summary function, such as running r12001, when R1 sends the 10.1.1.0/24 CIDR block to R2, it does not carry a mask. The R2 interface does not have a 10 CIDR block address. Therefore, R2 will automatically summarize it, when the entries saved in the route table change to 10.0.0.0/8 R3 and 10.1.2.0/24 are sent to R2, it will also be summarized as 10.0.0.0/8 by R2. For R2, two routes that reach the 10.0.0.0 network segment are saved in the route table, one pointing to R1 and the other pointing to R2.
R2 R 10.0.0.0/8 [120/1] via 192.168.2.2, 00:00:20, FastEthernet1/0 [120/1] via 192.168.1.1, 00:00:25, FastEthernet0/0C 192.168.1.0/24 is directly connected, fastEthernet0/0C 192.168.2.0/24 is directly connected, FastEthernet1/0 then R1 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.1.0 is directly connected, Loopback0C 192.168.1.0/24 is directly connected, fastEthernet0/0R 192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:04, FastEthernet0/0R3 10.0.0.0/24 is subnetted, 1 subnetsC 10.1.2.0 is directly connected, Loopback0R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:13, FastEthernet0/0C 192.168.2.0/24 is directly connected, FastEthernet0/0
If the vro is configured as r12002, The vro will carry a subnet mask when it sends a route update, and the vro configuration will not be automatically summarized, therefore, the R2 route table stores the IP address ranges 10.1.1.0/24 and 10.1.2.0/24.

R2 10.0.0.0/24 is subnetted, 2 subnetsR 10.1.2.0 [120/1] via 192.168.2.2, 00:00:09, FastEthernet1/0R 10.1.1.0 [120/1] via 192.168.1.1, 00:00:15, FastEthernet0/0C 192.168.1.0/24 is directly connected, fastEthernet0/0C 192.168.2.0/24 is directly connected, FastEthernet1/0 then R1 10.0.0.0/24 is subnetted, 2 subnetsR 10.1.2.0 [120/2] via 192.168.1.2, 00:00:20, FastEthernet0/0C 10.1.1.0 is directly connected, loopback0C 192.168.1.0/24 is directly connected, FastEthernet0/0R 192.168.2.0/24 [120/1] via 192.168.1.2, 00:00:20, FastEthernet0/0R2 10.0.0.0/24 is subnetted, 2 subnetsC 10.1.2.0 is directly connected, loopback0R 10.1.1.0 [120/2] via 192.168.2.1, 00:00:04, FastEthernet0/0R 192.168.1.0/24 [120/1] via 192.168.2.1, 00:00:04, FastEthernet0/0C 192.168.2.0/24 is directly connected, FastEthernet0/0
 

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.