Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Include Page
_IW Academy
_IW Academy

Hide_comments

Table of

...

contents

Table of Contents
excludeСодержание

...

  • the first RIP version was developed in 1969, as described in RFC 1058;
  • the second RIP version was developed in 1994, as described in RFC 2454. This version is the main one used in IPv4 networks. There is no backward compatibility between the first and the second versions;
  • there is a RIP version developed for IPv6 networks. This version is called RIPng and it is described in RFC 2080;
  • RIP is an internal distance vector routing protocol;
  • the number of hops is used as a metric, i.e. the number of routers on the path to the destination network. The maximum metric value is 16 and it limits the network size where in which RIP can be used;
  • the multicast address 224.0.0.9 is reserved for RIP version 2. The first version of the protocol uses the broadcast address 255.255.255.255;
  • UDP datagrams are used for service information transmission and port 520 is assigned to the protocol;
  • the first RIP version only supports the routes to classful networks, the second to classless networks;
  • the distance value of 120 is used for RIP;
  • RIP supports authentication: routing information will only be accepted from a router having the same key value.

...

Center

Figure 1 - Network scheme used to explain the RIP's operational principles

In this example, only the distribution of the routing information from router R1 will be described, because the routes from the other devices will be distributed in the same way.

The RIP operational algorithm in the described scheme is the following:

  1. RIP starts.
  2. Routing The routing information distributiondistributed.
  3. Adding routes Routes are added to the RIB.Adding routes to FIB
  4. Routes are added to the FIB.
  5. Timers control.
  6. Network changes control.

...

  • Step 3: routers R2 and R3 generate service messages to transmit the routing information to router R4:
    • R2: the router includes in the service message the 192.168.1.0/24 and the 10.10.13.0/30 networks received from router R1, incrementing the metric value. The information about the 10.10.12.0/30 network received from R1 is ignored because R2 is directly connected to this network. Instead, router R2 includes the 10.10.12.0/30 network with the metric 1 in the service message, announcing the network by itself. Also, the service message includes information about the network 10.10.24.0/30.
    • R3: the router includes in the service message the 192.168.1.0/24 and the 10.10.12.0/30 networks received from router R1, incrementing the metric value. The information about the 10.10.13.0/30 network received from R1 is ignored because R3 is directly connected to this network. Instead, router R3 includes the 10.10.13.0/30 network with the metric 1 in the service message, announcing the network by itself. Also, the service message includes information about the network 10.10.34.0/30.
  • Step 4: routers R2 and R3 send the service messages generated in the previous step to router R4 (Figure 2b). Note that R2 and R3 send routing information to R1, but this process will not be described in this example.
Center

Figure 2b - Routing Distribution of the routing information distribution by routers R2 and R3

Adding routes to the RIB

...

  • only one route to the destination network can be added to the RIB;
  • if there are two routes to towards the same network, the route with a lower metric value is added to the RIB;
  • a route with a higher metric value can be added to the RIB if it is received from the same source;
  • if there are two routes to towards the same destination network with the same metric values, then the route received first will be added to the RIB.

...

The export of the routes from the RIB to the FIB is associated with the analysis of the distance value assigned to each route source. Distance value 120 is assigned to RIP, so some of the routes added to the RIB in the previous step will be filtered out. For example, all the routes with the metric 1 will be discarded because these are routes to directly connected networks and have a 0 distance value.

Timers control

The distribution of the routing information distribution described above is cyclically repeated. The repetition period is defined by the "update timer's" value. By default, the update timer is 30 seconds. Thus, all the routing information in the network is distributed every 30 seconds.

...

After a route that was learned via RIP is placed in the RIB, the timeout timer is started, its default value being 180 seconds. If the router does not receive a route an update within 180 seconds, the route will be marked as unavailable, i.e. the metric value of such a route is set to 16. The router cannot use this route for data transmission.

...

After adding a route to the RIB, in addition to the timeout timer, the garbage timer is also started with the default value of 240 seconds. If the router does not receive a route an update within 240 seconds, then such a route will be removed from the routing table.

When routing information updates are received, the timeout timer and the garbage timer are reset to their original values.

...

