HCIE Interview Materials-RIP

RIP

Routing Information Protocol (Routing Information Protocol)
selects routes based on vector distance

Advantages
Simple configuration
Easy maintenance
Suitable for small networks

Disadvantages
Does not support VLSM and CIDR
No authentication function
The maximum number of hops is 15
Use UDP port number 520 for data sending and receiving

Working principle
Broadcast (255.255.255.255) sends UDP packets with port number 520

After running RIP, the router will send a Request message to request the RIP route of the neighbor router. After receiving the Request packet, the neighbor router running RIP will generate a Response packet according to its own routing table to reply. After receiving the Response packet, the router will add the corresponding route to its routing table.
After the RIP network is stable, each router will periodically advertise the routing information in its entire routing table to neighboring routers. The default period is 30 seconds. Neighboring routers update their own routing tables based on the received routing information.
Or the routing information changes, without waiting for 30s, directly send a trigger update message to the neighbor

Metric
Use the hop count as the metric value to measure the distance to the destination network
. By default, the hop count of the directly connected network is 0. When the router sends a routing update, it will add 1 to the metric value. If it exceeds 15 hops, it will be unreachable.

Receive update message
1. For existing routing entries in the routing table, when the next hop of the routing entry is the neighbor router, no matter the metric value will increase or decrease, the routing entry will be updated (when the metric value same, reset the aging timer to zero, when the aging timer reaches 180s, the metric value of this routing item becomes unreachable)
2. When the next hop of this routing item is not the neighbor router, if the metric value will decrease , then update the routing item
3. For the routing item that does not exist in the routing table, if the metric value is less than 16, then add the routing item in the routing table

After the metric value of a route item becomes unreachable, the route will be advertised four times (120 seconds) in the Response packet, and then cleared from the routing table.

Message field
Command: 1 is the request message, 2 is the response message
Version: 1 is RIPv1, 2 is RIPv2
Address Family Identifier (AFI): address identification information, for the IP protocol, the value is 2
Metric: identifies the routing entry Metric value, value range 1-16

Loop/split horizon (rip split-horizon in interface view is enabled by default)
R1 learns the R3 route from R2. When R2 loses the link to R3, R1 will continue to send R3's data to R2, and R2 considers R1 There is a path to R3, and then the routing table metric value +1 is updated, and R1 will also update the routing table until the metric value reaches 16. Split horizon
to solve the loop, and the route learned from R1 will not be advertised to R1

Poison reversal (rip poison-reverse in interface view)
After RIP learns a route from an interface, it will set the hop count of the route to 16 when sending it back to the neighbor router

RIPv2

The difference between RIPv2 and RIPv1
v1 is a classful routing protocol, v2 is a classless routing protocol (supports CIDR, VLSM)
v1 is sent in the form of broadcast, v2 uses broadcast and multicast (224.0.0.9), the default multicast
v1 does not support authentication , v2 supports plaintext authentication and MD5 authentication

RIPng


UDP port 521 is used for IPv6 services The next hop address in the
multicast address FF02::9/8 routing entry is 0::0 or link-local address

Guess you like

Origin blog.csdn.net/PanJWei/article/details/114807651