How to Configure Static Routing on Cisco Router in GNS3

In this article, we will use the GNS3 program to add Static Route on Cisco Routers to communicate with computers on two small networks.

How to Configure Static Routing on Cisco Router in GNS3

How to Configure Static Routing on a Router

Static Routing (ST) is a simple routing protocol and is configured manually on Routers. Routers use routes when communicating networks, and through these routes determine the destination of IP packets.

Configuring Static Route on Routers is very simple. If you have a small network topology, it is recommended that you enable ST routing instead of dynamic routing.

Static routing is more efficient than dynamic protocols because dynamic protocols consume hardware resources on the router. Also, in some cases, it may be necessary to configure a Static Route.

In a growing network, Dynamic Routing is configured so that Routers can automatically find networks because these routes will be difficult and complex to configure manually.

In this article, we will add static routes on two routers and communicate the networks in two different locations.

How to Setup Static Routing in GNS3

In this article, you need to install GNS3 and VMware Workstation on your computer for Static Route/Routing configuration using GNS3 and VMware Workstation programs.

Also, for virtual machine usage in the Graphical Network Simulator-3, see our article on VMware connection with GNS3.

If you want to watch the VMware connection as a video, you can check out this video.

   Step 1

Open the GNS3 program for Static Route and create a new project.

Creating a New Project with GNS3

   Step 2

In the GNS3 program, create a network topology as shown in the image below.

You can also provide a clearer understanding of the network topology by adding comments.

A Network Topology with Two Cisco Routers

   Step 3

Configure the IP address settings of the Windows 8.1 virtual machine on VMware Workstation as follows.

Windows 8.1 Network Settings

   Step 4

In the same way, configure the IP address of the Windows 10 virtual machine on VMware Workstation as follows.

Windows 10 Network Settings

   Step 5

Open the Cisco Router R1 CLI prompt and configure the FastEthernet 0/1 interface. Check your configured interfaces with the show ip interface brief command.

R1# conf t
R1(config)# interface fastethernet 0/1
R1(config-if)# ip address 192.168.5.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# end

 
R1(config)# interface fastethernet 0/1

   Step 6

In the same way, configure the interface to which the 192.168.10.0/24 network connected to the Cisco Router R2.

R2# conf t
R2(config)# interface fastethernet 0/1
R2(config-if)# ip address 192.168.10.1 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# end

 
R2(config)# interface fastethernet 0/1

   Step 7

When pinging the Fa0/1 interface of the Cisco Router R1 from the Windows 8 machine, and you will see that the connection was successful.

Ping from a Windows 8.1 VM to a Windows 10 VM

   Step 8

Pinging from the Windows 10 machine to the Fa0/1 interface of Router R2 will also be successful.

Ping from a Windows 10 VM to a Windows 8.1 VM

   Step 9

Configure the FastEthernet0/0 interface of the Cisco Router R1.

R1# conf t
R1(config)# interface fastethernet 0/0
R1(config-if)# ip address 10.1.1.1 255.255.255.0
R1(config-if)# no shutdown
R1(config-if)# end

 
R1(config-if)# ip address 10.1.1.1 255.255.255.0

   Step 10

In the same way, configure the Fa0/0 interface of Router R2.

R2# conf t
R2(config)# interface fastethernet 0/0
R2(config-if)# ip address 10.1.1.2 255.255.255.0
R2(config-if)# no shutdown
R2(config-if)# end

 
R2(config-if)# ip address 10.1.1.2 255.255.255.0

   Step 11

Before you configure Static Route, this will fail when you ping the Fa0/0 interface of Router R2 from Windows 8. Because there is no Route on Routers.

This is where the importance of ST Route or dynamic protocols emerges.

Pinging from Windows 8 to the Fa0/2 interface of Router R2 will also fail as follows. The reason for this; because no routing protocols configured, Windows 8 cannot access the Serial interface of Router R2.

Destination Host Unreachable

   Step 12

Do the same on the Windows 10 machine and observe that the ping failed for the 192.168.5.0/24 network.

Destination Host Unreachable

   Step 13

Now, you need to add ST Route on Router R1 and R2 to communicate virtual machines.

Use the following commands to add a static route for R1.

R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route 192.168.10.0 255.255.255.0 10.1.1.2
R1(config)#end
R1#
R1#show ip route
Codes: L - local, C - connected, S - ST, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user ST route
o - ODR, P - periodic downloaded ST route, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet0/0
L 10.1.1.1/32 is directly connected, FastEthernet0/0
192.168.5.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.5.0/24 is directly connected, FastEthernet0/1
L 192.168.5.1/32 is directly connected, FastEthernet0/1
S 192.168.10.0/24  via 10.1.1.2
R1#

 
You can also control the static route using the show ip route command on R1.

