+ All Categories
Home > Documents > Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf ·...

Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf ·...

Date post: 26-May-2020
Category:
Upload: others
View: 6 times
Download: 0 times
Share this document with a friend
69
1 ISP/IXP Workshops © 1999, Cisco Systems, Inc. Introduction to OSPF Introduction to OSPF Introduction to OSPF ISP/IXP Workshops ISP/IXP Workshops ISP/IXP Workshops
Transcript
Page 1: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

1ISP/IXP Workshops © 1999, Cisco Systems, Inc.

Introduction to OSPFIntroduction to OSPFIntroduction to OSPF

ISP/IXP WorkshopsISP/IXP WorkshopsISP/IXP Workshops

Page 2: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

2ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

AgendaAgendaAgenda

• OSPF Primer

• OSPF in Service Provider Networks

• OSPF BCP - Adding Networks

• OSPF Command Summary

Page 3: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

3ISP/IXP Workshops © 1999, Cisco Systems, Inc.

OSPF PrimerOSPF PrimerOSPF Primer

3ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Page 4: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

4ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPFOSPFOSPF

• Open ShortestPath First

• Link state or SPFtechnology

• Developed by OSPFworking group ofIETF (RFC 1247)

• Designed for TCP/IPInternet environment

• Fast convergence

• Variable-lengthsubnet masks

• Discontiguoussubnets

• No periodic updates

• Route authentication

• Delivered two yearsafter IGRP

• OSPF standarddescribed in RFC2328

Page 5: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

5ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Link StateLink State

Topology Information IsKept in a DatabaseSeparate from the

Routing Table

AA

BB

CC

22

1313

1313

QQ

ZZ

XX

X’s Link State

ZZ

XX

YYQQ

Z’s Link State

Q’s Link State

Page 6: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

6ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Link State RoutingLink State Routing

• Neighbour discovery

• Constructing an LSP

• Distribute LSP

• Compute routes

• On network failure

New LSPs flooded

All routers recompute routing tables

Page 7: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

7ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

FDDIDual Ring

Low Bandwidth UtilisationLow Bandwidth Utilisation

• Only changes propagated

• Multicast on multi-access broadcastnetworks

R1

LSA

XLSA

Page 8: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

8ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

FDDI Dual Ring

FDDI Dual Ring

Optimal Path UtilisationOptimal Path Utilisation

N1

N2 N3

N4

N5R1

R2

R3

R4

Cost = 1 Cost = 1

Cost = 10

Cost = 10

The optimal path is determined by thesum of the interface costs

Page 9: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

9ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Fast ConvergenceFast Convergence

• Detection Plus LSA/SPF

XR1 R3

R2

N2

Alternate Path

Primary Path

N1

Page 10: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

10ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Fast ConvergenceFast Convergence

• Finding a new route

LSA flooded throughout area

Acknowledgement based

Topology databasesynchronised

Each router derives routingtable to destination networks

LSA

XR1

N1

Page 11: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

11ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Utilises IP Multicast forUtilises IP Multicast forSending/Receiving UpdatesSending/Receiving Updates

• Broadcast networksDR and BDR —> AllSPFRouters (224.0.0.5)

All other routers —> AllDRRouters (224.0.0.6)

• Hello packets sent to AllSPFRouters(Unicast on point-to-point and virtuallinks)

Page 12: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

12ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF AreasOSPF Areas

• Group of contiguoushosts and networks

• Per area topologicaldatabase

Invisible outside the area

Reduction in routing traffic

• Backbone areacontiguous

All other areas must beconnected to the backbone

• Virtual Links

Area 1Area 4

Area 0Backbone Area

Area 2 Area 3

Page 13: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

13ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Classification of RoutersClassification of Routers

• Internal Router (IR)

• Area Border Router(ABR)

• Backbone Router (BR)

• Autonomous SystemBorder Router (ASBR)

Area 1

IR/BRArea 0

Area 2 Area 3

