83
Designing OSPF Networks 284_045/c2 1

Designing OSPF Networks

Embed Size (px)

DESCRIPTION

Designing OSPF Networks. 284_045/c2. 1. Amir Khan. Consulting Engineer [email protected]. 284_045/c2. 2. Agenda. Technical Overview Protocol Functionality Design Considerations Case Studies. OSPF Technical Overview. Background Features Hierarchical Organization. Why OSPF: Advantages. - PowerPoint PPT Presentation

Citation preview

Page 1: Designing  OSPF Networks

Designing OSPF

Networks

284_045/c2 1

Page 2: Designing  OSPF Networks

284_045/c2 2

Amir KhanConsulting Engineer

[email protected]

Page 3: Designing  OSPF Networks

284_045/c23

Agenda

• Technical Overview

• Protocol Functionality

• Design Considerations

• Case Studies

Page 4: Designing  OSPF Networks

284_045/c24

OSPF Technical Overview

• Background

• Features

• Hierarchical Organization

Page 5: Designing  OSPF Networks

284_045/c25

Why OSPF: Advantages

• Fast re-routing

• Minimizes routing protocol traffic

• Multi-vendor

Page 6: Designing  OSPF Networks

284_045/c26

Why OSPF: Disadvantages

• Topology restrictive

• Not easily centrally controlledSecurity transmitted in clear

No route filtering

Page 7: Designing  OSPF Networks

284_045/c27

Link State Technology

Topology information iskept in a database separatefrom the routing table

Q’s Link State

X’s Link State

Z’s Link States

Y

ABC

QZX

21313

Page 8: Designing  OSPF Networks

284_045/c28

OSPF Background

• Dynamic routing protocol

• Link state or SPF technology

• Developed by OSPF Working Group of IETF

• Intra-autonomous system (IGP)

• Designed expressly for TCP/IP Internet environment

Page 9: Designing  OSPF Networks

284_045/c29

OSPF Background (Cont.)

• Runs directly over IP (Protocol 89)

• Each router maintains an identical database (within areas)

• Each router constructs a tree of shortest paths by running SPF algorithm on the database

• Tree provides route to each known destination

• Cisco’s implementation is fully compliant with the specification as of software release 9.1 (November, 1992)

Page 10: Designing  OSPF Networks

284_045/c210

OSPF Technical Overview

• Background

• Features

• Hierarchical Organization

Page 11: Designing  OSPF Networks

284_045/c211

Fast Convergence

• Detection Plus LSA/SPF

XR1 R3

R2

Alternate Path

Primary Path

N1 N2

Page 12: Designing  OSPF Networks

284_045/c212

Load Balancing

• Equal cost multiple paths

R1 R4

N2N1

R3

R2

T1 T1

T1 T1

Page 13: Designing  OSPF Networks

284_045/c213

FDDIDual Ring

Low Bandwidth Utilization

• Only changes propagated

• Multicast on multi-access broadcast networks

R1

LSAX

LSA

Page 14: Designing  OSPF Networks

284_045/c214

FDDIDual Ring

Low Bandwidth Utilization ?

• Database synchronization

R1

LSA XLSA

Remote Site

R2 LSA

Page 15: Designing  OSPF Networks

284_045/c215

FDDI Dual Ring

FDDI Dual Ring

Optimal Path Utilization

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 16: Designing  OSPF Networks

284_045/c216

IP Subneting Support

• Network number, mask pair

• Variable length subnet mask (VLSM)

• Discontiguous subnets

• Supernets/subnet prefixes

Page 17: Designing  OSPF Networks

284_045/c217

Route Summarization

• 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 summarization

Withoutsummarization

BackboneArea 0

Area 1

Page 18: Designing  OSPF Networks

284_045/c218

Authenticated Routing Updates

• AuType 0: No authentication

• AuType 1: Simple passwordPassword is transmitted in clear

Page 19: Designing  OSPF Networks

284_045/c219

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 20: Designing  OSPF Networks

284_045/c220

External Routes

• Type 1 external metric

NetworkN1N1

Type 11110

Next HopR1R2

Cost = 10

to N1External Cost = 1

to N1External Cost = 2R2

R3

R1

Cost = 8

Selected Route

Page 21: Designing  OSPF Networks

284_045/c221

External Routes

• Type 2 external metric

NetworkN1N1

Type 212

Next HopR1R2

Cost = 10

to N1External Cost = 1

to N1External Cost = 2R2

