It is extremely simple to configure RIP on a router. You enter the router’s config mode, and then the router rip configuration. When you add new networks, the router turns on RIP. When you exit command mode, remember to save your changes with the write memory command.
router1#config t
router1(config)#router rip
router1(config-router)#network 192.168.1.0
router1(config-router)#network 192.168.2.0
router1(config-router)#exit
router1(config)#exit
router1#write memory
The third and fourth lines add these networks to the route table as networks that this router will route for.
Let us use Cisco Packet Tracer to implement the Routing Information Protocol or RIP. Consider configuring four LANs for simplicity. The implementation is depicted in the diagram below.
We must first physically connect all of the end devices to the network devices. This is the standard procedure.
The network, router, and end device IP addresses are listed below. This is required to logically connect the networks.
Router Configuration
Router0
Interface | IP Address | Subnet Mask |
GigabitEthernet0/0/0 | 192.168.1.1 | 255.255.255.0 |
Serial0/1/0 | 10.0.0.1 | 255.0.0.0 |
Serial0/1/1 |
CLI COMMAND:
Router>enable
Router#configure terminal
Router(config)#interface GigabitEthernet0/0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/1/0
Router(config-if)#ip address 10.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router1
Interface | IP Address | Subnet Mask |
GigabitEthernet0/0/0 | 192.168.2.1 | 255.255.255.0 |
Serial0/1/0 | 10.0.0.2 | 255.0.0.0 |
Serial0/1/1 | 11.0.0.1 | 255.0.0.0 |
CLI COMMAND:
Router>enable
Router#configure terminal
Router(config)#interface GigabitEthernet0/0/0
Router(config-if)#ip address 192.168.2.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/1/0
Router(config-if)#ip address 10.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/1/1
Router(config-if)#ip address 11.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router2
Interface | IP Address | Subnet Mask |
GigabitEthernet0/0/0 | 192.168.3.1 | 255.255.255.0 |
Serial0/1/0 | 11.0.0.2 | 255.0.0.0 |
Serial0/1/1 | 12.0.0.1 | 255.0.0.0 |
CLI COMMAND:
Router>enable
Router#configure terminal
Router(config)#interface GigabitEthernet0/0/0
Router(config-if)#ip address 192.168.3.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/1/0
Router(config-if)#ip address 11.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/1/1
Router(config-if)#ip address 12.0.0.1 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router3
Interface | IP Address | Subnet Mask |
GigabitEthernet0/0/0 | 192.168.4.1 | 255.255.255.0 |
Serial0/1/0 | 12.0.0.2 | 255.0.0.0 |
Serial0/1/1 |
CLI COMMAND:
Router>enable
Router#configure terminal
Router(config)#interface GigabitEthernet0/0/0
Router(config-if)#ip address 192.168.4.1 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#exit
Router(config)#interface Serial0/1/0
Router(config-if)#ip address 12.0.0.2 255.0.0.0
Router(config-if)#no shutdown
Router(config-if)#exit
The Shared network space between Router0 and Router1: Network Address: 10.0.0.0/8 Subnet Mask: 255.255.255.0 Network type: Type A The Shared network space between Router1 and Router2: Network Address: 11.0.0.0/8 Subnet Mask: 255.255.255.0 Network type: Type A The Shared network space between Router2 and Router3: Network Address: 12.0.0.0/8 Subnet Mask: 255.255.255.0 Network type: Type A
Network 1 Network Address:192.168.1.0/24 Subnet Mask: 255.255.255.0
Device | IP Address | Subnet Mask | Default Gateway |
PC0 | 192.168.1.101 | 255.255.255.0 | 192.168.1.1 |
Server0 | 192.168.1.102 | 255.255.255.0 | 192.168.1.1 |
PC1 | 192.168.1.103 | 255.255.255.0 | 192.168.1.1 |
Network 2 Network Address:192.168.2.0/24 Subnet Mask: 255.255.255.0
Device | IP Address | Subnet Mask | Default Gateway |
PC2 | 192.168.2.101 | 255.255.255.0 | 192.168.2.1 |
PC3 | 192.168.2.102 | 255.255.255.0 | 192.168.2.1 |
Network 3 Network Address:192.168.3.0/24 Subnet Mask: 255.255.255.0
Device | IP Address | Subnet Mask | Default Gateway |
PC4 | 192.168.3.101 | 255.255.255.0 | 192.168.3.1 |
PC5 | 192.168.3.102 | 255.255.255.0 | 192.168.3.1 |
Network 4 Network Address:192.168.4.0/24 Subnet Mask: 255.255.255.0
Device | IP Address | Subnet Mask | Default Gateway |
PC6 | 192.168.4.101 | 255.255.255.0 | 192.168.4.1 |
PC7 | 192.168.4.102 | 255.255.255.0 | 192.168.4.1 |
That all for network topologies. To test the connections, use the ping program.
If we try to ping a device from another network, the ping program fails if the networks are not directly connected. It’s because we haven’t set up the routing tables. In the previous tutorial, we used static routes to configure the routing table. In this tutorial, we will use the dynamic routing method to configure the routing table.
We previously demonstrated the commands for implementing RIP in Cisco routers. In this section, we will explain what the commands actually mean.
Take your coding skills to the next level with our comprehensive guides, “Python Beginner to Advanced” and “Java Beginner to Advanced.” Whether you’re diving into Python or mastering Java, these books provide step-by-step guidance and in-depth knowledge to elevate your programming expertise.
Enabling RIP And Configuring RIP Parameters
SUMMARY STEPS
1. enable
2. configure terminal
3. router rip
4. network ip-address
5. neighbor ip-address
6. offset-list [access-list-number | access-list-name] {in | out} offset [interface-type interface-number]
7. timers basic update invalid hold down flush [sleeptime]
8. End
Explanation Of Steps:
Step | Command | Example | Purpose |
Step 1 | enable | Router> enable | Enables the privileged mode |
Step 2 | configure terminal | Router# configure terminal | To actually program the router |
Step 3 | router rip | Router(config)# router rip | Enables a RIP routing process and enters router configuration mode. |
Step 4 | network ip-address | Router(config-router)# network 11.0.0.0 | Associates a network with a RIP routing process. |
Step 5 | neighbor ip-address | Router(config-router)#neighbor 10.0.0.2 | Defines a neighboring device with which to exchange routing information. |
Step 6 | offset-list [access-list-number | access-list-name] {in | out} offset [interface-type interface-number] | Router(config-router)# offset-list 98 in 1 Ethernet 1/0 | (Optional) Applies an offset list to routing metrics. |
Step 7 | timers basic update invalid hold down flush [sleeptime] | Router(config-router)# timers basic 1 2 3 4 | (Optional) Adjusts routing protocol timers. |
Step 8 | end | Router(config-router)# exit | Exits router configuration mode and returns to privileged EXEC mode. |
More information on RIP can be found in the IP Routing: RIP Configuration Guide, Cisco IOS Release 15M&T.
To implement RIP in Cisco Packet Tracer, simply follow Steps 1, 2, 3, 4, and 8. Due to the omission of the neighbor IP address, we must manually enter all networks while enabling RIP in a router.
In Cisco Packet Tracer, you can enable RIP and enter a network address using the GUI or CLI.
Enabling And Implementing RIP Using GUI
First, click on the router and then select the Config menu from the router’s main menu bar.
Remember to enter all the 7 network segments.
192.168.1.0/24 192.168.2.0/24 192.168.3.0/24 192.168.4.0/24 AND 10.0.0.0/8 11.0.0.0/8 12.0.0.0/8
Enabling And Implementing RIP Using CLI
Router>enable
Router#configure terminal
router(config)#router rip
router(config-router)#network 192.168.1.0
router(config-router)#network 192.168.2.0
router(config-router)#network 192.168.3.0
router(config-router)#network 192.168.4.0
router(config-router)#network 10.0.0.0
router(config-router)#network 11.0.0.0
router(config-router)#network 12.0.0.0
router(config-router)#exit
router(config)#exit
router#write memory
Repeat this for the remaining three routers. Then ping a device on a different network. Your ping should work now.
Now comes the exciting part. Consider the diagram below to fully grasp the significance of RIP.
Connect Router0 and Router3 using serial DCE cable. They share the network space 13.0.0.0/8. After connecting the router, configure the interfaces of these two routers.
Router0 GigabitEthernet0/0/0 192.168.1.1 Serial 0/1/0 10.0.0.1 Serial 0/1/1 13.0.0.1 Router3 GigabitEthernet0/0/0 192.168.4.1 Serial 0/1/0 12.0.0.2 Serial 0/1/1 13.0.0.2
In RIP routing, add the network 13.0.0.0 to all four routers.
Router(config)#router rip
Router(config-router)#network 13.0.0.0
Now run the following command in the Command prompt of PCO.
tracert 192.168.4.102
The diagram below will appear.
The traceroute command traces the route that packets take to reach their destination IP address. The IP addresses of the routers between the sending host and the destination IP address are used to represent this route. Traceroute, like ping, sends ICMP packets, but it does something different in that it sends those packets to get the routers between you and the destination to respond.
As you can see from the diagram above if we send packets from network 192.168.1.0/24 to network 192.168.4.0/24 it takes the shortest route which is via router 192.168.1.1 to 13.0.0.2 to 192.168.4.102(the end device).
Q: Sometimes I see a little star when I run the traceroute command. Does the little star mean that the router is down?
A: No, often it means that the router is configured to not respond to ICMP packets. This is done as a security measure.
Q: What happens if the shortest route is not available?
Then the router tries to send the packet using another available route. Assume the connection between Router0 and Router1 is disrupted for some reason.
When we use the tracert command to send a packet from PCO to PC2, we get the output shown below.
C:\>tracert 192.168.2.101
Tracing route to 192.168.2.101 over a maximum of 30 hops:
1 0 ms 0 ms 0 ms 192.168.1.1
2 1 ms 1 ms 1 ms 13.0.0.2
3 2 ms 1 ms 0 ms 12.0.0.1
4 3 ms 2 ms 2 ms 11.0.0.1
5 * 1 ms 1 ms 192.168.2.101
Trace complete.
As you can see, another route is used to send our packet to 192.168.2.101. This is the beauty of Dynamic Routing.
A static routing approach prevents routers from creating routes based on real-time information and does not allow routers to communicate with one another.
Scalability and adaptability are two key advantages of dynamic routing over static routing. A dynamically routed network can grow faster and adapt to changes in network topology caused by this growth or the failure of one or more network components.
Q: Does every type of router run RIP?
Almost every router will have a version of RIP installed. There are three standardized versions of the Routing Information Protocol: RIPv1 and RIPv2 for IPv4, and RIPng for IPv6.
Q: Is RIP a program running on the router?
That is something you could say. It is a combination of running software, a network protocol for communicating route information, and configuration files. It is usually some software function in the router’s operating system, depending on the type of router.
Q: How do you guard against someone hooking their own router up and sending bad routes?
There is really nothing to prevent that with the RIP v1 protocol. There is simple password authentication in RIP v2, but the passwords are sent in plaintext, so anyone connected to your network could probably get them. Some routers include mechanisms, such as peers, that allow you to choose which routers receive updates. RIP implements split horizon, route poisoning, and hold-down mechanisms to prevent the incorrect routing information from being propagated.
Q: It appears that it may take some time for routers to share all of their changes if there are several routers with many changes.
Yes, that is one of RIP’s issues. This is known as convergence. Because a router broadcasts its router table every 30 seconds, even a small network can take minutes for a change to propagate.