OSPF Configuration Example:

OSPF Single Area Configuration:

OSPF stands for Open Shortest Path First which is an open standard routing protocol that’s been implemented by lots of network vendors, including Cisco. If we have multiple routers and not all of them are Cisco, then we can’t use EIGRP, so our remaining protocol options are basically RIP RIPv2 and OSPF. If it’s a large network, then, we cannot use RIP protocol really, our only options are OSPF and something called route redistribution. OSPF uses the Dijkstra algorithm for best path selection in the Network. First, the shortest path is constructed, and then the routing table contains the resulting best paths. OSPF converges is quick, although perhaps not as quickly as EIGRP, it also supports both IP and IPv6 routing protocols.

Route redistribution: is a translation service between routing protocols     

Network Diagram:


Configuration of OSPF:

R1 configuration:

Router>
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int gigabitEthernet 0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.10.1 255.255.255.0
Router(config-if)#exit
Router(config)#router ospf ?
<1-65535> Process ID
Router(config)#router ospf 10
Router(config-router)#network 192.168.10.0 0.0.0.255 area 0
Router(config-router)#exit


R2 configuration:
Router>
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int gigabitEthernet 0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.10.2 255.255.255.0
Router(config-if)#exit
Router(config)#int gigabitEthernet 0/1
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.20.1 255.255.255.0
Router(config)#router ospf ?
<1-65535> Process ID
Router(config)#router ospf 10
Router(config-router)#network 192.168.10.0 0.0.0.255 area 0
Router(config-router)#network 192.168.20.0 0.0.0.255 area 0
Router(config-router)#exit

R3 Configuration:

Router>
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#int gigabitEthernet 0/0
Router(config-if)#no shutdown
Router(config-if)#ip address 192.168.20.2 255.255.255.0
Router(config-if)#exit
Router(config)#router ospf ?
<1-65535> Process ID
Router(config)#router ospf 10
Router(config-router)#network 192.168.20.0 0.0.0.255 area 0
Router(config-router)#exit

OSPF Testing:
Router#show ip protocol
Router#show ip route
Router#show ip route ospf
Router#show ip route ospfv3
Router#show ip ospf
Router#show ip ospf border-Routers
Router#show ip ospf database
Router#show ip ospf database Summary
Router#show ip ospf interface
Router#show ip ospf interface fastethernet0/0
Router#show ip ospf neighbor
Router#show ip ospf neighbor detail
Router#show ipv6 interface
Router#show ipv6 interface brief
Router#show ipv6 neighbors



No comments