Route basics-RIP Protocol

Source: Internet
Author: User

The RIP Protocol is an earlier protocol. For the use of this protocol, we need to learn as the basic knowledge, because the subsequent protocol evolution is based on this version.

RIP Protocol Introduction

RIP (Routing Information Protocol) is a simple dynamic Routing Protocol based on D-V algorithm, which is mainly used in small network. it exchanges route information through UDP and sends an update packet every 30 seconds to send all route tables to neighbors ). if the router fails to receive the route update packet from the peer end after 180 seconds, all route information from the router is marked as inaccessible. If the update packet is not received within the next 120 seconds, delete the route entry from the route table.

RIP uses the number of hops to measure the distance to the target network. The number of hops from a vro to a directly connected network is 0, and the number of hops from a vro to a network is 1. to limit the convergence time, RIP specifies that the maximum number of metric hops is 15, which is beyond this limit. This is the main factor that limits RIP's inability to be used in large networks.

The RIP Protocol is at the upper layer of the UDP protocol, and the route information received by RIP is encapsulated in the UDP datagram. RIP receives the route modification information from the remote router on port 520, modify the local route table and notify other routers. in this way, global route synchronization is achieved.

Implementation of RIP Protocol

System initialization

1. When RIP is started, the initial route table only contains some direct connection interface routes of the vro.

2. After the RIP Protocol is enabled, a Request packet is broadcast to each interface.

3. After the RIP Protocol of the neighbor router receives the Request packet from an interface, it forms a Response packet based on its route table and broadcasts it to the network corresponding to the interface.

4. RIP receives the Response packet from the neighbor router that contains the neighbor router route table to form its own route table.

Route update

The RIP Protocol broadcasts its route table using the Response packet for a period of 30 seconds.

After receiving the Response packet sent by the neighbor, the RIP Protocol calculates the metric value of the route entry in the packet, compares the metric value of the route entry with that of the local route table, and updates the route table.

The formula for calculating the metric value of a route entry in the message is metric = MINmetric + cost, 16 ). here, metric is the measurement value information carried in the message, and cost is the measurement overhead of the network for receiving packets. The default value is 11 hops.

The RIP configuration takes the Cisco router as an example)

Router (config) # router rip-start the RIP route protocol

AH_CZ_TC_2500 (config-router) # network [network range | all]-specify the CIDR block. RIP only works on the interface of the specified CIDR block. For interfaces not on the specified CIDR block, RIP neither receives or sends a route on it nor forwards its interface route.

AH_CZ_TC_2500 (config-router) # version [1 | 2-specified RIP version

AH_CZ_TC_2500 (config-router) # maximum-paths [1-6]-specify the maximum number of equal-cost routes

AH_CZ_TC_2500 (config-router) # passive-interface e0-allows the eth0 port to only receive RIP groups, but not send rip groups. This command is only configured when necessary.

AH_CZ_TC_2500 (config-router) # int s0-enter a separate interface for configuration

AH_CZ_TC_2500 (config-if) # ip rip [send | receive] version [1 | 2]-You can specify the version of RIP that an interface can send or execute.

AH_CZ_TC_2500 (config-if) # ip split-horizon-you can set whether to enable horizontal segmentation.

Because there are too many commands here, we will not illustrate them one by one. For specific command formats, refer to the Cisco website or other command reference manual.

Note For the RIP Protocol: RIP-1 sends packets in broadcast mode. RIP-2 provides two transmission modes: broadcast mode and multicast mode. By default, Multicast Transmission packets are used. the advantage of multicast packet sending is that hosts that do not run RIP in the same network can avoid receiving RIP broadcast packets. when the interface runs RIP-1, only RIP-1 and RIP-2 broadcast packets are received and sent, and no more than RIP-2 broadcast packets are received; when the interface is running in the RIP-2 multicast mode, only RIP-2 multicast packets are received and sent, and RIP-1 and RIP-2 broadcast packets are not received. by default, an interface can receive both RIP Update packets and RIP Update packets.

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.