Practical No.
4
Aim: Static Route Configuration
Theory :
Static Route
[Link] routing method is most trusted by a router.
[Link] routing is not really a routing protocol.
[Link] routes do not dynamically adapt to network changes, are not particularly scalable, and
require manual updating to reflect changes.
Static routing has the following advantages
1. There is no bandwidth usage between routers, which means you could possibly save
money on WAN links.
2. There is no overhead on the router CPU, which means you could possibly buy a cheaper
router than you would use if you were using dynamic routing.
3. It adds security because the administrator can choose to allow routing access to certain networks
only.
Static routing has the following disadvantages
1. Static routes don’t dynamically adapt to network change.
2. If a network is added to the internetwork, the administrator has to add a route to it on all routers
—by hand.
3. It’s not feasible in large networks because maintaining it would be a full-time job in itself.
4. With static routing, as your network grows, it can be difficult just keep adding static routes makes
sure everybody can still get everything.
5. The administrator must really understand the internetwork and how each router is
connected in order to configure routes correctly.
There are two different styles to configure an “ip route” command:
1. Using a next hop IP address
2. Using an outgoing interface
Configure Static Route on Cisco Routers with following information:
Network: [Link]/16, [Link]/24, [Link]/8
Gateway Address: [Link]/16, [Link]/24, [Link]/8
TAKE PRINTOUT OF NEXT SNAPS OF CODING AND OUTPUT
Putting three IP addresses, subnet mask and default gateway to three PCs.
Click PC1/ Desktop/IP Configuration /Static
Click Click Configure Router R1 PC2/ Desktop/IP Configuration /Static
Click PC2/ Desktop/IP Configuration /Static
Click PC3/ Desktop/IP Configuration /StaticClick Configure Router R1 PC2/ Desktop/IP
Configuration /Static PC3/ Desktop/IP Configuration /Static
Configure Router R2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R1
R1(config)#int fa 0/1
R1(config-if)#ip address [Link] [Link]
R1(config-if)#no shut
R1(config-if)#int fa 1/0
R1(config-if)#ip address [Link] [Link]
R1(config-if)#no shut
R1(config)#int fa 0/0
R1(config-if)#ip address [Link] [Link]
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#
Click
Click
Configure Router R2
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#host R2
R2(config)#int fa 0/0
R2(config-if)#ip address [Link] [Link]
R2(config-if)#no shut
R2(config)#int fa 0/1
R2(config-if)#ip address [Link] [Link]
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#
Configure Static Route to router R1
Go to config mode, type ip route command, the subnet number, followed by the mask, and next hop
ip address.
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#ip route [Link] [Link] [Link]
R1(config)#^Z
See routing table of router R1
R1#show ip route
Gateway of last resort is not set
S [Link]/8 [1/0] via [Link]
[Link]/30 is subnetted, 1 subnets
C [Link] is directly connected, FastEthernet0/0
C [Link]/16 is directly connected, FastEthernet0/1
C [Link]/24 is directly connected, FastEthernet1/0
R1#
Note a static route added to the routing table. The character S means static route. It references
[Link] subnet and it says to get there via100.0.0.2. via means that the next hop router’s IP address.
Now check IP connectivity
Click PC-1/ Desktop/Command Prompt
PC>ping [Link]
Pinging [Link] with 32 bytes of data:
Request timed out.
Request timed out.
Request timed out.
Request timed out.
Ping statistics for [Link]:
Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),
PC>
However PC-1 can’t ping PC-3 right now, the ping fails. See routing table of router R2
R2#show ip route
Gateway of last resort is not set
C [Link]/8 is directly connected, FastEthernet0/1
[Link]/30 is subnetted, 1 subnets
C [Link] is directly connected, FastEthernet0/0
R2#
The output confirms that R2 does not have route to reach subnet [Link]/16, [Link]/24 or
PC-1, PC-2. As a result, if PC-1 tries to ping PC-3 or PC-3 tries to ping PC-1 right now, the ping will fail.
So, we have to add a routing protocol(in this case, static route) that points PC-3’s subnet namely
[Link]/8. In this way we will tell R1 how to forward packet to [Link]/8 subnet. The packet arrives
at R2, R2 has a directly connected route PC-3’s subnet.
Configure Static Route to router R2
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#ip route [Link] [Link] [Link]
R2(config)#ip route [Link] [Link] [Link]
R2(config)#^Z
R2#
Now,see routing table of router R2
R2#show ip route
Gateway of last resort is not set
C [Link]/8 is directly connected, FastEthernet0/1
[Link]/30 is subnetted, 1 subnets
C [Link] is directly connected, FastEthernet0/0
S [Link]/16 [1/0] via [Link]
S [Link]/24 [1/0] via [Link]
R2#
Now check IP connectivity Click PC-1/ Desktop/Command Prompt
PC>ping [Link]
Pinging [Link] with 32 bytes of data:
Reply from [Link]: bytes=32 time=12ms TTL=126
Reply from [Link]: bytes=32 time=13ms TTL=126
Reply from [Link]: bytes=32 time=12ms TTL=126
Reply from [Link]: bytes=32 time=20ms TTL=126
Ping statistics for [Link]:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 12ms, Maximum = 20ms, Average = 14ms
PC>
We can reach [Link] network.
Click PC-2/ Desktop/Command Prompt
PC>ping [Link]
Pinging [Link] with 32 bytes of data:
Reply from [Link]: bytes=32 time=12ms
TTL=126 Reply from [Link]: bytes=32
time=14ms TTL=126 Reply from [Link]:
bytes=32 time=24ms TTL=126 Reply from
[Link]: bytes=32 time=11ms TTL=126
Ping statistics for [Link]:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 11ms, Maximum = 24ms, Average = 15ms
PC>
We can reach [Link] network.
Click PC-3/ Desktop/Command Prompt
PC>ping [Link]
Pinging [Link] with 32 bytes of data:
Reply from [Link]: bytes=32 time=10ms
TTL=126 Reply from [Link]: bytes=32
time=11ms TTL=126 Reply from [Link]:
bytes=32 time=12ms TTL=126 Reply from
[Link]: bytes=32 time=16ms TTL=126
Ping statistics for [Link]:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 16ms, Average = 12ms
PC>
We can reach [Link] network.
PC>ping [Link]
Pinging [Link] with 32 bytes of data:
Reply from [Link]: bytes=32 time=12ms TTL=126
Reply from [Link]: bytes=32 time=11ms TTL=126
Reply from [Link]: bytes=32 time=22ms TTL=126
Reply from [Link]: bytes=32 time=10ms TTL=126
Ping statistics for [Link]:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 22ms, Average = 13ms
PC>
We can reach [Link] network.
Conclusion:
Draw table of marks obtained.