43
Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network vendors This works by using the Dijkstra algorithm First, a shortest path tree is constructed, and then the routing table is populated with the resulting best paths OSPF converges quickly

Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Embed Size (px)

Citation preview

Page 1: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Open Shortest Path First (OSPF)

Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network vendors

This works by using the Dijkstra algorithm First, a shortest path tree is constructed,

and then the routing table is populated with the resulting best paths

OSPF converges quickly

Page 2: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Open Shortest Path First (OSPF)

OSPF provides the following features: Consists of areas and autonomous

systems Minimizes routing update traffic Allows scalability Supports VLSM/CIDR Has unlimited hop count Allows multi-vendor deployment (open

standard)

Page 3: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Open Shortest Path First (OSPF)

OSPF is supposed to be designed in a hierarchical fashion, which basically means that you can separate the larger network into smaller networks called areas.

The reasons for creating OSPF in a hierarchical design include: To decrease routing overhead To speed up convergence To confine network instability to single areas of

the network

Page 4: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Open Shortest Path First (OSPF)

Page 5: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Open Shortest Path First (OSPF)

Each area 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

Routers that connect other areas to the backbone within an AS are called Area Border Routers (ABRs)

Still, at least one interface must be in area 0

Page 6: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Open Shortest Path First (OSPF)

OSPF runs inside an autonomous system, but can also connect multiple autonomous systems together

The router that connects these AS’es together is called an Autonomous System Boundary Router (ASBR).

Page 7: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Terminology Following are important OSPF terms to familiarize

yourself Link A link is a network or router interface

assigned to any given network. When an interface is added to the OSPF process, it’s considered by OSPF to be a link. This link, or interface, will have state information associated with it (up or down) as well as one or more IP addresses.

Router ID The Router ID (RID) is an IP address used to identify the router. OSPF chooses the highest IP address of all active physical interfaces

Page 8: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Terminology

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

Adjacency An adjacency is a relationship between two OSPF routers that permits the direct exchange of route updates OSPF directly shares routes only with neighbors that

have also established adjacencies. And not all neighbors will become adjacent—this depends upon both the type of network and the configuration of the routers

Page 9: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Terminology

Hello protocol The OSPF Hello protocol provides dynamic neighbor discovery and maintains neighbor relationships Hello packets are addressed to 224.0.0.5.

Neighborship database The neighborship database is a list of all OSPF routers for which Hello packets have been seen A variety of details, including the Router ID

and state, are maintained on each router in the neighborship database

Page 10: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Terminology Topology database The topology database

contains information from all of the Link State Advertisement packets that have been received for an area The router uses the information from the topology

database as input into the Dijkstra algorithm that computes the shortest path to every network

Link State Advertisement A Link State Advertisement (LSA) is an OSPF data packet containing link-state and routing information that’s shared among OSPF routers There are different types of LSA packets An OSPF router will exchange LSA packets only with

routers to which it has established adjacencies

Page 11: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Terminology Designated router A designated router (DR) is elected

whenever OSPF routers are connected to the same multi-access network

They are networks that have multiple recipients A prime example is an Ethernet LAN To minimize the number of adjacencies formed, a DR is

chosen (elected) to send/receive routing information to/from the remaining routers on the broadcast network or link

This ensures that their topology tables are synchronized All routers on the shared network will establish adjacencies

with the DR and backup designated router (BDR) The election is won by the router with the highest priority,

and the Router ID is used as a tiebreaker if the priority of more than one router turns out to be the same

Page 12: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Terminology Backup designated router A backup designated router (BDR) is

a hot standby for the DR on multi-access links The BDR receives all routing updates from OSPF adjacent routers,

but doesn’t flood LSA updates OSPF areas An OSPF area is a grouping of contiguous networks

and routers All routers in the same area share a common Area ID A router can be a member of more than one area so, 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 There must exist an area 0, typically configured on the routers

that connect to the backbone of the network Areas also play a role in establishing a hierarchical network

organization

Page 13: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Terminology Broadcast (multi-access) networks such as Ethernet

allow multiple devices to connect to (or access) the same network, as well as provide a broadcast ability in which a single packet is delivered to all nodes on the network

In OSPF, a DR and a BDR must be elected for each broadcast multi-access network

Non-broadcast multi-access (NBMA) networks are types such as Frame Relay, X.25, and Asynchronous Transfer Mode (ATM)

These networks allow for multi-access, but have no broadcast ability like Ethernet

So, NBMA networks require special OSPF configuration to function properly and neighbor relationships must be defined

Page 14: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Terminology

Point-to-point Point-to-point refers to a type of network topology consisting of a direct connection between two routers that provides a single communication path The point-to-point connection can be physical, as in a