IR

ABR/BR

To other AS

ASBR

Page 14: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

14ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF Route TypesOSPF Route Types

Intra-area Route

all routes inside an area

Inter-area Route

routes advertised from one areato another by an Area BorderRouter

External Route

routes imported into OSPF fromother protocol or static routes

Area 0Area 2 Area 3

ABR

To other AS

ASBR

Page 15: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

15ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Inter-Area RouteInter-Area RouteSummarisationSummarisation

• Prefix or all subnets

• Prefix or all networks

• ‘Area range’ command

1.A 1.B 1.C

FDDIDual Ring

R1 (ABR)

R2

Network1

Next HopR1

Network1.A1.B1.C

Next HopR1R1R1

With summarisation

Withoutsummarisation

BackboneArea 0

Area 1

Page 16: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

16ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

External RoutesExternal Routes

• Redistributed into OSPF

• Flooded unaltered throughout the AS

• OSPF supports two types of externalmetrics

Type 1 external metrics

Type 2 external metrics (Default)

RIPIGRPEIGRPBGPetc.

OSPF

Redistribute

Page 17: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

17ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

External RoutesExternal Routes

• Type 1 external metric: metrics are addedto the summarised internal link cost

NetworkN1N1

Type 11110

Next HopR2R3

Cost = 10

to N1External Cost = 1

to N1External Cost = 2R2

R3

R1

Cost = 8

Selected Route

Page 18: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

18ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

External RoutesExternal Routes

• Type 2 external metric: metrics are comparedwithout adding to the internal link cost

NetworkN1N1

Type 212

Next HopR2R3

Cost = 10

to N1External Cost = 1

to N1External Cost = 2R2

R3

R1

Cost = 8

Selected Route

Page 19: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

19ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Topology/Link State DatabaseTopology/Link State Database

• A router has a separate LS databasefor each area to which it belongs

• All routers belonging to the samearea have identical database

• SPF calculation is performed separatelyfor each area

• LSA flooding is bounded by area

Page 20: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

20ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Protocol FunctionalityProtocol Functionality

• Bringing up adjacencies

• LSA types

• Area classification

Page 21: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

21ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

The Hello ProtocolThe Hello Protocol

• Responsible for establishing and maintainingneighbour relationships

• Elects designated router on multi-accessnetworks

FDDIDual Ring

Hello

HelloHello

Page 22: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

22ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

The Hello PacketThe Hello Packet

• Router priority

• Hello interval

• Router deadinterval

• Network mask

• Options: T-bit, E-bit

• List of neighbours

FDDIDual Ring

Hello

HelloHello

Page 23: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

23ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Designated RouterDesignated Router

• One per multi-access network

Generates network links advertisements

Assists in database synchronization

Designated Router

Designated Router

BackupDesignated Router

BackupDesignated

Router

Page 24: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

24ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Designated Router by PriorityDesignated Router by Priority

• Configured priority (per interface)

• Else determined by highest router ID

Router ID is the loopback interface address, ifconfigured, otherwise the highest IP address

144.254.3.5

R2 Router ID = 131.108.3.3

131.108.3.2 131.108.3.3

R1 Router ID = 144.254.3.5

DR

Page 25: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

25ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Neighbouring StatesNeighbouring States

• 2-way

Router sees itself in other Hello packets

DR selected from neighbours in state2-way or greater

DR BDR

2-way

Page 26: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

26ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Neighbouring StatesNeighbouring States

• FullRouters are fully adjacent

Databases synchronised

Relationship to DR andBDR

DR BDR

Full

Page 27: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

27ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

When to Become AdjacentWhen to Become Adjacent

• Underlying network is point to point

• Underlying network type is virtual link

• The router itself is the designated router

• The router itself is the backup designatedrouter

• The neighbouring router is the designatedrouter

• The neighbouring router is the backupdesignated router

Page 28: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

28ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

