In this lab, we will be looking at different routing protocols that are used in all Interior Gateway Protocols. This exercise isn’t aimed towards configuration, but towards learning how the protocols make routers communicate and send updates to other devices on the network. We will be following the below topology on which we will be performing a basic set-up for RIPV1, RIPV2 and OSPF. We have used OSPF briefly in a previous lab when configuring site-to-site VPNs. You can check that out here.
Part 1: Basic Setup and examining of RIPV1
A screenshot of successful communication between devices in the 192.168.10.0/24 and 192.168.20.0/24 subnets after setting up RIPV1. To enable rip on the routers, use the following commands:
router rip
network 192.168.10.0
network 192.168.50.0
no auto-summary
For R2, substitute the 192.168.10.0 with the subnet that R2 is serving. The no auto-summary command is used to disable the default behaviour of automatic summarization of subnet routes into network-level routes.
Below we can see a PDU generated to transmit a RIP update from R1 through the networks. This PDU is using a broadcast address of 255.255.255.255 as its destination. This is to ensure that all devices in the network accept this packet. RIP updates are sent via UDP and operates on port 520. Since R2 is enabled with RIPV1, it is listening on port 520. When it receives an update from R1 it will check the routes included in the PDU. Since it already has the network 192.168.10.0/24 in its routing table, it does not have anything to add. It will then send its own RIP update by broadcasting on all its interfaces. RIPV1 is said to have overheads on other devices on the network since they will accept the RIP update because they have a broadcast address.
Part 2: Examining RIPV2
To set up RIPV2 on the routers R1 and R2, use the following commands:
router rip
version 2
no auto-summary
This applies to both R1 and R2. Once setup, we go into simulation mode and observe the RIPV2 updates being sent through the network. The first difference is that RIPV2 is using a multicast address of 224.0.0.9 as its destination address. RIPV2 still uses UDP port 520 to listen and transmit RIPV2 updates. The multicast address is an improvement over RIPV1 as it reduces the processing overheads incurred by other devices in the network that are not RIP enabled. The 224.0.0.9 multicast address is reserved for RIPV2 and only interfaces enabled with RIPV2 will accept this packet.
To check if R1 has learnt routes using RIP, we can issue the “show ip route” command in R1’s CLI. This is the result on mine.
R1 is aware of the networks not directly connected to it using RIP. It also shows the interface and IP via which these networks are accessible. The “show ip protocols” command will give you information about RIP on R1.
To view the RIP database on R1, issue the command “show ip rip database”. This will give you a breakdown of the networks that R1 has gained knowledge of using RIP.
Part 3: Setup and Examine OSPF
Enter the commands below to enable a basic configuration of OSPF on the routers. OSPF makes use of areas that a router can serve.
router ospf 1
network 192.168.10.1 255.255.255.0 area 0
If we disable the interface g0/0/0 on R2, the interface that is connected to the 192.168.20.0/24 network, we will notice that the routing table tells us that the host is possibly down. This is because RIP is sending updates at an interval and once R1 does not get an update about 192.168.20.0/24 from R2, it assumes it is down and it eventually removes it from the routing table.