CCNP1: RIP – Routing Information Protocol (interference routing, V1, V2 compatibility issues, V1 continuous subnet issues)

Article directory

  • CCNP1: RIP – Routing Information Protocol (interference routing, V1, V2 compatibility issues, V1 continuous subnet issues)
    • 1. Explanation of RIP protocol:
      • 1. The difference between V1 and V2:
      • 3. The working principle of RIP:
      • 4. The breaking mechanism of RIP:
      • 5. What happens if RIP does not have a breaking mechanism?
    • Second, the configuration of RIP:
      • 1. Basic configuration:
      • 2. Extended configuration:
        • (6) Interference routing:
        • (7) Compatibility issues of V1 and V2:
        • (8) The continuous subnet problem of V1:

CCNP1: RIP – Routing Information Protocol (interference routing, V1, V2 compatibility issues, V1 continuous subnet issues)

RIP: Routing Information Protocol, distance vector protocol, using hop count as a measure, working based on UDP520 port, management distance 120. Use cycle (30s) and trigger update
Trigger update: Used for timely re-convergence when the structure changes suddenly, telling all routers that a network segment has changed.
Periodic update: It is used to keep alive, ensure data receipt, and solve the situation that no confirmation package is received, but it occupies bandwidth.

1. Explanation of RIP protocol:

Three versions of RIP exist:
Work based on IPv4: V1, V2
Working on IPv6: NG version

The difference between 1, V1 and V2:

3. The working principle of RIP:


There are a total of five network segments in the figure, 1, 3, and 5 are loopbacks, and 2, 4 are direct routes between them. Both R1 and R2 have 2 network segments, so R1 needs to tell R2 its 1.1.1.0/24 network segment, the data packet is as shown in the figure, the information in the packet contains the 1.1.1.0/24 network segment, and the data packet contains the transmission Protocol, source and destination port, source IP, source MAC, multicast update address, etc.

After R2 receives the packet from R1, it knows that the packet comes from its S0/0 port. The address sent by R1 is 12.1.1.1/24, and the information contains the metric value of 1.1.1.0/24 1 jump. will generate a
R 1.1.1.0/24 [120/1] S0/0 12.1.1.1 routing table

When this packet is forwarded by R2 to R3, the source IP is changed to 23.1.1.1/24, and the hop number is also changed to the second hop. Finally, R3 learns the route of 1.1.1.0/24. Similarly, all routes can dump all routes in this way. When there are 5 routes on R1, R2, and R3, that is, they have obtained the routes of the entire topology, which means that they have converged.

4. RIP breaking mechanism:

(1) Toxic reverse split horizon:
Trigger update: When a router disconnects a certain network segment, the router will send an update packet, which contains the disconnected network segment and 16 hops, to tell other routers The network segment is unreachable. In response, the received router needs to send this update packet to the router that sent it to confirm that it has received it. This is the core mechanism of the breaking mechanism.
(2) Jump limit – 15 jumps
(3) Horizontal segmentation – enter from this mouth, do not exit from this mouth. Doesn’t quite solve the problem, as this only works against line, star topologies.
The core role of split horizon:
① Eliminate duplicate updates
② Eliminate the amount of repeated updates in the MA network (MA: multi-access network, in one network segment, the number of connectable nodes is not limited)
(4) Inhibition timer – usually does not work, but when the number of hops increases without symptoms, it means that the network has been out of the loop. At this time, it will be suppressed for 180s and then converge to find a new network segment.

5. What happens if RIP does not have a breaking mechanism?

First of all, we need to know that the periodic update time of RIP is 30S, and each router is not updated at the same time, they stagger the update time.

According to the above figure: if R3 suddenly disconnects the 3.3.3.0/24 network segment, when its own 30s countdown is 0, it sends this message to R2, and the distance of R2 has just been updated for 13s. Then after 7 seconds, R1 sends a packet to tell R2 that it can go to the 3.3.3.0/24 network segment, and the measurement value is 3 hops. At this time, there are 10 seconds left before the update time of R2.

At this time, R2 will think that the next hop to the 3.3.3.0/24 network segment is 12.1.1.1, but it does not know that the next hop of R1 to the 3.3.3.0/24 network segment is also itself. This leads to an out-of-loop, and this is not over. After R2 is updated, it will show that it has a route to 3.3.3.0/24 and tell R3, and finally this graph is trapped in an out-of-loop.

The reason for being out of the ring is that the information I received was the one I just deleted, or even the one I just shared with you.

2. RIP configuration:

1. Basic configuration:

(1) RIPv1:

R1(config)#router rip
R1(config-router)#version 1
R1(config-router)#network 1.0.0.0
R1(config-router)#network 12.0.0.0
</code>
 
 
 
 

1# Start the RIP protocol
2# Select the RIP version as 1. If no version election is performed, the default version is upgraded to 1 (note that it is not a normal version)
The meaning of 3# declaration:
1. Activate the interface – make the interface capable of receiving and sending routing information
2. Routing or topology – not declaring an interface will cause the information of this interface to be unable to be transmitted to other routers

RIP can only define the scope of the main class when declaring
(2) RIPv2:

r1(config)#router rip
r1(config-router)#version 2
r1(config-router)#no auto-summary
r1(config-router)#network 172.16.0.0
r1(config-router)#network 192.168.1.0
</code>
 
 

#3 Turn off automatic summarization – when it is turned off, it will carry the exact mask, if it is not turned off, it will carry the main class mask

2. Extended configuration:

(1) RIPV2 authentication-Running between the neighbors of the RIP protocol to verify the identity. Authentication≠Encryption
Customize the keychain first, and then call it on the interface connected to the neighbor

R1(config)#key chain xxx The name of the key store is xxx, neighbors can be different
R1(config-keychain)#key 1 Key 1 is the first key, neighbors must be the same
R1(config-keychain-key)#key-string cisco123 The key is cisco123, neighbors must be the same
R1(config)#interface f0/0 Enter and call on the interface connected to the neighbor
R1(config-if)#ip rip authentication key-chain xxx Both sides of plaintext authentication need to be consistent
R1(config-if)#ip rip authentication mode md5 Both sides of ciphertext authentication need to be consistent
</code>
 
 

(2) Manual summary of RIPV2–Configure on the interface from which all updates are issued on the update source router

R1(config)#interface f0/0
R1(config-if)#ip summary-address rip 2.2.2.0 255.255.254.0
</code>
 
 

(3) Passive interface-only accepts and does not send routing protocol information, can only be used to connect to the interface of the user, not to the interface of the neighbor.

R1(config)#router rip
R1(config-router)#passive-interface lo0
</code>
 
 

(4) Default route–After configuring RIP default on the border router, the internal router will automatically generate a default route pointing to the border router, and the border router will reach the default route of the ISP, and declare the manual static route configuration

R1(config)#router rip
R1(config-router)#default-information originate
</code>
 
 

(5) Speed up convergence
RIP timer 30s update, 180s failure, 180s suppression, 240s refresh (not cisco300s refresh)

Features\Version V1 V2
Category Category No category (with mask)
Support Support Continuity subnet supports VLSM, only supports CIDR, does not support supernet
update method broadcast update
255.255.255.255
multicast update
224.0.0.9
Does authentication support No Yes
Timer Notes
180s failure If you don’t receive an update once and you can’t judge the route, it’s gone. It may be because of the network card, so you gave 6 chances. Once the 6 opportunities are used up, it is determined that this route is invalid. Immediately afterwards, another poisonous route will be sent to other neighbors to inform other neighbors that the path is no longer reachable.
180s suppression Normally does not work, under normal circumstances assume R1 reaches R2, jump The number is 1 hop. However, the number of hops suddenly increases without warning, indicating that the network has gone out of the loop. At this time, after suppressing for 180s, it converges again to find a new network segment.
240s refresh That is, it will delete the routing entries that do not exist

Appropriately modifying the timer can speed up the convergence speed of the device. It is recommended to maintain the original multiple relationship when modifying, and it is not easy to modify too small, otherwise bandwidth resources will be occupied, and all devices on the entire network need to be modified.

R1(config)#router rip
R1(config-router)#timers basic 15 90 90 120
</code>
 
 

The above is the content copied and pasted from my CCNA classification, if you want to view it, please click here: CCNA3: Dynamic Routing Protocol, RIP – Routing Information Protocol and the next 3 extended configurations , is the extended configuration that CCNP needs to supplement compared to CCNA:

(6) Interference routing:

Because RIP uses the hop count as a measure, the route selection may be inaccurate during route selection, as shown in the following figure:

The above road has a large number of hops, but the bandwidth is good. The router has chosen the following path, which requires us to intervene in the path selection.

Interference principle: use the offset list strategy to achieve: on the inbound or outbound interface of the control plane traffic, increase the metric value in the traffic, and then affect the route selection. When adding metrics, if multiple devices are set, the metrics will be superimposed.