LSAsLSAs Propagate Along Propagate AlongAdjacenciesAdjacencies

• LSAs acknowledged alongadjacencies

DR BDR

Page 29: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

29ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Routing Protocol PacketsRouting Protocol Packets

• Share a common protocol header

• Routing protocol packets are sent with typeof service (TOS) of 0

• Five types of OSPF routing protocol packets

Hello - packet type 1

Database description - packet type 2

Link-state request - packet type 3

Link-state update - packet type 4

Link-state acknowledgement - packet type 5

Page 30: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

30ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Different Types ofDifferent Types of LSAs LSAs

• Five distinct type of LSAs

Type 1 : Router LSA

Type 2 : Network LSA

Type 3 and 4: Summary LSA

Type 5 and 7: External LSA

Page 31: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

31ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Router LSA (Type 1)Router LSA (Type 1)

• Describes the state and cost of therouter’s links to the area

• All of the router’s links in an area must bedescribed in a single LSA

• Flooded throughout the particular areaand no more

• Router indicates whether it is an ASBR,ABR, or end point of virtual link

Page 32: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

32ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Network LSA (Type 2)Network LSA (Type 2)

• Generated for every transit broadcastand NBMA network

• Describes all the routers attached to thenetwork

• Only the designated router originatesthis LSA

• Flooded throughout the area and nomore

Page 33: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

33ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Summary LSA (Type 3 and 4)Summary LSA (Type 3 and 4)

• Describes the destination outside thearea but still in the AS

• Flooded throughout a single area

• Originated by an ABR

• Only intra-area routes are advertisedinto the backbone

• Type 4 is the information about theASBR

Page 34: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

34ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

External LSA (Type 5)External LSA (Type 5)

• Defines routes to destination externalto the AS

• Default route is also sent as external

• Two types of external LSA:

E1: Consider the total cost up to the externaldestination

E2: Considers only the cost of the outgoinginterface to the external destination

Page 35: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

35ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Not Summarised: Specific LinksNot Summarised: Specific Links

BackboneArea #0

External links

1.A

1.C

1.B

1.D

TokenRing

TokenRing

TokenRing

TokenRing

3.D

3.A

3.C

3.B

1.A1.B1.C1.D

3.A3.B3.C3.D

2.A2.B2.C

2.A

2.C

2.B

TokenRing

TokenRing

• Specific link LSA advertised out• Link state changes propagate out ASBR

Page 36: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

36ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Summarised: Summary LinksSummarised: Summary Links

BackboneArea #0

ASBR

External links

1.A

1.C

1.B

1.D

TokenRing

TokenRing

TokenRing

TokenRing

3.D

3.A

3.C

3.B

2.A

2.B

TokenRing

TokenRing

• Only summary LSA advertised out• Link state changes do not

propagate

1 3

2

Page 37: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

37ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

BackboneArea #0

External links

1.A

1.C

1.B

1.D

TokenRing

TokenRing

TokenRing

TokenRing

3.D

3.A

3.C

3.B

2.A

2.C

2.B

TokenRing

TokenRing

ASBR

Not Summarised: Specific LinksNot Summarised: Specific Links

2.A2.B2.C3.A3.B3.C3.D

1.A1.B1.C1.D3.A3.B3.C3.D

1.A1.B1.C1.D2.A2.B2.C

• Specific link LSA advertised in• Link state changes propagate in

Page 38: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

38ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Summarised: Summary LinksSummarised: Summary Links

BackboneArea #0

3.D

3.A

2.B

• Only summary LSA advertised in• Link state changes do not

propagate ASBR

External links

1.A

1.C

1.B

1.D

TokenRing

TokenRing

TokenRing

TokenRing

3.C

3.B

2.A

TokenRing

TokenRing

2,3

1,3

1,2

Page 39: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

39ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

TokenRing

TokenRing

TokenRing

TokenRing

Regular Area (Not a Stub)Regular Area (Not a Stub)

From area 1’s viewpoint

