Wednesday, February 27, 2013

Static Route on IOS CISCO

OS: IOS



To create static route to loopback interface for this network.

First assign ip address for each interface FastEthernet0/0 and Loopback0 at each router.

router1(config)#interface FastEthernet0/0
router1(config-if)#ip address 192.168.0.1 255.255.255.252
router1(config)#interface Loopback0
router1(config-if)#ip address 172.16.0.1 255.255.255.255

router2(config)#interface FastEthernet0/0
router2(config-if)#ip address 192.168.0.2 255.255.255.252
router2(config)#interface Loopback0
router2(config-if)#ip address 172.16.0.2 255.255.255.255

To get access to Loopback0 at router2 from router1, you need to add static route at router1.
router1(config)#ip route 172.16.0.2 255.255.255.255 192.168.0.2
Test it with ping
router1#ping 172.16.0.2

For router2 to get access to Loopback0 at router1, add static route at router2.
router2(config)#ip route 172.16.0.1 255.255.255.255 192.168.0.1
Test ping again
router2#ping 172.16.0.1

No comments:

Post a Comment