Introduction to RIPng
RIP next generation (RIPng) is an extension of RIP-2 for IPv4. Most RIP concepts are applicable in RIPng.
RIPng for IPv6 made the following changes to RIP:
l UDP port number: RIPng uses UDP port 521 for sending and receiving routing information.
l Multicast address: RIPng uses FF02:9 as the link-local multicast address.
l Destination Prefix: 128-bit destination address prefix.
l Next hop: 128-bit IPv6 address.
l Source address: RIPng uses FE80::/10 as the link-local source address
RIPng Working Mechanism
RIPng is a routing protocol based on the distance vector (D-V) algorithm. RIPng uses UDP packets to exchange routing information through port 521.
RIPng uses a hop count to measure the distance to a destination. The hop count is referred to as metric or cost. The hop count from a router to a directly connected network is 0. The hop count between two directly connected routers is 1. When the hop count is greater than or equal to 16, the destination network or host is unreachable.
By default, the routing update is sent every 30 seconds. If the router receives no routing updates from a neighbor after 180 seconds, the routes learned from the neighbor are considered as unreachable. After another 240 seconds, if no routing update is received, the router will remove these routes from the routing table.
RIPng supports Split Horizon and Poison Reverse to prevent routing loops, and route redistribution.
Each RIPng router maintains a routing database, including route entries of all reachable destinations. A route entry contains the following information:
l Destination address: IPv6 address of a host or a network.
l Next hop address: IPv6 address of a neighbor along the path to the destination.
l Egress interface: Outbound interface that forwards IPv6 packets.
l Metric: Cost from the local router to the destination.
l Route time: Time that elapsed since a route entry is last changed. Each time a route entry is modified, the routing time is set to 0.
l Route tag: Identifies the route, used in routing policy to control routing information.
RIPng Packet Format
I. Basic format
A RIPng packet consists of a header and multiple route table entries (RTEs). The maximum number of RTEs in a packet depends on the MTU of the sending interface.
Figure 1 shows the packet format of RIPng.
Figure 1 RIPng basic packet format
l Command: Type of message. 0x01 indicates Request, 0x02 indicates Response.
l Version: Version of RIPng. It can only be 0x01 currently.
l RTE: Route table entry, 20 bytes for each entry.
II. RTE format
There are two types of RTE in RIPng.
l Next hop RTE: Defines the IPv6 address of a next hop
l IPv6 prefix RTE: Describes the destination IPv6 address, route tag, prefix length and metric in the RIPng routing table.
Figure 2 shows the format of the next hop RTE:
IPv6 next hop address is the IPv6 address of the next hop.
Figure 3 shows the format of the IPv6 prefix RTE.
Figure 3 IPv6 prefix RTE format
l IPv6 prefix: Destination IPv6 address prefix.
l Route tag: Route tag.
l Prefix len: Length of the IPv6 address prefix.
l Metric: Cost of a route.
RIPng Packet Processing Procedure
I. Request packet
When a RIPng router first starts or needs to update some entries in its routing table, generally a multicast request packet is sent to ask for needed routes from neighbors.
The receiving RIPng router processes RTEs in the request. If there is only one RTE with the IPv6 prefix and prefix length both being 0, and with a metric value of 16, the RIPng router will respond with the entire routing table information in response messages. If there are multiple RTEs in the request message, the RIPng router will examine each RTE, update its metric, and send the requested routing information to the requesting router in the response packet.
II. Response packet
The response packet containing the local routing table information is generated as:
l A response to a request
l An update periodically
l A trigged update caused by route change
After receiving a response, a router checks the validity of the response before adding the route to its routing table, such as whether the source IPv6 address is the link-local address, whether the port number is correct. The response packet failed the check will be discarded.
Protocols and Standards
l RFC2080: RIPng for IPv6
l RFC2081: RIPng Protocol Applicability Statement
l RFC2453: RIP Version 2



Products


