![Page 1: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/1.jpg)
OSPF in Detail
ISP Workshops
1Last updated 29th September 2017
These materials are licensed under the Creative Commons Attribution-NonCommercial 4.0 International license(http://creativecommons.org/licenses/by-nc/4.0/)
![Page 2: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/2.jpg)
Acknowledgementsp This material originated from the Cisco ISP/IXP Workshop
Programme developed by Philip Smith & Barry Greene
p Use of these materials is encouraged as long as the source is fully acknowledged and this notice remains in place
p Bug fixes and improvements are welcomedn Please email workshop (at) bgp4all.com
2Philip Smith
![Page 3: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/3.jpg)
Agendap Detailed Background about OSPFp OSPF Design in SP Networksp Adding Networks in OSPFp OSPF in Cisco’s IOS
3
![Page 4: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/4.jpg)
OSPF: The detail
Technical Background
4
![Page 5: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/5.jpg)
OSPFp Open Shortest Path Firstp Link state (SPF)
technologyp Developed by OSPF
working group of IETF (RFC 1247)
p OSPFv2 standard described in RFC2328
p Designed for:n TCP/IP environmentn Fast convergencen Variable-length subnet
masksn Discontiguous subnetsn Incremental updatesn Route authentication
p Runs on IP, Protocol 89
5
![Page 6: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/6.jpg)
Link State
6
Topology Information is kept in a Database separate from the Routing Table
ABC
21313
QZX
Z
X
YQ
Z’s Link StateQ’s Link State
X’s Link State
![Page 7: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/7.jpg)
Link State Routingp Neighbour discoveryp Constructing a Link State Packet (LSP)p Distribute the LSP
n (Link State Announcement – LSA)
p Compute routesp On network failure
n New LSPs floodedn All routers recompute routing table
7
![Page 8: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/8.jpg)
Low Bandwidth Utilisation
p Only changes propagatedp Uses multicast on multi-access broadcast networks
8
LSA
X
LSA
R1
![Page 9: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/9.jpg)
Fast Convergencep Detection Plus LSA/SPF
n Known as the Dijkstra Algorithm
9
X N2
Alternate Path
Primary Path
N1
R2
R1 R3
![Page 10: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/10.jpg)
Fast Convergencep Finding a new route
n LSA flooded throughout arean Acknowledgement basedn Topology database
synchronisedn Each router derives routing
table to destination network
10
LSA
N1R1
X
![Page 11: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/11.jpg)
OSPF Areasp Area is a group of contiguous
hosts and networksn Reduces routing traffic
p Per area topology databasen Invisible outside the area
p Backbone area MUST be contiguousn All other areas must be
connected to the backbone
11
Area 1
Area 2 Area 3
R1 R2
R3R6
Area 4
R5 R4R7R8
RaRd
RbRcArea 0
Backbone Area
![Page 12: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/12.jpg)
Virtual Links between OSPF Areas
p Virtual Link is used when it is not possible to physically connect the area to the backbone
p ISPs avoid designs which require virtual linksn Increases complexityn Decreases reliability and scalability
12
Area 1
R3R6
Area 4R5 R4
R7R8
RaRd
RbRcArea 0
Backbone Area
![Page 13: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/13.jpg)
Classification of Routers
p Internal Router (IR)p Area Border Router (ABR)p Backbone Router (BR)p Autonomous System
Border Router (ASBR)
13
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 14: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/14.jpg)
OSPF Route Types
p Intra-area Routen All routes inside an area
p Inter-area Routen Routes advertised from one area to
another by an Area Border Routerp External Route
n Routes imported into OSPF from other protocol or static routes
14
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 15: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/15.jpg)
External Routesp Prefixes which are redistributed into OSPF from other protocolsp Flooded unaltered throughout the AS
n Recommendation: Avoid redistribution!!p OSPF supports two types of external metrics
n Type 1 external metricsn Type 2 external metrics (Cisco IOS default)
15
RIPEIGRPBGPStaticConnectedetc.
OSPF
RedistributeR2
![Page 16: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/16.jpg)
External Routesp Type 1 external metric: metrics are added to the
summarised internal link cost
16
NetworkN1N1
Type 11110
Next HopR2R3
Cost = 10 to N1 External Cost = 1
to N1 External Cost = 2Cost = 8
Selected Route
R3
R1
R2
![Page 17: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/17.jpg)
External Routesp Type 2 external metric: metrics are compared without
adding to the internal link cost
17
NetworkN1N1
Type 112
Next HopR2R3
Cost = 10 to N1 External Cost = 1
to N1 External Cost = 2Cost = 8
Selected Route
R3
R1
R2
![Page 18: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/18.jpg)
Topology/Link State Databasep A router has a separate LS database for each area to
which it belongsp All routers belonging to the same area have identical
databasep SPF calculation is performed separately for each areap LSA flooding is bounded by areap Recommendation:
n Limit the number of areas a router participates in!!n 1 to 3 is fine (typical ISP design)n >3 can overload the CPU depending on the area topology
complexity 18
![Page 19: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/19.jpg)
The Hello Protocolp Responsible for
establishing and maintaining neighbour relationships
p Elects designated router on multi-access networks
19
Hello
HelloHello
![Page 20: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/20.jpg)
The Hello Packetp Contains:
n Router priorityn Hello interval n Router dead intervaln Network maskn List of neighboursn DR and BDRn Options: E-bit, MC-bit,…
(see A.2 of RFC2328)
20
Hello
HelloHello
![Page 21: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/21.jpg)
Designated Routerp There is ONE designated router per multi-access network
n Generates network link advertisementsn Assists in database synchronization
21
Designated Router
Designated Router
BackupDesignated Router
Backup Designated Router
![Page 22: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/22.jpg)
Designated Router by Priorityp Configured priority (per interface)
n ISPs configure high priority on the routers they want as DR/BDR
p Else determined by highest router IDn Router ID is 32 bit integern Derived from the loopback interface address, if configured, otherwise
the highest IP address
22144.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 23: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/23.jpg)
Neighbouring Statesp Full
n Routers are fully adjacentn Databases synchronisedn Relationship to DR and BDR
23
FullDR BDR
![Page 24: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/24.jpg)
Neighbouring Statesp 2-way
n Router sees itself in other Hello packetsn DR selected from neighbours in state 2-way or greater
24
2-way
DR BDR
![Page 25: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/25.jpg)
When to Become Adjacentp Underlying network is point to pointp Underlying network type is virtual linkp The router itself is the designated router or the backup
designated routerp The neighbouring router is the designated router or the
backup designated router
25
![Page 26: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/26.jpg)
LSAs Propagate Along Adjacencies
p LSAs acknowledged along adjacencies
26
DR BDR
![Page 27: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/27.jpg)
Broadcast Networksp IP Multicast used for Sending and Receiving Updates
n All routers must accept packets sent to AllSPFRouters (224.0.0.5)
n All DR and BDR routers must accept packets sent to AllDRouters (224.0.0.6)
p Hello packets sent to AllSPFRouters (Unicast on point-to-point and virtual links)
27
![Page 28: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/28.jpg)
Routing Protocol Packetsp Share a common protocol headerp Routing protocol packets are sent with type of service
(TOS) of 0p Five types of OSPF routing protocol packets
n Hello – packet type 1n Database description – packet type 2n Link-state request – packet type 3n Link-state update – packet type 4n Link-state acknowledgement – packet type 5
28
![Page 29: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/29.jpg)
Different Types of LSAsp Six distinct type of LSAs
n Type 1 : Router LSAn Type 2 : Network LSAn Type 3 & 4: Summary LSAn Type 5 & 7: External LSA (Type 7 is for NSSA)n Type 6: Group membership LSAn Type 9, 10 & 11: Opaque LSA (9: Link-Local, 10: Area)
29
![Page 30: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/30.jpg)
Router LSA (Type 1)p Describes the state and cost of the router’s links to the
areap All of the router’s links in an area must be described in a
single LSAp Flooded throughout the particular area and no morep Router indicates whether it is an ASBR, ABR, or end point
of virtual link
30
![Page 31: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/31.jpg)
Network LSA (Type 2)p Generated for every transit broadcast and NBMA networkp Describes all the routers attached to the networkp Only the designated router originates this LSAp Flooded throughout the area and no more
31
![Page 32: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/32.jpg)
Summary LSA (Type 3 and 4)p Describes the destination outside the area but still in the
ASp Flooded throughout a single areap Originated by an ABRp Only inter-area routes are advertised into the backbonep Type 4 is the information about the ASBR
32
![Page 33: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/33.jpg)
External LSA (Type 5 and 7)p Defines routes to destination external to the ASp Default route is also sent as externalp Two types of external LSA:
n E1: Consider the total cost up to the external destinationn E2: Considers only the cost of the outgoing interface to the
external destinationp (Type 7 LSAs used to describe external LSA for one
specific OSPF area type)
33
![Page 34: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/34.jpg)
Inter-Area Route Summarisationp Prefix or all subnetsp Prefix or all networksp ‘Area range’ command
34
1.A 1.B 1.C
(ABR)Network1
Next HopR1
Network1.A1.B1.C
Next HopR1R1R1
With summarisation
Withoutsummarisation
BackboneArea 0
Area 1R1
R2
![Page 35: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/35.jpg)
No Summarisationp Specific Link LSA advertised out of each areap Link state changes propagated out of each area
35
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
![Page 36: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/36.jpg)
With Summarisationp Only summary LSA advertised out of each areap Link state changes do not propagate out of the area
36
3.A3.B
3.C 3.D2.A2.B
2.C 2.D
1.A1.B
1.C 1.D
1Area 0
2
3
![Page 37: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/37.jpg)
No Summarisationp Specific Link LSA advertised in to each areap Link state changes propagated in to each area
37
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
![Page 38: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/38.jpg)
With Summarisationp Only summary link LSA advertised in to each areap Link state changes do not propagate in to each area
38
3.A3.B
3.C 3.D2.A2.B
2.C 2.D
1.A1.B
1.C 1.D
23 Area 0
13
12
![Page 39: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/39.jpg)
Types of Areasp Regularp Stubp Totally Stubbyp Not-So-Stubbyp Only “regular” areas are useful for ISPs
n Other area types handle redistribution of other routing protocols into OSPF – ISPs don’t redistribute anything into OSPF
p The next slides describing the different area types are provided for information only
39
![Page 40: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/40.jpg)
Regular Area (Not a Stub)p From Area 1’s point of view, summary networks from other areas
are injected, as are external networks such as X.1
40
3.A3.B
3.C 3.D2.A2.B
2.C 2.D
1.A1.B
1.C 1.D
23 Area 0
13
12
ASBRExternal networks
X.1
X.1
X.1
X.1
X.1
X.1
X.1
![Page 41: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/41.jpg)
Normal Stub Areap Summary networks, default route injectedp Command is area x stub
41
3.A3.B
3.C 3.D2.A2.B
2.C 2.D
1.A1.B
1.C 1.D
23 Area 0
13
12
ASBRExternal networks
X.1
X.1
Default
X.1
X.1
Default
Default
![Page 42: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/42.jpg)
Totally Stubby Areap Only a default route injected
n Default path to closest area border routerp Command is area x stub no-summary
42
3.A3.B
3.C 3.D2.A2.B
2.C 2.D
1.A1.B
1.C 1.D
Area 01 3
1 2
ASBRExternal networks
X.1
X.1
Default
X.1
X.1
Default
DefaultTotally Stubby Area
![Page 43: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/43.jpg)
Not-So-Stubby Areap Capable of importing routes in a limited fashionp Type-7 LSA’s carry external information within an NSSAp NSSA Border routers translate selected type-7 LSAs into type-5 external network LSAs
43
3.A3.B
3.C 3.D2.A2.B
2.C 2.D
1.A1.B
1.C 1.D
Area 01 3
1 2
ASBRExternal networks
X.1
X.1
Default
X.1
X.1
Default X.2
Default X.2
Not-So-Stubby Area
External networks
X.2
X.2
X.2
![Page 44: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/44.jpg)
ISP Use of Areasp ISP networks use:
n Backbone arean Regular area
p Backbone arean No partitioning
p Regular arean Summarisation of point to point link addresses used within areasn Loopback addresses allowed out of regular areas without
summarisation (otherwise iBGP won’t work)
44
![Page 45: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/45.jpg)
Addressing for Areas
p Assign contiguous ranges of subnets per area to facilitate summarisation
45
Area 1network 192.168.1.64range 255.255.255.192
Area 2network 192.168.1.128range 255.255.255.192
Area 3network 192.168.1.192range 255.255.255.192
Area 0network 192.168.1.0range 255.255.255.192
![Page 46: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/46.jpg)
Summaryp Fundamentals of Scalable OSPF Network Design
n Area hierarchyn DR/BDR selectionn Contiguous intra-area addressingn Route summarisationn Infrastructure prefixes only
46
![Page 47: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/47.jpg)
OSPF Design
As applicable to Service Provider Networks
47
![Page 48: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/48.jpg)
Service Providersp SP networks are divided into PoPsp PoPs are linked by the backbonep Transit routing information is carried
via iBGPp IGP is only used to carry the next
hop for BGPp Optimal path to the next hop is
critical
48
![Page 49: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/49.jpg)
SP Architecture p Major routing information is
~670K prefixes via BGPp Largest known IGP routing table is
~9–10Kp Total of 680Kp 10K/680K is 1½% of IGP routes in
an ISP networkp A very small factor but has a huge
impact on network convergence!
49
IP Backbone
POP
POP POP
POP
Area 1/L1BGP 1
POP POP
Area 6/L1BGP 1
Area 5/L1BGP 1 Area 4/L1
BGP 1
Area 2/L1BGP 1
Area 3/L1BGP 1Area0/L2
BGP 1
![Page 50: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/50.jpg)
SP Architecturep You can reduce the IGP size
from 10K to approx the number of routers in your network
p This will bring really fast convergence
p Optimise where you must and summarise where you can
p Stops unnecessary flapping50
RR
Regional Core
Access
customer customer customer
IGP
![Page 51: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/51.jpg)
OSPF Design: Addressingp OSPF Design and Addressing go together
n Objective is to keep the Link State Database leann Create an address hierarchy to match the topologyn Use separate Address Blocks for loopbacks, network
infrastructure, customer interfaces & customers
51
InfrastructureCustomer Address Space LoopbacksPtP Links
![Page 52: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/52.jpg)
OSPF Design: Addressingp Minimising the number of prefixes in OSPF:
n Number loopbacks out of a contiguous address blockp But do not summarise these across area boundaries: iBGP peer addresses need to
be in the IGPn Use contiguous address blocks per area for infrastructure point-to-point links
p Use command on ABR to summarise
p With these guidelines:n Number of prefixes in area 0 will then be very close to the number of routers
in the networkn It is critically important that the number of prefixes and LSAs in area 0 is
kept to the absolute minimum
52
area range
![Page 53: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/53.jpg)
OSPF Design: Areasp Examine physical topology
n Is it meshed or hub-and-spoke?p Use areas and summarisation
n This reduces overhead and LSA countsn (but watch next-hop for iBGP when summarising)
p Don’t bother with the various stub areasn No benefits for ISPs, causes problems for iBGP
p Push the creation of a backbonen Reduces mesh and promotes hierarchy
53
![Page 54: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/54.jpg)
OSPF Design: Areasp One SPF per area, flooding done per area
n Watch out for overloading ABRsp Avoid externals in OSPF
n DO NOT REDISTRIBUTE into OSPFn External LSAs flood through entire network
p Different types of areas do different floodingn Normal areasn Stub areasn Totally stubby (stub no-summary)n Not so stubby areas (NSSA)
54
![Page 55: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/55.jpg)
OSPF Design: Areasp Area 0 must be contiguous
n Do NOT use virtual links to join two Area 0 islandsp Traffic between two non-zero areas always goes via Area 0
n There is no benefit in joining two non-zero areas togethern Avoid designs which have two non-zero areas touching each othern (Typical design is an area per PoP, with core routers being ABR to the
backbone area 0)
55
![Page 56: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/56.jpg)
OSPF Design: Summaryp Think Redundancy
n Dual Links out of each area – using metrics (cost) for traffic engineering
p Too much redundancy…n Dual links to backbone in stub areas must be the same cost –
other wise sub-optimal routing will resultn Too Much Redundancy in the backbone area without good
summarisation will effect convergence in the Area 0
56
![Page 57: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/57.jpg)
OSPF Areas: Migrationp Where to place OSPF Areas?
n Follow the physical topology!n Remember the earlier design advice
p Configure area at a time!n Start at the outermost edge of the networkn Log into routers at either end of a link and change the link from Area 0 to the
chosen Arean Wait for OSPF to re-establish adjacenciesn And then move onto the next link, etcn Important to ensure that there is never an Area 0 island anywhere in the
migrating network
57
![Page 58: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/58.jpg)
OSPF Areas: Migration
p Migrate small parts of the network, one area at a timen Remember to introduce summarisation where feasible
p With careful planning, the migration can be done with minimal network downtime
58
Area 0
A
B
GFE
D
C
Area 10
![Page 59: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/59.jpg)
OSPF for Service Providers
Configuring OSPF & Adding Networks
59
![Page 60: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/60.jpg)
OSPF: Configurationp Starting OSPF in Cisco’s IOS
n Where “100” is the process IDp OSPF process ID is unique to the router
n Gives possibility of running multiple instances of OSPF on one router
n Process ID is not passed between routers in an ASn Many ISPs configure the process ID to be the same as their BGP
Autonomous System Number
60
router ospf 100
![Page 61: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/61.jpg)
OSPF: Establishing Adjacenciesp Cisco IOS OSPFv2 automatically tries to establish
adjacencies on all defined interfaces (or subnets)p Best practice is to disable this
n Potential security risk: sending OSPF Hellos outside of the autonomous system, and risking forming adjacencies with external networks
n Example: Only POS4/0 interface will attempt to form an OSPF adjacency
61
router ospf 100passive-interface defaultno passive-interface POS4/0
![Page 62: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/62.jpg)
OSPF: Adding NetworksOption Onep Redistribution:
n Applies to all connected interfaces on the router but sends networks as external type-2s – which are not summarised
p Do NOT do this! Because:n Type-2 LSAs flood through entire networkn These LSAs are not all useful for determining paths through backbone; they
simply take up valuable space
62
router ospf 100redistribute connected subnets
![Page 63: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/63.jpg)
OSPF: Adding NetworksOption Twop Per link configuration – from IOS 12.4 onwards
n OSPF is configured on each interface (same as IS-IS)n Useful for multiple subnets per interface
63
interface POS 4/0ip address 192.168.1.1 255.255.255.0ip address 172.16.1.1 255.255.255.224 secondaryip ospf 100 area 0!router ospf 100passive-interface defaultno passive-interface POS 4/0
![Page 64: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/64.jpg)
OSPF: Adding NetworksOption Threep Specific network statements
n Every active interface with a configured IP address needs an OSPF network statement
n Interfaces that will have no OSPF neighbours need passive-interface to disable OSPF Hello’s
p That is: all interfaces connecting to devices outside the ISP backbone (i.e. customers, peers, etc)
64
router ospf 100network 192.168.1.0 0.0.0.3 area 51network 192.168.1.4 0.0.0.3 area 51passive-interface Serial 1/0
![Page 65: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/65.jpg)
OSPF: Adding NetworksOption Fourp Network statements – wildcard mask
n Every active interface with configured IP address covered by wildcard mask used in OSPF network statement
n Interfaces covered by wildcard mask but having no OSPF neighbours need passive-interface (or use passive-interface default and then activate the interfaces which will have OSPF neighbours)
65
router ospf 100network 192.168.1.0 0.0.0.255 area 51passive-interface defaultno passive interface POS 4/0
![Page 66: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/66.jpg)
OSPF: Adding NetworksRecommendationsp Don’t ever use Option 1p Use Option 2 if supported; otherwise:p Option 3 is fine for core/infrastructure routers
n Doesn’t scale too well when router has a large number of interfaces but only a few with OSPF neighbours
n ® solution is to use Option 3 with “no passive” on interfaces with OSPF neighbours
p Option 4 is preferred for aggregation routersn Or use iBGP next-hop-selfn Or even ip unnumbered on external point-to-point links
66
![Page 67: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/67.jpg)
OSPF: Adding NetworksExample One (Cisco IOS ≥ 12.4)p Aggregation router with large number of leased line
customers and just two links to the core network:
67
interface loopback 0ip address 192.168.255.1 255.255.255.255ip ospf 100 area 0
interface POS 0/0ip address 192.168.10.1 255.255.255.252ip ospf 100 area 0
interface POS 1/0ip address 192.168.10.5 255.255.255.252ip ospf 100 area 0
interface serial 2/0:0 ...ip unnumbered loopback 0
! Customers connect here ^^^^^^^router ospf 100passive-interface defaultno passive interface POS 0/0no passive interface POS 1/0
![Page 68: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/68.jpg)
OSPF: Adding NetworksExample One (Cisco IOS < 12.4)p Aggregation router with large number of leased line
customers and just two links to the core network:
68
interface loopback 0ip address 192.168.255.1 255.255.255.255
interface POS 0/0ip address 192.168.10.1 255.255.255.252
interface POS 1/0ip address 192.168.10.5 255.255.255.252
interface serial 2/0:0 ...ip unnumbered loopback 0
! Customers connect here ^^^^^^^router ospf 100network 192.168.255.1 0.0.0.0 area 51network 192.168.10.0 0.0.0.3 area 51network 192.168.10.4 0.0.0.3 area 51passive-interface defaultno passive interface POS 0/0no passive interface POS 1/0
![Page 69: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/69.jpg)
OSPF: Adding NetworksExample Two (Cisco IOS ≥ 12.4)p Core router with only links to other core routers:
69
interface loopback 0ip address 192.168.255.1 255.255.255.255ip ospf 100 area 0
interface POS 0/0ip address 192.168.10.129 255.255.255.252ip ospf 100 area 0
interface POS 1/0ip address 192.168.10.133 255.255.255.252ip ospf 100 area 0
interface POS 2/0ip address 192.168.10.137 255.255.255.252ip ospf 100 area 0
interface POS 2/1ip address 192.168.10.141 255.255.255.252ip ospf 100 area 0
router ospf 100passive interface loopback 0
![Page 70: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/70.jpg)
OSPF: Adding NetworksExample Two (Cisco IOS < 12.4)p Core router with only links to other core routers:
70
interface loopback 0ip address 192.168.255.1 255.255.255.255
interface POS 0/0ip address 192.168.10.129 255.255.255.252
interface POS 1/0ip address 192.168.10.133 255.255.255.252
interface POS 2/0ip address 192.168.10.137 255.255.255.252
interface POS 2/1ip address 192.168.10.141 255.255.255.252
router ospf 100network 192.168.255.1 0.0.0.0 area 0network 192.168.10.128 0.0.0.3 area 0network 192.168.10.132 0.0.0.3 area 0network 192.168.10.136 0.0.0.3 area 0network 192.168.10.140 0.0.0.3 area 0passive interface loopback 0
![Page 71: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/71.jpg)
OSPF: Adding NetworksSummaryp Key Theme when selecting a technique: Keep the Link
State Database Leann Increases Stabilityn Reduces the amount of information in the Link State
Advertisements (LSAs)n Speeds Convergence Time
71
![Page 72: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/72.jpg)
OSPF in Cisco IOS
Useful features for ISPs
72
![Page 73: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/73.jpg)
Areas
p An area is stored as a 32-bit field:n Defined in IPv4 address format
(i.e. Area 0.0.0.0) n Can also be defined using
single decimal value (i.e. Area 0)
p 0.0.0.0 reserved for the backbone area
73
Area 0
Area 1
Area 2
Area 3
![Page 74: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/74.jpg)
Logging Adjacency Changesp The router will generate a log message whenever an
OSPF neighbour changes state p Syntax:
n (OSPF keyword is optional, depending on IOS version)p Example of a typical log message:
74
[no] [ospf] log-adjacency-changes
%OSPF-5-ADJCHG: Process 1, Nbr 223.127.255.223 on Ethernet0 from LOADING to FULL, Loading Done
![Page 75: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/75.jpg)
Number of State Changesp The number of state transitions is available via SNMP
(ospfNbrEvents) and the CLI:
n Detail—(Optional) Displays all neighbours given in detail (list all neighbours). When specified, neighbour state transition counters are displayed per interface or neighbour ID
75
show ip ospf neighbor [type number] [neighbor-id] [detail]
![Page 76: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/76.jpg)
State Changes (Continued)p To reset OSPF-related statistics, use the following
command:
n This will reset neighbour state transition counters per interface or neighbour id:
76
clear ip ospf counters
clear ip ospf counters [neighbor [<type number>] [neighbor-id]]
![Page 77: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/77.jpg)
Router ID
p If the loopback interface exists and has an IP address, that is used as the router ID in routing protocols –stability!
p If the loopback interface does not exist, or has no IP address, the router ID is the highest IP address configured – danger!
p OSPF sub command to manually set the Router ID:
77
router-id <ip address>
![Page 78: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/78.jpg)
Cost & Reference Bandwidth
p Bandwidth used in Metric calculationn Cost = 108/bandwidthn Not useful for interface bandwidths > 100 Mbps
p Syntax:
p Default reference bandwidth still 100 Mbps for backward compatibility
p Most ISPs simply choose to develop their own cost strategy and apply to each interface type
78
ospf auto-cost reference-bandwidth <reference-bw>
![Page 79: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/79.jpg)
Cost: Example Strategy100GE 100Gbps cost = 140GE/OC768 40Gbps cost = 210GE/OC192 10Gbps cost = 5OC48 2.5Gbps cost = 10GigabitEthernet 1Gbps cost = 20OC12 622Mbps cost = 50OC3 155Mbps cost = 100FastEthernet 100Mbps cost = 200Ethernet 10Mbps cost = 500E1 2Mbps cost = 1000
79
![Page 80: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/80.jpg)
Default routesp Originating a default route into OSPF
n Will originate a default route into OSPF if there is a matching default route in the Routing Table (RIB)
n The optional keyword will always originate a default route, even if there is no existing entry in the RIB
80
default-information originate metric <n>
always
![Page 81: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/81.jpg)
Clear/Restartp OSPF commands
n If no process ID is given, all OSPF processes on the router are assumed
pn This command clears redistribution based on OSPF routing process ID
pn This command clears counters based on OSPF routing process ID
pn This command will restart the specified OSPF process. 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
81
clear
clear ip ospf [pid] redistribution
clear ip ospf [pid] counters
clear ip ospf [pid] process
![Page 82: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/82.jpg)
Use OSPF Authenticationp Use authentication
n Too many operators overlook this basic requirementp When using authentication, use the MD5 feature
n Under the global OSPF configuration, specify:
n Under the interface configuration, specify:
p Authentication can be selectively disabled per interface with:
82
area <area-id> authentication message-digest
ip ospf message-digest-key 1 md5 <key>
ip ospf authentication null
![Page 83: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/83.jpg)
Point to Point Ethernet Linksp For any broadcast media (like Ethernet), OSPF will attempt to elect
a designated and backup designated router when it forms an adjacencyn If the interface is running as a point-to-point WAN link, with only 2 routers on
the wire, configuring OSPF to operate in "point-to-point mode" scales the protocol by reducing the link failure detection times
n Point-to-point mode improves convergence times on Ethernet networks because it:
p Prevents the election of a DR/BDR on the link,p Simplifies the SPF computations and reduces the router's memory footprint due to
a smaller topology database.
83
interface fastethernet0/2ip ospf network point-to-point
![Page 84: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/84.jpg)
Tuning OSPF (1)p DR/BDR Selection
n (default 1)n This feature should be in use in your OSPF networkn Forcibly set your DR and BDR per segment so that they are
knownn Choose your most powerful, or most idle routers, so that OSPF
converges as fast as possible under maximum network load conditions
n Try to keep the DR/BDR limited to one segment each
84
ip ospf priority 100
![Page 85: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/85.jpg)
Tuning OSPF (2)p OSPF startup
n Avoids blackholing traffic on router restart n Causes OSPF to announce its prefixes with highest possible metric until iBGP
is up and runningn When iBGP is running, OSPF metrics return to normal, make the path valid
p IS-IS equivalent:
85
max-metric router-lsa on-startup wait-for-bgp
set-overload-bit on-startup wait-for-bgp
![Page 86: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/86.jpg)
Tuning OSPF (3)p Hello/Dead Timers
n (default 10)n (default is 4x hello)n This allows for faster network awareness of a failure, and can result in
faster reconvergence, but requires more router CPU and generates more overhead
p LSA Pacingn (default 240)n Allows grouping and pacing of LSA updates at configured intervaln Reduces overall network and router impact
86
ip ospf hello-interval 3
ip ospf dead-interval 15
timers lsa-group-pacing 300
![Page 87: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/87.jpg)
Tuning OSPF (4)p OSPF Internal Timers
n (default is 5 and 10 respectively)n Allows you to adjust SPF characteristicsn The first number sets wait time from topology change to SPF
runn The second is hold-down between SPF runsn BE CAREFUL WITH THIS COMMAND; if you’re not sure when to
use it, it means you don’t need it; default is sufficient 95% of the time
87
timers spf 2 8
![Page 88: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/88.jpg)
Tuning OSPF (5)p LSA filtering/interface blocking
n Per interface:p (no options)
n Per neighbor:p (no options)
n OSPFs router will flood an LSA out all interfaces except the receiving one; LSA filtering can be useful in cases where such flooding unnecessary (i.e., NBMA networks), where the DR/BDR can handle flooding chores
n Filters out specific Type 3 LSAs at ABRs
p Improper use can result in routing loops and black-holes that can be very difficult to troubleshoot 88
ip ospf database-filter all out
neighbor 1.1.1.1 database-filter all out
area <area-id> filter-list <acl>
![Page 89: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/89.jpg)
Summaryp OSPF has a bewildering number of features and optionsp Observe ISP best practicesp Keep design and configuration simplep Investigate tuning options and suitability for your own
networkn Don’t just turn them on!
89
![Page 90: OSPF in Detail - bgp4all.com.au · OSPF in Detail ISP Workshops ... Virtual Links between OSPF Areas pVirtual Link is used when it is not possible to physically connect the area to](https://reader036.vdocument.in/reader036/viewer/2022062311/5ed0840631579e17926e6131/html5/thumbnails/90.jpg)
OSPF in Detail
ISP Workshops
90