How to configured Static routing
The phenomena of adding router manually table ,is termed as static routing .This Is feasible in small Network ,but not in large networks,as small networks,it easier to add the routes .However,in a large network such as internet,it On the other hand ,in dynamic routing,the network routes are added automatically in the routing table the Concept of routing can be explained with the example of three labs.
Consider three LAB_1 ,LAB_2, and LAB_3 and each a router.The routers are connected with networks , 203.197.47.0 , 202.197.47.0 ,201.197.47.0 , 204.197.47.0 and 205.197.47.0 Network Map of the lab with Three routers connected in the network .
Network Map of the Three Labs. |
first ,each router should be config with the connected networks .display the network to be connected with each other .
Table
Router
|
Network
Address
|
Interface
|
IP
Address
|
LAB_1
|
203.197.47.0
|
Ethernet 0
|
203.197.47.1
|
LAB_1
|
202.197.47.0
|
Serial 0
|
202.197.47.1
|
LAB_2
|
204.197.47.0
|
Ethernet 0
|
204.197.47.1
|
LAB_2
|
202.197.47.0
|
Serial 0
|
202.197.47.2
|
LAB_2
|
201.197.47.0
|
Serial 1
|
201.197.47.2
|
LAB_3
|
205.197.47.0
|
Ethernet 0
|
205.197.47.1
|
LAB_3
|
201.197.47.0
|
Serial 1
|
201.197.47.1
|
Configuring LAB_1 Router
Lab_1 Router needs to be configured with the connected interface .The router connects Switch 1 with Ethernet 0 and LAB _2 Router with Serial 0 .The command should be used to configure . LAB_1
Router>en
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z
Router(config) #hostname LAB_1
LAB_1 (config) #interface ethernet 0
LAB_1 (Config-if)#ip address 203.197.47.1 255.255.255.0
LAB_1 (config-if)#no shutdown
%LINK-3UPDOWN: interface Ethernet0, Changed state to up
LAB_1 (Config-if)#exit
LAB_1 (config )#interface serial 0
LAB_1 (config-if)#ip address 202.197.47.1 255.255.255.0
LAB_1 (config-if) no shutdown
%LINK-3UPDOWN: interface Ethernet0, Changed state to up
%LINK-3UPDOWN: interface Ethernet0, Changed state to down
%LINEPROTO-5-UPDOWN:Line protocol on interface serial0, changed state to up
The following list explains the configuration of LAB-1 router .
1) en :- Enable you to rnter the privileged mode
2) configure terminal :- Enables you to enter the configuration mode
3) hostname LAB_1 :- Sets the hostname to LAB_1
4) ip subnet:- zero - Enables you to use the first and the last subnet i the network
5) no ip domain -lookup :- Turn off the DNS look-up
6) interface Ethernet 0:- Establish a connection with the interface ethernet 0
7) ip address :- Adds the IP address to Ethernet 0 connecting the Switch 1
8) no shutdown :- Ensures that the interface is always in the active state for communication
9) ip address :- Adds the ip address to serial 0 connection the router of LAB_2
10) clock rate 64000:- Specifies the rate at which the bits will be transferred on the Serial interface
11) bandwidth 64 :- Sets the bandwidth to 64
12) no shutdown :- Ensures that the interface Serial 0 is always active for communication
LAB_1#show ip route
codes: c - connected , S- static, I- IGRP, R- RIP, M- mobile , B- BGP , D-EIGRP , EX-EIGRP external , 0 -OSPF , IA - OSPF inter area, 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, *- candidate default, U- per -user static route
Gateway of last resort is not set
C 203.197.47.0 is directly connected , Ethernet 0
C 201.197.47.0 is directly connected, Serial0
The output displays that LAB_1 is Directly to the networks 203.197.47.0 and 202.197.47.0
Configuring LAB_2 Router
The way LAB_1 was configured: similarly you need to configure the router connected to LAB_2 and LAB_3 .The router should be configured with the interface Ethernet 0 connecting 0 Switch 0 connecting LAB_1 Router and Serial 1 connecting LAB_3 router .The following commands should be used to configure LAB_2
Router>en
Router#configuration terminal
Enter configuration command ,one per Line . End with CNTL/Z
Router(config)#hostname LAB_2
LAB_2 (config)#interface ethernet 0
LAB_2 (config-if)#ip address 204.197.47.1. 255.255.255.0
LAB_2 (config-if)#no shutdown
%Link-3 UPDOWN: interface Ethernet 0, Changed state to up
LAB_2 (config-if)#exit
LAB_2 (config)#interface serial 0
LAB_2 (config-if)#ip address 202.197.47.2 255.255.255.0
LAB_2 (config-if)#clock rate 64000
LAB_2 (config-if)#bandwidth 64
LAB_2 (config-if)#no shutdown
%LINK-3 UPDOWN:interface serial0,changed state to up
LAB_2 (config-if)#exit
LAB_2 (config-if)#interface serial 1
LAB_2 (config-if)#ip address 201.197.47 255.255.255.0
LAB_2 (config-if)#clock rate 64000
LAB_2 (config-if)#bandwidth 64
LAB_2 (config-if)#no shutdown
%LINK -3-UPDOWN:interface Serial1 , changed state to up
LAB_2 (config-if)#exit
%LINK -3-UPDOWN:interface Serial1 , changed state to up
%LINEPROTO-5UPDOW:Line protocol on interface serial1, changed state to down
LAB_2 (config)#
%Link-3 UPDOWN:interface serial1,changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on interface Serial1, changed state to up
To verify the directly connected networks to LAB_2 router,You need to use the Show ip route command
LAB_2#show 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, E1- OSPF external Type 1, E - OSPF
external type 2, E-EGP , I-IS_IS , L1 - ISIS level-1 ,L2 - ISIS Level -2 *-candidate of default ,U -Per-user static Route
The out put Displays that LAB_2 is directly connected to the network 204.197.47.0, 202.197.47.0 and 201.197.47.0
Configuring LAB_3 Router
Similarly , LAB _3 router should be configured with the interface Ethernet 0 connecting Switch 3, Serial 1 connecting LAB_2 router .LAB_3 router will be configured using the following command
Router#configure terminal
Enter configuration commands, one per line . End with CNTL/Z
Router ( Config) # hostname LAB_3
LAB_3 (config-if)# interface ethernet 0
LAB_3 (config-if)#ip address 205.197.47.1 255.255.255.0
LAB_3 (config-if)#no shutdown
LAB_3 (config-if)#exit
LAB_3 (config-if)#interface serial 1
LAB_3 (config-if)#ip address 202.197.47.2 255.255.255.0
LAB_3 (config-if)#no shutdown
LAB_3 (config-if)#exit
LAB_3 (config)#
use the command show ip route to verify the directly connected network to the LAB_3 router
Thank You