Implementing Routing Information Protocol(RIP) Using Cisco Packet Tracer

Home /

Table of Contents

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.

G7hLOhu ml79qcrIGDoHCCeH6d4baJybtD B 1KEJ2z9UHujpZNl3iOMl5FUVW4jGUwi6wrW4dHe6O h0T6XP IMaPGLuAVGnZ2fLI 59LhS3Qz3syI02fvT XBg O1PlM1sgZNbp3AtDa5JMolHQjNPg9Sj0XUwSkuWbEjtyYgR09gddOtRSSk7X8c8PA - Implementing Routing Information Protocol(RIP) Using Cisco Packet Tracer

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

InterfaceIP AddressSubnet Mask
GigabitEthernet0/0/0192.168.1.1255.255.255.0
Serial0/1/010.0.0.1255.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

InterfaceIP AddressSubnet Mask
GigabitEthernet0/0/0192.168.2.1255.255.255.0
Serial0/1/010.0.0.2255.0.0.0
Serial0/1/111.0.0.1255.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

InterfaceIP AddressSubnet Mask
GigabitEthernet0/0/0192.168.3.1255.255.255.0
Serial0/1/011.0.0.2255.0.0.0
Serial0/1/112.0.0.1255.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

InterfaceIP AddressSubnet Mask
GigabitEthernet0/0/0192.168.4.1255.255.255.0
Serial0/1/012.0.0.2255.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
DeviceIP AddressSubnet MaskDefault Gateway
PC0192.168.1.101255.255.255.0192.168.1.1
Server0192.168.1.102255.255.255.0192.168.1.1
PC1192.168.1.103255.255.255.0192.168.1.1

Network 2
Network Address:192.168.2.0/24
Subnet Mask: 255.255.255.0
DeviceIP AddressSubnet MaskDefault Gateway
PC2192.168.2.101255.255.255.0192.168.2.1
PC3192.168.2.102255.255.255.0192.168.2.1

Network 3
Network Address:192.168.3.0/24
Subnet Mask: 255.255.255.0
DeviceIP AddressSubnet MaskDefault Gateway
PC4192.168.3.101255.255.255.0192.168.3.1
PC5192.168.3.102255.255.255.0192.168.3.1

Network 4
Network Address:192.168.4.0/24
Subnet Mask: 255.255.255.0
DeviceIP AddressSubnet MaskDefault Gateway
PC6192.168.4.101255.255.255.0192.168.4.1
PC7192.168.4.102255.255.255.0192.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.

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:

StepCommandExamplePurpose
Step 1enableRouter> enableEnables the privileged mode
Step 2configure terminalRouter# configure terminalTo actually program the router
Step 3router ripRouter(config)# router ripEnables a RIP routing process and enters router configuration mode.
Step 4network ip-addressRouter(config-router)# network 11.0.0.0
Associates a network with a RIP routing process.
Step 5neighbor ip-addressRouter(config-router)#neighbor 10.0.0.2
Defines a neighboring device with which to exchange routing information.
Step 6offset-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 7timers basic update invalid hold down flush [sleeptime]Router(config-router)# timers basic 1 2 3 4(Optional) Adjusts routing protocol timers.
Step 8endRouter(config-router)# exitExits 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.

4u0CVZ86v9L7Ajt9Nnug6GU9bMb9cgzp 6LMcStURdwXpz0P3j2n44NcpqJzCt6RYT9uGwdCfm1VP3wCKq8Pl y gTOrZUy7hX6 OMPRWTVKWV3 vzPkz3GTCyY F wx7XuZ6HCW8F4BOcLTcHwA5iixotVPLvuf - Implementing Routing Information Protocol(RIP) Using Cisco Packet Tracer

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. 

cXyNpSLEgFkPETh4on2DISr2hNS4Ga7bMK WhMMQsk3AQrQeP2waH fyDLyvkBoqQ5f27sxLy5xTcT7fqFeYuVfhZcQxRAjzYP7IxqbwXtwjoxCJXdzmQ NzLyYbrwfmLvPRZ7Z9rhLKkueFs1E89c5hYYaoBtvQPxhm4zd 0iLsu gZuFMtle1kvjyoAg - Implementing Routing Information Protocol(RIP) Using Cisco Packet Tracer

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.

ORTYKVZo2zGziVUt6z43 mkALry24jYh14soyPf50vZxfbpWrtnXJJNzBi1rk1ePdDnOkuQ3Zs2ozSrz04BuQF QNFWnrZHm5uJ6g7LdzmEvymWdrdv7oMTKFFZTMo4ocu AVnlN3cAVqlgEGadljMynESNls2WRJwoGdWrBnvsCWBHISqtqLyACSof pQ - Implementing Routing Information Protocol(RIP) Using Cisco Packet Tracer

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. 

RIP

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.

Share The Tutorial With Your Friends
Twiter
Facebook
LinkedIn
Email
WhatsApp
Skype
Reddit

Check Our Ebook for This Online Course

Advanced topics are covered in this ebook with many practical examples.

Other Recommended Article