R3

R1

Cost = 8

Selected Route

Page 22: Designing  OSPF Networks

284_045/c222

External Routes• Forwarding Address on shared/common network

(Field in AS external links advertisement)

AS#2R1

R2

R3

AS#1

FDDIDualRing

N1

N2N3OSPF

BGP

TokenRing

NetworkN3

Next HopR3

Page 23: Designing  OSPF Networks

284_045/c223

Route Tagging

A

BC

D• Autonomous System B wants toPropagate routes from A —> D, but NOT propagate routes from C —> D

• OSPF tags routes with AS inputThis info can be used when redistributing routes

Page 24: Designing  OSPF Networks

284_045/c224

TOS Based Routing

• IP header supports 3 bit priority field• IP header supports 4 special types of service

BandwidthDelayMTUCost

• Currently only TOS 0 supported

Page 25: Designing  OSPF Networks

284_045/c225

Utilizes IP Multicast for Sending/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 virtual links)

Page 26: Designing  OSPF Networks

284_045/c226

OSPF Technical Overview

• Background

• Features

• Hierarchical Organization

Page 27: Designing  OSPF Networks

284_045/c227

BackboneArea #0

Area #1 Area #2 Area #3

Hierarchical Structure

• Structure must exist or be created• Explicit topology has precedence over addressing

Page 28: Designing  OSPF Networks

284_045/c228

OSPF Areas

• OSPF areasGroup of contiguous hosts and networks

Per area topological database

Backbone area (contiguous)

Virtual links

Inter-area routing Area 1Area 4

Area 0

Area 2 Area 3

Page 29: Designing  OSPF Networks

284_045/c229

OSPF Areas

• RulesBackbone area must be presentAll other areas must have connection to backboneBackbone must be contiguous

BackboneArea #0

Area #1 Area #2 Area #3

Page 30: Designing  OSPF Networks

284_045/c230

BackboneArea #0

Area #1 Area #2 Area #3

Why Areas

• Topology of an area is invisible from outside of the area

• Results in marked reduction in routing traffic

Page 31: Designing  OSPF Networks

284_045/c231

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 32: Designing  OSPF Networks

284_045/c232

Area Link State Database

• Area database is composed of:Router links advertisements

Network links advertisements

Summary links advertisements (IP network, ASBR)

AS external advertisements (in non-stub areas)

Page 33: Designing  OSPF Networks

284_045/c233

Area 1

Area 0

Area 2 Area 3

Classification of Routers

IR

ABR/BR

IR/BR

To other AS

ASBR • Internal Router (IR)

• Area Border Router (ABR)

• Backbone Router (BR)

• Autonomous System Border Router (ASBR)

Page 34: Designing  OSPF Networks

284_045/c234

OSPF Address to Area Mapping

• Area can be one or more networks

• Area can be one or more subnets

• Any combination of networks and subnets possible

(But bad in practice)

• For summarization subnets must be grouped

• Mask in area...range command consolidates

Page 35: Designing  OSPF Networks

284_045/c235

Virtual Links

BackboneBackboneArea 0Area 0

BackboneBackboneArea 0Area 0

Area 3

Area 1

Area 2

• Virtual links configured between any two backbone routers that have an interface to a common non-backbone area

• A router connected to two or more areas is considered to be a backbone router

Page 36: Designing  OSPF Networks

284_045/c236

Agenda

• Technical Overview

• Protocol Functionality

• Design Considerations

• Case Studies

Page 37: Designing  OSPF Networks

284_045/c237

Protocol Functionality

• Bringing up adjacencies

• Convergence

• Subneting

• Route summarization

• Area classification

Page 38: Designing  OSPF Networks

284_045/c238

OSPF Terminology

• Hello protocol

• Designated router

• Router ID

• Neighboring routers

• Adjacency

• Link state advertisement

Page 39: Designing  OSPF Networks

284_045/c239

The Hello Protocol

• Responsible for establishing and maintaining neighbor relationships

• Elects designated router on multi-access networks

FDDIDual Ring

Hello

HelloHello

Page 40: Designing  OSPF Networks

284_045/c240

The Hello Packet

• Router priority

• Hello interval

• Router dead interval

• Network mask

• Options: T-bit, E-bit

• List of neighbors

FDDIDual Ring

Hello

HelloHello

Page 41: Designing  OSPF Networks

Designated Router• One per multi-access network

Generates network links advertisements

Assists in database synchronization

