Network Protocol - What is the RIP protocol? What is the working principle?

Author: Insist--

Personal homepage: insist--personal homepage

The author will continue to update network knowledge and python basic knowledge, looking forward to your attention

 

Table of contents

1. What is the RIP protocol?

Second, why use RIP?

3. Where is RIP used?

Fourth, the working principle of the RIP protocol

V. Summary


foreword

This article will explain to you what RIP is, why it is used, and how it works

1. What is the RIP protocol?

The RIP protocol (Routing Information Protocol, Routing Information Protocol) is a distance-vector-based interior gateway protocol , that is, to measure routing costs based on the number of hops for routing selection.

Compared with other routing protocols (such as OSPF, ISIS, etc.), the RIP protocol is simpler to implement and has lower requirements for bandwidth, configuration, and management. However, it is limited by the number of routing hops and convergence speed . If the number of hops is greater than 15, it is considered a network. Unreachable, so it cannot be used in large and complex networks.

Second, why use RIP?

Before the emergence of dynamic routing, static routing had several problems that could not be solved:

Problem 1: When the network topology and link status change, it is necessary tomodify the static routing information of the router on a large scale, and the work complexity is high.

Problem 2: When a network failure occurs,the route cannot be reselected, which may cause the route to fail.

In order to solve these problems, a dynamic routing protocol has emerged. The router can automatically learn and adapt to changes in the network without manually changing the configuration.

3. Where is RIP used?

RIP is suitable for small and medium-sized networks because RIP is based on a distance vector algorithm (DV algorithm). Since it can only support hops 0-15, the sixteenth hop will be marked as infinite or unreachable. Therefore, in the entire network, only 16 routers can become rip neighbor routers with each other. Due to the above reasons, RIP can only be applied to small and medium-sized networks.

Fourth, the working principle of the RIP protocol

As shown in the figure below, there are three routers, RTA, RTB, and RTC . Each router first learns its own direct route to form a routing table.

30bb6e92203d4f20b9fa3824e0665549.png

Then we configure the RIP protocol on the router. After the configuration is complete, the router will advertise its own routing table to its directly connected routes every 30s . For example, RTB will send its own routing table to RTC, and RTC will add the 20.0.0.0 network segment that is not in its own table, remember the next hop, and mark the hop number as 1.

daa151a4c276476a83356ea08eb00185.png

After the first 30s update , the routing tables of the three routers are as follows:

4464ccbf88f540f78ea2e0852df6b813.png

When the router's second update cycle comes , the router will send the routing table to the neighbors again . RTA sends the routing table to RTB, but RTB no longer needs to learn.

Reasons for not needing to learn : The routing table of RTB contains all network segments of RTA.

RTB sends its own routing table to RTA, and RTA will add the network segment 40.0.0.0 to its own routing table, add the next hop address as 20.0.0.2 (because it is received through this port), and add The distance is marked as 2. RTC will also update its own routing table. The final routing table is as follows:

3419da7301d74ed59db48786bf11b11e.png

V. Summary

RIP is a routing protocol that appeared earlier. It calculates the best path to the destination network through a simple distance vector algorithm. It is relatively easy to implement and maintain , and can meet the needs of early small networks. The number of hops is limited, and RIP will occupy a large amount of bandwidth every time a route is updated, and it will take a long time to achieve convergence after a link failure. , cannot be used in some modern large complex networks .

Guess you like

Origin blog.csdn.net/m0_73995538/article/details/131095351