RIPng routing protocol based on IPv6

Source: Internet
Author: User

1 Preface
The development of routing technology is closely related to the development of the entire internet. With the growth of Internet scale and load, a series of problems have emerged, such as insufficient address space and the sharp increase in the volume of information stored and exchanged by routers. This has allowed IPv6 to develop rapidly and will eventually replace IPv4. At the same time, the existing IPv4-based routing protocol must also be modified to meet the future development requirements of the Internet.
As we all know, there are two routing protocols based on distance vector and link status. The most widely used routing Protocol based on distance vector is the routing Information Protocol RIPRouting Information Protocol ). RIP was generated earlier. After years of application, mature standards and products have been produced. The biggest advantage of RIP is its simplicity, which is easy to operate and maintain on networks with a small scale and simple topology. However, for a large network, because of its problems such as routing loops and infinite count, the routing performance is not as good as that of link-state-based protocols such as OSPF, so it is rarely used.
As a mature routing standard, RIP is widely used in the Internet, especially in some small and medium networks. Based on this situation and the compatibility between RIP and IPv6, IETF has transformed existing technologies and developed the RIP standard under IPv6, namely, RIPngRIP next generation ). In the following sections, we will give a brief introduction to RIPng's message format, working principle, main differences with r12001 and r00002, the shortcomings of the protocol, the direction of improvement, and the development trend.
2 RIPng Message format
RIPng is a UDP-based protocol that uses port 521 to send and receive data packets. RIPng packets can be divided into two types: routing information and request information. They all use the same format and are composed of a fixed header and a route Table Entry RTERoute Table Entry). There can be multiple route Table entries.
The header includes the command field and version number field. Like RIP, command fields are used to differentiate various operations to be implemented by packets. Command 1 indicates part or all of the request's route selection information, and command 2 indicates the response, which contains one or more RTE.
A vro or host can send a request command to request routing information from another vro. The router uses the response command to answer the question. The version field contains the current version number of the Protocol. The receiver checks this field to determine whether the RIPng protocol run by the other party can be correctly interpreted locally.
The rest of the packet is an RTE sequence. Each RTE consists of four parts: the destination IPv6 prefix, route tag, the valid length of the prefix, and the cost to the destination network.
The IPv6 address is 128bit, so it occupies 16 bytes in RTE.
The routing label field is preserved from RIP. Its main purpose is to mark external routes to distinguish between internal routes and external routes for external gateway routing protocols such as EGP or BGP). This field can also be used for other purposes, as long as all routers running RIPng in the network have the same interpretation.
The prefix length field specifies the length of the valid bits in the prefix. The concept of prefix length in IPv6 replaces the subnet mask in IPv4. Because the IPv6 address has a clear meaning, RIPng no longer distinguishes between network routing, subnet routing, or host routing.
The route cost field specifies the cost of the destination network. Since RIPng has a maximum diameter of 15 hops, this field can be any value between 1 and 15, and 16 means the destination is inaccessible. RIPng still uses a fixed measurement method, that is, the meaning of this field can only be the number of hops, vro cannot explain it to others.
RIPng does not limit the packet size. The maximum number of RTE that RIPng packets can carry is determined by the MTU of the physical media. The formula is as follows:
Packet Length = RTE count × 20 + 4
The formula for calculating the RTE number is as follows:
Rte count = INT [MTU-IPv6 Header Length-UDP header length-RIPng header length)/RTE length]
Different from RNG 2, RIPng's next hop field is specified by a separate RTE. RIPng uses a separate RTE to indicate the Next Hop because the IPv6 address is up to bits. If the next hop field and the destination network address are placed in the same RTE, the RTE size will almost double, so RIPng uses the method of separating the destination network address from the next hop to reduce the RTE length. In the next hop RTE, the route tag and prefix length fields must be zero, and the measurement field is 0xFF.
3 RIPng Working Principle
RIPng divides the machines involved in communication into two ways: active and passive. The active router advertises a route to other routers, while the passive router receives and updates the route. The Passive router itself does not advertise the route. Only routers use RIPng in active mode, and the host can only use the passive mode, because the host does not know route information.
The router running RIPng maintains a route table to all possible destination networks. The router periodically recommends a route table of 30 s for the RFC) and sends the route table of the router to the neighbor node, the receiver updates its route table by receiving periodic notifications from neighboring routers. This periodic route information exchange gives each router a local understanding of the network topology. RIPng uses the number of links that reach the target site, that is, the number of hops, to measure the route cost. RFC also sets the RIPng's working range to 15 hops, and the value 16 indicates infinity, this means that the route is inaccessible.
Generally, a router does not send a request message to send a route request. A route request sends a request message only when the router is started or the router is looking for route information.
The router receives a Response Message in three situations: query response, periodic update, and trigger update. The router determines whether to update the local route table based on the Response Message. Because the response message may modify the local route table, the source of the message must be checked strictly to confirm the validity of the message.
As we all know, routing protocols based on distance vector algorithms produce slow convergence and infinite count, which leads to route inconsistency. RIPng uses horizontal segmentation technology, toxicity reversal technology, and trigger update technology to solve these problems. However, the introduction of these technologies also brings about other problems, such as the use of trigger update technology, if you do not properly control the generated packets, it is easy to generate a broadcast storm.
The periodic packet broadcast and update trigger of the router cause a lot of extra load on the network. To reduce the number of route information, RIPng can use Multicast technology to send update packets, at the same time, a small random delay is used to suppress the update packet.
The timer plays an important role in RIPng. RIPng uses the timer to update the route table and send packets. Periodic message broadcasting is implemented by the timer. To prevent the route table from being updated for a long time, each route table item has two timers, the expired route table will be deleted to prevent the router from broadcasting and using the invalid route. RIPng uses the following three Timers:
1) start the timer for periodic broadcast. This timer is set to any random number between 25 s and 35 S. This setting aims to prevent all routers on the network from sending Update packets at the same time and balance the traffic at random intervals to reduce the possibility of conflicts between routers.
2) Expiration timer. As long as the router receives a route entry to a specific destination, it initializes the timer that expires to the destination. The expiration timer is set to 180 s. If a route is not updated before the expiration timer times out, the route is no longer valid, but is still in the routing table, to notify other routers that this route is invalid.
3) garbage collection timer. The router marks invalid routing with an invalid mark of infinity and initializes the garbage collection timer. At this time, the timer is set to 120 s. During this period, these routes will still be periodically broadcast by the routers, so that the adjacent routers can quickly delete the routes from the routing table.
4 Comparison of r00001, r00002, and RIPng
According to the above introduction, we should see that RIPng's goal is not to create a new protocol, but to make necessary modifications to RIP to adapt to the routing requirements under IPv6, the basic working principle of RIPng is the same as that of RIP. The main changes are in the address and Message format. The following lists the main differences between r1_1, r1_2, and RIPng:
1) Address version. R1_1 and r1_2 are based on IPv4, and the address domain is only 32 bits. RIPng is based on IPv6 and all addresses used are bits.
2) subnet mask and prefix length. R00001 is designed for a network without a subnet. Therefore, there is no subnet mask. This determines that r00001 cannot be used to spread a longer subnet address or a non-type address for CIDR. R12002 adds support for subnet routing. Therefore, the subnet mask is used to distinguish between network routing and subnet routing. The IPv6 address prefix has a clear meaning, so RIPng no longer has the concept of subnet mask, instead of the prefix length. Because IPv6 addresses are used, RIPng does not need to distinguish between network routing, subnet routing, and host routing.
3) scope of use of the Protocol. R00001 and r00002 are designed to be applicable not only to TCP/IP protocol clusters, but also to other network protocol clusters, therefore, the route table of a packet contains a network protocol cluster field, but the actual implementation program is rarely used in other non-IP networks. Therefore, RIPng removes support for this function.
4) indicates the next hop. RIPv1 does not have the next hop information. The receiver router uses the source IP address of the packet as the next hop of the destination network route. RIPv2 clearly contains the next hop information, which facilitates the selection of the optimal route and prevents the occurrence of routing loops and slow convergence. Unlike RIPv2, in order to prevent RTE from being too long and improve the transmission efficiency of route information, the next hop field in RIPng exists as a separate RTE.
5) message length. R00001 and r00002 have limits on the length of packets. Each packet must carry up to 25 RTE packets. RIPng does not specify the message length and the number of RTE. The message length is determined by the MTU of the media. RIPng processes the packet length, improving the network's transmission efficiency on Route information.
6) security considerations. The RIPv1 message does not contain authentication information, so it is also insecure. Any host sent to the Group through UDP port 520 will be treated as a router by the adjacent host, which may easily cause router spoofing. R12002 designed verification packets to enhance security. The routers that exchange routes must pass verification to receive route information from each other. However, r00002 is still inadequate in terms of security. IPv6 contains good security policies. Therefore, RIPng does not separately design security verification packets, but uses IPv6 security policies.
7) message transmission method. R12001 uses broadcast to send route information. Not only does the router receive the group, but all hosts in the same LAN also receive the group. This is unnecessary and insecure. Therefore, RIPv2 and RIPng can use both broadcast and multicast to send packets, so that Multicast can be used to send packets in a network that supports multicast, this greatly reduces the number of route information transmitted in the network.

Related Articles]

  • OSPF routing protocol simulation test
  • Detailed introduction to the concept of MPLS Routing Protocol
  • Detailed concept and working principle of OSPF Routing Protocol

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.