Designated Router

Designated Router

BackupDesignated Router

BackupDesignated

Router

284_045/c2 41

Page 42: Designing  OSPF Networks

284_045/c242

Designated Router by Priority

• Configured priority (per interface)

• Else determined by highest router IDRouter ID is the highest IP address on the box

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 43: Designing  OSPF Networks

284_045/c243

Neighboring States

• 2-wayRouter sees itself in other Hello packets

DR selected from neighbors in state 2-way or greater

DR BDR

2-way

Page 44: Designing  OSPF Networks

284_045/c244

Neighboring States

• FullRouters are fully adjacent

Databases synchronized

Relationship to DR and BDR

DR BDR

Full

Page 45: Designing  OSPF Networks

284_045/c245

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 neighboring router is the designated router

• The neighboring router is the backup designated router

Page 46: Designing  OSPF Networks

284_045/c246

LSAs Propagate Along Adjacencies

• LSAs acknowledged along adjacencies

DR BDR

Page 47: Designing  OSPF Networks

284_045/c247

Convergence

• Detection Plus LSA/SPF

XR1 R3

R2

N2

Alternate Path

Primary Path

N1

Page 48: Designing  OSPF Networks

284_045/c248

Convergence

• Fault detectionSerial lines

Detection immediate for carrier loss

2 to 3 times keepalive otherwisekeepalive 10 seconds by default

Token Ring and FDDI immediate

Ethernet

2 to 3 times keepalive

Hello can supersede keepalive

Dead timer is 40 sec by default

XR1

N1

Primary Path

Alternate Path

Page 49: Designing  OSPF Networks

284_045/c249

Convergence

• Finding a new route LSA flooded throughout area

Acknowledgment based

Topology database synchronized

Each router derives routing table

Tree to each destination network

LSA

XR1

N1

Page 50: Designing  OSPF Networks

284_045/c250

Convergence

• Finding a new routeLoad balancing provides immediate convergence

Equal cost paths only

R1

R4

N2N1

R3

R2

T1 T1

T1 T1

Page 51: Designing  OSPF Networks

284_045/c251

Variable Length Subneting (IP)

.10.

.6

.50.

.13

.60..254.

‘Sub-subnet’ subnet .254. for serial linksUse mask 255.255.255.252 for serial links

‘Sub-subnet’ Mask Boundary131.108.254.XXXXXX YY Subnet Hosts

1 00 401 510 611

.9

.10

.14

.5 Serial Addresses131.108.254.5

.6

.9.10.13.14....

A

C

B

Page 52: Designing  OSPF Networks

284_045/c252

VLSM Concerns

• Pick one regular subnet

• Further subnet that with extended mask

• Keep sub-subnets together in same area

131.108.0.0255.255.255.0255.255.255.252

Class B254 subnets62 extra subnets

Page 53: Designing  OSPF Networks

284_045/c253

Discontiguous Subnets

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

Page 54: Designing  OSPF Networks

284_045/c254

BackboneArea #0

Area #1 Area #2 Area #3

OSPF Link Summarization

Page 55: Designing  OSPF Networks

284_045/c255

Not Summarized: Specific Links

BackboneArea #0

External links

1.A

1.C

1.B

1.D

TokenRing

TokenRing Token

Ring

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 56: Designing  OSPF Networks

284_045/c256

Summarized: 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 57: Designing  OSPF Networks

284_045/c257

BackboneArea #0

External links

1.A

1.C

1.B

1.D

TokenRing

TokenRing Token

Ring

TokenRing

3.D

3.A

3.C

3.B

2.A

2.C

2.B

TokenRing

TokenRing

ASBR

Not Summarized: 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 58: Designing  OSPF Networks

284_045/c258

Summarized: Summary Links

BackboneArea #0

ASBRExternal 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

2,3

1,3

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

1,2

Page 59: Designing  OSPF Networks

284_045/c259

Regular Area (Not a Stub)

• Summary LSA from other areas injected• Specific links from other areas injected

Can cause routing trouble—link flaps Solution: configure area range

• Default external injectedConfigure default-info originate on AS border

• External links injectedAS border not default-info originate

Page 60: Designing  OSPF Networks

284_045/c260

Normal Stub Area

• Summary LSAs from other areas injected• Default LSA injected into area

Represents external linksRepresents non-summarized internal links

• Default path to closest area border router• Define all routers in area as stub

(area x stub) • Specific link flaps will not be injected

