Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent...

69
1 © 2003, Cisco Systems, Inc. All rights reserved. Cisco ISP Workshops Introduction to OSPF ISP/IXP Workshops ISP/IXP Workshops

Transcript of Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent...

Page 1: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

1© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Introduction to OSPFISP/IXP WorkshopsISP/IXP Workshops

Page 2: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

222© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Agenda

• OSPF Primer

• OSPF in Service Provider Networks

• OSPF BCP – Adding Networks

• OSPF Command Summary

Page 3: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

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

OSPF Primer

Page 4: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

444© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF

• Open ShortestPath First

• Link state or SPF technology

• Developed by OSPF working group of IETF (RFC 1247)

• Designed for TCP/IP Internet environment

• Fast convergence

• Variable-length subnet masks

• Discontiguous subnets

• No periodic updates

• Route authentication

• Delivered two years after IGRP

• OSPF standard described in RFC2328

Page 5: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

555© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Link State

Topology Information Is Kept in a Database Separate from the

Routing Table

AABBCC

2213131313

QQZZXX

X’s Link State

ZZ

XX

YYQQ

Z’s Link State

Q’s Link State

Page 6: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

666© 2003, 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 failureNew LSPs flooded

All routers recompute routing tables

Page 7: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

777© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

FDDIDual Ring

Low Bandwidth Utilisation

• Only changes propagated

• Multicast on multi-access broadcast networks

R1

LSA

XLSA

Page 8: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

888© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

FDDI Dual Ring

FDDI Dual Ring

Optimal 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: Cost = 10^8/BW

Page 9: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

999© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Fast Convergence

• Detection Plus LSA/SPF

XR1 R3

R2

N2

Alternate Path

Primary Path

N1

Page 10: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

101010© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Fast Convergence

• Finding a new route

LSA flooded throughout area

Acknowledgement based

Topology database synchronised

Each router derives routing table to destination networks

LSA

XR1

N1

Page 11: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

111111© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Utilises IP Multicast for Sending/Receiving Updates

• Broadcast networks

All 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 on point-to-point and virtual links)

Page 12: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

121212© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Areas

• Group of contiguous hosts and networks

• Per area topological database

Invisible outside the area

Reduction in routing traffic

• Backbone area contiguousAll other areas must be connected to the backbone

• Virtual Links Area 1Area 4

Area 0Backbone Area

Area 2 Area 3

Page 13: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

131313© 2003, 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)

Area 1

IR/BRArea 0

Area 2 Area 3

IR

ABR/BR

To other AS

ASBR

Page 14: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

141414© 2003, 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 to another by an Area Border Router

External Routeroutes imported into OSPF from other protocol or static routes

Area 0Area 2 Area 3

ABR

To other AS

ASBR

Page 15: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

151515© 2003, 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

R1 (ABR)

R2

Network1

Next HopR1

Network1.A1.B1.C

Next HopR1R1R1

With summarisation

Withoutsummarisation

BackboneArea 0

Area 1

Page 16: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

161616© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

External Routes

• Redistributed into OSPF

• Flooded unaltered throughout the AS

• OSPF supports two types of external metricsType 1 external metrics

Type 2 external metrics (Default)

RIPIGRPEIGRPBGPetc.

OSPF

Redistribute

Page 17: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

171717© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

External Routes

• Type 1 external metric: metrics are added to 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

181818© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

External Routes

• Type 2 external metric: metrics are compared without 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

191919© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Topology/Link State Database

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

• All routers belonging to the same area have identical database

• SPF calculation is performed separately for each area

• LSA flooding is bounded by area

Page 20: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

202020© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Protocol Functionality

• Bringing up adjacencies

• LSA types

• Area classification

Page 21: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

212121© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

The Hello Protocol

• Responsible for establishing and maintaining neighbour relationships

• Elects designated router on multi-access networks

FDDIDual Ring

Hello

HelloHello

Page 22: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

222222© 2003, 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 23: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

232323© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Designated Router

• One per multi-access networkGenerates network links advertisements

Assists in database synchronization

Designated Router

Designated Router

BackupDesignated Router

BackupDesignated

Router

Page 24: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

242424© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Designated Router by Priority

