STATIC ROUTING

STATIC ROUTING



By default IP routing process is disabled. To enable IP Routing use the following command in Global configuration Mode:-

Command:
Router(config)#ip routing

To verify the routing table after routing is enabled.

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

Once routing is enabled the directly connected networks are automatically added into the routing table. “C” represents directly connected networks. The IP Network was learnt through the local Interface of the router.

To configure static Routing use the following Syntax:

Syntax:
Router(config)#ip route <Destination Network ID> <Destination Subnet Mask> {<Next hop IP address> or < Exit Interface type><No.>}


Dest N/W ID:              Network ID (of the remote network)
Dest Subnet Mask:    Subnet Mask (of the remote network)
Next hop IP Address: IP Address of the Next Router (directly connected)
Exit interface type & Number: outgoing interface type and number

STATIC ROUTING – Example 1


Configure Static Route to allow LAN of Delhi to communicate with LAN of Kolkata and vice-versa: 



ON DELHI:-

DELHI #configure terminal
DELHI(config) #ip routing
DELHI(config)#ip route 10.0.0.0 255.0.0.0 Serial 0
DELHI(config) #exit
DELHI#
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) #exit
To verify, the following commands can be give on all Routers
Show commands:

Router#show ip route
Output:

Delhi#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
S    10.0.0.0/8 is directly connected, Serial0/0/0
C   172.16.0.0/16 is directly connected, Serial0/0/0
C   192.168.1.0/24 is directly connected, FastEthernet0/0

No comments:

Post a Comment