How To Configure Dynamic Routing In Cisco Packet Tracer

In a local area network (LAN), routers has the knowledge of the routes to host devices within the network. However, in a wide area network (WAN), which typically consist of two or more routers, routers in the network does not know routes to host devices or network addresses beyond those directly connected to its interfaces. Two primary methods routers use to learn route to networks not directly connected to its interfaces are through static routing and dynamic routing protocols.

In static routing, network administrators manually build the router’s routing table by configuring routes to networks not directly linked to the router’s interface. We have a separate post on how to  configure static route in Packet Tracer.

The second method involves routers building their routing tables through dynamic routing protocols. In dynamic routing, each router advertises all networks connected to its interface to the next router, facilitating the sharing of routing information until every router learn the route to every network in the topology.

Dynamic routing protocols are categorized into two types: exterior gateway protocol (EGP) and interior gateway protocol (IGP).

EGP serves to exchange routes between autonomous systems, while IGP handles route sharing within a single autonomous system. For instance, EGP facilitates route exchange between two internet service providers’ networks, while IGP manages route sharing within an internet service provider’s network.

Each gateway protocol has an algorithm it uses to learn routes, share routing information, and determine the optimal route to reach a destination. EGP relies on path vectors, whereas IGP employs both distance vectors and link state algorithms.

This article will primarily concentrate on the Interior Gateway Protocol; which is the dynamic routing protocol utilized for route sharing within a wide Area network.

Interior Gateway Protocols(IGP)

Interior Gateway Protocol is a dynamic routing protocol used to share routing information within an autonomous system. IGP uses both distance vectors and link state algorithms to learn routing information.

ALSO READ:  How to Connect Two LANs in Packet Tracer

IGP is classified according to the algorithm used in the learning route. As shown below, Routing Information Protocol (RIP), enhanced interior gateway  protocol(EIGRP) uses the distance vector routing algorithm, while open shortest part first (OSPF) and Intermediate System – Intermediate System (IS-IS) use the link-state routing algorithm.

dynamic routing Protocols
dynamic routing protocols

So generally, the following are the examples of dynamic routing routing Protocols

  1. Open shortest path first (OSPF).
  2. Routing Information Protocol (RIP)
  3. Enhanced interior gateway protocol (EIGRP)
  4. Intermediate System: Intermediate System (IS-IS)

Network Topology

The network topology we will be making use of in this post is shown below. As you can see, it consists of two routers, two layer 2 switches, and four PCS. In this post, we will configure dynamic routes on the two routers so that each router can discover networks not connected to its interfaces.

network topology

Interface Configuration for the routers

Before we dive into dynamic route configuration using the methods we outlined above, let’s configure the interface of the routers in our network topology. Enter following commands to assign IP address to the interfaces of the routers.

Router1

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#int g0/0/0
R1(config-if)#ip address 203.0.113.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#int g0/0/1
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#no shut

 Router0

Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R0
R0(config)#int g0/0/0
R0(config-if)#ip address 203.0.113.2 255.255.255.252
R0(config-if)#no shut
R0(config-if)#int g0/0/1
R0(config-if)#ip address 192.168.1.1 255.255.255.0
R0(config-if)#no shut

Note: I have completed the IP address configuration for each of the PCs. I believe you know how to do that. If you are having trouble doing that, check out our post on how to configure IP address to a PC in the packet tracer.

How To Configure Dynamic Routing Using OSPF

OSPF is a dynamic routing protocol that uses a link-state algorithm to build the routing table. OSPF learns about the network’s topology by constructing a connectivity map using OSPF costs.

The following commands can be used to configure OSPF on each of the routers;

 Router0

R0>enable
R0#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R0(config)#router ospf 1
R0(config-router)#network 192.168.1.0 0.0.0.255 area 0
R0(config-router)#network 203.0.113.0 0.0.0.3 area 0
  1. R0(config)#router ospf 1: This command enters OSPF router configuration mode with a specified OSPF process ID of 1. The OSPF process ID is a local identifier used to distinguish between multiple OSPF instances running on the same router.
  2. R0 (config-router) #network 192.168.1.0 0.0.0.255 area 0: This command configures OSPF to include the network 192.168.1.0 with a wildcard mask of 0.0.0.255 in OSPF Area 0. It tells OSPF to start advertising the specified network into the OSPF routing process.
  3. R0 (config-router)#network 203.0.113.0 0.0.0.3 area 0: This command adds another network, 203.0.113.0, with a wildcard mask of 0.0.0.3, to OSPF Area 0. Similar to the previous command, it instructs OSPF to include this network in its routing process.

 Router1