R1(config)#ip route 192.168.10.0 255.255.255.0 10.1.1.2

   Step 14

In the same way, add ST Route to Router R2 and check it with the show ip route command.

R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip route 192.168.5.0 255.255.255.0 10.1.1.1
R2(config)#end
R2#
R2#show ip route
Codes: L - local, C - connected, S - ST, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user ST route
o - ODR, P - periodic downloaded ST route, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet0/0
L 10.1.1.2/32 is directly connected, FastEthernet0/0
S 192.168.5.0/24  via 10.1.1.1
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, FastEthernet0/1
L 192.168.10.1/32 is directly connected, FastEthernet0/1
R2#

 
R2(config)#ip route 192.168.5.0 255.255.255.0 10.1.1.1

   Step 15

When you Ping from Windows 8.1 to the Windows 10 machine on the 192.168.10.0/24 network, Ping will succeed as follows.

Ping Successful

   Step 16

Pinging will be successful if you ping from Windows 10 to a Windows 8.1 machine on the 192.168.5.0/24 network.

Ping Successful

Show Commands

R1#show ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.1.1.1 YES manual up up
FastEthernet0/1 192.168.5.1 YES manual up up
R1#

 

R2#show ip int br
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.1.1.2 YES manual up up
FastEthernet0/1 192.168.10.1 YES manual up up
R2#

 

R1#show ip route Codes: L - local, C - connected, S - ST, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user ST route o - ODR, P - periodic downloaded ST
 route, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks C 10.1.1.0/24 is directly connected, FastEthernet0/0 L 10.1.1.1/32 is directly connected, FastEthernet0/0 192.168.5.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.5.0/24 is directly connected, FastEthernet0/1 L 192.168.5.1/32 is directly connected, FastEthernet0/1 S 192.168.10.0/24  via 10.1.1.2 R1#

 

R2#show ip route
Codes: L - local, C - connected, S - ST, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user ST route
o - ODR, P - periodic downloaded ST route, H - NHRP, l - LISP
+ - replicated route, % - next hop override

Gateway of last resort is not set

10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.1.1.0/24 is directly connected, FastEthernet0/0
L 10.1.1.2/32 is directly connected, FastEthernet0/0
S 192.168.5.0/24  via 10.1.1.1
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.10.0/24 is directly connected, FastEthernet0/1
L 192.168.10.1/32 is directly connected, FastEthernet0/1
R2#

 

R1#show running-config
Building configuration...

Current configuration : 1087 bytes
!
! Last configuration change at 11:27:41 UTC Fri Jun 2 2017
upgrade fpd auto
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
redundancy
!
!
ip tcp synwait-time 5
!
!
!
interface FastEthernet0/0
ip address 10.1.1.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.5.1 255.255.255.0
duplex auto
speed auto
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip route 192.168.10.0 255.255.255.0 10.1.1.2
!
no cdp log mismatch duplex
!
!
control-plane
!
mgcp profile default
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
transport input all
!
!
end
R1#

 

R2#show running-config
Building configuration...

Current configuration : 1087 bytes
!
! Last configuration change at 11:28:22 UTC Fri Jun 2 2017
upgrade fpd auto
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
no ip icmp rate-limit unreachable
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
redundancy
!
!
ip tcp synwait-time 5
!
!
interface FastEthernet0/0
ip address 10.1.1.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.10.1 255.255.255.0
duplex auto
speed auto
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
ip route 192.168.5.0 255.255.255.0 10.1.1.1
!
no cdp log mismatch duplex
!
control-plane
!
!
mgcp profile default
!
!
gatekeeper
shutdown
!
!
line con 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line aux 0
exec-timeout 0 0
privilege level 15
logging synchronous
stopbits 1
line vty 0 4
login
transport input all
!
!
end
R2#

 

How to Add Static Route to Router ⇒ Video

You can watch the video below to add Static Route on Routers and also subscribe to our YouTube channel to support us!

   Final Word


In this article, we have configured the Routes on routers using the network simulator.

Static Routing may be preferred for performance but it is recommended to use Dynamic Routing in a large network as this will be difficult and complex to use. Thanks for following us!

   Related Articles


♦ Router Basic Configuration
Router Modes
How to Use Layer 2 SW
How to Use Layer 3 SW
♦ How to Use VPCS

Add a Comment

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