54
© 1999, Cisco Systems, Inc. www.cisco.com 8-1 OSPF Overview RFC 2328, 2178, 1583

© 1999, Cisco Systems, Inc. 8-1 OSPF Overview RFC 2328, 2178, 1583

Embed Size (px)

Citation preview

Page 1: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

© 1999, Cisco Systems, Inc. www.cisco.com 8-1

OSPF Overview

RFC 2328, 2178, 1583

OSPF Overview

RFC 2328, 2178, 1583

Page 2: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

• Has fast convergence

• Supports VLSM

• Has no hop count limitation

• Processes updates efficiently

• Selects paths based on bandwidth

What Is OSPF?

Page 3: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

OSPF Terminology

Links

TokenRing

Page 4: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

OSPF Terminology

Links

TokenRing

Cost=10

Cost=1785Cost=6

Page 5: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

OSPF Terminology

Area 1Links

TokenRing

Cost=10

Cost=1785Cost=6

Area 0

Page 6: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

OSPF Terminology

Area 1Links

TokenRing

Cost=10

Cost=1785Cost=6

Area 0DR

BDR

Page 7: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

OSPF Terminology

Adjacencies Database

Lists Neighbors

Area 1Links

TokenRing

Cost=10

Cost=1785Cost=6

Area 0DR

BDR

Page 8: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

OSPF Terminology

Topology Database

Lists All Routes

Area 1Links

TokenRing

Cost=10

Cost=1785Cost=6

Area 0DR

BDR

Adjacencies Database

Lists Neighbors

Page 9: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Area 1Links

TokenRing

Cost=10

Cost=1785Cost=6

Area 0

OSPF Terminology

DR

BDR

RoutingTable

Lists Best Routes

Topology Database

Lists All Routes

Adjacencies Database

Lists Neighbors

Page 10: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

© 1999, Cisco Systems, Inc. www.cisco.com 8-10

OSPF Operation within a Single Area

OSPF Operation within a Single Area

Page 11: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Establishing Adjacencies

Hello

A

D E

CB

Hello

afadjfjorqpoeru39547439070713

Router IDHello/Dead IntervalsNeighborsArea-IDRouter PriorityDR IP AddressBDR IP AddressAuthentication PasswordStub Area Flag

* *

* *

Page 12: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Establishing Adjacencies (cont.)

172.68.5.1/24

E0

172.68.5.2/24

E1A BDown State

Page 13: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Establishing Adjacencies (cont.)

172.68.5.1/24

E0

172.68.5.2/24

E1

Router BAdjacencies Database

172.68.5.1/24, int E1

I am router ID 172.68.5.1 and I see no one.

A BDown State

Init State

Page 14: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Establishing Adjacencies (cont.)

172.68.5.1/24

E0

I am router ID 172.68.5.2, and I see 172.68.5.1

172.68.5.2/24

E1

Router BAdjacencies Database

172.68.5.1/24, int E1

I am router ID 172.68.5.1 and I see no one.

A BDown State

Init State

Page 15: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Establishing Adjacencies (cont.)

172.68.5.1/24

E0

I am router ID 172.68.5.2, and I see 172.68.5.1

Router AAdjacencies Database

172.68.5.2/24, int E0

172.68.5.2/24

E1

Router BAdjacencies Database

172.68.5.1/24, int E1

I am router ID 172.68.5.1 and I see no one.

A BDown State

Init State

Two-Way State

Page 16: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

• Hellos elect DR and BDR• Each router forms adjacency with DR and BDR

Electing the DR and BDR

DR BDR

Page 17: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

• Hello packets exchanged via IP multicast • Router with highest OSPF priority elected

P=1 P=0P=1

Electing the DR and BDR (cont.)

P=3 P=2

Hello

DR BDR

Page 18: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Discovering Routes

E0

172.68.5.1

DRE0

172.68.5.3

No, I will start exchange because I have a higher router ID.

I will start exchange because I have router ID 172.68.5.1.Hello

afadjfjorqpoeru39547439070713

Hello

afadjfjorqpoeru39547439070713

Exstart State

Page 19: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Discovering Routes

E0

172.68.5.1

DRE0

172.68.5.3

No, I will start exchange because I have a higher router ID.

I will start exchange because I have router ID 172.68.5.1.

Here is a summary of my link-state database.

Hello

afadjfjorqpoeru39547439070713

Hello

afadjfjorqpoeru39547439070713

DBD

afadjfjorqpoeru39547439070713

Exstart State

Exchange State

Here is a summary of my link-state database.DBD

afadjfjorqpoeru39547439070713

Page 20: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Discovering Routes (cont.)

E0

172.68.5.1

E0

172.68.5.3

Thanks for the information!LSAck

afadjfjorqpoeru39547439070713

LSAck

afadjfjorqpoeru39547439070713

DR

Page 21: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Discovering Routes (cont.)

E0

172.68.5.1

E0

172.68.5.3

I need the complete entry for network 172.68.6.0/24.

Here is the entry for network 172.68.6.0/24.

Thanks for the information!

LSR

afadjfjorqpoeru39547439070713

LSAck

afadjfjorqpoeru39547439070713

LSU

afadjfjorqpoeru39547439070713

Loading State.

Thanks for the information!LSAck

afadjfjorqpoeru39547439070713

LSAck

afadjfjorqpoeru39547439070713

DR

Page 22: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Discovering Routes (cont.)

E0

172.68.5.1

E0

172.68.5.3

I need the complete entry for network 172.68.6.0/24.

Here is the entry for network 172.68.6.0/24.

Thanks for the information!

LSR

afadjfjorqpoeru39547439070713

LSAck

afadjfjorqpoeru39547439070713

LSU

afadjfjorqpoeru39547439070713

Full State

Loading State.

Thanks for the information!LSAck

afadjfjorqpoeru39547439070713

LSAck

afadjfjorqpoeru39547439070713

DR

Page 23: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Choosing Routes

Routing TableNet Cost Out Interface2.2.2.0 6 TR03.3.3.0 7 TR03.3.3.0 10 E0

TokenRing

Cost=10

Cost=6FDDI

Cost=1A B C

This is the best route to C.

1.1.1.0/24 2.2.2.0/24 3.3.3.0/24

4.4.4.0/24

Page 24: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Maintaining Routing Information

New Routerxx

Link-State Change

LSU1

DR

AB

• New router tells all OSPF DRs on 224.0.0.6

Page 25: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Maintaining Routing Information

New Routerxx

Link-State Change

LSU

LSU

1

2

DR

A B

• New router tells all OSPF DRs on 224.0.0.6

• DR tells others on 224.0.0.5

Page 26: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

• New router tells all OSPF DRs on 224.0.0.6

• DR tells others on 224.0.0.5

New Routerxx

Link-State Change

LSU

LSU

LSU

1

2

3

Maintaining Routing Information

DR

A B

Page 27: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

• New router tells all OSPF DRs on 224.0.0.6

• DR tells others on 224.0.0.5

Maintaining Routing Information

New Routerxx

Link-State Change

LSU

LSU

LSU

1

2

3

I need to update my routing table.

DR

AB

4

Page 28: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Maintaining Routing Information (cont.)

Is entry inlink-state

database?

No

Run SPF to calculate new routing table

Add to database

Flood LSA

End

LSA

LSU

A

Page 29: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Maintaining Routing Information (cont.)

Is entry inlink-state

database? Yes

No

Run SPF to calculate new routing table

Add to database

Flood LSA

Is seq. # the same?

No

Send LSUwith newer

information to source

EndEnd

LSA

LSU

Is seq. #newer?

No

Page 30: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Maintaining Routing Information (cont.)

Is entry inlink-state

database? Yes

No

Run SPF to calculate new routing table

Add to database

Flood LSA

Is seq. # the same?

Yes

No

Send LSUwith newer

information to source

EndEnd

LSA

LSU

Is seq. #newer?

No

Ignore LSA

Page 31: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Maintaining Routing Information (cont.)

