open shortest path first

48
Open Shortest Path First Pedro Tsao E- mail:[email protected] w

Upload: nizana

Post on 15-Jan-2016

80 views

Category:

Documents


1 download

DESCRIPTION

Open Shortest Path First. Pedro Tsao E-mail:[email protected]. Link state OSPF Areas OSPF behavior OSPF Packets Type OSPF Network Type OSPF LSA Type OSPF Route Summarization Configuring OSPF Special Area types Configuring OSPF Authentication. Agenda. Link State. Link State. - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Open Shortest Path First

Open Shortest Path First

Pedro Tsao E-mail:[email protected]

Page 2: Open Shortest Path First

Agenda

Link state

OSPF Areas

OSPF behavior

OSPF Packets Type

OSPF Network Type

OSPF LSA Type

OSPF Route Summarization

Configuring OSPF Special Area types

Configuring OSPF Authentication

Page 3: Open Shortest Path First

Link State

Page 4: Open Shortest Path First

Link StateThe information available to a distance vector router has been compared to the information available from a road sign. Link state routing protocol are like a road map.

Link State routing include the following:

• Open Shortest Path First (OSPF) for IP

•The ISO’s Intermediate System-to-Intermediate System (IS-IS) for CLNS and IP

•DEC’s DNA Phase V

•Novell’s NetWare Link Services Protocol (NLSP)

Page 5: Open Shortest Path First

•OSPF propagates link-state advertisements rather than routing table updates

•LSAs are flooded to all OSPF routers in the area

•The OSPF link-state database(LSDB) is pieced together from the LSAs generated by the OSPF routers

•OSPF use the SPF algorithm to calculate the shortest path to a destination

Link = router interface

State = description of an interface and its relationship to neighboring routers

OSPF as a Link-State Protocol

Page 6: Open Shortest Path First

– Neighbor table:

Also known as the adjacency database

Contains list of recognized neighbors

– Topology table:

Typically referred to as LSDB

Contains all routers and their attached links in the area or network

Identical LSDB for all routers within an area

– Routing table:

Commonly named a forwarding database

Contains list of best paths to destinations

Link State Data Structures

Page 7: Open Shortest Path First

Link State Routing Protocol

Link-state routers recognize more information about the network

than their distance vector counterparts.

Each router has a full picture of the topology.

Consequently, link-state routers tend to make more accurate decisions.

Page 8: Open Shortest Path First

OSPF Areas

Page 9: Open Shortest Path First

Link State Data Structure: Network Hierarchy

Link-state routing requires a hierachical network structure

that is enforced by OSPF.

This two-level hierarchy consists of the following:

•Transit area (backbone or area 0)

•Regular areas (non-backbone areas)

Page 10: Open Shortest Path First

OSPF area characteristics:

Minimizes routing table entries

Localizes impact of a topology change within an area

Detailed LSA flooding stops at the area boundary

Requires a hierarchical network design

OSPF Areas

Backbone Area

Area1 Area2Area3

Page 11: Open Shortest Path First

OSPF Terminology

Router A and B are backbone routers

Backbone routers make up area 0

Router C, D and E are known as Area Border Routers (ABRs)

ABRs attach all other areas to area 0

Backbone Area

Area1 Area2Area3

Page 12: Open Shortest Path First

OSPF Behavior

Page 13: Open Shortest Path First

OSPF Adjacencies

Hello

Routers discover neighbors by exchange hello packets

Routers declare neighbors to be up after checking certain parameters or options in the hello packet

Page 14: Open Shortest Path First

Forming OSPF Adjacencies

Point-to-point WAN links:

Both neighbors become full adjacent

LAN Links

Neighbors form a full adjacency with the DR and BDR

Routers maintain two-way state with the other routers (DROTHERs)

Routing updates and topology information are passed only between adjacent routers

Once an adjacency is formed, LSDBs are synchronized by exchanging LSAs

LSAs are flooded reliably through the area (or network)

Page 15: Open Shortest Path First

OSPF Router ID

The Router is Known to OSPF by the OSPF router ID number

LSDBs use the OSPF router ID to differentiate one router from the next

In descending other of specificity, the Router-id may be one of following:

•Router-id command

•Highest loopback address

•Highest Active IP address

Page 16: Open Shortest Path First

OSPF DR/BDR Election

DR/BDR will be electing by the following rules:

• The router With Highest priority value is the DR

• The router with the second highest priority value is BDR

• In case of a tie. The highest Router ID is DR, the second is BDR

• A router with priority of 0 cannot be the DR or BDR

• A router that’s not DR or BDR is a DROther

•If a router with higher priority comes into the network, it does not preempt the DR or BDR

Page 17: Open Shortest Path First

Routers find the best paths to destinations by applying Dijkstra’s SPF algorithm to link-state database as follows:

Every router in an area has the identical link-state DB

Each router in the area places itself into the root of the tree that is built

The best path is calculated with respect to the lowest total cost of links to a specific destination

Best routes are put into the forwarding database(routing table)

OSPF Calculation

Page 18: Open Shortest Path First

