Configuring Open Shortest Path First Protocol:
Configuring Open Shortest Path First Protocol:
What is OSPF?
The OSPF (Open Shortest Path First) protocol is one of a family of IP Routing protocols, and is an Interior Gateway Protocol (IGP) for the Internet, used to distribute IP routing information throughout a single Autonomous System (AS) in an IP network.
The OSPF protocol is a link-state routing protocol, which means that the routers exchange topology information with their nearest neighbours. The topology information is flooded throughout the AS so that every router within the AS has a complete picture of the topology of the AS. This picture is then used to calculate end-to-end paths through the AS, normally using a variant of the Dijkstra algorithm. Therefore, in a link-state routing protocol, the next hop address to which data is forwarded is determined by choosing the best end-to-end path to the eventual destination.
CONFIGURATION:
STEPS:
1) Select 3PCs and connect them with Routers and Switches.T hen connect all the routers with each other.
2) Make all the necessary connections.
3) Assign IP addresses , subnets and gateways.
4) After all the connections are made and all the configuration is done go to the command line of router 1 and type the command ‘router OSPF 10 ’. Here 10 is the process id OSFP protocol .
5) Now type Network Networkid_IP wildcard mask area no. for eg. Network 192.168.1.0 0.0.0.255 area 0
COMMANDS AND OUTPUT FOR ROUTER-1
ROUTER – 1:
Router>enable
Router#
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface GigabitEthernet0/0
Router(config)#interface GigabitEthernet0/0
Router(config-if)#ip address 192.168.2.2 255.255.255.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#
Router(config)#interface GigabitEthernet0/0
Router(config-if)#no shut exit
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#no shut exit
Router(config-if)#
%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)#interface Serial0/0/1
Router(config-if)#ip address 192.168.4.1 255.255.255.0
Router(config-if)#ip address 192.168.4.1 255.255.255.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/1
Router(config-if)#no shut exit
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up
Router(config-if)#exit
Router(config)#router ospf 10
Router(config-router)#network 192.168.4.0 0.0.0.255 area 0
Router(config-router)#
00:53:47: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.5.2 on Serial0/0/1 from LOADING to FULL, Loading Done
COMMANDS AND OUTPUT FOR ROUTER-2
ROUTER – 2:
Router>enable
Router#
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface GigabitEthernet0/0
Router(config-if)#ip address 192.168.3.2 255.255.255.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#ip address 192.168.1.2 255.255.255.0
Router(config-if)#
Router(config)#interface GigabitEthernet0/0
Router(config-if)#no shut exit
Router(config-if)#
%LINK-5-CHANGED: Interface GigabitEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/0, changed state to up
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#no shut exit
Router(config-if)#
%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)#router ospf 10
Router(config-router)#network 192.168.1.0 0.0.0.255 area 0
Router(config-router)#network 192.168.3.0 0.0.0.255 area 0
Router(config-router)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/1
Router(config-if)#ip address 192.168.5.1 255.255.255.0
Router(config-if)#ip address 192.168.5.1 255.255.255.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/1
Router(config-if)#no shut exit
Router(config-if)#
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up
Router(config-if)#exit
Router(config)#router ospf 10
Router(config-router)#network 192.168.5.0 0.0.0.255 area 0
Router(config-router)#exit
Router(config)#
00:54:10: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.5.2 on Serial0/0/1 from LOADING to FULL, Loading Done.
cOMMANDS AND OUTPUT FOR ROUTER-3
ROUTER – 3:
Router>enable
Router#
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface Serial0/0/1
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#ip address 192.168.1.3 255.255.255.0
Router(config-if)#ip address 192.168.1.3 255.255.255.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/1
Router(config-if)#no ip address
Router(config-if)#no ip address
Router(config-if)#ip address
% Incomplete command.
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#ip address 192.168.4.3 255.255.255.0
Router(config-if)#ip address 192.168.4.2 255.255.255.0
Router(config-if)#ip address 192.168.4.2 255.255.255.0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/1
Router(config-if)#ip address 192.168.5.2 255.255.255.0
Router(config-if)#ip address 192.168.5.2 255.255.255.0
Router(config-if)#ip address 192.168.5.2 255.255.255.0
Router(config-if)#ip address 192.168.5.2 255.255.255.0
Router(config-if)#ip address 192.168.5.2 255.255.255.0
Router(config-if)#router ospf 10
OSPF process 10 cannot start. There must be at least one "up" IP interface
Router(config-router)#exit
Router(config)#
Router(config)#interface Serial0/0/1
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#no shut exit
%LINK-5-CHANGED: Interface Serial0/0/0, changed state to down
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/0
Router(config-if)#
Router(config-if)#exit
Router(config)#interface Serial0/0/1
Router(config-if)#no shut exit
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to down
Router(config-if)#
%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
%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up
Router(config-if)#exit
Router(config)#router ospf 10
Router(config-router)#network 192.168.4.0 0.0.0.255 area 0
Router(config-router)#network 192.168.5.0 0.0.0.255 area 0
Router(config-router)#exit
Router(config)#
00:06:55: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.2.2 on Serial0/0/0 from LOADING to FULL, Loading Done
00:07:27: %OSPF-5-ADJCHG: Process 10, Nbr 192.168.3.2 on Serial0/0/1 from LOADING to FULL, Loading Done
6) Now ping to check.
Comments
Post a Comment