Defect of the offset list: it can only be increased, not decreased. If you want to modify one of the paths, you need to increase the measurement on the other path

The control plane is the direction of transmitting the routing table (R4 sends its loopback to R1), the direction of the data plane access target (R1pingR4) .

Level Annotation
Control Level For the routing protocol, the router learns the route through the IGP protocol to form a routing table, which is
data level For sending data, the control plane builds a routing table to provide services for sending data at the data plane, that is, without the control plane forming a routing table, the data plane has no meaning.


The configuration is as follows:

R1(config)#access-list 1 permit 3.3.3.0 (first use ACL to capture the corresponding network number traffic: equivalent to 3.3.3.0 0.0.0.0)
R1(config)#router rip (set in rip again)
R1(config-router)#offset-list 1 in 2 serial 1/1

offset: list of offsets
1: ACL number
2: The measurement is increased by 2 on the basis of the original
in: The direction of calling the interface is inbound
serial 1/1: incoming interface

(7) Compatibility issues of V1 and V2:

Here we want to set up an experimental environment, the underlying configuration is shown in the figure below, and then R1 runs RIPv1 version, R2 runs RIPv1 + version, and R3 runs V2 version.

The declaration is as follows:

R1(config)#router rip
R1(config-router)#version 1
R1(config-router)#network 1.0.0.0
R1(config-router)#network 12.0.0.0
R2(config)#router rip
R2(config-router)#network 12.0.0.0
R2(config-router)#network 2.0.0.0
R2(config-router)#network 23.0.0.0
R3(config)#router rip
R3(config-router)#version 2
R3(config-router)#no auto-summary
R3(config-router)#network 23.0.0.0
R3(config-router)#network 3.0.0.0
</code>
 
 

Their routing tables after the announcement are as follows:



We found that only the routing table of R3 is faulty, and the previous routes of R1 and R2 were not received.

Let’s take a look at their protocol operation again:
R1 only sends and receives version 1

V1 + version: release V1, both V1 and V2 accept V2

Receiver relationship\version Standard V1 Upgrade V1
Send V1 V1
Receive V1 V1, V2

No matter what version the device is currently using, the version information that can be sent and received by all interfaces can be modified, so the compatibility problem can be solved:
①V1, V1 + devices can imitate the routing of sending and receiving V2, but they cannot carry the mask.
②V2 can normally issue the same route as V1.

R2(config)#int s0/1
R2(config-if)#ip rip send version 1 2
R2(config-if)#ip rip receive version 1 2
</code>
 
 

(8) The continuous subnet problem of V1:

Continuity subnet: Same parent network, same mask length (Only contiguous subnets can be aggregated).
For example, the following four network segments are a continuous subnet.

Let’s take the following figure as an example. When the two routers are running the V1 version of RIP, R1 will not learn the network segment on 1.1.2.0, and R2 will not learn the network segment on R1.

The underlying configuration is shown in the figure above, and the declaration is as follows:

R1(config)#router rip
R1(config-router)#version 1
R1(config-router)#network 1.0.0.0
R1(config-router)#network 12.0.0.0
R2(config)#router rip
R2(config-router)#version 1
R2(config-router)#network 1.0.0.0
R2(config-router)#network 12.0.0.0
</code>
 
 

We checked their routing tables and found that they did not learn the loopback network segment of the other party.

The reasons are as follows:
From the announcement above, we should also be able to see that the network segment of 1.0.0.0 was announced. When two routers receive the route from the peer, It is found that, as announced by myself, according to the split horizon rule of RIP, the same route is no longer received, which leads to the fact that the network segment is not fully learned.

Solution principle:
In V1 RIP, if the local is going to share the routing of the neighbor with the directly connected network segment of the local and the neighbor If it is a continuous subnet, the local will send the route with the host bit to the neighbor. When the neighbor receives the route with the host bit, it will use the mask of the network segment directly connected to the neighbor to add to these routes.

solution:
According to the solution principle, we can add a second address to the IP between R1 and R2 (or directly cover the original IP), so that it can be connected with R1 and R2 The loopback constructs the continuity subnet, so that the three network segments are all in the same continuity subnet.

The configuration is as follows:

R1(config)#int s0/0
R1(config-if)#ip add 1.1.3.1 255.255.255.0 secondary
R2(config)#int s0/0
R2(config-if)#ip add 1.1.3.2 255.255.255.0 secondary
</code>
 
 

Finally, the routing table is complete: