OSPF stands for Open shortest path first which is an interior routing protocol with open standard and being used for years in different networking vendors. To configure OSPF, its required to establish communication between neighboring devices with some basic exchange routing configuration. To start with, OSPF uses Hello mechanism to detect neighboring devices that run on OSPF. Once detects the neighbour, its forms adjacency. Post which, adjacency establishes link-state advertisements to exchange routing information.
Before proceeding with the basic setup steps, it’s important to have an understanding on Hello packet. This packet uses the Hello protocol, which is responsible for establishing and maintaining neighbor relationships. It ensures that the communication between the neighbours is bidirectional. Once the bidirectional communication is established, a Designed Router(DR) is selected if on a multiaccess network. After the neighbouring devices pair up, they synchronize to Link-State databases.
To setup basic OSPF, for a neighboring adjacency below are the high-level steps
- List out the network interfaces that are on OSPF
- Identify the OSPF area
- Run required commands to enable OSPF
As a first step to start with, enter the OSPF configuration mode. Before proceeding, remember that you need to identify the OSPF with a process ID.
Sample snippet to enable the configuration is as below. In this case, enabling configuration mode on a Router named 8 and process ID as 1. These configurations will vary based on your network topology.
R8>en
R8#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R8(config)#router ospf 1
R8(config-router)#
Next, run the network statement on each interface that should run OSPF. Sample snippet of the command line is as below
R8(config-router) #network X.X.X.X W.W.W.W area A
In this syntax, the X.X.X.X indicates the network address. The W.W.W.W is the wildcard mask. The A is the area ID.
Now, we need to identify that the OSPF has been neighbored up and synchronized the databases. To perform this step, run the show ip ospf neighbors command. Sample snippet of command line
R8#sh ip ospf neighbor
Next let’s look at our Link-State Database on R8.
R8#show ip ospf database
As a last step in our configuration, look if the OSPF routes populating our routing table on R8(example router):
R8#show ip route
Depending on the topology that was selected, your basic OSPF configuration is now completed by executing the above steps
Info about Cisco Exam
Looking for an IT Job?
Please call us on 1800 159 151, or complete the form below.