serial cable directly connecting two routers, or it can be logical, as in two routers that are thousands of miles apart yet connected by a circuit in a Frame Relay network

This type of configuration eliminates the need for DRs or BDRs—but neighbors are discovered automatically

Page 15: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Terminology

Point-to-multipoint Point-to-multipoint refers to a type of network topology consisting of a series of connections between a single interface on one router and multiple destination routers All of the interfaces on all of the routers

sharing the point-to-multipoint connection belong to the same network

As with point-to-point, no DRs or BDRs are needed

Page 16: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF The DR is responsible for distributing all LSAs

to every OSPF router on that network and it is also responsible for generating a separate LSA for that multi access network

The BDR becomes the DR if the current DR goes down

After BDR becomes the DR, a new BDR is elected

Page 17: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF If OSPF used broadcast packets to exchange routing

information, all nodes on the network would have to process the packets to determine whether or not the packets were meant for them

OSPF uses multicast

Destination IP address for all OSPF routers is 244.0.0.5 (called ALLSPFRouters)

Destination IP address for designated and backup designated router in OSPF is 244.0.0.6 (called ALLDRouter)

Page 18: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF OSPF can be a memory intensive protocol

All routers store all LSA’s in their link state database

On a large network, memory requirements can make OSPF cost prohibitive or may prevent organizations from running the protocol on existing hardware

OSPF allows the site to partition its networks and routers in smaller subsets called AREAS To permit growth and make the networks in an AS

easier to manage

Page 19: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF AREAS An AREA is part of the OSPF AS, in which all routers

share a common link state database Router in different areas do not share the same link

state database, but information is passed between areas within an AS through other types of LSAs

Information is shared between areas but the information a router stores about other areas is not as detailed

Using areas, OSPF networks can be logically segmented to decrease the size of routing tables

With the introduction of areas, its is no longer true that all routers in the AS have an identical link state database. A router actually has a separate link state database for each area it is connected to

Page 20: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF AREAS An AREA is identified by a number, which is 32-

bit unsigned integer value

Area 0 is reserved for the backbone of the network and all areas must connect to area 0 directly

Area numbers can be expressed as decimal integers or in dotted decimal format Area 0 or 0.0.0.0 Area 2216169484 or 132.24.16.12

Page 21: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF AREAS

Based on its role in an area, a router can be one or more of the following types Internal routers

A router whose interfaces are all in the same area

Backbone routers A router with at least one interface in area 0 Backbone routers do not have to be area border

routers. Routers with all interfaces connecting to the backbone area are supported

Page 22: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF AREAS Area Border Router (ABR)

A router with at least one interface in area 0 and at least one interface in an other area

Area border routers run multiple copies of the basic algorithm, one copy for each attached area

Area border routers condense the topological information of their attached areas for the distribution to the backbone. The backbone in turn distributes the information to other areas

Page 23: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF AREAS

Autonomous System Border Router (ASBR) A router that connects an AS running OSPF to

another AS running another protocol such as RIP

Such a router advertises AS external routing information throughout the Autonomous System

The paths to each AS boundary router are known by every router in the AS

Page 24: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF AREAS

Area 0

Area 1

Area 1024

RIP

Area 192.168.100.100

ASBR

ABR, B

ABR, B

I

I

I

I

I, BI, B

Page 25: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF AREAS

When routing a packet between two non-backbone areas, the backbone is used

Looking at this another way, inter-area can be pictured as forcing a star configuration on the autonomous system, with the back bone as hub

Page 26: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Link State Advertisements LSAs are the means by which OSPF routers

communicate information for the link state database

LSAs come in several types which are identified by the following type numbers

Type 1 Router LSA Every router generates one Router LSA which

includes its RID along with a list of all of the routers interfaces including their cost and state

These LSAs do not traverse ABRs

Page 27: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Link State Advertisements Type 2 Network LSA:

Every DR generates one Network LSA for a multiaccess netwok

A network LSA includes a list of all routers attached to the MA network

Like Type 1, these LSA's are blocked by ABRs and kept in the area itself

Type 3 Network Summary LSA: Network summary LSA carry routing information about

networks of one area into another area They are generated by ABRs to propagate routing

information between areas Network summary LSAs are not included in the SPF

algorithm run by routers. They are simply directly inserted into the routing table. In this respect, OSPF behaves as a distance vector routing protocol between areas

Page 28: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Link State Advertisements Each summary-LSA describes a route to a

destination outside the area, yet still inside the AS(i.e., an inter-area route)

TYPE 4 ASBR Summary LSA: Also generated by ABRs Similar to Network summary LSA except they

contain routing information about a particular host (ASBR)