Page 61: Designing  OSPF Networks

284_045/c261

Totally Stubby Area

• Configure ‘area x stub no-summary’• Default LSA injected into area

Represents all external linksRepresents all summarized internal linksRepresents non-sumarized internal links

• Default path to closest area border router• Define all routers totally stubby• Specific link flaps will not be injected

Page 62: Designing  OSPF Networks

284_045/c262

Agenda

• Technical Overview

• Protocol Functionality

• Design Considerations

• Case Studies

Page 63: Designing  OSPF Networks

284_045/c263

Design Considerations

• Network hierarchy

• Addressing

Page 64: Designing  OSPF Networks

284_045/c264

Hierarchical Network Structure

Distribution

Core

Access

Optimal TransportBetween Sites

Policy Based Connectivity

Local/Remote Workgroup Access

Page 65: Designing  OSPF Networks

284_045/c265

Hierarchical Network Structure

S S

SSDistribution

Access

FDDI Dual Ring

FDDI Dual Ring

Core

Page 66: Designing  OSPF Networks

284_045/c266

OSPF Network Topology

S S

SS

BackboneArea 0

Area 1

FDDI Dual Ring

Area 2

FDDI Dual Ring

Page 67: Designing  OSPF Networks

284_045/c267

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 summarization

Page 68: Designing  OSPF Networks

284_045/c268

OSPF RIP

Route Redistribution

• Transferring routes between routing protocols

Redistribute OSPF routes into RIPand vice versa

Page 69: Designing  OSPF Networks

284_045/c269

Route Redistribution Example

• UNIX host running routed• Cisco router redistributes RIP into OSPF and

vice versa

OSPF Domain

Page 70: Designing  OSPF Networks

284_045/c270

Good OSPF Backbone Design

• Avoid large mesh backbones

• Best—collapsed LAN backbone

FDDI Dual Ring

Page 71: Designing  OSPF Networks

284_045/c271

Scalable OSPF Network Design

• Area hierarchy

• Stub areas

• Addressing

• Route summarization

Page 72: Designing  OSPF Networks

284_045/c272

Agenda

• Technical Overview

• Protocol Functionality

• Design Considerations

• Case Studies

Page 73: Designing  OSPF Networks

284_045/c273

Case Study

• Add site to an existing network

• Minimize impact on existing network

• Topology and addressing considerations

BackboneArea #0

1.A

1.C

1.B

1.D

TokenRing

TokenRing Token

Ring

TokenRing

2.A

2.C

2.B

TokenRing

TokenRing

Area 1Area 2

Page 74: Designing  OSPF Networks

284_045/c274

Case Study

• Option 1: Place in the backboneJeopardize backbone stability

Increase non-transit traffic

• Option 2: Place in existing area 2Adjust area 2’s address space

Increase traffic in Europe

Page 75: Designing  OSPF Networks

284_045/c275

Case Study

• Option 3: Create new areaRequires unique address space

Logically easy

Optimizes routing

Page 76: Designing  OSPF Networks

284_045/c276

Case Study

• Option 3: Create new areaRequires unique address space

Logically easy, optimizes routing

BackboneArea #0

1.A

1.C

1.B

1.D

TokenRing

TokenRing Token

Ring

TokenRing

2.A

2.C

2.B

TokenRing

TokenRing

Area 1Area 2 Area 3

Page 77: Designing  OSPF Networks

284_045/c277

OSPF Configuration Commands

• Router command

• Router subcommand

• Interface subcommands

Page 78: Designing  OSPF Networks

284_045/c278

Router Command

• router ospf {as}Multiple OSPF processes can be configured

Autonomous system must be on unique interfaces

as# not transmitted

Page 79: Designing  OSPF Networks

284_045/c279

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 80: Designing  OSPF Networks

284_045/c280

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-passwd>

Page 81: Designing  OSPF Networks

284_045/c281

Redistributing Routes into OSPF

ROUTER OSPF <as#x>

REDISTRIBUTE {protocol} <as#y>

<metric>

<metric-type (1 ro 2)

<tag>

<subnets>

<default>

Page 82: Designing  OSPF Networks

284_045/c282

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-passwd>

Page 83: Designing  OSPF Networks

284_045/c283

Supporting Nonbroadcast Multiaccess Environments

• X.25, Frame Relay, ATM etc.ROUTER OSPF <as#>

NEIGHBOR n.n.n.n INTERFACE <x> <y>