Practical 3 Static
Practical 3 Static
3
Q3) Configure IP static routing.
3.Static routes do not dynamically adapt to network changes, are not particularly
scalable, and require manual updating to reflect changes.
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.
4. With static routing, as your network grows, it can be difficult to just keep
adding static routes and make 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.
Syntax:
ip route [destination_network] [mask] [next_hop_address or exit_interface]
[administrative_distance][permanent]
We can break the above syntax:
ip route [destination_network] [mask] [next_hop_address]
ip route [destination_network] [mask] [exit_interface/next_hop_address]
network - the destination network
mask - is the subnet mask for that network
address - IP address of the next hop router
interface - the interface the traffic is to leave by
distance - (optional) the administrative distance of the route
Example: 1
Router(config)#ip route 10.0.0.0 255.0.0.0 131.108.3.4 110
Example: 2
We can use the exit interface instead of next hop ip address. Functionally, next
hop ip and exit interface work exactly the same. But, it is preferred to
use next_hop_ip_address for troubleshoot easier way.
3.You don't want the routers to use up precious bandwidth by using routing protocols.
___________________________________________________________________________
PRINT-OUT
___________________________________________________________________________
Putting three IP addresses, subnet mask and default gateway to three PCs.
Click PC1/ Desktop/IP Configuration /Static
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)#
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)#
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 10.0.0.0 255.0.0.0 100.0.0.2
R1(config)#^Z
See routing table of router R1
R1#show ip route
PC>ping 10.0.0.2
PC>
However PC-1 can’t ping PC-3 right now, the ping fails.
R2#show ip route
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.
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#
R2#show ip route
PC>ping 10.0.0.2
PC>
PC>
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
PC>