Pages

Search This Blog

Total Pageviews

Wednesday 25 June 2014

OSPF Configuration


OSPF (Open Shortest Path First)
Open Shortest Path First (OSPF) is a routing protocol for Internet Protocol (IP) networks. It uses a link state routing algorithm and falls into the group of interior routing protocols, operating within a single autonomous system (AS).

                                      ROUTER OSPF CONFIGURATION




Router 1
Router1>enable
Router1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#interface fastEthernet 0/0
Router1(config-if)#ip address 10.1.1.1 255.0.0.0
Router1(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
Router1(config-if)#exit
Router1(config)#interface serial 2/0
Router1(config-if)#ip address 192.168.1.1 255.255.255.0
Router1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to down
Router1(config-if)#exit
Router1(config)#router ospf 1
Router1(config-router)#network 10.1.1.0  0.255.255.255 area 0
Router1(config-router)#network 192.168.1.0  0.0.0.255 area 0
Router1(config-router)#exit

Router 2
Router>enable
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname Router2
Router2(config)#interface fastEthernet 0/0
Router2(config-if)#ip address 10.1.2.1 255.0.0.0
Router2(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
Router2(config-if)#exit
Router2(config)#interface serial 2/0
Router2(config-if)#ip address 192.168.1.2 255.255.255.0
Router2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
Router2(config-if)#exit
Router2(config)#interface serial 3/0
Router2(config-if)#ip address 192.168.2.1 255.255.255.0
Router2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial3/0, changed state to down
Router2(config-if)#exit
Router2(config)#router ospf 2
Router2(config-router)#network 10.1.2.1  0.255.255.255 area 0
Router2(config-router)#network 192.168.1.0  0.0.0.255 area 0
Router2(config-router)#network 192.168.2.0  0.0.0.255 area 0
00:18:23: %OSPF-5-ADJCHG: Process 2, Nbr 192.168.1.1 on Serial2/0 from LOADING to FULL, Loading Done
Router2(config)#exit
Router2#

Router 3
Router#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname Router3
Router3(config)#interface fastEthernet 0/0
Router3(config-if)#ip address 10.1.3.1 255.0.0.0
Router3(config-if)#no shutdown
Router3(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router3(config)#interface serial 3/0
Router3(config-if)#ip address 192.168.2.2 255.255.255.0
Router3(config-if)#no shutdown
%LINK-5-CHANGED: Interface Serial3/0, changed state to up
Router3(config)#router ospf 3
Router3(config-router)#network 10.1.3.0 0.255.255.255 area 0
Router3(config-router)#network 192.168.2.0 0.0.0255 area 0
 0Router3#exit
Router3#

VERIFICATION
Go to any pc and ping to any other pc
PC 10.1.1.2
ping  10.1.3.2
Pinging 10.1.3.3 with 32 bytes of data:
Reply from 10.1.3.3: bytes=32 time=40ms TTL=128
Reply from 10.1.3.3: bytes=32 time=20ms TTL=128
Reply from 10.1.3.3: bytes=32 time=20ms TTL=128
Reply from 10.1.3.3: bytes=32 time=20ms TTL=128

0 comments:

Post a Comment