Is entry inlink-state

database? Yes

No

Run SPF to calculate new routing table

Add to database

Flood LSA

Is seq. # the same?

Yes

No

Yes

Send LSUwith newer

information to source

EndEnd

LSA

LSU

Is seq. #newer?

No

A

Ignore LSA

Send LSAckto DR

Go to A

Page 32: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Configuring OSPF on Internal Routers

Can assign network or interface address.

Broadcast Network Point-to-Point Network

E0

10.64.0.1

10.64.0.2

E0

S0

10.2.1.210. 2.1.1

S1A B C

<Output Omitted>interface Ethernet0 ip address 10.64.0.1 255.255.255.0!<Output Omitted>router ospf 1 network 10.0.0.0 0.255.255.255 area 0

<Output Omitted>interface Ethernet0 ip address 10.64.0.2 255.255.255.0!interface Serial0 ip address 10.2.1.2 255.255.255.0<Output Omitted>router ospf 50 network 10.2.1.2 0.0.0.0 area 0 network 10.64.0.2 0.0.0.0 area 0

Page 33: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

• Assigns a cost to an outgoing interface• May be required for interoperability• Use default cost between Cisco devices

Cisco Non-Cisco

Traffic

TokenRing

Router(config-if)#

ip ospf cost cost

Configuring Optional Commands (cont.)

Page 34: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

© 1999, Cisco Systems, Inc. www.cisco.com 9-34

Creating Multiple OSPF Areas

Creating Multiple OSPF Areas

Page 35: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Issues with Maintaining a Large OSPF Network

OSPF

OSPF

OSPF

OSPF

OSPF

My routing table is too big, I am running low on memory.

The SPF is running toooften for me to route.

I am only receivingLSAs, no data.

Page 36: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Area 0

Area 1 Area 2

Autonomous System

• Consists of areas and autonomous systems

• Minimizes routing update traffic

The Solution: OSPF Hierarchical Routing

Page 37: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

OSPF Multiarea Components

Area 0I am a backbone.

Area 2I am a stub.

Area 1I am standard.

Areas Routers LSAs

Internal

ABR

ASBR

Backbone

Type 1

afadjfjorqpoeru39547439070713

Type 2

afadjfjorqpoeru39547439070713

Type 3/4

afadjfjorqpoeru39547439070713

Type 5

afadjfjorqpoeru39547439070713

Page 38: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Types of OSPF Routers

InternalRouters

Area 1 Area 2

ASBR andBackbone

Router

Backbone/InternalRouters

ABR and Backbone

Router

Backbone Area 0

ExternalAS

ABR and Backbone

Router

InternalRouters

Page 39: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Flooding LSUs to Multiple Areas (cont.)

Routing Table

Interarea routes

Intra-area routes

External (non-OSPF routes)

Area 1

Area 1 Area 0

Area 1 RIP

Page 40: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

OSPF Area Configuration Example

192.168.15.2

Area 0

Stub Area 2

192.168.14.1 192.168.15.1S0

S0E0

ExternalAS

R4

R3

R3#

interface Ethernet 0ip address 192.168.14.1 255.255.255.0interface Serial 0 ip address 192.168.15.1 255.255.255.252

router ospf 100network 192.168.14.0 0.0.0.255 area 0network 192.168.15.0 0.0.0.255 area 2

R4#

interface Serial 0 ip address 192.168.15.2 255.255.255.252

router ospf 15network 192.168.15.0 0.0.0.255 area 2

Page 41: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Link-State Network Discovery

Routers calculate the shortest path to destinations in parallel

AA BB CC

X YZW

Routing TableRouting Table

WW 00

XX 00

Routing TableRouting Table

XX 00

YY 00

Routing TableRouting Table

YY 00

ZZ 00

E0

S1 S0

S1 S1

E1

E0 S1 S1 S0 S1 E1

Page 42: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Link-State Network Discovery

Routers calculate the shortest path to destinations in parallel

SPF

AA BB CC

X YZ

TopologicalDatabase SPF

TopologicalDatabase SPF

