Open Shortest Path First (OSPF)
Open Shortest Path First (OSPF)
OSPF Tables:-
1. Neighbor Table
2. Topology Table
3. Routing Table
Page 1 of 13
OSPF Types of Traffic:-
1. Intra-area Traffic
2. Inter-area Traffic
3. External Traffic
This traffic consists of packets that are passed between routers inside a
single area.
Interarea Traffic:-
This traffic consists of packets that are passed between routers inside
different areas.
Page 2 of 13
External area Traffic:-
The Traffic consists of packets that are passed between routers within
the OSPF domain and a router inside a non-OSPF domain.
1. Internal Router
2. Backbone Router
3. Area Border Router (ABR)
4. Autonomous System Border Router (ASBR)
Internal Router:-
Routers that have all of their interfaces within the same area are called
internal routers.
Page 3 of 13
Backbone Router:-
A router with at least one interface that is attached to the backbone area
is called Backbone routers. Area 0 is called Backbone area.
A router that connects different areas with the same AS is called ABR. At
least one interface of the ABR should be connected to the Backbone
Area.
An ABR can be a Back Bone Router. But every backbone routers cannot
be ABR.
A router that connects OSPF domain to other Non-OSPF domain for the
purpose of exchanging External Routes in to the OSPF domain and to
Non-OSPF domain is called ASBR.
Backbone Area:-
All areas distribute routing information in to the Back bone area and the
back bone area will spread this routing information back to each area.
Example:-
Page 4 of 13
Configuring OSPF:-
Wildcard Mask:-
Page 5 of 13
To clear OSPF routing table:-
An OSPF router can run multiple OSPF process. A single interface can
only belong to a single process.
Manual Router ID
Highest Loopback Address
Highest Physical Address
Page 6 of 13
Highest Loopback Address:-
It will become RID of the OSPF router if there is no manual RID.
OSPF Cost:-
Cost is the metric of the OSPF. OSPF router use cost to select the best
path to the destination network.
Route with lowest cost will be selected as the best path. OSPF
calculates the cost using the bandwidth of the link.
The higher the bandwidth, lower the cost will be. So the path with lowest
cost will be selected.
For example, in the case of 10 Mbps Ethernet, OSPF Metric Cost value
is 100 Mbps / 10 Mbps = 10.
Fast Ethernet = 1
Page 7 of 13
Initially, an OSPF router interface is in the down state. In the
down state, the OSPF process has not exchanged information with any
neighbor.
OSPF router will try to start a relationship and want to enter the Init state
or really the Two-way state.
OSPF hello packets are sent to 224.0.0.5 advertising its own Router ID.
When a router (sends or) receives its first Hello packet, it enters the Init
state.
As soon as the router sends a Hello packet to the neighbor with its
Router-ID and the neighbor sends a Hello packet back with that Router
ID, the routers interface will transition to the two-way state
Page 8 of 13
Router A (config-router) # network 192.168.10.0 0.0.0.255 area 0
Router A (config-router) # network 1.1.1.0 0.0.0.255 area 0
Router A (config-router) # exit
RouRourRouRoRouRourRouRRRouRourRoRouRourRouRoRouRourRo
uRRRouRou
BMA is the one of the network type that OSPF supports. BMA network is
multi-access and have broadcast capability.
On a BMA network, DR and BDR is elected and all other routers form
adjacency with the DR and BDR.
Page 10 of 13
Hello packets are sent using multicast address 224.0.0.5 on every
10 seconds.
Designated Router:-
A designated router will collect LSA from DR-others and responsible for
forwarding them throughout the network. So DR will reduce the amount
of LSA traffic generated on BMA network.
The router can be the DR only for one multi access network and it
cannot be DR in another multi access network.
If the DR fails, BDR becomes the new DR. DR-others will also make
adjacency with the BDR.
DR Others:-
Routers which are not elected as DR and BDR are called DR-others.
Page 11 of 13
Election Procedure of DR and BDR:-
Router priority
Router-ID
Router Priority:-
Router-ID:-
If there is a tie in Router priority, The OSPF-RID will become the tie-
breaker. The router with highest RID will win.
Page 12 of 13
Router # show ip OSPF interface fa0/1
Page 13 of 13