• Summary networks from other areas injected

• External networks injected, for examplenetwork X.1

ASBR

External Networks

1.A

1.C

1.B

1.DTokenRing

TokenRing

3.C

3.B

2.A

2,3

1,3

1,2X.1

X.1

X.1

X.1

2.D2.C

2.B

3.A

3.D

Page 40: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

40ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

TokenRing

TokenRing

TokenRing

TokenRing

Normal Stub AreaNormal Stub Area

From area 1’s viewpoint

• Summary networks from other areas injected

• Default network injected into the area - represents external links

• Default path to closest area border router

• Define all routers in the area as stubarea x stub command ASBR

External Networks

1.A

1.C

1.B

1.DTokenRing

TokenRing

3.C

3.B

2.A

2,3 & Default

1,3

1,2X.1

X.1

X.1

X.1

2.D2.C

2.B

3.A

3.D

Page 41: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

41ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

TokenRing

TokenRing

TokenRing

TokenRing

Totally Stubby AreaTotally Stubby Area

From area 1’s viewpoint

• Only a default network is injected into the areaRepresents external networks and all inter-area routes

• Default path to closest area border router

• Define all routers in the area as totally stubbyarea x stub no-summary command ASBR

External Networks

1.A

1.C

1.B

1.DTokenRing

TokenRing

3.C

3.B

2.A

Default 2&3

1,3

1,2X.1

X.1

X.1

X.1

2.D2.C

2.B

3.A

3.D

Page 42: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

42ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

TokenRing

TokenRing

TokenRing

TokenRing

Not-So-Stubby AreaNot-So-Stubby Area

• Capable of importing external routes in a limitedfashion

• Type-7 LSA’s carry external information within anNSSA

• NSSA Border routers translate selected type-7LSAs into type-5 external network LSAs ASBR

External Networks

1.A

1.C

1.B

1.DTokenRing

TokenRing

3.C

3.B

2.A

Default 2&3

1,3

1,2X.1

X.1, X.2

X.1, X.2X.1

2.D2.C

2.B

3.A

3.DExternalNetworks

X.2

Page 43: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

43ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

AddressingAddressing

Area 1network 131.108.0.0subnets 17-31range 255.255.240.0

Area 2network 131.108.0.0subnets 33-47range 255.255.240.0

Area 3network 131.108.0.0subnets 49-63range 255.255.240.0

Area 0network 192.117.49.0range 255.255.255.0

Assign contiguous ranges of subnets per area to facilitate summarisation

Page 44: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

44ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

SummarySummary

• Scalable OSPF Network Design

Area hierarchy

Stub areas

Contiguous addressing

Route summarisation

Page 45: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

45ISP/IXP Workshops © 1999, Cisco Systems, Inc.

OSPF Design InService Provider

Networks

OSPF Design InOSPF Design InService ProviderService Provider

NetworksNetworks

45ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Page 46: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

46ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

BackboneBackboneRouterRouter

OSPF Areas and RulesOSPF Areas and RulesOSPF Areas and Rules

Area 1

Area 4

Area 0

Area 2 Area 3

InternalInternalRouterRouter

AreaAreaBorderBorderRouterRouter

AutonomousAutonomousSystem (AS)System (AS)

Border RouterBorder Router

Internet

• Backbone area (0)must be present

• All other areasmust haveconnectionto backbone

• Backbone mustbe contiguous

• Do not partitionarea (0)

Page 47: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

47ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF DesignOSPF DesignOSPF Design

• Attack addressing first - OSPF andAddressing go together.

Objective is to keep the Link State DataBase lean.

Create address hierarchy to matchtopology

Separate Blocks for infrastructure,customer interfaces, customers, etc.

Page 48: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

48ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF DesignOSPF DesignOSPF Design

• Examine physical topology

Is it meshed or hub-and-spoke?

• Try to use as Stubby an area as possible

It reduces overhead and LSA counts

