+ All Categories
Home > Documents > 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF...

2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF...

Date post: 30-Jan-2018
Category:
Upload: doanmien
View: 235 times
Download: 6 times
Share this document with a friend
43
1 © 2005 Cisco Systems, Inc. All rights reserved. Session Number Presentation_ID Cisco Confidential Introduction to OSPF ISP/IXP Workshops ISP/IXP Workshops
Transcript
Page 1: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

1© 2005 Cisco Systems, Inc. All rights reserved.Session NumberPresentation_ID Cisco Confidential

Introduction to OSPF

ISP/IXP WorkshopsISP/IXP Workshops

Page 2: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

2© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF

• Open ShortestPath First

• Link state or SPFtechnology

• Developed by OSPFworking group of IETF(RFC 1247)

• Designed for TCP/IPInternet environment

• Fast convergence

• Variable-lengthsubnet masks

• Discontiguous subnets• No periodic updates• Route authentication• OSPF standard described

in RFC2328

Page 3: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

3© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Link State

Topology Information IsKept in a DatabaseSeparate from the

Routing Table

AABBCC

2213131313

QQZZXX

X’s Link State

ZZ

XX

YYQQ

Z’s Link StateQ’s Link State

Page 4: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

4© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Link State Routing

• Neighbour discovery• Constructing a Link State Packet (LSP)• Distribute the LSP

(Link State Announcement – LSA)

• Compute routes• On network failure

New LSPs floodedAll routers recompute routing tables

Page 5: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

5© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Low Bandwidth Utilisation

• Only changes propagated• Multicast on multi-access broadcast networks

LSA

XLSA

R1

Page 6: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

6© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Fast Convergence

• Detection Plus LSA/SPF

X N2

Alternate Path

Primary Path

N1

R2

R1 R3

Page 7: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

7© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Fast Convergence

• Finding a new routeLSA flooded throughout area

Acknowledgement based

Topology database synchronised

Each router derives routing table todestination networks

LSA

XN1R1

Page 8: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

8© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

IP Multicast for Sending/Receiving Updates

• Broadcast networksAll routers must accept packets sent to AllSPFRouters(224.0.0.5)All DR and BDR routers must accept packets sent toAllDRouters (224.0.0.6)

• Hello packets sent to AllSPFRouters (Unicast onpoint-to-point and virtual links)

Page 9: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

9© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Areas

• Group of contiguous hosts andnetworks

• Per area topological databaseInvisible outside the areaReduction in routing traffic

• Backbone area contiguousAll other areas must be connectedto the backbone

• Virtual LinksArea 1

Area 2 Area 3

R1 R2

R3R6

Area 4R5 R4

R7R8

RaRd

RbRcArea 0

Backbone Area

Page 10: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

10© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Classification of Routers

• Internal Router (IR)• Area Border Router (ABR)• Backbone Router (BR)• Autonomous System

Border Router (ASBR)

R1 R2

R3

R5 R4

Rd Ra

RbRc

IR

ABR/BR

IR/BRASBR

To other AS

IR

Area 1

Area 0

Area 2 Area 3

Page 11: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

11© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Route Types

• Intra-area Routeall routes inside an area

• Inter-area Routeroutes advertised from one area toanother by an Area Border Router

• External Routeroutes imported into OSPF from otherprotocol or static routes

R1 R2

R3

R5 R4

Rd Ra

RbRc

IR

ABR/BR

ASBR

To other AS

IR

Area 1

Area 0

Area 2 Area 3

Page 12: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

12© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Inter-Area Route Summarisation

• Prefix or all subnets

• Prefix or all networks• ‘Area range’ command

1.A 1.B 1.C

FDDIDual Ring

(ABR)Network1

Next HopR1

Network1.A1.B1.C

Next HopR1R1R1

With summarisation

Withoutsummarisation

BackboneArea 0

Area 1R1

R2

Page 13: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

13© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

• Prefixes which are redistributed into OSPF fromother protocols

• Flooded unaltered throughout the AS

• OSPF supports two types of external metricsType 1 external metrics

