Lab 07 : Configure Static Route in GNS3
Static route tells the device exactly where to send traffic, no matter what.
Static route is often used when your network has only a few routers or there is only one route from a source to a destination.
Syntax of static route
ip route destination-network-address subnet-mask {next-hop-IP-address | exit-interface}
destination-network-address: destination network address of the remote network
subnet mask: subnet mask of the destination network
next-hop-IP-address: the IP address of the receiving interface on the next-hop router
exit-interface: the local interface of this router where the packets will go out
1. Scenario
Suppose that your company has 2 branches located in Tehran and Shiraz.
As the administrator of the network, you are tasked to connect them so that employees in the two LANs can communicate with each other.
After careful consideration you decided to connect them via static route.
2. Physical Topology

3. Configuring interfaces on R1
R1#configure terminal
R1(config)#interface fastEthernet 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#interface serial 1/0
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#no shut
R1(config-if)#clock rate 64000
4. Configuring interfaces on R2
R2#configure terminal
R2(config)#interface serial 1/0
R2(config-if)#ip address 10.0.0.2 255.255.255.252
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip address 172.16.0.1 255.255.0.0
R2(config-if)#no shut
R2(config-if)#exit
5. show ip route command
R1#show ip route
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/30 is directly connected, Serial1/0
L 10.0.0.1/32 is directly connected, Serial1/0
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, FastEthernet0/0
L 192.168.1.1/32 is directly connected, FastEthernet0/0
R1#
R2#show ip route
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/30 is directly connected, Serial1/0
L 10.0.0.2/32 is directly connected, Serial1/0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/16 is directly connected, FastEthernet0/0
L 172.16.0.1/32 is directly connected, FastEthernet0/0
R2#
6. Configuring static route on R1
R1(config)#ip route 172.16.0.0 255.255.0.0 10.0.0.2
R1(config)#exit
R1#show ip route
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/30 is directly connected, Serial1/0
L 10.0.0.1/32 is directly connected, Serial1/0
S 172.16.0.0/16 [1/0] via 10.0.0.2
192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C 192.168.1.0/24 is directly connected, FastEthernet0/0
L 192.168.1.1/32 is directly connected, FastEthernet0/0
R1#
7. Configuring static route on R2
R2(config)#ip route 192.168.1.0 255.255.255.0 10.0.0.1
R2(config)#exit
R2#show ip route
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/30 is directly connected, Serial1/0
L 10.0.0.2/32 is directly connected, Serial1/0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/16 is directly connected, FastEthernet0/0
L 172.16.0.1/32 is directly connected, FastEthernet0/0
S 192.168.1.0/24 [1/0] via 10.0.0.1
R2#
8. Manually set an IP on PC1
PC1> ip 192.168.1.100 255.255.255.0 192.168.1.1
Checking for duplicate address...
PC1 : 192.168.1.100 255.255.255.0 gateway 192.168.1.1
PC1>
9. Manually set an IP on PC2
PC2> ip 172.16.0.100 255.255.0.0 172.16.0.1
Checking for duplicate address...
PC1 : 172.16.0.100 255.255.0.0 gateway 172.16.0.1
PC2>
10. Try to ping each far end network
PC2> ping 192.168.1.100
84 bytes from 192.168.1.100 icmp_seq=1 ttl=62 time=34.043 ms
84 bytes from 192.168.1.100 icmp_seq=2 ttl=62 time=42.031 ms
84 bytes from 192.168.1.100 icmp_seq=3 ttl=62 time=31.992 ms
84 bytes from 192.168.1.100 icmp_seq=4 ttl=62 time=38.026 ms
84 bytes from 192.168.1.100 icmp_seq=5 ttl=62 time=38.034 ms
PC2>
Last updated