• Push the creation of a backbone

Reduces mesh and promotes hierarchy

Page 49: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

49ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF DesignOSPF Design

• One SPF per area, flooding done per areaWatch out for overloading ABRs

• Different types of areas do differentflooding

Normal areas

Stub areas

Totally stubby (stub no-summary)

Not so stubby areas (NSSA)

Page 50: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

50ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF DesignOSPF Design

• Redundancy

Dual Links out of each area - usingmetrics (cost) for traffic enginering

Too much redundancy…

Dual links to backbone in stub areasmust be the same - other wise sub-optimal routing will result

Too Much Redundancy in the backbonearea without good summarization willeffect convergence in the area 0

Page 51: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

51ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF for ISPsOSPF for ISPsOSPF for ISPs

• OSPF features should consider.

OSPF logging neighbour changes

OSPF reference cost

OSPF Router ID Command

OSPF Process Clear/Restart

Page 52: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

52ISP/IXP Workshops © 1999, Cisco Systems, Inc.

OSPF BCPAdding Networks

OSPF BCPOSPF BCPAdding NetworksAdding Networks

52ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Page 53: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

53ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF - Adding NetworksOSPF - Adding NetworksOSPF - Adding Networks

• BCP - Individual OSPFNetwork statement foreach infrastructure link.

Have separate IP addressblocks for infrastructureand customer links.

Use IP UnnumberedInterfaces or BGP to carry/30s to customers

OSPF should only carryinfrastructure routes in anISP’s network.

OC12c

OC12c

Customer Connections

OC48

ISP Backbone

Page 54: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

54ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF - Adding Networks(Method One)

OSPF - Adding NetworksOSPF - Adding Networks(Method One)(Method One)

• redistributed connect subnets

Works for all connected interfaces on therouter but sends networks as externaltype-2s - which are not summarized

router ospf 100

redistributed connected subnets

• Not recommended

Page 55: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

55ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF - Adding NetworksOSPF - Adding NetworksOSPF - Adding Networks

• Specific network statements

Every interface needs a OSPF networkstatement. Interface that should not bebroadcasting OSPF Hello packets needspassive-interface.

router ospf 100

network 192.168.1.4 0.0.0.3 area 51

network 192.168.1.6 0.0.0.3 area 51

passive interface Serial 1/0

Page 56: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

56ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF - Adding NetworksOSPF - Adding NetworksOSPF - Adding Networks

• Network statements - wildcard mask

Every interface covered by wildcard maskused in OSPF network statement.Interfaces that should not be broadcastingOSPF Hello packets need passive-interfaceor default passive-interface.

router ospf 100

network 192.168.1.0 0.0.0.255 area 51

default passive-interface default

no passive interface POS 4/0

Page 57: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

57ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF - Adding NetworksOSPF - Adding NetworksOSPF - Adding Networks

• Key Theme when selecting atechnique: Keep the Link StateDatabase Lean

Increases Stability

Reduces the amount of information inthe Link State Advertisements (LSAs)

Speeds Convergence Time

Page 58: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

58ISP/IXP Workshops © 1999, Cisco Systems, Inc.

OSPF - New and UsefulFeatures

OSPF - New and UsefulOSPF - New and UsefulFeaturesFeatures

58ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Page 59: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

59ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF Logging NeighbourOSPF Logging NeighbourChangesChanges

• The router will generate a log messagewhenever an OSPF neighbour changes state

• Syntax:

[no] ospf log-adjacency-changes[no] ospf log-adjacency-changes

• Example of a typical log message:

%OSPF-5-ADJCHG: Process 1,%OSPF-5-ADJCHG: Process 1, Nbr Nbr223.127.255.223 on Ethernet0 from LOADING to223.127.255.223 on Ethernet0 from LOADING toFULL, Loading DoneFULL, Loading Done

Page 60: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

60ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Number of State ChangesNumber of State Changes