Type 5 AS External LSA: AS external LSA are generated by ASBR routers They advertise routes external to the OSPF AS, such

as those from other routing protocols Type 5 LSA are not associated with any particular

Area so they are flooded in the entire OSPF AS

Page 29: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Message Format (Header)

0 8 16 24

Version (1)

Type Message Length

Source Router IP address

Area ID

Checksum Authentication Type

Authentication (octets 0 – 3)

Authentication (octets 4 – 7)

Page 30: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Message Types 1) Hello

Tests reachability of neighbours 2) Database description

Topology outline sent to a newly connected router 3) Link state request

Request for more information about a link 4) Link state update

Update changes in link status 5) Link state acknowledgment

ACK for every update message

Page 31: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Hello Message

0 8 16 24 32

OSPF header with Type = 1

Network Mask

Dead Timer Hello Intr GWAY PRIO

Designated Router

Backup Designated Router

Neighbor 1 IP Address

Neighbor 1 IP Address

Page 32: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Hello Message Unlike RIP, OSPF does not regularly broadcast all of its

routing information

OSPF routing updates are incremental, so usually router only send updates when a topology change occurs

Instead, routers use Hello packets to let their neighbours know that they are still up and running

If a router does not receive a Hello packet for a certain amount of time, it decides that the neighbour must no longer be running

Page 33: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Hello Message

On addition to functioning as keepalives between neighbours, Hello packets allow the descovery of OSPF neighbours, establishment of neighbour

Timers that are used with Hello packets are HELLO INTR DEAD TIMER

Page 34: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Hello Message DEAD TIMER

Time in seconds after which a non-responding neighbour is considered dead (normally 4 times the Hello interval)

HELLO INTR Time in seconds between hello messages (normally

10 seconds)

PRIORITY Integer priority of the sender (router) Used during elections for Designated and Backup

designated router

Page 35: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Hello Message

DESIGNATED and BACKUP ROUTER IP addresses that gives the senders view of

the designated and backup designated router for the network over which this message is sent

NEIGHBOR IP ADDRESS IP address of all neighbours from which the

sender has recently received hello messages

Page 36: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Neighbours OSPF neighbours are routers on the same

network that agree on certain configuration parameters

Routers form a neighbour relationship by analyzing the contents of each others Hello packets to determine whether they agree on the required parameters

The following parameters must be matched for routers to become neighbours Area ID Network mask Authentication information Hello Interval Dead Timer

Page 37: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Neighbours

If routers don't agree on the parameters, they cannot become neighbours to form adjacencies

If the routers agree on these parameters, each router put the Router ID into his own Hello packet with its own RID listed as neighbour, it knows that the neighbour relationship has been formed

Page 38: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Link Status Update Message (LSU)

0 8 16 24

OSPF Header with Type = 4

Number of LSAs

LSA 1

LSA 2

………

Page 39: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Link State Advertisement

0 8 16 24

Link Age Link Type

Link ID

Advertising Router

Link Sequence Number

Link Checksum Length

Page 40: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Link Status Advertisement

All LSA have an age which is measured in seconds

When generating an LSA the router sets its age to ZERO

Age of the LSA is also kept in the link state database and incremented over time

MaxAge is the max amount of time an LSA can exist without being refreshed. MaxAge is 3600 seconds (one hour)

If the LSA reaches MaxAge in the database the router will flush the LSA from its database

Page 41: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

OSPF Link Status Advertisement

LSAs are not packets on their own; they are contained within Link State update (LSU) packets

Several LSAs may be contained in one LSU

Every router that receives an LSA for a particular area will flood that LSA out of all other interfaces that are part of that area

It does not simply forward the packet instead, it extracts LSAs from the LSU, enters them in its database and builds its own LSU to forward the new or updated LSAs to its adjacent neighbours

Page 42: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Steady-State OperationAfter a network has stabilized, all routers in the same area have the exact same LSAs, and each router has chosen its best routes using SPF, the following is still true of routers running OSPF:

Each router sends Hellos, based on per-interface hello intervals

Each router expects to receive Hellos from neighbors within the dead interval on each interface; if not, the neighbor is considered to have failed

Each router originally advertising an LSA refloods each LSA based on a per-LSA Link-State Refresh (LSRefresh) interval (default 30 minutes)

Each router expects to have its LSA refreshed within each LSA’s MaxAge timer (default 60 minutes)

Page 43: Open Shortest Path First (OSPF) Open Shortest Path First (OSPF) is an open standards routing protocol that’s been implemented by a wide variety of network

Conclusions

Efficient routing protocol for larger networks

No loops in the network

Difficult to configure and manage on larger network

Scalable Protocol