Type 2 external metrics (Default)

External Routes

RIPIGRPEIGRPBGPetc.

OSPF

RedistributeR2

Page 14: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

14© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

External Routes

• Type 1 external metric: metrics are added to thesummarised internal link cost

NetworkN1N1

Type 11110

Next HopR2R3

Cost = 10to N1

External Cost = 1

to N1 External Cost = 2Cost = 8

Selected Route

R3

R1

R2

Page 15: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

15© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

External Routes

• Type 2 external metric: metrics are compared withoutadding to the internal link cost

NetworkN1N1

Type 212

Next HopR2R3

Cost = 10to N1

External Cost = 1

to N1 External Cost = 2Cost = 8

Selected Route

R3

R1

R2

Page 16: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

16© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Topology/Link State Database

• A router has a separate LS database for each areato which it belongs

• All routers belonging to the same area haveidentical database

• SPF calculation is performed separately for eacharea

• LSA flooding is bounded by area

Page 17: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

17© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Protocol Functionality

• Bringing up adjacencies

• LSA types

• Area classification

Page 18: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

18© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

The Hello Protocol

• Responsible for establishing and maintainingneighbour relationships

• Elects designated router on multi-access networks

FDDIDual Ring

Hello

HelloHello

Page 19: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

19© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

The Hello Packet

• Router priority

• Hello interval

• Router dead interval

• Network mask

• Options: T-bit, E-bit• List of neighbours

FDDIDual Ring

Hello

HelloHello

Page 20: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

20© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Designated Router

• There is ONE designated router per multi-access networkGenerates network link advertisementsAssists in database synchronization

Designated Router

Designated Router

BackupDesignated Router

BackupDesignated

Router

Page 21: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

21© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Designated Router by Priority

• Configured priority (per interface)

• Else determined by highest router IDRouter ID is the loopback interface address, if configured,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 R2R1

Page 22: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

22© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Neighbouring States

• FullRouters are fully adjacent

Databases synchronised

Relationship to DR and BDR

DR BDR

Full

Page 23: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

23© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Neighbouring States

• 2-wayRouter sees itself in other Hello packets

DR selected from neighbours in state 2-way or greater

DR BDR

2-way

Page 24: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

24© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

When 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 designated router

• The neighbouring router is the designated router

• The neighbouring router is the backupdesignated router

Page 25: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

25© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

LSAs Propagate Along Adjacencies

• LSAs acknowledged along adjacencies

DR BDR

Page 26: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

26© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Routing Protocol Packets

• Share a common protocol header• Routing protocol packets are sent with type of

service (TOS) of 0• Five types of OSPF routing protocol packets

Hello – packet type 1Database description – packet type 2Link-state request – packet type 3Link-state update – packet type 4Link-state acknowledgement – packet type 5

Page 27: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

27© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Different Types of LSAs

• Four distinct type of LSAsType 1 : Router LSA

Type 2 : Network LSA

Type 3 and 4: Summary LSAType 5 and 7: External LSA

Page 28: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

28© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Router LSA (Type 1)

• Describes the state and cost of the router’s links to thearea

• All of the router’s links in an area must be described ina single LSA

• Flooded throughout the particular area and no more• Router indicates whether it is an ASBR, ABR, or end

point of virtual link

Page 29: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

29© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Network LSA (Type 2)

• Generated for every transit broadcast and NBMAnetwork

• Describes all the routers attached to the network• Only the designated router originates this LSA

• Flooded throughout the area and no more

Page 30: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

30© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Summary LSA (Type 3 and 4)

• Describes the destination outside the area butstill in the AS

• Flooded throughout a single area

• Originated by an ABR

• Only inter-area routes are advertised into thebackbone

• Type 4 is the information about the ASBR

Page 31: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

31© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

External LSA (Type 5 and 7)

• Defines routes to destination external to the AS

• Default route is also sent as external

• Two types of external LSA:E1: Consider the total cost up to the external destination

E2: Considers only the cost of the outgoing interface to theexternal destination

• (Type 7 LSAs used to describe external LSA for onespecific OSPF area type)

