Dynamic routing 2--Distance vectors

Source: Internet
Author: User

1) Distance vector Route selection protocol

Most routing protocols are attributed to two classes: the distance vector (distance ventor) and the link state (link states);

First, the distance vector route is advertised in vectors (distance, direction), where distance is defined by metric, and direction is based on a scare-hop router. For example, target A is 5 hops away in the direction of the next hop router.

The distance vector routing protocol is routed according to rumors, and each router learns the route information they observe by learning from neighboring routers, then advertises its observed routing information outward, and so on.

For example: IP routing Information Protocol (RIP), Internet Gateway Routing Protocol (IGRP), Enhanced Gateway Routing Protocol (EIGRP) is the distance vector routing protocol.

The distance vector routing protocol typically uses a routing algorithm in which routers send routing update information to all neighbors on a regular basis by broadcasting the entire routing table.

The main attributes are as follows:

    • Regular updates: Update information is sent to neighbors without a specific time period;
    • Neighbor: A router or some higher-level logical adjacency relationship for a shared data link;
    • Broadcast update: After the router starts, by sending the update information to the broadcast address (255.255.255.255) of the entire network, the neighbor router using the same routing protocol will update according to the received broadcast packet;
    • Full route selection update: Usually the distance vector routing protocol advertises routing information to neighbors by broadcasting the entire routing table;

Figure 1.4.3

1.4.3, if the total convergence time of the network is fragmented into T0+T1+T2, then:

    • After the router is started at t0 time, the router updates the routing table according to the direct connection routing information of the respective interface, and broadcasts its own routing table information to each neighbor router;
    • At the T1 time, each router receives information from the neighbor Router advertisement and updates it, for example, R1 will compare after receiving R2 's routing table, 192.168.2.0 I have a hop count of 0 (direct connection), If the route from R2 gets 192.168.2.0 is 1 (more than one router R2 through R2 to the network 192.168.2.0), R1 chooses not to update the routing information to the network 192.168.2.0/24; for network 192.168.3.0/ 24,R1 check its own routing table found that there is no such routing information, so choose to update the routing information to 192.168.3.0/24, and to the network 192.168.3.0/24 need to go through the router R2 (the next hop to 192.168.2.2), so the number of hops +1;
    • At T2 time, the update period expires, another set of update information is broadcast, each router compares the same as above and adds a routing table-----"Network convergence;

Route Expiration Timer:

1.4.3, after the network convergence, when the router R3 failure, and the network 192.168.4.0/24 no fault, then the router R1 and R2 still retain the information to reach the network 192.168.4.0/24, when there is data need to send to 192.168.4.0/24, R2 will continue to forward the packet to R3, which is R3 unreachable, which is equivalent to opening a black hole on the network.

Therefore, when dealing with the above problem, the router's routing table is set in the routing failure timer, when the R3 no longer send routing information to R2, the timer will time out, the route information obtained from R3 is marked as unreachable.

Horizontal separation:

1.4.3, after the network convergence, when the network 192.168.4.0/24 failure, R3 will 192.168.4.0/24 marked as unreachable and the next update cycle is advertised to R2, but at the same time R2 will be advertised to R3, I have reached the network 192.168.4.0/ 24 of the routing information, hop number is 1 hops, and R3 in the Update routing table when the routing information (to reach the network 192.168.4.0/24 the number of hops to 2 hops, the next hop is R2) stored in the local routing table.

Then when a packet is forwarded from R2 to the network 192.168.4.0/24, the packet is routed to R3, and the R3 queries the routing table and sends the packet to R2, and so on, causing the routing loop.

At this point we can prevent the loop from happening by performing a horizontally delimited approach. Divided into simple horizontal separation and toxicity level separation.

Simple horizontal separation: Sending an update message from an interface cannot contain the network contained in the update message received from the interface, that is, the update message R2 to R3 sent in Figure 1.4.3 does not contain information about 192.168.4.0/24 obtained from R3.

Toxicity level separation: When the update information is sent out of an interface, the information will specify that the network obtained from this information is unreachable, that is, in Figure 1.4.3, R2 advertises the 192.168.4.0/24 routing information to R3, but R3 does not think that the routing information sent by R2 is unreachable.

Count to Infinity:

A horizontal divider cuts off the loop between neighbors, but it cannot cut off loops in the network.

As shown in 1.4.4, R1 will mark 192.168.7.0/24 unreachable when the network 192.168.7.0/24 fails, and R1 will notify R2 and R3 that 192.168.7.0/24 is unreachable, At this time, R4 is being advertised to reach the network 192.168.7.0/24 reachable, the hop count is 3 hops/the next hop for the R3 routing information; this time R2 and R3 will add this reachable information to the routing table after adding 1 and advertise it to R1, R1 can also add this information to the local routing table with a hop count of 6 hops if no other preferred path is optional;

Then in the R4 packet sent to R3---"R1---" r2-"R4, and so on, and so on has been a hop number +1 loop, hop count to infinity.

To solve the above problem, we set the maximum hop count to 15 hops in the router, and the router treats the hop number 16 as unreachable.

Figure 1.4.4

Trigger Update:

In order to improve the convergence time, set in the network if a metric gets better or worse, the router sends the update information immediately, and the unequal timer times out.

Note: Suppress the timer, asynchronous update is not here to say, want to know, please check the information yourself.

Dynamic routing 2--Distance vectors

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.