• The number of state transitions isavailable via SNMP (ospfNbrEvents)and the CLI:

show ip ospf neighbor [type number]show ip ospf neighbor [type number][neighbor-id] [detail][neighbor-id] [detail]

Detail—(Optional) Displays all neighboursgiven in detail (list all neighbours). Whenspecified, neighbour state transition countersare displayed per interface or neighbour ID

Page 61: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

61ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

State Changes (Continued)State Changes (Continued)

• To reset OSPF-related statistics, usethe clear ip ospf countersclear ip ospf counters EXECcommand. At this point neighborneighbor is theonly available option; it will resetneighbour state transition counters perinterface or neighbour id

clear ip ospf counters [neighbor [<typeclear ip ospf counters [neighbor [<typenumber>] [neighbor-id]]number>] [neighbor-id]]

Page 62: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

62ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF Cost: ReferenceOSPF Cost: ReferenceBandwidthBandwidth

• Bandwidth used in Metric calculation

Cost = 10^8/BW

Not useful for BW > 100 Mbps

• Syntax:ospf auto-cost reference-bandwidth <reference-ospf auto-cost reference-bandwidth <reference-bandwidth>bandwidth>

• Default reference bandwidth still 100Mbps for backward compatibility

Page 63: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

63ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF Router IDOSPF Router IDOSPF Router ID

• If the loopback interface exists and has anIP address, that is used as the router ID inrouting protocols - stability!

• If the loopback interface does not exist, orhas no IP address, the router ID is thehighest IP address configured - danger!

• New sub command to manually set theOSPF Router ID:

router-id <ip address>

Page 64: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

64ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

OSPF Clear/RestartOSPF Clear/RestartOSPF Clear/Restart

• clear ip ospf [pid] redistribution

This command can now clear redistribution based on OSPF routingprocess ID. If no pid is given, it assumes all OSPF processes.

• clear ip ospf [pid] counters

This command can now clear counters based on OSPF routingprocess ID. If no pid is given, it assumes all OSPF processes.

• clear ip ospf [pid] process

This command will restart the specified OSPF process. If no pid isgiven, it assumes all OSPF processes. It attempts to keep the oldrouter-id, except in cases, where a new router-id was configured, oran old user configured router-id was removed. Since this commandcan potentially cause a network churn, a user confirmation isrequired before performing any action.

Page 65: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

65ISP/IXP Workshops © 1999, Cisco Systems, Inc.

OSPF CommandSummary

OSPF CommandOSPF CommandSummarySummary

65ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Page 66: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

66ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Redistributing Routes intoRedistributing Routes intoOSPFOSPF

ROUTER OSPF <pid#x>

REDISTRIBUTE {protocol} <as#y>

<metric>

<metric-type (1 or 2)

<tag>

<subnets>

Page 67: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

67ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Router Sub-commandsRouter Sub-commands

• NETWORK <n.n.n.n> <mask> AREA <area-id>

• AREA <area-id> STUB {no-summary}

• AREA <area-id> AUTHENTICATION

• AREA <area-id> DEFAULT_COST <cost>

• AREA <area-id> VIRTUAL-LINK <router-id>...

• AREA <area-id> RANGE <address mask>

Page 68: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

68ISP/IXP Workshops © 1999, Cisco Systems, Inc. www.cisco.com

Interface SubcommandsInterface Subcommands

• IP OSPF COST <cost>

• IP OSPF PRIORITY <8-bit-number>

• IP OSPF HELLO-INTERVAL <number-of-seconds>

• IP OSPF DEAD-INTERVAL <number-of-seconds>

• IP OSPF AUTHENTICATION-KEY <8-bytes-of-password>

Page 69: Introduction to OSPF - IPsynftp.ipsyn.net/.../isp-routing/2-Introduction_to_OSPF-1up.pdf · 2001-05-01 · Network LSA (Type 2) • Generated for every transit broadcast and NBMA

69


Recommended