• Configured priority (per interface)

• Else determined by highest router ID

Router 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

Page 25: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

252525© 2003, 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 26: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

262626© 2003, 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 27: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

272727© 2003, 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 backup designated router

Page 28: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

282828© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

LSAs Propagate Along Adjacencies

• LSAs acknowledged along adjacencies

DR BDR

Page 29: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

292929© 2003, 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 packetsHello – 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

303030© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Different Types of 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

313131© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Router LSA (Type 1)

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

• All of the router’s links in an area must be described in a 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 32: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

323232© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Network LSA (Type 2)

• Generated for every transit broadcast and NBMA network

• Describes all the routers attached to the network

• Only the designated router originates this LSA

• Flooded throughout the area and no more

Page 33: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

333333© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Summary LSA (Type 3 and 4)

• Describes the destination outside the area but still in the AS

• Flooded throughout a single area

• Originated by an ABR

• Only intra-area routes are advertised into the backbone

• Type 4 is the information about the ASBR

Page 34: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

343434© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

External LSA (Type 5)

• 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 the external destination

Page 35: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

353535© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Not 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

363636© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Summarised: 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

373737© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

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 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

383838© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

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

Summarised: Summary Links

BackboneArea #0

3.D

3.A

2.B

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

propagate

Page 39: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

393939© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

TokenRing

TokenRing

TokenRing

TokenRing

Regular Area (Not a Stub)

From area 1’s viewpoint • Summary networks from other areas injected• External networks injected, for example

network X.1ASBR

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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

404040© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

TokenRing

TokenRing

TokenRing

TokenRing

Normal 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 stub

area x stub commandASBR

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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

414141© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

TokenRing

TokenRing

TokenRing

TokenRing

Totally Stubby Area

From area 1’s viewpoint • Only a default network is injected into the area

Represents external networks and all inter-area routes

• Default path to closest area border router• Define all routers in the area as totally stubby

area x stub no-summary commandASBR

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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

424242© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

TokenRing

TokenRing

TokenRing

TokenRing

Not-So-Stubby Area

• Capable of importing external routes in a limited fashion

• Type-7 LSA’s carry external information within an NSSA

• NSSA Border routers translate selected type-7 LSAsinto 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.DExternal Networks

X.2

Page 43: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

434343© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Addressing

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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

444444© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Summary

• Scalable OSPF Network Design

Area hierarchy

Stub areas

Contiguous addressing

Route summarisation

Page 45: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

45© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Design In Service Provider Networks

Page 46: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

464646© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

BackboneRouter

OSPF Areas and Rules

Area 1Area 4

Area 0

Area 2 Area 3

InternalRouter

AreaBorderRouter

AutonomousSystem (AS)

Border Router

Internet

Backbone area (0)must be presentAll other areasmust haveconnection to backboneBackbone mustbe contiguousDo not partitionarea (0)

Page 47: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

474747© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Design

• OSPF design and Addressing go together.

Objective is to keep the Link State Data Base lean.

Create address hierarchy to match topology

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

Page 48: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

484848© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Design

• Examine physical topologyIs it meshed or hub-and-spoke?

• Try to use as Stubby an area as possibleIt reduces overhead and LSA counts

• Push the creation of a backboneReduces mesh and promotes hierarchy

Page 49: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

494949© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Design

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

• Different types of areas do different flooding

Normal areasStub areasTotally stubby (stub no-summary)Not so stubby areas (NSSA)

Page 50: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

505050© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Design

• RedundancyDual Links out of each area – using metrics (cost) for traffic engineering

Too much redundancy…

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

Too Much Redundancy in the backbone area without good summarization will effect convergence in the area 0

Page 51: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

515151© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF for ISPs

• OSPF features which should be considered:

OSPF logging neighbour changes

OSPF reference cost

OSPF Router ID Command

OSPF Process Clear/Restart

Page 52: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

52© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF BCPAdding Networks

Page 53: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

535353© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF – Adding Networks

• BCP – Individual OSPF Network statement for each infrastructure link.Have separate IP address blocks for

infrastructure and customer links.

Use IP Unnumbered Interfaces or BGP to carry /30s to customers