Page 32: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

32© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

• Specific Link LSA advertised out of each area• Link state changes propagated out of each area

No Summarisation

3.A3.B

3.C 3.D2.A2.B

2.C 2.D

1.A1.B

1.C 1.D

1.A1.B1.C1.D Area 0

2.A2.B2.C2.D

3.A3.B3.C3.D

ASBRExternal

links

Page 33: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

33© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

• Only summary LSA advertised out of each area• Link state changes do not propagate out of the area

With Summarisation

3.A3.B

3.C 3.D2.A2.B

2.C 2.D

1.A1.B

1.C 1.D

1Area 0

2

3

ASBRExternal

links

Page 34: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

34© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

• Specific Link LSA advertised in to each area• Link state changes propagated in to each area

No Summarisation

3.A3.B

3.C 3.D2.A2.B

2.C 2.D

1.A1.B

1.C 1.D

2.A 2.B2.C 2.D3.A 3.B3.C 3.D Area 0

1.A 1.B1.C 1.D3.A 3.B3.C 3.D

1.A 1.B1.C 1.D2.A 2.B2.C 2.D

ASBRExternal

links

Page 35: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

35© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

• Only summary link LSA advertised in to each area• Link state changes do not propagate in to each area

With Summarisation

3.A3.B

3.C 3.D2.A2.B

2.C 2.D

1.A1.B

1.C 1.D

2 3 Area 0

1 3

12

ASBRExternal

links

Page 36: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

36© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Types of Areas

• Regular

• Stub

• Totally Stubby

• Not-So-Stubby

Page 37: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

37© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

• From Area 1’s point of view, summary networks from other areas areinjected as are external networks such as X.1

Regular Area (Not a Stub)

3.A3.B

3.C 3.D2.A2.B

2.C 2.D

1.A1.B

1.C 1.D

2 3 Area 0

1 3

12

ASBRExternalnetworks

X.1

X.1

X.1

X.1

X.1

X.1

X.1

Page 38: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

38© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

• Summary networks, default route injected• Command is area x stub

Normal Stub Area

3.A3.B

3.C 3.D2.A2.B

2.C 2.D

1.A1.B

1.C 1.D

2 3 Area 0

1 3

12

ASBRExternalnetworks

X.1

X.1

Default

X.1

X.1

Default

Default

Page 39: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

39© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

• Only a default route injectedDefault path to closest area border router

• Command is area x stub no-summary

Totally Stubby Area

3.A3.B

3.C 3.D2.A2.B

2.C 2.D

1.A1.B

1.C 1.D

Area 0

1 3

1 2

ASBRExternalnetworks

X.1

X.1

Default

X.1

X.1

Default

DefaultTotallyStubby Area

Page 40: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

40© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

• Capable of importing routes in a limited fashion• Type-7 LSA’s carry external information within an NSSA• NSSA Border routers translate selected type-7 LSAs into type-5 external network

LSAs

Not-So-Stubby Area

3.A3.B

3.C 3.D2.A2.B

2.C 2.D

1.A1.B

1.C 1.D

Area 0

1 3

1 2

ASBRExternalnetworks

X.1

X.1

Default

X.1

X.1

DefaultX.2

DefaultX.2

Not-So-Stubby Area

Externalnetworks

X.2

X.2

X.2

Page 41: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

41© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Addressing for Areas

Area 1network 131.108.0.0subnets 0-15range 255.255.240.0

Area 2network 131.108.0.0subnets 16-31range 255.255.240.0

Area 3network 131.108.0.0subnets 32-47range 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 42: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

42© 2006 Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Summary

• Scalable OSPF Network DesignArea hierarchy

Stub areas

Contiguous addressing

Route summarisation

Page 43: 2 - Introduction to OSPF - PacNOG - PacNOG: The Pacific ... · PDF fileIntroduction to OSPF ISP/IXP Workshops

43© 2005 Cisco Systems, Inc. All rights reserved.Session NumberPresentation_ID Cisco Confidential

Introduction to OSPF

ISP/IXP WorkshopsISP/IXP Workshops


Recommended