x

C

BA

F

DE

HG

x

C

BA

F

DE

HG

Shortest PathLink-state DB

Dijkstra’s algorithm

Assume all links are Ethernet, with an OSPF cost of 10

OSPF Calculation(cont.)

Page 19: Open Shortest Path First

OSPF Packets Type

Page 20: Open Shortest Path First

OSPF Packet Types

1.Hello

2.Destination Description

5.Link-State Acknowledgement

4.Link-State Update

3.Link-State Request

Page 21: Open Shortest Path First

Neighborship: The Hello Packet

Hello

hello

•Router ID•Hello and dead intervals•Neighbors•Area ID•Router priority•DR IP address•BDR IP address•Authentication password•Stub area flag

•Entry must match on neighboring routers

Page 22: Open Shortest Path First

I am router id 172.16.5.2, and I see 172.16.5.1

I am router id 172.16.5.1, and I see no one

BA

172.16.5.1/24

172.16.5.2/24

helloTo 224.0.0.5

Down state

Initial State

Port1

Port2

Router B neighbor List 172.16.5.1/24,in Port2

hello

Router A neighbor List 172.16.5.2/24,in Port1

Two-way State

Unicast to A

Establishing Bidirectional Communication

Page 23: Open Shortest Path First

Here is a summary of my LSDB

No, I’ll start exchange because I have a higher RID

I will start exchange because I have router id 172.16.5.1

BA

172.16.5.1/24

172.16.5.2/24

DBD

Exstart state

exchange State

Port1

Port2

DBD

Discovering the Network Routes

Here is a summary of my LSDBDBD

DBD

Page 24: Open Shortest Path First

Thanks for the information!

BA

172.16.5.1/24

172.16.5.2/24

LSAck

Loading state

Full State

Port1

Port2

Adding the Link-State Entries

LSAck

I need complete entry for network 172.16.6.0/24LSR

Here is the entry for network 172.16.6.0/24LSU

LSAckThanks for the information!

Page 25: Open Shortest Path First

int1192.168.1.1/24

System10.1.1.2/24

int2192.168.2.1/24

int1172.17.1.1/24

int2172.17.2.1/24

int110.1.1.3/24

Area 0

Area 2

Case Study: OSPF Packets

Router ID:2.2.2.2

Router ID:1.1.1.1

Page 26: Open Shortest Path First
Page 27: Open Shortest Path First
Page 28: Open Shortest Path First
Page 29: Open Shortest Path First

NO

NO

YES

YES

NO

YES

Link-State Data Structures: LSA Operation

IS entry in LSDB?

Is seq# the

same?

Ignore LSA

Add to DB

Send LSAck

Flood LSA

Run SPF to calculate new routing table

END

LSA

Is seq# higher?

Send LSU with newer information to source

END

Page 30: Open Shortest Path First

Maintaining Routing Information

B

DR

A

12

3

Router A notifies all OSPF DRs on 224.0.0.6

DR notifies others on 224.0.0.5

Page 31: Open Shortest Path First

Command (OSPF)

Command Parameters

Enable ospf

Disable ospf

