You are on page 1of 14

Open Shortest Path First (OSPF) was developed by the Internet Engineering Task Force

(IETF) as a replacement for RIP and is now the IETF-recommended Interior Gateway
Protocol (IGP).

OSPF is a link-state protocol that, as the name implies, uses Dijkstra's Shortest Path First
(SPF) algorithm

the most recent specification is RFC 2328

OSPF's major advantages over distance vector protocols are


fast reconvergence
scalability to much larger networks
and less susceptibility to bad routing information

Other features of OSPF are

• The use of areas, which reduces the protocol's impact on CPU and memory,
contains the flow of routing protocol traffic, and makes possible the construction
of hierarchical network topologies
• Fully classless behavior, eliminating such classful problems as discontiguous
subnets
• Support of classless route table lookups, VLSM, and supernetting for efficient
address management
• A user definable metric
• Equal-cost load balancing for more efficient use of multiple paths
• The use of reserved multicast addresses to reduce the impact on non-OSPF–
speaking devices
• Support of authentication for more secure routing
• The use of route tagging for the tracking of external routes

OSPF Timers

HelloInterval – 10 seconds on a broadcast network, 30 seconds on a non-


broadcast network. This timer can be changed.

DeadInterval – This is 4 times the hello interval – by default, 40 seconds on a


broadcast network and 120 seconds on a non-broadcast network. This timer can
be changed.
OSPF defines five network types:

• Point-to-point networks
• Broadcast networks
• Nonbroadcast Multiaccess (NBMA) networks
• Point-to-multipoint networks
• Virtual links

Point-to-point networks, such as a T1, DS-3, or SONET link, connect a single pair of
routers. Valid neighbors on point-to-point networks will always become adjacent. The
destination address of OSPF packets on these networks will always be the reserved class
D address 224.0.0.5, known as AllSPFRouters

In addition to these five network types, it should be noted that all networks fall into one
of two more-general types:

• Transit networks have two or more attached routers. They might carry packets
that are "just passing through"—packets that were originated on and are destined
for a network other than the transit network.
• Stub networks have only a single attached router.[6] Packets on a stub network
always have either a source or a destination address belonging to that network.
That is, all packets were either originated by a device on the network or are
destined for a device on the network. OSPF advertises host routes (routes with a
mask of 255.255.255.255) as stub networks. Loopback interfaces are also
considered stub networks and are advertised as host routes.[7]

Steps to forming neighbor adjacency and link state database synchronization for a multi-
access network (Ethernet)

We begin in the DOWN STATE

1) RT1 sends a hello to the multicast address of AllSPFRouters (224.0.0.5) – it


indicates it knows of no neighbors, and does not know who the DR/BDR is
(0.0.0.0)

INIT STATE BEGINS when

2) RT2 receives the hello from RT1, and sends a hello back. This hello contains RT1
as a known neighbor (since it is responding to a hello from RT1) , and RT2 is
flagged as the DR (this election has formerly taken place, not as part of this
transaction)
2-WAY STATE HAS OCCURRED at this point

-> DR/BDR Election takes place here, if necessary.

Here is the election process (not needed in this example)

1) After 2-way state has been established, we will examine the Priority, DR,
and BDR values of the hello packets from each neighbor. Neighbors with
a priority value set to zero (0) are ineligible for election.
2) Create a list of eligible neighbors, those not claiming to be the DR
3) From this list, any neighbors claiming to be the BDR (formerly elected)
will participate in the election – the highest router ID wins.
4) If no neighbor has formerly been elected BDR (none claimed it) then the
highest priority wins, for a tiebreaker the highest router ID wins.
5) If any neighbors have declared themselves as the DR, the highest priority
wins, for a tiebreaker the highest router ID wins.
6) If no router has declared itself the DR, the BDR (newly elected) will be
promoted to the DR.
7) Repeat steps 2 through 6 for BDR election

EXSTART STATE BEGINS (when the Initial DBD is sent – the “I” bit is set to 1)

3) DBD Packets are exchanged between RT1 and RT2. Since RT1 has a higher
Router ID (discovered by the initial hellos) RT1 takes the role of “Master” while
RT2 acts as slave – all this means is that RT1 sends the DBD first, and RT2
follows after. The DBD Packets exchanged contains the list of links (not
complete LSA information) contained in the link state database of the originating
router. Each DBD must be individually ACKd (LSAck)