R1>enable
R1#conf terminal
R1(config)#router ospf 1
R1(config-router)#network 192.168.2.0 0.0.0.255 area 0
R1(config-router)#network 203.0.113.0 0.0.0.3 area 0

Verify OSPF Configuration

OSPF configuration can be verified on each router using the command below;

R1#show ip route

Router1

The red rectangle below highlights the route learned by the router through the OSPF configuration we have completed.

show ip route

Router0

show ip route for ospf

For in-depth explanation on OSPF configuration, Check out our Post on how to configure OSPF on Cisco Packet Tracer

Note: Before proceeding to the below configuration, I have disabled the OSPF configuration on each of the routers as it has a lower administrative distance and therefore will not allow the router to learn routes using RIP if I should configure RIP in addition to OSPF.

How To Configure Dynamic Routing Using RIP

Routing Information Protocol (RIP) is one of the dynamic routing protocols that use distance vector to discover network routes and build the routing table.

Enter the following commands to configure RIP on the two routers

 Router0

R0#config terminal
Enter configuration commands, one per line.  End with CNTL/Z.
R0(config)#router RIP
R0(config-router)#network 203.0.113.0
R0(config-router)#network 192.168.1.0

 Router1

R1>enable
R1#configure terminal
R1(config)#Router RIP
R1(config-router)#network 192.168.2.0
R1(config-router)#network 203.0.113.0

Verify RIP Configuration

RIP configuration can be verified on each router using the command below;

R1#show ip route

Router1

The red rectangle below shows route learned by router1 through RIP

show ip route for rip

Router0

show ip route for rip

For in-depth explanation about RIP configuration, check out our post on how to configure RIP on cisco packet tracer

ALSO READ:  How to Configure ACL On Layer 3 Switch in Packet Tracer

How To Configure Dynamic Routing Using EIGRP

EIGRP is a dynamic routing protocol that combines the characteristics of both distance vector and link-state algorithms to discover routes and build the routing table.

Enter the following command to configure EIGRP on a Cisco router:

Router1

R1>enable
R1#conf terminal
R1(config)#router eigrp 100
R1(config-router)#network 192.168.2.0
R1(config-router)#network 203.0.113.0
R1(config-router)#no auto-summary

 Router0

R0#conf terminal
R0(config)#router eigrp 100
R0(config-router)#network 203.0.113.0
R0(config-router)#network 192.168.2.0
R0(config-router)#no auto-summary

R1(config)#router eigrp 100:This command enters EIGRP router configuration mode with a process ID of 100. The EIGRP process ID is a locally significant identifier used to distinguish between multiple EIGRP instances running on the same router.

R1(config-router)#network 192.168.2.0: This command specifies that the network 192.168.2.0 should participate in the EIGRP routing process. The router will advertise this network to other routers running EIGRP in the same autonomous system (AS).

R1(config-router)#network 203.0.113.0: Similar to the previous command, this one adds another network (203.0.113.0) to the EIGRP routing process. The router will include this network in its EIGRP advertisements.

R1(config-router)#no auto-summary: This command disables automatic summarization of routes at network boundaries. By default, EIGRP summarizes routes at network boundaries, but this command ensures that subnet information is preserved and advertised accurately.

Verify EIGRP Configuration

Enter the following command to verify EIGRP configuration on each of the routers;

R1#show ip route

Router0

show ip route for eigrp

Router1

Show ip route for eigrp on router 1

 

Conclusion

There are varieties of dynamic routing protocols that can be configured on a Cisco router in packet tracer; popular ones include OSPF, RIP, and EIGRP.

We have outlined the steps that can guide you through the configuration processes of each of these protocols.

Depending on your specific objectives and familiarity with these protocols, you can confidently configure any of them on your network routers. This enables the routers to dynamically learn routes to networks not directly connected to their interfaces.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top