create ospf area<area_id> type [normal | stub {stub_summary [enable |disable] | metric <value 0-65535>}

create ospf host_route

<ipaddr> {area <area_id> | metric <value 1-65535>}

create ospf aggregation

<area_id> <network_address> lsdb_type summary {advertise[enabled | disabled]}

config ospf ipif

[ipif <ipif_name 12> | all] {area <area_id> | priority <value> |hello_interval <sec 1-65535> | dead_interval <sec 1-65535> |authentication [none | simple <password 8> | md5 <key_id 1-255>] | metric <value 1-65535> | state [enable | disable] |active | passive}

create ospf virtual_link

<area_id> <neighbor_id> {hello_interval <sec 1-65535> |dead_interval <sec 1-65535> | authentication [none | simple<password 8> | md5 <key_id 1-255>]}

Page 32: Open Shortest Path First

Case Study: OSPF Configuration(D-Link)

int1192.168.1.1/24

System10.1.1.2/24

int2192.168.1.1/24

int1172.17.1.1/24

int2172.17.2.1/24

System10.1.1.3/24

Area 0

Area 2

Router ID:2.2.2.2

Router ID:1.1.1.1

DES-3852

DES-3828P

Page 33: Open Shortest Path First

DES-3852# OSPFconfig ospf ipif System area 0.0.0.0 state enable config ospf ipif int1 area 0.0.0.0 state enable config ospf ipif int2 area 0.0.0.0 state enable config ospf router_id 2.2.2.2enable ospf

DES-3828P# OSPFcreate ospf area 0.0.0.2 type normalconfig ospf ipif System area 0.0.0.0 state enable config ospf ipif int1 area 0.0.0.2 state enable config ospf ipif int2 area 0.0.0.2 state enableconfig ospf router_id 1.1.1.1enable ospf

System10.1.1.2/24

System10.1.1.3/24

int1172.17.1.1/24

int2172.17.2.1/24

int1192.168.1.1/24

int2192.168.1.1/24

Page 34: Open Shortest Path First

DES-3852# OSPFconfig ospf ipif System area 0.0.0.0 state enable config ospf ipif int1 area 0.0.0.0 state enable config ospf ipif int2 area 0.0.0.0 state enable config ospf router_id 2.2.2.2enable ospf

DES-3828P# OSPFcreate ospf area 0.0.0.2 type normalconfig ospf ipif System area 0.0.0.0 state enable config ospf ipif int1 area 0.0.0.2 state enable config ospf ipif int2 area 0.0.0.2 state enableconfig ospf router_id 1.1.1.1enable ospf

System10.1.1.2/24

System10.1.1.3/24

int1172.17.1.1/24

int2172.17.2.1/24

int1192.168.1.1/24

int2192.168.1.1/24

Page 35: Open Shortest Path First

DES-3852# OSPFconfig ospf ipif System area 0.0.0.0 state enable config ospf ipif int1 area 0.0.0.0 state enable config ospf ipif int2 area 0.0.0.0 state enable config ospf router_id 2.2.2.2enable ospf

DES-3828P# OSPFcreate ospf area 0.0.0.2 type normalconfig ospf ipif System area 0.0.0.0 state enable config ospf ipif int1 area 0.0.0.2 state enable config ospf ipif int2 area 0.0.0.2 state enableconfig ospf router_id 1.1.1.1enable ospf

System10.1.1.2/24

System10.1.1.3/24

int1172.17.1.1/24

int2172.17.2.1/24

int1192.168.1.1/24

int2192.168.1.1/24

Page 36: Open Shortest Path First

SW1SW2

•X is the Switch Number•Each Switch has a loopback: X.X.X.X/32 except SW3

Area 0

Area 1

SW3

SW4

Fa1/310.1.3.1/24

Fa1/210.1.2.1/24

Fa1/210.1.2.1/24

Fa1/310.1.3.2/24

Fa1/1172.31.1.1/24

Fa1/1172.31.1.2/24

Fa1/188.88.88.88/24

Area 3

Fa1/299.99.99.99/24

Case Study: OSPF Configuration(Cisco)

Page 37: Open Shortest Path First

OSPF Network Type

Page 38: Open Shortest Path First

OSPF Network Type

The three types of networks defined by OSPF are:

Point-to-point: A network that joins a single pair of routers

Broadcast: A multiaccess broadcast network, such as Ethernet

Non-Broadcast multiaccess(also called NBMA): A network that interconnects more than

two routers but that has no broadcast capability. Frame Relay, X.25 and ATM are examples

of NBMA networks

Page 39: Open Shortest Path First

Point-to-point Links

Usually a serial interface running either PPP or HDLC

May also be a point-to-point interface running Frame Relay or ATM

No DR or BDR election required

OSPF autodetects this interface type

OSPF packets are send using multicast 224.0.0.5

Page 40: Open Shortest Path First

Broadcast Network

Generally these are LAN technologies like Ethernet and Token Ring

DR and BDR election are required

All neighbor routers form full adjacencies with the DR and BDR only

Packets to the DR and BDR use 224.0.0.6

Packets from DR to all other routers use 224.0.0.5

Page 41: Open Shortest Path First

Hello

Electing the DR and BDR

Hello packets are exchange via IP multicast

The router with the highest priority is selected as the BR. The second-highest one is the BDR

Use the OSPF RID as the tie breaker

The DR election is nonpreemptive

Page 42: Open Shortest Path First

OSPF ModeNBMA Preferred

TopologySubnet Address

Hello Timer

AdjacencyRFC or Cisco

BroadcastFull or partial

meshSame 10 sec

Automatic, DR/BDR elected

Cisco

Nonbroadcast (NBMA)

Full or partial mesh

Same 30 secManual

configuration, DR/BDR elected

RFC

Point-to-multipoint

Partial-mesh or star

Same 30 SecAutomatic, no DR/BDR

RFC

Point-to-multipoint

nonbroadcast

partial-mesh or star

Same 30 secManual

configuration, no/DR/BDR

Cisco

Point-to-pointPartial-mesh or

star, using subinterface

Different for Each Subinterface

10 secAutomatic, no DR/BDR

Cisco

OSPF Network Type summary

Page 43: Open Shortest Path First

ABR and Backbone

Router

ASBR and Backbone

Router

OSPF Router Type

ExternalAS

Area1

Area0

Area2

Internal routers

Internal routers

Backbone/Internal routers

ABR and Backbone

Router

Page 44: Open Shortest Path First

OSPF Virtual Link

Virtual Link

Area010.0.0.0

Area010.0.0.0

Area1172.16.0.0

•Virtual links are used to connect a discontinuous area to area 0

•A logical connection is built between router A and router B

•Virtual links are recommended for backup or temporary connections

A B

Page 45: Open Shortest Path First

Case Study: OSPF Virtual Link (D-Link)

Page 46: Open Shortest Path First

Case Study: OSPF Virtual Link (Cisco)

Page 47: Open Shortest Path First

Q&A

Page 48: Open Shortest Path First

END