Practical No 4 Ip Static Routing
Practical No 4 Ip Static Routing
Practical No 4 Ip Static Routing
4
Aim: Static Route Configuration
Theory :
Static Route
1.Static routing method is most trusted by a router.
2.Static routing is not really a routing protocol.
3.Static 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.
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 172.16.0.1 255.255.0.0
R1(config-if)#no shut
R1(config-if)#int fa 1/0
R1(config-if)#ip address 192.168.0.1 255.255.255.0
R1(config-if)#no shut
R1(config)#int fa 0/0
R1(config-if)#ip address 100.0.0.1 255.255.255.252
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 100.0.0.2 255.255.255.252
R2(config-if)#no shut
R2(config)#int fa 0/1
R2(config-if)#ip address 10.0.0.1 255.0.0.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#
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 10.0.0.0/8 is directly connected, FastEthernet0/1
100.0.0.0/30 is subnetted, 1 subnets
C 100.0.0.0 is directly connected, FastEthernet0/0
R2#
The output confirms that R2 does not have route to reach subnet 172.16.0.2/16, 192.168.0.2/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
10.0.0.0/8. In this way we will tell R1 how to forward packet to 10.0.0.0/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 172.16.0.0 255.255.0.0 100.0.0.1
R2(config)#ip route 192.168.0.0 255.255.255.0 100.0.0.1
R2(config)#^Z
R2#
Now,see routing table of router R2
R2#show ip route
Gateway of last resort is not set
C 10.0.0.0/8 is directly connected, FastEthernet0/1
100.0.0.0/30 is subnetted, 1 subnets
C 100.0.0.0 is directly connected, FastEthernet0/0
S 172.16.0.0/16 [1/0] via 100.0.0.1
S 192.168.0.0/24 [1/0] via 100.0.0.1
R2#
Now check IP connectivity Click PC-1/ Desktop/Command Prompt
PC>ping 10.0.0.2
Pinging 10.0.0.2 with 32 bytes of data:
Reply from 10.0.0.2: bytes=32 time=12ms TTL=126
Reply from 10.0.0.2: bytes=32 time=13ms TTL=126
Reply from 10.0.0.2: bytes=32 time=12ms TTL=126
Reply from 10.0.0.2: bytes=32 time=20ms TTL=126
Ping statistics for 10.0.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 12ms, Maximum = 20ms, Average = 14ms
PC>
PC>ping 192.168.0.2
Pinging 192.168.0.2 with 32 bytes of data:
Reply from 192.168.0.2: bytes=32 time=12ms TTL=126
Reply from 192.168.0.2: bytes=32 time=11ms TTL=126
Reply from 192.168.0.2: bytes=32 time=22ms TTL=126
Reply from 192.168.0.2: bytes=32 time=10ms TTL=126
Ping statistics for 192.168.0.2:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 10ms, Maximum = 22ms, Average = 13ms
PC>
Conclusion:
Draw table of marks obtained.