0% found this document useful (0 votes)
81 views

Open Shortest Path First (OSPF)

OSPF is an open standard link-state routing protocol that uses areas and link state advertisements to determine the shortest path to destinations. It establishes neighbor adjacencies via hello packets and elects a designated router and backup designated router on broadcast multi-access networks to reduce the number of adjacencies required. OSPF routers maintain neighbor, topology, and routing tables to exchange routing information and determine the best path.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
81 views

Open Shortest Path First (OSPF)

OSPF is an open standard link-state routing protocol that uses areas and link state advertisements to determine the shortest path to destinations. It establishes neighbor adjacencies via hello packets and elects a designated router and backup designated router on broadcast multi-access networks to reduce the number of adjacencies required. OSPF routers maintain neighbor, topology, and routing tables to exchange routing information and determine the best path.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

Open Shortest Path First (OSPF)

OSPF is an Open standard routing protocol.


It is Link State Routing Protocol.
Classless Routing Protocol.
OSPF use the concept of Area.
Metric is the Cost.
Administrative Value is 110.
Maximum Hop count is Unlimited.
Area 0 is the Backbone area of the OSPF domain.
Hello Packets are sent for Neighbor Discovery.
Fast Convergence

OSPF Tables:-

1. Neighbor Table
2. Topology Table
3. Routing Table

To view the OSPF Neighbor Table:-

Router# show ip OSPF neighbor

To view the OSPF Topology Table:-

Router# show ip OSPF database

To view the OSPF Routing Table:-

Router# show ip route OSPF

To clear OSPF Process:-

Router# clear ip OSPF process

Page 1 of 13
OSPF Types of Traffic:-

1. Intra-area Traffic
2. Inter-area Traffic
3. External Traffic

Intra- area Traffic:-

This traffic consists of packets that are passed between routers inside a
single area.

O is used to represent Intra-area Traffic in routing table.

Interarea Traffic:-

This traffic consists of packets that are passed between routers inside
different areas.

O IA is used to represent Inter-area Traffic in the routing table.

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.

OSPF Router Types:-

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.

Area Border Router (ABR):-

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.

Autonomous System Border Router (ASBR):-

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:-

Backbone area is the backbone of the OSPF domain. Area 0 is called


Backbone area. It is also called Transit area.

If multiple areas are configured in an OSPF domain, all areas must be


connected to the Back bone area (Area 0).

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:-

Router (config) # Router OSPF [Process ID]

Router (config-router) # network [directly connected network] [wildcard


mask] area [area id]

Wildcard Mask:-

Broadcast Subnet mask = Wildcard mask

Example: - 255.255.255.255 255.255.255.0 = 0.0.0.255

To view the OSPF Process:-

Router# show ip OSPF [Process ID]

Page 5 of 13
To clear OSPF routing table:-

Router# clear ip route *

OSPF Process ID:-

The process ID is the ID of the OSPF process to which the interface


belongs. The process ID is local to the router, and two OSPF neighbor
routers can have different OSPF process IDs.

An OSPF router can run multiple OSPF process. A single interface can
only belong to a single process.

To clear a specific OSPF process:-

Router# clear ip OSPF [process ID] process

OSPF Router ID:-

It is a 32 bit number assigned to each OSPF enabled router. Router ID is


used to identify each router inside an OSPF domain.

Conditions for Router-ID:-

Manual Router ID
Highest Loopback Address
Highest Physical Address

Manual Router ID:-


If there is a manually configured Router ID, it will be the RID of the
OSPF router.

Router (config) # Router OSPF [Process ID]


Router (config-router) # Router-ID [X.X.X.X]

Page 6 of 13
Highest Loopback Address:-
It will become RID of the OSPF router if there is no manual RID.

Highest Physical Address:-


It will become RID of the OSPF router if there is no manual RID and
Loopback Interface.

OSPF Cost:-

Cost is the metric of the OSPF. OSPF router use cost to select the best
path to the destination network.

Cost of a destination network is the cumulative costs of the outgoing


interfaces from this router 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.

Cost= 100 Mbps / Interface Bandwidth (Mbps)

For example, in the case of 10 Mbps Ethernet, OSPF Metric Cost value
is 100 Mbps / 10 Mbps = 10.

T1 (1.544-Mbps serial link) = 64

E1 (2.048-Mbps serial link) = 48

Fast Ethernet = 1

Gigabit Ethernet and faster = 1

Establishing OSPF Adjacency:-

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.

224.0.0.5- All OSPF routers should be able to transmit and listen to


this address.

Hello packets are sent at regular intervals (10 seconds).

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

Single Area OSPF Lab:-

!!! Router A Configuration

Router A (config) # router OSPF 10

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

!!! Router B Configuration

RouRourRouRoRouRourRouRRRouRourRoRouRourRouRoRouRourRo
uRRRouRou

!!! Router C Configuration

Multi Area OSPF Lab:-

!!! Router A Configuration

Router A (config) # router OSPF 10


Router A (config-router) # network 192.168.10.0 0.0.0.255 area 0
Page 9 of 13
Router A (config-router) # network 1.1.1.0 0.0.0.255 area 0
Router A (config-router) # exit

!!! Router B Configuration

!!! Router C Configuration

OSPF Broadcast Multi Access Network (BMA):-

BMA is the one of the network type that OSPF supports. BMA network is
multi-access and have broadcast capability.

Multi Access: - It is capable of connecting more than two devices.

Broadcast Capability: - All attached devices in a BMA network can


receive a single transmitted packet.

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.

The purpose of DR and BDR is to reduce the number of neighbor


adjacencies.

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.

Back-up Designated Router (BDR):-

It is the router on a multi access network responsible for functioning at


the time of DR failure.

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 priority is an 8 bit integer ranging from 0-255. The default


priority on cisco routers is 1 and can be changed using the command IP
OSPF Priority.

Routers with priority of 0 are ineligible to participate in the DR and BDR


election.

The router with highest priority becomes DR.


The router with second highest priority becomes BDR.
All other routers will become DR-others.

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.

To change the OSPF Priority:-

Router (config) # Interface Fa0/1


Router (config-if) # ip OSPF priority [Priority value 0-255]

To view the OSPF Priority:-

Router # show ip OSPF interface fa0/1

To view the OSPF Network type:-

Page 12 of 13
Router # show ip OSPF interface fa0/1

Page 13 of 13

You might also like