STATIC ROUTING – Example 2

STATIC ROUTING – Example 2

Configure Static Route to allow LAN at Delhi, Kolkata & Mumbai  to communicate with each other:


ON DELHI:   .
DELHI#configure terminal
DELHI(config)#ip routing
DELHI(config)#ip route 10.0.0.0 255.0.0.0 172.16.0.2
DELHI(config)#ip route 192.168.2.0 255.255.255.0 172.16.0.2
DELHI(config)#ip route 172.17.0.0 255.255.0.0 172.16.0.2



ON KOLKATA:   .
KOLKATA#configure terminal
KOLKATA(config)#ip routing
KOLKATA(config)#ip route 192.168.1.0 255.255.255.0 172.16.0.1
KOLKATA(config)#ip route 192.168.2.0 255.255.255.0 172.17.0.2


ON MUMBAI:   .
MUMBAI#configure terminal
MUMBAI(config)#ip routing
MUMBAI(config)#ip route 10.0.0.0 255.0.0.0 S1
MUMBAI(config)#ip route 192.168.2.0 255.255.255.0 S1
MUMBAI(config)#ip route 172.17.0.0 255.255.0.0 S1

To verify, the following commands can be give on all Routers
Show commands: 
Router#show ip route

To view the routing table for verification of static route
Syntax:
Router#show ip route


Output : 


Kolkata#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

C    10.0.0.0/8 is directly connected, FastEthernet0/0
C    172.16.0.0/16 is directly connected, Serial0/0/0
C    172.17.0.0/16 is directly connected, Serial0/0/1
S    192.168.1.0/24 [1/0] via 172.16.0.1
S    192.168.2.0/24 [1/0] via 172.17.0.2


'S" represents Static route. The IP Network was defined through the Static routing command.



Syntax:
Router#ping <IP of destination PC>

Output : 

Kolkata#ping 192.168.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 5/14/34 ms



#############################################################################

To enable the logs on telnet session give the following command."(By default logs can be seen only on Console)

Router#terminal monitor


To view logs of any changes in the routing table, use the following command: 


Router#debug ip routing


To view the source and destination of the packet, use the following command: 

Router#debug ip packet


















No comments:

Post a Comment