OSPF Overview
OSPF Overview
OSPF is a Link State Routing Table. Each router will have complete topology
information.
OSPF breaks the network down into logical groups of routers known as Areas. In
this video, we will focus on a Single Area.
Just like EIGRP, OSPF also uses a Hello protocol to discover neighbors and form
Neighbor relationships. OSPF uses 224.0.0.5 & 224.0.0.6 Multicast addresses to
communicate to its neighbors.
As each router has complete topology information, it can quickly adapt to alternate
paths. If the primary route in the routing table is lost, the router will recalculate an
alternate path (if it exists) immediately without consulting a neighbor.
OSPF supports Equal Cost Load Balancing.
OSPF Characteristics
OSPF supports the validation of neighbors by using Authentication using Clear Text and MD5
based Keys. Authentication makes sure that the routes received by the router are from
Trusted sources / Routers.
OSPF also supports the Summarization of routes. It allows you the ability to send a summary
route to represent a group of routes allowing you to cut down on the size of the routing table.
OSPF advertises the network along with it’s subnet mask making it a Classless Routing
Protocol. It supports features like VLSM.
OSPF sends information about all the directly connected Links to its neighbor. The updates
are acknowledged. Just like EIGRP, OSPF does not send the Full routing table. The Hello
Packets are used as keepalives to maintain the neighbor relationships.
OSPF Characteristics - Timers
Hello Timer: Once the OSPF neighbors establish a
neighbor relationship and exchange Network information,
they send Hello packets to let the neighbor know that it is
still up and the routes are still valid. The default OSPF
Hello time on a Ethernet Link is 10 seconds.
Dead Timer: If a router does not receive a hello for 40
seconds from a neighbor, it will consider the neighbor
down and delete all the routes from it.
OSPF Characteristics – Metric
OSPF uses a Cost Metric.
By default, the cost is calculated based on the logical interface
bandwidth.
The metric calculation formula for OSPF is :
LSAs are the building blocks of the OSPF Link State Database [LSDB].
The LSDB is similar to your EIGRP topology table.
Although there are multiple types of LSAs in OSPF, only 2 LSAs are
used for network/routes within a Single Area.
It also specifies the Subnet Mask for the Multi-Access Segment.
Basic OSPF Configuration
All Routing Protocols are enabled by using the “Router” command.
In order to enable OSPF, you use the “Router OSPF” command followed by a process
ID.
The Process is locally significant. It does not need to match the neighboring router.
R1(config)#Router ospf 1
R1(config-router)#
Basic OSPF Configuration
OSPF Routers requires a unique identifier. This ID is known as the
Router ID.
It can be set either of the 3 ways and in that order.
1. Manually under the Router ospf process using the “router-id” command.
2. If the command is missing under the process, OSPF tries to pick the router-id
based on the Highest IP address on a Loopback.
3. If you don't have a loopback interface, it will use the highest IP address on any
Physical Interface.
R1(config)#Router ospf 1
R1(config-router)#router-id 0.0.0.1
Network Command
Just like the other Routing protocols, the “Network” Command is used by the Routing
Protocols on the specified Interface.
By Enabling the routing protocol under the interface, it will take the following 2 actions:
• 1. It will allow the router to send and receive OSPF updates on that interface.
• 2. It will send/advertise this interface network on other OSPF enabled interfaces.
In OSPF, the network command allows you the ability to enable OSPF on a Major network or
subnets. The subnets can be specified using a Inverse Mask.
The Area that the interface belongs to is also specified in the Network Command.
You enable OSPF on all the directly connected interfaces.
R1(config)#Router OSPF 1
R1(config-router)#Network 10.1.1.0 0.0.0.255 area 0
R1(config-router)#Network 11.0.0.0 0.255.255.255 area 0
R1(config-router)#Network 192.1.13.0 0.0.0.255 area 0
Configuring OSPF on a Point – To
– Point Serial Interface
OSPF detects a Point-to-Point Interface by looking at the
Encapsulation of the Interface. When it sees either HDLC or PPP
as the encapsulation, it knows it is a Point-to-point segment.
A P2P segment will only have 1 neighbor hence does not require
a DR or BDR.
Interface E 0/0
ip ospf priority 10
Verifications
Type Show IP OSPF Neighbors on R5. You should see 2 Neighbors listed.
Type Show IP route OSPF on R2. You should see the Loopback Interfaces of R4
& R5. They will be listed as a Host router “/32”. This is due to the fact that
OSPF treats a Loopback as a Host and advertises it with a /32 mask.
Type Show IP OSPF Interface S 1/0 on R4. The Link will have a Network Type
of Loopback.
Type Show IP OSPF Interface S 1/0 on R2. The Link will have a Network Type
of Point-to-point.
OSPF Characteristics – Metric
OSPF uses a Cost Metric.
By default, the cost is calculated based on the logical interface
bandwidth.
The metric calculation formula for OSPF is :
Area Border Routers: Routers in Backbone area that connect to other areas
are known as Area Border Routers (ABR). As the ABR belongs to multiple
areas, it will maintain complete information about the topologies in both areas.
It separates the LSA Flooding zones by sending general (Summary) information
about one area to another. If required, Route Summarization is performed on
the ABR.
OSPF Router Types
Internal Routers: Routers that have all links within the same area is known
as a Internal Routers. Backbone routers which have all their links in Area 0
can also be classified as Internal Backbone Routers.
It also specifies the Subnet Mask for the Multi-Access Segment.
OSPF – LSA Type 3 – Summary LSA
An ABR takes the detailed information that it learns from one
area and summarizes it for another area.