OSPF is link-state routing protocol which is often used to implement internetwork routing. It uses Dijkstra algorithm to calculate best route which follows the rule of open shortest path first. This article guides you through the basic setup of OSPF in your organization. When configuring OSPF, there are some fundamental requirements in order for it work. To begin with, OSPF uses a Hello messages to detect neighboring devices that run OSPF. Once detected OSPF attempts to form an adjacency with neighbors. Once an adjacency is formed LSA (Link-State Advertisements) are used to exchange routing information.
- Working LAN connections
- Basic router configuration such as ip address assignment and turning on interfaces from shutdown state.
Step1: The very first thing to do is to select the best OSPF design according to your organizational needs such as single-Area OSPF or multi-area OSPF.
Step2: Identify the network interfaces on which you want to setup OSPF and the OSPF area.
Step3: On a router, use the router ospf process-id global command to enter OSPF configuration mode for a particular OSPF process. Example:
Enter configuration commands, one per line. End with CNTL/Z.
R9(config)#router ospf 1
Step4: (Optional) Configure the OSPF router ID by doing following:
- Use the router-id id-value router subcommand to define the router ID. Example:
R9(config-router) # router-id 184.108.40.206
- Use the interface loopback number global command, along with an ip address address mask command, to configure an IP address on a loopback interface (chooses the highest IP address of all working loops). Example:
R9(config-interface) #Ip address 220.127.116.11 255.255.255.255
- Rely on an interface IP address (chooses the highest IP address of the nonloopback interfaces).
Step5: Use one or more network ip-address wildcard-mask area area-id router subcommands to enable OSPF on any interfaces matched by the configured address and mask, enabling OSPF on the interface for the listed area. Example:
R9(config-router) #network 10.0.0.30 0.0.0.3 area 1
R9(config-router) #network 10.0.0.40 0.0.0.3 area 1
Step6: (Optional) Use the passive-interface type number router subcommand to configure any OSPF interfaces as passive if no neighbors can or must be discovered on it.
Perform these steps on all the routers in your internetwork. And then for verification purpose you can use these commands on your router:
- Show ip route
- Show ip protocols
- Show ip ospf database
- Show ip ospf neighbor
Click here for CCNA Certification