Friday, 25 March 2011

Static Routes

Now I am configuring static routing, to allow routers to exchange information without the use of routing protocols.

Topology



Objectives

Configure Static route
Configure a router description

Router R1 Configuration

Router#conf t
Router(config)#hostname R1
R1(config)#int s0/0
R1(config-if)#ip add 148.1.1.1 255.255.255.0
R1(config-if)#description R1 - to -R2
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown

Don't worry about the static route now.


Router R2 Configuration

Router#conf t
R2(config)#int s0/0
R2(config-if)#ip add 148.1.1.2 255.255.255.0
R2(config-if)#no shut

R2(config-if)#int s0/1
R2(config-if)#ip add 148.1.2.1 255.255.255.0
R2(config-if)#clock rate 64000
R2(config-if)#description R2- to -R3
R2(config-if)#no shut
R2(config-if)#

No static route now.


Router R3 Configuration

Router#conf t
Router(config)#hostname R3
R3(config)#int s0/0
R3(config-if)#description R3- to -R2
R3(config-if)#ip add 148.1.2.2 255.255.255.0
R3(config-if)#no shut

Ping from directly connected router should work between directly connected routers. R1 and R3 cannot exchange any data at this point.


Static routes Configuration

R1

R1#conf t
R1(config)#ip route 148.1.2.0 255.255.255.0 148.1.1.2
R1(config)#

R2
R2 doesn’t need a static route to talk to anyone, as they are directly connected.

R3

R3#conf t
R3(config)#ip route 148.1.1.0 255.255.255.0 148.1.2.1
R3(config)#

Run the show ip route command on R1 and R3. The s means static, and should appear in the routing table of both routers.

Gateway of last resort is not set
148.1.0.0/24 is subnetted, 2 subnets
C 148.1.1.0 is directly connected, Serial0/0
S 148.1.2.0 [1/0] via 148.1.1.2

Now R1 and R3 should ping each other.

1 comment: