In network engineering, it is easier to configure small network routes using static routing methods, but if the network is larger and there are frequent link changes, the maintenance workload of the network administrator can be very heavy or even impossible to adapt to the situation. At this point, the dynamic routing protocol configuration method will be more appropriate.

Usually routes are divided into static and dynamic routes according to the way they are configured.

Static routing refers to the manual configuration of routing tables by the administrator through the command to achieve communication between routers, although the static route is simple to configure, but the workload is very large, only for simple structure of small networks, and not easy to check the error. When it comes to medium and large networks, it is difficult to configure the routing table for each router, so we have to use dynamic routing to iterate through the routing table.

What is dynamic routing?

Dynamic routing generally refers to what we usually call dynamic routing protocols. It is a protocol used by routers to calculate and maintain network routing information, usually with certain algorithms, and works at the transport or application layer.

Dynamic routing is based on a routing protocol that defines some rules for routers to follow when communicating with other routers. Dynamic routing protocols are like a language used to exchange information between routers, through which network connectivity information and status information can be shared between routes. It is also through this different language that routers iterate through routing tables in different ways.

Based on the individual autonomous systems (AS), dynamic routing is also divided into internal gateway protocols (IGP) and external gateway protocols (EGP). The Internal Gateway Protocol is used for network communication within the AS, while the External Gateway Protocol is used for communication between the ASs. And the RIP protocol is one of the IGPs.

What is RIP?

RIP – Routing Information Protocol: The earliest distance vector IP routing protocol and one of the first to be widely used, it uses the Bellman-Ford algorithm and its biggest advantage is that it is simple to configure.

The protocol requires each router in the network to maintain routing information from itself to each destination network. The RIP protocol uses hop counts to measure “distance” in the network: the number of hops from a router to its directly connected network is defined as 1, and the distance from a router to its non-directly connected network is defined as the distance for each router passed plus 1. “Distance”: also known as “hops”, RIP allows a maximum of 15 hops for routing, meaning that a hop count of 16 is unreachable. Therefore, the RIP protocol is only suitable for small networks.

RIP Workflow

The initial routing table at the start of the RIP protocol contains only some direct port routes for this device. Routing interoperability across network segments is only possible through neighbouring devices learning routing table entries from each other. When a router finds a change in the directly connected network, it immediately forwards the routing table update information to all neighbouring routing nodes at a distance of 1 hop. Other routers receive the updated information and continue to forward it to other routers at a distance of plus 1 hop. Each router receives the update information and updates its own routing table information once again. Each router sends routing updates on average every 30s from each of the interfaces of the activated RIP protocol.

There are currently two versions of RIP, RIPv1 and RIPv2. RIPv2 complements RIPv1 by being able to carry a greater amount of information and enhanced security. Both RIPv1 and RIPv2 are based on the UDP protocol.

The RIP protocol relies entirely on the number of hops as a criterion. In the following case, R1 to R3, the RIP protocol will still select this 10kbps path for transmission even if the 2-hop path has a much higher transmission speed than the 1-hop path. If a special path is required, you can manually interfere with RIP’s path selection by increasing the path metric to make it choose another path.

How to configure router RIP?

The configuration of the RIP routing protocol is divided into operations such as creating RIP routing processes, defining associated networks, defining RIP versions, and turning off the route auto-summary function. The relevant configuration commands are described below.

1. Creating a RIP routing process

In configuring a RIP process, you first create the RIP process and then RIP configuration mode for the relevant configuration. The command format for creating a RIP process is as follows:

router(config)# router rip

Tip: You can delete the created RIP process with the no router rip command, e.g. router(config)#no router rip.

2. Defining an Associated Network

After creating the RIP process, you need to define the associated network, which is actually a network range in which the router only advertises routing information to the outside world and only publishes update messages to the outside world from the network ports in this range. The command format for defining an associated network is as follows:

router(config-router)# network network-number

The network-number is the network number of the directly connected network, e.g. The defined network can be deleted with the no network command. Network of RIPv1 is only treated as the network number of the natural network.

3. Defining the RIP version

There are two versions of RIP: RIPv1 and RIPv2, which have different characteristics and require special attention during use. In general, a uniform RIPv1 or RIPv2 should be used in a network. If both RIPv1 and RIPv2 are used in a network, there may be unintended consequences. The command format for defining the RIP version is as follows:

router(config-router)# version {1 ︱2}

Tip: By default, the router can receive RIPv1 and RIPv2 packets, but only sends RIPv1 packets. Use the no version command to restore the default configuration, such as router(config-router)#no version.

4. Turn off route auto-summary

The RIP route auto-summary function means that when a subnet route crosses a classful network boundary, it will be automatically summarized into a classful route. For example, and are two subnets of the natural classful network When the route auto-summary function is not turned off, both subnets will be aggregated into the network, and no and subnet routing information can be seen in the routing table.

By default, RIPv2 will perform route auto-summary; RIPv1 does not support turning off route auto-summary. In some cases, it is necessary to manually disable the route auto-summary function of RIPv2 in order to be able to see subnet routing information. The command format for disabling the route auto-summary function is as follows:

router(config-router)# no auto-summary

Tip 1: By default, RIPv2 will perform route auto-summary. To turn on route auto-summary use the router(config-router)#auto-summary command.

Tip 2: The following points need to be noted during the configuration of the RIP routing protocol.

  1. There are two versions of RIP, version 1 and version 2. Version 2 uses multicast updates instead of broadcast updates and carries the mask information of the route, it is recommended to use RIP version 2.
  2. When RIP advertises a network via the command network, it can only advertise the primary class network, even if network is written as a subnet address, it will still advertise that primary class network, and all ports belonging to that primary class network will be advertised into the RIP process.
  3. RIP will do auto-summary at the main class network boundary by default, if there are discontinuous networks, it will lead to route learning anomaly, it is recommended to turn off auto-summary and adopt manual summary method after enabling RIP protocol.

Read More: