OSPF (Open Shortest Path First)
OSPF (Open Shortest Path First)
Open Shortest Path First is an open standards routing protocol that’s been implemented by a wide
variety 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
options are basically RIP V1, RIP V2, or OSPF. But if it’s a large network, then really we have options are
OSPF or something called route redistribution. This works by using the Dijkstra Algorithm.
OSPF Converges quickly, although perhaps not as quickly as EIGRP and it supports multiple equal cost
routes to the same destination. But unlike EIGRP, it only supports IP routing.
To see each router connects to the backbone – called area 0, or the backbone area. OSPF must have an
area 0, and all routers should connect to this area if at all possible, but routers that connect other areas
to the backbone within an AS are called Area Border Routers (ABRs)
OSPF runs inside an autonomous system, but can also connect multiple autonomous systems together.
The Router that connects these AS’s together is called an Autonomous System Boundary router (ASBR).
OSPF Terminology
1. Link – A link is a network or router interface assigned to any given network.
2. Router ID – (RID) is an IP address used to identify the router. Cisco Chooses the router ID by using the
highest IP address of all configured loopback interfaces.
3. Neighbors – Neighbors are two or more routers that have an interface on a common network, such as
two routers connected on a point- to – point serial link.
4. Adjacency – An adjacency is a relationship between two OSPF routers that permits the direct
exchange of route updates.
5. Hello Protocol – The OSPF hello protocol provides dynamic neighbor discovery and maintains
neighbor relationship. Hello packets are addressed to 224.0.0.5.
6. Neighborship Database – The neighborship database is a list of all OSPF routers for which Hello
packets have been seen.
7. Topology Database – The topology database contains information from all of the link state
advertisement packets that have been received for an area.
8. Designated Router – A designated router is elected whenever OSPF routers are connected to the
same multi-access network.
9. Back up designated Router – A backup designated router (BDR) is a hot standby for the DR on multi
access links.
10. OSPF Areas – An OSPF area is a grouping of contiguous networks and routers. All routers in the same
area share a common Area ID. Because a router can be a member of more than one area at a time, the
area ID is associated with specific interfaces on the router. This would allow some interfaces to belong
to area 1, while the remaining interfaces can belong to area 0. All of the routers within the same area
have the same topology table. When configuring OSPF, you have got to remember that there must be
an area o, and that this is typically configured on the routers that connect to the backbone of the
network. Areas also play a role in establishing a hierarchical network organization.
An interface set with a bandwidth of 64000 would have a default cost of 1563.
The OSPF process ID is needed to identify a unique instance of an OSPF database and is locally
significant.
The Show IP OSPF command is used to display OSPF information for one or all OSPF processes running
on the router.
#sh ip ospf
The show ip ospf database command indicates the number of links and the neighboring routers ID and is
the topology database mentioned earlier.
#show ip protocol
Loop back Interfaces are logical interfaces, which are virtual, software- only interfaces. Using loopback
interfaces with your ospf configuration ensures that an interface is always active for ospf processes.
Let’s say that you are not using loopback interfaces and the serial interface of your router is the RID of
the router because it has the highest IP address of active interfaces. If this interface goes down, then a
re-election must occur on who is going to be the DR and BDR on the network. Not necessarily a big deal
but what happens if this is a flapping link (going up /down). The routers will not converge because the
election is never completed. This is obviously a problem with OSPF. Loopback interfaces solve this
problem because they never go down and the RID of the router never changes.
The highest IP address of any logical interface will always become a routers ID.
#Conf t
Router (config)#int lo 0
#ip add 172.16.30.1 255.255.255.255
#no shut
I am sure that you are wondering, what the IP address mask of 255.255.255.255 /32 means and why we
don’t just use 255.255.255.0 instead. Well, either mask works, but the /32 mask is called a host mask
and works fine for loop back interfaces.
An important thing to keep in mind is that the new RIDs didn’t show p after setting the loopback
interface on each router until I rebooted the routers.
It’s important to remember that although the IP address on the interface is higher than the loopbacks
address the highest loopback address always beats any physical interface.
AD – 110
It supports unlimited hop count
Metric = cost + 108 /Bandwidth
It supports load balancing with equal paths.
OSPF (Open Shortest Path First)