Static Routing
Static routing is a concept describing one way of configuring
path selection of routers in computer networks.
A router does not know anything about destinations that are NOT
connected directly to a router (remote) by default.
Static routing is one way of teaching a router about remote
networks or subnets.
There are pros and cons of using manual method. In complex
scenarios (with redundant connections),
more often than not, we use dynamic routing protocols. But there
are situations in which static routing is good or perhaps the best solution.
A static route is a manually
configured route on your router. Static routes are typically used in smaller
networks and when few networks or subnets exist, or with WAN links that have
little available bandwidth. With a network that has hundreds of routes, static
routes are not scalable, since you would have to configure each route and any
redundant paths for that route on each router.
In this article I will demonstrate
an example of static route configurations. We will use four different series
router so you can get familiar with all different platform covered in CCNA
exam.
Create a topology as shown in
figure.
1841 Series Router0 (R1)
|
2621XM Series Router (R3)
|
||||
|
FastEthernet0/0
|
Serial0/0/0
|
|
Fa0/0
|
Serial0/0/0
|
IP address
|
10.0.0.1
|
20.0.0.1
|
IP address
|
30.0.0.2
|
40.0.0.1
|
Connected With
|
Pc0
|
R2 on Serial 0/0
|
Connected With
|
FastEthernet0/0
|
R4 on Serial 0/0/0
|
2620XM Series Router(R2)
|
2811 Series Router0 (R4)
|
||||
|
FastEthernet0/0
|
Serial0/0
|
|
FastEthernet0/0
|
Serial0/0/0
|
IP address
|
30.0.0.1
|
20.0.0.2
|
IP address
|
50.0.0.1
|
40.0.0.2
|
Connected With
|
R3 on Fa0/0
|
R1 on Serial 00/0
|
Connected With
|
Pc1
|
R3 on Serial 0/0
|
PC-PT PC0
|
PC-PT PC1
|
||||
|
FastEthernet0
|
Default Gateway
|
|
FastEthernet0
|
Default Gateway
|
IP address
|
10.0.0.2
|
10.0.0.1
|
IP address
|
50.0.0.2
|
50.0.0.1
|
Connected With
|
R1 on
FastEthernet0/0
|
|
Connected With
|
R4 on
FastEthernet0/0
|
|
(1841Router0) Hostname
R1
To configure and
enable static routing on R1 follow these commands exactly.
Router>enable
Router#configure
terminal
Enter configuration
commands, one per line. End with CNTL/Z.
Router(config)#hostname
R1
R1(config)#interface
fastethernet 0/0
R1(config-if)#ip
address 10.0.0.1 255.0.0.0
R1(config-if)#no
shutdown
%LINK-5-CHANGED:
Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN:
Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#exit
R1(config)#interface
serial 0/0/0
R1(config-if)#ip
address 20.0.0.1 255.0.0.0
R1(config-if)#clock
rate 64000
R1(config-if)#bandwidth
64
R1(config-if)#no
shutdown
%LINK-5-CHANGED:
Interface Serial0/0/0, changed state to down
R1(config-if)#exit
%LINK-5-CHANGED:
Interface Serial0/0/0, changed state to up
R1(config)#ip route
30.0.0.0 255.0.0.0 20.0.0.2
R1(config)#ip route
40.0.0.0 255.0.0.0 20.0.0.2
R1(config)#ip route
50.0.0.0 255.0.0.0 20.0.0.2
(2620XM-Router1)
Hostname R2
To configure and
enable static routing on R2 follow these commands exactly.
Router>enable
Router#configure
terminal
Enter configuration
commands, one per line. End with CNTL/Z.
Router(config)#hostname
R2
R2(config)#interface
serial 0/0
R2(config-if)#ip
address 20.0.0.2 255.0.0.0
R2(config-if)#no
shutdown
%LINK-5-CHANGED:
Interface Serial0/0, changed state to up
%LINEPROTO-5-UPDOWN:
Line protocol on Interface Serial0/0, changed state to up
R2(config-if)#exit
R2(config)#interface
fastethernet 0/0
R2(config-if)#ip
address 30.0.0.1 255.0.0.0
R2(config-if)#no
shutdown
%LINK-5-CHANGED:
Interface FastEthernet0/0, changed state to up
R2(config-if)#exit
%LINEPROTO-5-UPDOWN:
Line protocol on Interface FastEthernet0/0, changed state to up
R2(config)#ip route
10.0.0.0 255.0.0.0 20.0.0.1
R2(config)#ip route
40.0.0.0 255.0.0.0 30.0.0.2
R2(config)#ip route
50.0.0.0 255.0.0.0 30.0.0.2
(2620XM-Router2)Hostname
R3
To configure and
enable static routing on R3 follow these commands exactly.
Router>enable
Router#configure
terminal
Enter configuration
commands, one per line. End with CNTL/Z.
Router(config)#hostname
R3
R3(config)#interface
fastethernet 0/0
R3(config-if)#ip
address 30.0.0.2 255.0.0.0
R3(config-if)#no
shutdown
%LINK-5-CHANGED:
Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN:
Line protocol on Interface FastEthernet0/0, changed state to up
R3(config-if)#interface
serial 0/0
R3(config-if)#ip
address 40.0.0.1 255.0.0.0
R3(config-if)#clock
rate 64000
R3(config-if)#bandwidth
64
R3(config-if)#no
shutdown
%LINK-5-CHANGED:
Interface Serial0/0, changed state to down
R3(config-if)#exit
%LINK-5-CHANGED:
Interface Serial0/0, changed state to up
%LINEPROTO-5-UPDOWN:
Line protocol on Interface Serial0/0, changed state to up
R3(config)#ip route
10.0.0.0 255.0.0.0 30.0.0.1
R3(config)#ip route
20.0.0.0 255.0.0.0 30.0.0.1
R3(config)#ip route
50.0.0.0 255.0.0.0 40.0.0.2
(2811Router3) Hostname R4
To
configure and enable static routing on R4 follow these commands exactly.
Router>enable
Router#configure
terminal
Enter configuration
commands, one per line. End with CNTL/Z.
Router(config)#interface
serial 0/0/0
Router(config-if)#ip
address 40.0.0.2 255.0.0.0
Router(config-if)#no
shutdown
%LINK-5-CHANGED:
Interface Serial0/0/0, changed state to up
%LINEPROTO-5-UPDOWN:
Line protocol on Interface Serial0/0/0, changed state to up
Router(config-if)#exit
Router(config)#interface
fastethernet 0/0
Router(config-if)#ip
address 50.0.0.1 255.0.0.0
Router(config-if)#no
shutdown
%LINK-5-CHANGED:
Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN:
Line protocol on Interface FastEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#ip
route 10.0.0.0 255.0.0.0 40.0.0.1
Router(config)#ip
route 20.0.0.0 255.0.0.0 40.0.0.1
Router(config)#ip
route 30.0.0.0 255.0.0.0 40.0.0.1
PC:-
PC>ipconfig
IP
Address......................: 10.0.0.2
Subnet
Mask.....................: 255.0.0.0
Default
Gateway.................: 10.0.0.1
PC>ping 50.0.0.2
Pinging 50.0.0.2 with
32 bytes of data:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip
times in milli-seconds:
Minimum = 127ms, Maximum = 156ms, Average = 144ms
PC>
PC-2
PC>ipconfig
IP
Address......................: 50.0.0.2
Subnet
Mask.....................: 255.0.0.0
Default
Gateway.................: 50.0.0.1
PC>ping 10.0.0.2
Pinging 10.0.0.2 with
32 bytes of data:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip
times in milli-seconds:
Minimum = 140ms, Maximum = 157ms, Average = 148ms