Friday, 27 May 2011

Configure Dynamic Routing with OSPF (Open Shortest Path First)











R1
Configure Fastethernet:
R1#conf

R1#configure t
Enter configuration commands, one per line.  End with CNTL/Z.
R1(config)#inte
R1(config)#interface se
R1(config)#interface serial fa
R1(config)#interface fa
R1(config)#interface fastEthernet 0/0
R1(config-if)#inte
R1(config-if)#ip add
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no sh
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


Configure Interface:



R1(config)#interface se
R1(config)#interface serial 2/0
R1(config-if)#ip add
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down

Its showing down cause we have to configure interface on R2.

 R2


Configure Interface:


Router(config)#interface se
Router(config)#interface serial 3/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#clo
Router(config-if)#clock rat
Router(config-if)#clock rate 64000
Router(config-if)#no sh
Router(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial3/0, changed state to up
Router(config-if)#
Router#
%SYS-5-CONFIG_I: Configured from console by console
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial3/0, changed state to up 

Now on both side ports are up

Now we have to configure second interface which is connected with R3.

R2(config)#interface serial 2/0
R2(config-if)#ip address 192.168.4.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial2/0, changed state to down



Configure Fastethernet:

R2(config)#inte
R2(config)#interface fa
R2(config)#interface fastEthernet 3/0
%Invalid interface type and number
R2(config)#interface fastEthernet 0/0
R2(config-if)#ip add
R2(config-if)#ip address 192.168.3.1 255.255.255.0
R2(config-if)#no sh
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

R3

Configure Interface:
R3(config-if)#ip add
R3(config-if)#ip address 192.168.4.2 255.255.255.0
R3(config-if)#clo
R3(config-if)#clock ra
R3(config-if)#clock rate 64000
R3(config-if)#no sh
R3(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial3/0, changed state to up

Configure Fastethernet:

R3(config)#inte
R3(config)#interface fa
R3(config)#interface fastEthernet 0/0
R3(config-if)#ip add
R3(config-if)#ip address 192.168.5.1 255.255.255.0
R3(config-if)#no sh
R3(config-if)#no shutdown

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

R3(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

CONFIGURATION OF OSPF:

R1
R1(config)#router ospf 1
R1(config-router)#net
R1(config-router)#network 192.168.1.0 0.0.0.255 are
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#network 192.168.2.0 0.0.0.255 area 0
R1(config-router)#^Z
R1#


R2
R2(config)#router ospf 1
R2(config-router)#network 192.168.2.0 0.0.0.255 area 0
R2(config-router)#network 192.168.3.0 0.0.0.255 area 0
R2(config-router)#network 192.168.4.0 0.0.0.255 area 0
R2(config-router)#^Z

R3
R3(config)#router ospf 1
R3(config-router)#network 192.168.4.0 0.0.0.255 are
R3(config-router)#network 192.168.4.0 0.0.0.255 area 0
R3(config-router)#
02:22:34: %OSPF-5-ADJCHG: Process 1, Nbr 192.168.4.1 on Serial3/0 from LOADING to FULL, Loading Done
R3(config-router)#network 192.168.5.0 0.0.0.255 area 0
R3(config-router)#^Z





No comments: