Dynamic routing (1) --- RIP protocol learning

Dynamic routing related

Foreword:

Before we use dynamic routing, when communicating across network segments through routing, we can only configure static routing, but static routing is not very convenient and quick to use, and it is not practical in real complex networks, so learn dynamics here. routing.

1. Dynamic routing:

Dynamic routing means that the router can automatically establish its own routing table, and can adjust it in a timely manner according to the changes in the actual situation (according to the specific protocol)

1.1 Features of dynamic reason:

1. Reduced management tasks, automatic learning only needs to announce its own routing table information and send it to other routing tables
2. Occupies network resources

1.2 Overview:

The language used to exchange information between routers (various protocols are not connected and cannot understand each other, each protocol is a language)

1.2.1 Measurement value:

Hops, bandwidth, load, delay, reliability, cost,
routers use metric values ​​to determine the optimal routing path

1.2.2 Convergence:

The process of bringing all routing tables to a consistent state
Comparison
of static routing and dynamic routing Static routing and dynamic routing in the network complement each other

1.2.3 Classification according to routing execution algorithm

Two categories:
distance vector routing protocol : (mainly based on the number of hops) legend routing, tell one by one.
Select the route based on the number of routers passing from the source network to the target network.
RIP IGRP (Cisco Proprietary Protocol)
link state routing protocol : (commonly used primary protocol) signaling routing, one superimposed on a
comprehensive consideration from the source network to the target network Choose routing
OSPF and IS-IS for each path

2.RIP:

2.1 Basic concept: Vector routing protocol

Features

It takes too long to update regularly for 30S. The port is UDP port 520.
Send its own routing table to neighbors.
Broadcast update.
Full routing table update.

2.2 RIP metric value is the number of hops

The maximum number of hops is 15 hops. When it is 16 hops, no hops are allowed.
Update time
Send routing update messages every 30s, UDP 520 port
RIP routing update messages
send the entire routing table

2.3 routing loop

It is impossible to turn on at the same time in the routing operation, and it is basically updated every 30S. Here, if R3 changes its state first in the update CD, such as poisoning, then Hop changes to 16, which is exactly the R2 update cycle. When it arrives, send its own routing table to R3, then send the original 40, directly cover the 40 network segment that has the problem, and change the next hop address to 30.0.0.1.
Insert picture description here
At this time, if there is a data packet sent to the 40 network segment, after R2, check the routing table, find the next hop 30.0.0.2 and send it to R3. After R3 gets it, check the routing table to get the next hop of the 40 network segment to 30.0 .0.1 is sent, that is, a routing loop is formed.

Insert picture description here

2.3 Split horizon

It can prevent the occurrence of routing loops.
Functions:
1. The routing information learned from an interface is no longer sent from this interface
. 2. At the same time, it can also reduce the routing update information and the link bandwidth resources occupied.
Insert picture description here
In the figure, after R1 learns the 30 and 40 network segments in the R2 table from the 20.0.0.1 interface, when R1 sends the routing table to R2, it will no longer send 30 and 40 routing information. This avoids that after the R2 address is updated, R1 sends the address that was not updated before R2 to R2 to overwrite the real address information at the moment. It can also reduce the amount of information sent, thereby reducing resource occupation.

2.4 The difference between RIP v1 and RIP v2

the difference RIP v1 RIP v2
1 Classful routing protocol Classless routing protocol
2 Broadcast update (255.255.255.0) Multicast update (244.0.0.9)
3 Does not support VLSM (subnetting) Support VLSM
4 Automatic route summarization, cannot be turned off Automatic summary can be turned off, and can be manually summarized
5 Discontinuous subnets are not supported Support for discontinuous subnets

For a RIP routing network that has been configured, we can see through the packet capture software that we can see that the multicast update (224.0.0.9) is indeed used in the V2 version.
Insert picture description here

3. RIP v2 simulation experiment

Use RIP v2 protocol to achieve network interoperability between PC1 and PC2
Insert picture description here

1. First, enter each route first and configure the gateway address of each port.
Insert picture description here
2. Enter each router to set RIP related settings.
Announce adjacent network segments here

Insert picture description here

3. After all routers are configured with RIP, configure their own IP address on each PC and perform PING instruction.
Just finished the configuration, PING directly finds the timeout, indicating that it is learning. We use tracert to track and find that we are actually connected. PING it again to PING.
Insert picture description here

Guess you like

Origin blog.csdn.net/weixin_44324367/article/details/109466771