EXCHANGE BEGINS (when DBD’s are being exchanged – the “I” bit is set to 0 since
co

this is not the initial DBD packet)

4) DBD’s are exchanged between the routers, until the “M” bit (signifying that more
packets are coming) is set to 0 (indicating that NO more packets are coming)
Each DBD must be individually ACKd (LSAck)

LOADING OCCURS when all DBD’s have been exchanged, and there are entries in the
Link State Request List (link states that I need information on)

5) LSR’s (Link State Request Packets) are exchanged to request LSA’s from the
other router (with link state information) for each link whose information is
required. The LSA’s will be ACK’d (LSAck)If no link state information is
required, the neighbor relationship is transitioned to FULL.
FULL occurs when BOTH neighbors link state information exchange has been
completed.

A full adjacency does not occur until the link state information has been synchronized
between the two routers – they then begin running SPF calculations to determine network
routes.

DR / BDR Information

In OSPF, the DR acts as a pseudonode – with all other adjacent routers on the segment
appearing as links on the pseudonode – those links just happen to have a cost of zero (0)
so the route cost is not influenced negatively.

Each router on the network forms an adjacency with the DR - which represents the
pseudonode with a special Network LSA

Link State Updates

On a broadcast network, Link State Updates are exchanged between the DR,
BDR, and DROther routers. The DROther routers will tell the DR and BDR about link
state changes. Only the DR will tell DROther routers of link state changes. Once
received, link state updates are flooded out all interfaces except the one received on (split
horizon at work) LSAck’s are unicast.

Each LSA contains three values that are used to ensure that the most recent copy of the
LSA exists in every database. These values are sequence number, checksum, and age.

OSPF uses a 32-bit signed, linear sequence number space

The first LSA sent has a sequence number of InitialSequenceNumber. Each time the
router produces a new instance of the LSA, the router increments the sequence number
by one. When MaxSequenceNumber is reached, the LSA will flush from the link state
databases by setting the age to 0 (MaxAge), and re-flooding. When the LSAck is received
on this change (setting the age to 0) the LSA is again re-flooded with the age set to
InitialSequenceNumber

Multi Area OSPF

All networks must have a backbone area (0)

Areas are identified by a 32-bit Area ID

Area names can be numeric (1,2,3,etc) or in Dotted Decimal notation (3.1.1.1)


There are 3 types of traffic

Intra-Area – stays within an area

Inter-Area – between areas

External – Between OSPF Domain and another AS (or domain) – think ASBR

Router Types

Internal Router – all interfaces are in the same OSPF area

ABR – Area Border Router – a router with interfaces in multiple areas

ASBR – Autonomous System Boundary Router – between AS’s or domains


(think route redistribution here)

All areas must connect to area 0 directly – if this cannot be done, you need to use a
virtual link. A virtual link is configured by identifying the router ID of the node at each
end, and the area to which you’re passing through.

LSA Types

1 – Router LSA – Standard LSA – “These are my directly connected link states”

2 – Network LSA – From the DR – “These are all the link states I know about” – for the
whole broadcast segment

3 – Network Summary LSA - Sent by the ABR – to advertise all routes in an area to
another area.

4 – ASBR Summary LSA - Sent by the ABR – advertises the router ID of the ASBR.

5 – AS External LSA - Sent by the ASBR “These are the networks outside my AS”

7 – NSSA External LSA -


Types of routes –

O – OSPF Intra-Area (Router LSA)

O IA – OSPF Inter-Area (Summary LSA)

O E1 – Type 1 External Routes

O E2 – Type 2 External Routes

Type 1 External Routes (E1) Cumulates cost through the network

Type 2 External Routes (E2) Keeps the cost the same through the network

OSPF Cost for an interface can be changed “(config-if)# ip ospf cost 100”

OSPF Cost can be hardcoded per interface “(config-router)# auto-cost reference-


bandwidth) – this means use the bandwidth as a cost instead of basing it on the “type of
interface”

OSPF Summarization can ONLY be done on 2 types of routers – ABR’s and ASBR’s.

Consolidate inter-area routes on an ABR

(config-router)# area 1 range 10.0.0.0 255.0.0.0

Consolidate external routes on an ASBR

(config-router)# summary-address 10.0.0.0 255.0.0.0