Let's assume that the link between routers R1and R1 and R3 has failed (Figure 3b):

  • Step 1: the interfaces eth3 of R1 and eth1 of R3 will become down.
  • Step 2: R1 and R3 will set the metric's value to 16 for 16 in the RIB for the route towards network 10.10.13.0/30 in the RIB.
  • Step 3: according to the update timer's expiration, routers R1 and R3 will generate a service message including the known routing information. This message includes the route to the unreachable network with the metric 15.
  • Step 4: routers R2 and R4 receive the service messages from R1 and R3, increment the metric value, and add the route to the RIB. The RIB of the routers R2 and R4 already has a route to the 10.10.13.0/30 network with the metric 2, but since the sources of the new routes with the worst metric are the same routers, then the route in the RIB will be replaced with a route with the metric 16. Thus, all the routers in the network will receive information about the link's unavailability.

...

If router R1 fails, it does not have time to send the routing information update about its status to routers R2 and R3. In addition, R2 and R3 won't be informed that R1 is unavailable because they are directly connected to switches SW1 and SW2 which don't support RIP. In this case, the other routers will assume that R1 is available during the timeout timer and will use the routes associated with R1. Particularly, the routes to networks 10.10.12.0/30, 10.10.13.0/30 and 192.168.1.0/24 will be valid in the routing tables of all the routers.

Center

Figure 3c - Transmission of the service messaged messages in case of router failure

...

The link between router R1 and the external WAN-1 network fails (Figure 4b). Router R1 sets the metric equal to 16 for such a route, but does not generate a service message with updated routing information, since the update timer value is 25 seconds. At the same time, the update timer on router R3 is 3 seconds.

Center

Figure 4b - Route The R1 - WAN-1 connection fails

Section
Column
width30%
R1 router
Destination networkMetricGateway
10.10.13.0/301-
192.168.1.0/2416-



Column
width30%
R3 router
Destination networkMetricGateway
10.10.13.0/301-
192.168.1.0/24210.10.13.1

Three seconds later after the R1 - WAN-1 link has failed, R3's update timer expires, so R3 sends a routing update to R1 (Figure 4c). This update contains information about the 10.10.13.0/30 and 192.168.1.0/24 networks. Router R1 adds a route to towards the 192.168.1.0/24 network to the RIB, because its metric is better than the route that has already been added to the RIB.

A routing loop is formed, each router, passing traffic to the 192.168.1.0/24 network. Thus, the traffic will be transmitted between the routers until the TTL expires. In addition to the routing loop generation, both routes are false as the connection with the network 192.168.1.0/24 is lost.

Center

Figure 4c - Service message distribution Distribution of the service messages by R3

Section
Column
width30%
R1 router
Destination networkMetricGateway
10.10.13.0/301-
192.168.1.0/24310.10.13.2
Column
width30%
R3 router
Destination networkMetricGateway
10.10.13.0/301-
192.168.1.0/24210.10.13.1

...

The false route exchange will continue until the metric value reaches the invalid value of 16. With the default settings, this will happen 36 minutes later after the occurrence of the link failure between R1 and WAN-1.

...

  • split-horizon: the routers do not distribute any routing information updates to those routers which are the sources of the information. In the example above (Figure 4d), router R3 will not include information about the route to the 192.168.1.0/24 network in the message for router R1, since R1 is the source of this information. This will allow to avoid the described situation, but will not work effectively in a scheme with a large number of routers. In the scheme with four routers (Figure 1) when the link with WAN-1 is out of order, routers R2 and R3 will not transmit information about the route to the 192.168.1.0/24 network for R1. However, this route is also in the R4's RIB and it will be included in the periodic distribution of the routing information, which will lead to the appearance of a false route.
  • poison-reverse: this mechanism implies the immediate distribution of the updates about unavailable routes without waiting for the update timer expiration. An unreachable route is sent with a metric of 15, so each router will increment the metric and lead to an unavailable route in the RIB. The mechanism has a disadvantage, since the routing information distribution about an unavailable route requires a certain time, during which a message with old routing information can be sent and include the unavailable route marked as available.
  • garbage-timer: the device does not accept updates for routes marked as unavailable before the garbage-timer expires.

The listed mechanisms make it possible to adapt RIP for the modern networks, since the existence of the false routes existence for 36 minutes or a protocol convergence time of 450 seconds is unacceptable for many services.

...

  • the operational algorithm used by RIP is easy to understand and to configure;
  • RIP is a standard protocol and can be implemented using devices from different manufacturers;
  • false routes may appear in the protocol: this disadvantage was eliminated by adding additional new functions to the protocol, but this makes the protocol's operation and implementation more complicated;
  • there is a network size limitation of 16 hops;
  • it takes a long time for the network to adapt to changes.

...