TopologicalDatabase

W

Routing TableRouting Table

WW 00

XX 00

Routing TableRouting Table

XX 00

YY 00

Routing TableRouting Table

YY 00

ZZ 00

E0

S1 S0

S1 S1

E1

E0 S1 S1 S0 S1 E1

Page 43: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Link-State Network Discovery

Routers calculate the shortest path to destinations in parallel

SPF

SPF Tree SPF Tree SPF Tree

AA BB CC

X YZ

TopologicalDatabase

ARouting

Table

ARouting

Table

SPFTopological

Database

BRouting

Table

BRouting

Table

SPFTopological

Database

CRouting

Table

CRouting

Table

W

Routing TableRouting Table

WW 00

XX 00

Routing TableRouting Table

XX 00

YY 00

Routing TableRouting Table

YY 00

ZZ 00

E0

S1 S0

S1 S1

E1

E0 S1 S1 S0 S1 E1

Page 44: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Link-State Topology Changes

Update processes proceed using the same link-state update

Process to update this

routingtable

Process to update this

routingtable

Process to update this

routingtable

Process to update this

routingtable

TopologyTopologychange change

ininlink-link-statestate

updateupdate

Process to update this

routingtable

Process to update this

routingtable

Page 45: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Link-State Concerns

Processing and memory required for link-state routing

SPF

SPF Tree

TopologicalDatabase

ARouting

Table

ARouting

Table

Page 46: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Link-State Concerns

Processing and memory required for link-state routing

Bandwidth consumed for initial link-state “flood”

SPF

SPF Tree

TopologicalDatabase

ARouting

Table

ARouting

Table

Page 47: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Problem: Link-State Updates

Unsynchronized updates, inconsistent path decisions

DD

BB

AACC

Network 1, UnreachableNetwork 1, Unreachable

Network 1, UnreachableNetwork 1, UnreachableNetwork 1goes down

then comes up

X, okX, ok

Slow path update

Page 48: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Problem: Link-State Updates

Unsynchronized updates, inconsistent path decisions

DD

BB

AACC

Network 1, UnreachableNetwork 1, Unreachable Network 1, UnreachableNetwork 1, Unreachable

Network 1, Back Up NowNetwork 1, Back Up Now

Network 1, UnreachableNetwork 1, UnreachableNetwork 1goes down

then comes up

X, okX, ok Fast path updates arrive first

Slow path update arrives lastSlow path update

Which SPF tree touse for routing?

Page 49: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Problem: Link-State Updates

Unsynchronized updates, inconsistent path decisions

DD

BB

AACC

Network 1, UnreachableNetwork 1, Unreachable Network 1, UnreachableNetwork 1, Unreachable

Network 1, Back Up NowNetwork 1, Back Up Now

Network 1, UnreachableNetwork 1, UnreachableNetwork 1goes down

then comes up

X, okX, ok Fast path updates arrive first

Slow path update arrives lastSlow path update

Which SPF tree touse for routing?

Page 50: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Link-State Update Problems

Synchronizing large networks—which network topology updates are correct?

Page 51: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Link-State Update Problems

Synchronizing large networks—which network topology updates are correct?

Router startup—order of start alters the topology learned

Page 52: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Link-State Update Problems

Synchronizing large networks—which network topology updates are correct?

Router startup—order of start alters the topology learned

Partitioned regions—slow updating part separated from fast updating part

Page 53: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Reduce the need for resources– “Dampen” update frequency

– Target link-state updates to multicast

–Use link-state area hierarchy for topology

–Exchange route summaries at area borders

Solution: Link-State Mechanisms

Page 54: © 1999, Cisco Systems, Inc.  8-1 OSPF Overview RFC 2328, 2178, 1583

Reduce the need for resources–“Dampen” update frequency

–Target link-state updates to multicast

–Use link-state area hierarchy for topology

–Exchange route summaries at area borders

Coordinate link-state updates–Use time stamps

–Update numbering and counters

–Manage partitioning using an area hierarchy

Solution: Link-State Mechanisms