RIP routing features

1. Introduction to
RIP RIP (Routing Information Protocol) is a relatively simple interior gateway protocol (Interior Gateway Protocol, IGP), which is mainly used in small-scale networks, such as campus networks and areas with simpler structures. Sex network. For more complex environments and large networks, RIP is generally not used.
Because the implementation of RIP is relatively simple, it is much easier to configure and maintain than OSPF and IS-IS, so it is still widely used in actual networking.
2. RIP startup and operation process
The entire process of RIP startup and operation can be described as follows:
1) After the router starts RIP, it will send a request message to the neighboring router, and the neighboring RIP router will receive the request. After the message, in response to the request, a response message containing the information of the local routing table is sent back.
2) After the router receives the response message, it updates the local routing table, and at the same time sends a trigger update message to the neighboring router to broadcast the routing update information. After receiving the trigger update message, the neighboring routers send the trigger update message to their respective neighboring routers. After a series of triggered update broadcasts, each router can obtain and maintain the latest routing information.
3) RIP uses an aging mechanism to age out routes to ensure the real-time and effectiveness of the routes.

3. A feature of updated information (counting to infinity can avoid loop generation):
good news spreads quickly, and bad news spreads slowly, that is, route convergence is slow. The following example (the number of direct hops is 1):
Note: The router broadcasts its routing table in the form of RIP response every 30 seconds. For a piece of routing information, if the device does not receive a routing update message from the opposite end after 180 seconds All routing information from this device is marked as unreachable. After the route enters the unreachable state, these routes will be deleted from the routing table if no update message is received within 120 seconds.Insert picture description here

  1. Under normal circumstances, for the target network R2, the metric value of router R1 is 1, and the metric value of router R3 is 2.
  2. When the link between the target network and router R1 fails and is broken, R1 can feel it, so it updates to 16 in its routing table, which means "infinity" and is unreachable.
    3. R1 is going to tell R3 the bad news in the next 30-second routing update, but R3 first tells R1 all of its information. R1 takes a look (updates) and finds that the number of hops from R3 to R1 is 2, and at this time R1 to R3 just jump, R1 thinks that although I can't go to R2 directly, can I just bypass R3? So change the number of hops from R2 to 3.
    4. At this time, the corresponding port becomes the port connected to the R3 router. After R3 receives the information that the hop number is 3 sent by R1, it unconditionally updates according to the rules, and Change the number of hops to R2 to 4, and then send the information to R1 again. Although R1 and R3 are very confused, they will continue to modify their routing information according to the rules until the hops are updated to 16. Found that everyone can't reach R2.
    Summary: When the link between the target network and the adjacent router fails, it will take a long time for other routers to discover the failure (several minutes), that is, the convergence update time is too long, that is, the convergence is slow.
    Four, RIP's anti-loop mechanism:
    1) Define the maximum number of hops: The maximum number of RIP is 16 hops, if the number is exceeded, the network is regarded as unreachable.
    2) Split Horizon: The route learned by the router from a certain interface will not be sent back to neighboring routes from this interface.
    3) Route Poisoning: When the topology changes, the router will mark the invalid route as possibly down and assign an unreachable metric value.
    4) Poison Reverse: After the router learns a poisoned route from a certain interface, it sets the number of routes to 16 to indicate that the destination is unreachable, and sends it to neighboring routers from all interfaces (this is a special case beyond split horizon) , To ensure that all routers have received the poisoned information.
    5) Hold-Down Timers: Used to prevent regularly updated messages from resetting a broken route within an inappropriate time. After setting a hold-down timer for a certain route, if you receive a better Metric routing cancels the suppression timer.
    6) Trigger update (Hold-Down Timers): When a router detects a network failure, it will send a trigger update message to neighboring routers, so that all routers can quickly learn about changes in the entire network.
    Five, RIP mainly uses three timers
    1) Update timer: It regularly triggers the sending of update messages, and the default update cycle is 30 seconds.
    2) Aging timer: If the RIP device does not receive a routing update message from the neighbor within the aging time, it will consider the route to be unreachable. After the aging timer expires, the metric value of the route entry is set to 16.
    3) Garbage collection timer: If within the garbage collection time (the default is 4 times the update timer, which is 120 seconds), the unreachable route does not receive the update from the same neighbor, the route will be completely removed from the routing table delete.
    4) The relationship between the three timers:
    The release of RIP update information is controlled by the update timer, which is sent every 30 seconds by default.
    Each routing table entry corresponds to two timers: aging timer and garbage collection timer. When a route is learned and added to the routing table, the aging timer is started. If the aging timer expires and the device still does not receive the update message from the neighbor, it sets the metric value of the route to 16 (indicating that the route is unreachable) and starts the garbage collection timer. If the garbage collection timer expires and the device still does not receive the update message, it deletes the entry in the routing table.
    Note:
    If the device does not have the trigger update function, a routing table entry can take up to 300 seconds to be deleted (aging time + garbage collection time).
    If there is a trigger update, then a routing entry can take up to 120 seconds to be deleted (that is, garbage collection time).

Guess you like

Origin blog.csdn.net/ZYJY2020/article/details/111588835