Default-information originate – use this to summarize all routes into a single


advertisement (0.0.0.0). – This doesn’t create a route, it simply advertises it into the
network if it exists.

(config-router)# default-information originate [always] - always keyword allows you to


blackhole a network (advertise the default route even if you don’t have one)

OSPF Area Types


Backbone Area – area 0

Stubby Area – Does not accept external LSA’s (No type 5 LSA’s)

Totally Stubby Area – Does not accept external LSA’s (Type 5) nor 3 or 4 (Summary
LSA’s) – it uses a simple default route – which is automatically created!

Standard Area (normal)

NSSA (Not So Stubby Area) – Cisco Proprietary – No type 5 LSA’s – but converts them
to type 7 LSA’s

No ASBRs in a Stub Area (except an NSSA)

Only one ABR in a stub area

No virtual links through Stub Areas

Stub area configuration -

Router ospf 10

Network x.x.x.x area x

Network x.x.x.x area x

Area 1 stub

Totally Stubby Area

Area 1 stub no-summary

You can manipulate the cost of the default route coming into the area as below

(config-router)# area 1 default-cost 10

For NSSA areas

Area 1 nssa (on all routers in the NSSA area)


Area 1 nssa default-information originate (on the ABR – to tell the REST of the
NSSA routers where their default route is)

- You can also make an NSSA accept no summaries from the


ABR (area 1 nssa no-summary) while still letting it be an
NSSA and injecting networks from an ASBR. – stoopid
network design!

EASY Integrated IS-IS

Types of Routers:

L1 – Route within an area

L2 – Route between areas

L1/L2 – Route between Level 1 and Level 2

Two Separate Databases – Level 1 Database, Level 2 Database

Metric – Fully user configurable. An arbitrary value of 0 through 63. 10 is the Cisco
default metric

L1/L2 routers only form an L2 relationship between areas.

IS-IS Routing Domains –

Level 0 Routes – between ES and IS


Level 1 Routes – Within an area

Level 2 Routes – Between areas

Level 3 Routes – External to the AS

OSI Addressing

CLNP Addressing – Connectionless Network Protocol

When you assign a CLNP address to a router, it’s called an NSAP (Network Service
Access Point)

Only one address per node (router)

NSAP Address can be up to 20 bytes long

Cisco’s implementation of ISIS uses 3 fields of the OSI Addressing Scheme

Area

System ID

NSAP Selector (NSEL)

Example - 49.1234.AA15.B322.1841.00

NSEL of .00 = “Router” or “IS”

System ID = .AA15.B322.1841

Area = 49.1234

Rules: Addres can be 20 bytes

Last Byte of address is always 00


Last 6 bytes (before NSEL) is always the system ID (12 digits – remember 2
digits is one byte)

Everything else to the left is the Area ID. Read these RIGHT to LEFT

49.xxxxxx = Private address

Network Layer PDU – Network PDU

Data Link Layer PDU – Data Link PDU

ISIS Packet Types –

Hello

Link-State Packet (LSP)

Partial Sequence Number PDU (PSNP)

Complete Sequence Number PDU (CSNP)

TWO ISIS Network Types

Broadcast

Point to Point

Broadcast mode elects a DIS (think DR)

Use sub-interfaces with NBMA network topologies


EIGRP –

3 Separate Tables

Neighbor Table

Topology Table

Routing Table

FD – Feasible Distance – How far away from a router

AD – Advertised Distance – How far away my neighbor tells me it is

Successor (Active Route)

Feasible Successor (Backup Route)

Active Route

Passive Route

To be considered a Feasible Successor, The AD must be less than the FD of the


Successor

In the routing table - the metric (90/2365952)

90 = Administrative Distance

2365952 = Feasible Distance

In the Topology Table – the metric (2365952/281600)

2365952 = Feasible Distance

281600 = Advertised Distance


EIGRP Neighbor Formation

Message Types

Hello

Update

Query

Reply

Ack

EIGRP Messages sent via multicast (224.0.0.10)

Metrics Based on - Bandwidth/Delay/Load/Reliability/MTU

Default Metric = 256*(BW + Delay)

5 K Values

Defaults

K1 =1

K2 = 0

K3 = 1

K4 = 0

K5 = 0V

Delay = Delay in MICROSECONDS

BW = 10^7/BW in Kilobytes

You might also like