OSPF should only carry infrastructure routes in an ISP’s network.

OC12c

OC12c

Customer Connections

OC48

ISP Backbone

Page 54: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

545454© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF – Adding Networks(Method One)

• redistribute connected subnets

Works for all connected interfaces on the router but sends networks as external type-2s – which are not summarized

router ospf 100

redistribute connected subnets

• Not recommended

Page 55: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

555555© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF – Adding Networks

• Specific network statements

Every interface needs a OSPF network statement. Interface that should not be broadcasting OSPF Hello packets needspassive-interface.

router ospf 100

network 192.168.1.1 0.0.0.3 area 51

network 192.168.1.5 0.0.0.3 area 51

passive interface Serial 1/0

Page 56: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

565656© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF – Adding Networks

• Network statements – wildcard mask

Every interface covered by wildcard mask used in OSPF network statement. Interfaces that should not be broadcasting OSPF Hello packets need passive-interface or 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

575757© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF – Adding Networks

• Key Theme when selecting a technique: Keep the Link State Database Lean

Increases Stability

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

Speeds Convergence Time

Page 58: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

58© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF – New and Useful Features

Page 59: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

595959© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Logging Neighbour Changes

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

• Syntax:[no] ospf log[no] ospf log--adjacencyadjacency--changeschanges

• Example of a typical log message:%OSPF%OSPF--55--ADJCHG: Process 1, ADJCHG: Process 1, NbrNbr223.127.255.223 on Ethernet0 from LOADING to 223.127.255.223 on Ethernet0 from LOADING to FULL, Loading DoneFULL, Loading Done

Page 60: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

606060© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Number of State Changes

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

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

Detail—(Optional) Displays all neighbours given in detail (list all neighbours). When specified, neighbour state transition counters are displayed per interface or neighbour ID

Page 61: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

616161© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

State Changes (Continued)

• To reset OSPF-related statistics, use the clear ip ospf countersclear ip ospf counters EXEC command. At this point neighborneighbor is the only available option; it will reset neighbour state transition counters per interface or neighbour id

clear ip ospf counters [neighbor [<type clear ip ospf counters [neighbor [<type number>] [neighbornumber>] [neighbor--id]]id]]

Page 62: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

626262© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Cost: Reference Bandwidth

• Bandwidth used in Metric calculation

Cost = 10^8/BW

Not useful for BW > 100 Mbps

• Syntax:ospf autoospf auto--cost referencecost reference--bandwidth <referencebandwidth <reference--bandwidth>bandwidth>

• Default reference bandwidth still 100 Mbps for backward compatibility

Page 63: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

636363© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Router ID

• If the loopback interface exists and has an IP address, that is used as the router ID in routing protocols – stability!

• If the loopback interface does not exist, or has no IP address, the router ID is the highest IP address configured – danger!

• New sub command to manually set the OSPF Router ID:router-id <ip address>

Page 64: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

646464© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Clear/Restart

• clear ip ospf [pid] redistributionThis command can now clear redistribution based on OSPF routing process

ID. If no pid is given, it assumes all OSPF processes.

• clear ip ospf [pid] countersThis command can now clear counters based on OSPF routing process ID. If

no pid is given, it assumes all OSPF processes.

• clear ip ospf [pid] processThis command will restart the specified OSPF process. If no pid is given, it

assumes all OSPF processes. It attempts to keep the old router-id, except in cases, where a new router-id was configured, or an old user configured router-id was removed. Since this command can potentially cause a network churn, a user confirmation is required before performing any action.

Page 65: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

65© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

OSPF Command Summary

Page 66: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

666666© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Redistributing Routes into OSPF

ROUTER OSPF <pid#x>

REDISTRIBUTE {protocol} <as#y>

<metric>

<metric-type (1 or 2)

<tag>

<subnets>

Page 67: Introduction to OSPF - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

676767© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Router 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

686868© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Interface 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 - Network Startup Resource Center · • Routing protocol packets are sent with type of service (TOS) of 0 • Five types of OSPF routing protocol packets Hello

69© 2003, Cisco Systems, Inc. All rights reserved.Cisco ISP Workshops

Introduction to OSPFISP/IXP WorkshopsISP/IXP Workshops