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.

...

Center
Section
Column
width30%
R2 router
Destination networkMetricGateway
10.10.12.0/301-
10.10.24.0/301-
10.10.13.0/30210.10.12.1
192.168.1.0/24210.10.12.1
Column
width30%
R3 router
Destination networkMetricGateway
10.10.13.0/301-
10.10.34.0/301-
10.10.12.0/30210.10.13.1
192.168.1.0/24210.10.13.1
Column
width30%
R4 router
Destination networkMetricGateway
10.10.24.0/301-
10.10.34.0/301-
10.10.12.0/30210.10.24.1
10.10.13.0/30210.10.34.1
192.168.1.0/24310.10.24.1

Adding routes to the FIB

Routes The export of the routes from the RIB to the FIB is go along associated with the analysis of the distance values value assigned to the each route source. Distance value 120 is assigned to RIP, so some of the routes added to the RIB at 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 equal to defined by the "update timer's" value. By default, the update timer is 30 seconds. Thus, all the routing information on in the network is distributed every 30 seconds.

Note , that the routers do not establish neighbor neighboring relations and do not synchronize the routing information exchange time, therefore, the time for sending service messages by routers is distributed in the 30 seconds interval , it helps to avoid for every router, avoiding this way the service traffic bursts in the network.

After the a route obtained that was learned via RIP is placed in the RIB, the timeout timer is started, by its default its value is 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.

The RIP service data exchange is not guaranteed, so the timeout timer value must be greater than the update timer. Otherwise, there may be false operation and determining routes in case of delays or packet loss a route can be falsely marked as unavailable.

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.

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

...

RIP is a dynamic routing protocol and must adapt to the changes in the network. There are three main scenarios of that describe the network changes:

  • a new link has been added;
  • a link is out of order;
  • a router is out of order.

...

Let's add a new link between router R1 and WAN-2 to the example scheme (Figure 3a). In this case, the WAN-2 network will be external for RIP, it means that so the route to this network will be distributed similarly to the route to towards the WAN-1 network: router R1 will announce advertise this network with the metric 1, R2 and R3 will increment the metric's value and transmit the route to R4.  АIn In case of new routers included to into the RIP domain, the algorithm process will be similar.

Center

Figure 3a - The example Transmission of the service messages sending when a new link has been added

...

A link is out of order

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

  • Step 1: the interfaces eth3 of R1 router and eth1 of R3 router will go to become down state.
  • Step 2: R1 and R3 routers will set the metric value 16 for 's value to 16 in the RIB for the route to towards network 10.10.13.0/30 in RIB.
  • Step 3: in accordance with 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 value 15.
  • Step 4: routers R2 and R4 receive the service messages from R1 and R3, increment the metric value, and add the route in to the RIB. The RIB of the routers R2 and R4 RIB 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 on in the network will receive information about the link's unavailability.
Center

Figure 3b - The example Transmission of the service messages distribution in case of link failsfailure

Time The time during which the updated information is distributed depends on the  the size of the network size and on the update timer's value. As the maximum network size is 16 hops , and the update timer by default is 30 seconds, then in the worst scenario, the distribution information time about the link's unavailability will be transmitted in 15 * 30 = 450 seconds.

...

A router is out of order

Let's add two switches SW1 and SW2 to the scheme in (Figure 3c) and assume the failure of that router R1 has failed.

If router R1 fails, it does not have time to send a the routing information update about its unavailable 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 without which don't support RIP support. In this case, the network 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 table tables of all the routers.

Center

Figure 3c - The example Transmission of the service messages distribution in case of router failsfailure

False routes

...

Let's simplify the scheme, leaving two routers R1 and R3 (Figure 4a). We will assume that the routers have exchanged routing information and the device's routing tables are up to date.

...

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

3 Three seconds later after the R1 - WAN-1 link failshas failed, the 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, refers to another router.  ThusThus, the traffic will be transmitted by between the routers to each other until the TTL expires. In addition to the routing loop generation, both routes are false as a the connection to with the network 192.168.1.0/24 is lost.

Center

Figure 4c - Service message distribution with routing information by router 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 fails route usage false routes will continue until the timeout timer expires on R3. After that, after that R3 will set the metric value for this route to 16. In the next routing information distribution, router R1 will send route routing information to router R3 with information about the 10.10.13.0/30 and 192.168.1.0/24 networks (Figure 4d). Since the metric for the route to 192.168.1.0/24 is 3, and less than 16, R3 will add a false route to the RIB, incrementing the metric value.

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.

Center

Figure 4d - Service message distribution with routing information by router R1

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/24410.10.13.1

To avoid the appearance of the false routes appearance in the RIP protocol, the following mechanisms are used:

  • split-horizonthorizon: мrouters  the routers do not distribute any routing information updates to those routers which are the sources of this 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, then 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 router 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 appearance.
  • 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, it incrementing by 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 , where and include the unavailable route will be 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 the RIP for the modern networks, since the existence of the false routes existence for 36 minutes or a protocol convergence time for of 450 seconds is unacceptable for many services.

...

RIP has the following features:

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

Additional materials

...