0% found this document useful (0 votes)
196 views

Ospf e Book

The document discusses OSPF (Open Shortest Path First), a link-state routing protocol. It provides an agenda that covers OSPF theory, convergence, scalability, multi-area designs, fast reroute, overlay technologies, and applications in datacenter and service provider networks. The document also discusses OSPF design best practices, advantages/disadvantages, and frequently asked questions.

Uploaded by

SAYHI NAIL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
196 views

Ospf e Book

The document discusses OSPF (Open Shortest Path First), a link-state routing protocol. It provides an agenda that covers OSPF theory, convergence, scalability, multi-area designs, fast reroute, overlay technologies, and applications in datacenter and service provider networks. The document also discusses OSPF design best practices, advantages/disadvantages, and frequently asked questions.

Uploaded by

SAYHI NAIL
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 121

OSPF

Open Shortest
Path First
Open Shortest Path First www.orhanergun.net

Agenda

• OSPF Theory
• OSPF Fast Convergence
• Convergence and Micro-loop
• OSPF Scalability, Multi Area OSPF Design
• Fast Reroute with OSPF
• Overlay Technologies and OSPF (GRE, mGRE,IPSEC, DMVPN, LISP)
• OSPF in the Datacenter Networks
ag
• OSPF in the Service Provider Networks
en
da
Open Shortest Path First www.orhanergun.net

Agenda

• OSPF Design Best Practices


• OSPF Advantages and Disadvantages
• OSPF Frequently Asked Questions – How many Routers in an OSPF Area,
How many ABR per Area ?
• Case Studies
• OSPF in the CCDE Exam
• Summary
ag
• Bonus Materials
en
da
Open Shortest Path First www.orhanergun.net

Theory

• If the requirements is to have MPLS Traffic Engineering, Standard based


and Enterprise level protocol then only choice is OSPF.

• OSPF as a link state protocol has many similarities


with IS-IS but if the requirements is to run IPsec,

the
since IS-IS doesn’t work on top of IP, it is not well
suited for Enterprise environment.

ory
Open Shortest Path First www.orhanergun.net

3 Types of Routing Protocols

Path Vector
BGP
Protocol

RIP
Distance Vector
Routing
Protocol
IGRP EIGRP

Link State
OSPF typ
es
Routing Protocol
IS-IS
Open Shortest Path First www.orhanergun.net

LSA Flooding

• In a link state protocols, each router advertises the state of its links to every other router in the
Network

• D determines that it is connected to


192.168.0.0/24 with metric 10
B 20 10 C • Connected to B with metric 10
• Connected to B with metric 10

10 10
D

• D advertises this information describing all of


its links to its neighbors B and C
10
192.168.0.0/24

lsa
Open Shortest Path First www.orhanergun.net

LSA Flooding

• This process of recording and re-transmitting is


called flooding.
B 20 10 C

10 10
D • Since information is flooded within a link State
network, every router should have the same
information about the network (How it looks
like).

192.168.0.0/24

lsa
Open Shortest Path First www.orhanergun.net

ABR (Area Border Router) and


ASBR (Autonomous System Border Router)

• When scaling become an issue network is


broken into separate flooding domains, which
we call it areas.

R6 R6
OSPF OSPF
• The router connecting the two area is called an AREA1 AREA2
Area Border Router (ABR).
R3 R4
ABR ABR

• The router connecting the network to the other


R1 R2
networks is called ASBR.
OSPF ASBR
AREA0
(Blackbone Area)
Open Shortest Path First www.orhanergun.net

• In a particular area every routers have identical topology map. Every router
knows which network behind which router and their metrics.

• OSPF, unlike EIGRP and IS-IS works differently on


different media. On broadcast network DR
(Designated Router) creates a pseudo node to
avoid unnecessary flooding.
Open Shortest Path First www.orhanergun.net

OSPF DR & BDR

R4

• DR creates type 2 LSA (Network LSA) to inform


the connected routers on the broadcast
network.

R3 R8 (DR)

• Highest priority OSPF router on the broadcast


segment wins the Designated Router (DR)
election. If priorities are the same then highest
router ID wins the DR election. On every R7
broadcast segment there can be only 1 DR.
R2 (BDR)
Open Shortest Path First www.orhanergun.net

OSPF DR & BDR

R4

• Each router in multi access segment creates a


OSPF neighbourship with DR and BDR only R3 R8 (DR)

• Unlike IS-IS, there is Backup Designated Router


(BDR) in OSPF.
R7
R2 (BDR)
Open Shortest Path First www.orhanergun.net

DR & BDR Question

• Is there a DR and BDR in the below topology?

GE 0/0 GE 0/0

Direct back to back connection


Open Shortest Path First www.orhanergun.net

• We can only have scalable, resilient, fast-


converged OSPF design when we
understand OSPF LSAs and Area types
and their restrictions
Open Shortest Path First www.orhanergun.net

• There are 11 types of LSAs and 5 of them


are important for the OSPF routing
protocol design.
Open Shortest Path First www.orhanergun.net

5 Critical LSAs for OSPF Design

Description

• Router information
1.Router • Connections to other routers
• Connections to links (link states)
• Pseudonode information
2.Pseudonode • Connections to routers
• Connections to broadcast link
• Destinations reachable within an area (flooding
3.Summary
domain)
• Cost to reach a router advertising external routing
4.Border Router information (an ASBR)
• Generated by the ABR
• Cost to reach a destination which is external to the
5.External Destination OSPF flooding domain (outside the local autonomous
system)

lsa
Open Shortest Path First www.orhanergun.net

OSPFv2 all LSA Types

LSA Type Description

1 Router LSA

2 Network LSA

3 and 4 Summary LSAs

5 AS external LSA

6 Multicast OSPF LSA

7 Defined for NSSAs

8 External attribute LSA for Border Gateway Protocol (BGP)

lsa
9, 10, 11 Opaque LSAs
Open Shortest Path First www.orhanergun.net

OSPF Area Types

Area Restriction

Normal None

Stub No type 5 LSA/No External LSAs allowed

No type 3, 4 or 5 LSA allowed except the


Totally Stubby
default summary route

No type 5 ASYExternal LSAs allowed, but type 7 LSAs that convert to


NSSA
type 5 at the NSSA ABR can traverse

No type 3, 4 or 5 LSAs allowed except the default summary route,


NSSA Totally Stubby
but type 7 LSAs that convert to type 5 at the NSSA ABR are allowed

lsa
Open Shortest Path First www.orhanergun.net

All routers in an area must have same LSDB


(Link State Database)

• OSPF uses two level hierarchical model.


• Areas are use for scalability.
AREA10 AREA20
• Regular, Stub, Totally Stub, NNSA and
Totally NSSA Areas.
• Router keeps separate link state
database for each area which it
belongs.
• LSA flooding is bounded by area,
Backbone outside of an area Type 1 and Type 2
Area0 LSA is not sent.
AREA30 • SPF calculation is performed
independently for each area.
• All routers belonging the same area
EIGRP should have identical link state
database.
Open Shortest Path First www.orhanergun.net

OSPF Fast Convergence

• Network convergence is the between the failure event and the recovery.

• Through the path all the routers process the


event and update their routing and forwarding
table.

os
• Thus; there are 4 steps for convergence in general:

1. Failure Detection
2. Failure Propagation
3. Processing the new information
4. Routing and Forwarding table update

pf
Open Shortest Path First www.orhanergun.net

OSPF Fast Convergence

• Convergence is a control plane events and for IGPs it can take seconds; BGP
routers which have full internet routing table, control plane convergence
can take minutes.

• Protection is a data plane recovery mechanism.


As soon as failure is detected and propagated to
the nodes, data plane can react and a backup

os path can be used. A backup path should be


calculated and installed in routing and forwarding
table before the failure event.

pf
Open Shortest Path First www.orhanergun.net

Convergence Tools

• DETECTION • PROCESSING

Carrier Delays • PROPAGATIO Full, Partial and


Debounce Timers N Incremental SPF
Bidirectional Forwarding MinLSA Arrival Interval
Detection-BFD Interface event dampening LSA and SPF Throttling
Protocol Hello/Dead Timers LSA Pacing timers
Open Shortest Path First www.orhanergun.net

Convergence & Micro-loop

E B

D C
Open Shortest Path First www.orhanergun.net

OSPF Scalability and Multi Area Design

• To reduce the impact of flooding and provide scalability Multi Area OSPF
Design can be used.

• With the today hardware 100s of OSPF routers


can be placed in an OSPF area.

os
• OSPF Multi-Area design is not the only tool to provide scalability.

pf
Open Shortest Path First www.orhanergun.net

OSPF Scalability and Multi Area Design

• OSPF prefix-suppression feature provides scalability through removing


point-to-point links from the Type 1 LSA, thus LSDB and routing table size is
reduced.

• Also OSPF Database-filter (similar to IS-IS mesh


group) reduces the flooding between the routers

os in a full-mesh topology, thus provides scalability

pf
Open Shortest Path First www.orhanergun.net

OSPF Scalability and Multi Area Design

• Number of routers in an OSPF domain may impact scalability.

• Problem with the number of routers in OSPF


domain is the Router LSA size.

• Each additional link and subnet makes Router LSA bigger and when it

os
exceed the interface MTU, packet is fragmented. You should always avoid
fragmentation.

pf
Open Shortest Path First www.orhanergun.net

Multi Area OSPF – Fault Isolation

• Special areas such as Stub and NSSA in OSPF provides fault isolation.

• When fault is isolated, adding a link or node or


changing the metric in one area doesn’t cause
Full SPF calculation in other OSPF areas.

os
• This is important for scaling.

pf
Open Shortest Path First www.orhanergun.net

What is the problem with the below area design?

• Area 10 is regular area thus all the LSA


AREA10
types including type 3 and 5 are
Type 3,4,5
allowed.
AREA20
• ABRs create Type 4 LSA into an Area 10.
Type 3,4,5 • Area 20 is Stub Area. That’s why only
Type 3 LSA Type 3 LSA is allowed.
only
• Type 5 LSA is not allowed in Stub Area
• Thus type 4 is not generated as well.
Type 3 LSA Backbone
only
Area0

AREA30

EIGRP
Type 5 LSA
Open Shortest Path First www.orhanergun.net

• ABR has to have a connection to more than one area, and at least one area
should be in Area 0 (Backbone Area) but even creating a loopback interface and
placing it into a Area 0 makes that router an ABR.

Area LSAs Allowed

Backbone 1, 2, 3, 4, 5

Regular 1, 2, 3, 4, 5

Stub 1, 2, 3

Totally Stubby 1, 2, Default 3

Not So Stubby 1, 2, 3, 4, 7
Open Shortest Path First www.orhanergun.net

Fast reroute with OSPF

• Fast reroute is done by placing the alternate route in RIB and FIB

• Alternate/backup route is not used while primary


link is up and running.

• OSPF FRR can be done with LFA, Remote LFA, Segment Routing FRR, RSVP-

os
TE FRR.

pf
Open Shortest Path First www.orhanergun.net

Convergence & Micro-loop

Protecting Node Primary Next Hop

A B

Primary Path
Repair Path
C

Alternate Next Hop


Open Shortest Path First www.orhanergun.net

• OSPF Fast reroute can provide 50ms convergence time which cannot be
done by tuning SPF parameters, link failure detection tuning with BFD etc.
Open Shortest Path First www.orhanergun.net

• Fast reroute is proactive recovery, fast convergence is reactive recovery


technique.

• Proactive recovery mean, calculating and


installing the backup path into the RIB and FIB
before the failure event.
Open Shortest Path First www.orhanergun.net

Overlay Technologies and OSPF


(GRE, MGRE, DMVPN, GETVPN, LISP)

• OSPF can work on top of many overlay technologies.

• GRE, MGRE, DMVPN, GETVPN and LISP can be


used to create overlay/VPN in the networks.

• OSPF can be used for these overlay mechanisms as an underlay

os
infrastructure routing protocol.

pf
Open Shortest Path First www.orhanergun.net

Overlay Technologies and OSPF


(GRE, MGRE, DMVPN, GETVPN, LISP)

• OSPF works over GRE, MGRE and DMVPN

• OSPF doesn’t work over GETVPN and LISP,


because both are tunnelless VPN mechanisms,
routing protocols can be an underlay for them but
not an overlay

• OSPF with GRE is not scalable for large scale deployment but scaling
limitation comes from GRE, it is not the OSPF problem, MGRE provides
scalability with OSPF even in large scale deployment.
Open Shortest Path First www.orhanergun.net

OSPF in the Datacenter

• OSPF can be used at the DC edge to advertise DC prefixes to the WAN and
Campus network

Internet
Data Center

Core Layer-3 router


Common DC Topology

Aggregation Layer-2/3 switch

Layer-2
Access
switch

Servers
Open Shortest Path First www.orhanergun.net

• Also OSPF can be used as a Datacenter Fabric Protocol.

• Datacenters are very densely connected


networks, thus OSPF flooding creates scalability
problem.

• Large scale Datacenters mainly use CLOS (Leaf and Spine) topology,
depends on scale, multi stage CLOS topologies are used.
Open Shortest Path First www.orhanergun.net

3 stage CLOS topology


Open Shortest Path First www.orhanergun.net

• The Fabric provides basic connectivity, with possibility to carry one or more
overlays

• The Fabric MAY provide interconnect facility for other fabrics.

• The Fabric MUST support non equidistant end-points.

• The Fabric MUST support Spine and Leaf [CLOS] + isomorphic topologies
within its network.

• The Fabric MAY support non Spine and Leaf topologies


Open Shortest Path First www.orhanergun.net

• The Fabric SHOULD support 250k routes @ 5k fabric nodes with


convergence time below 250ms.

• The Fabric SHOULD support 500k routes @ 7.5k fabric nodes with
convergence time below 500ms.

• The Fabric SHOULD support 1M routes @ 10k fabric nodes with


convergence time below 1s.
Open Shortest Path First www.orhanergun.net

• The Fabric routing protocol MUST support load balancing using ECMP, wECMP
and UCMP.

• The Fabric routing protocol MUST support and provide facility for topology-
specific algorithms that enable correct operations in that specific topology.

• The Fabric routing protocol SHOULD support route scale and convergence times
of a Fabric mentioned above.

• The Fabric routing protocol SHOULD support ECMP as wide as 256 paths.

• The Fabric routing protocol MUST support various address families that covers
IP as well as MPLS forwarding.

• The Fabric routing protocol MUST support Traffic Engineering paths that are
host and/or router based paths.
Open Shortest Path First www.orhanergun.net

• The Fabric routing protocol MUST support Zero Touch Provisioning (ZTP).

• The Fabric routing protocol MUST support Neighbor Discovery to facilitate ZTP.

• The Fabric routing protocol MUST be able to leverage BFD [RFC5880] for
neighbor state.

• The Fabric routing protocol MUST be able to support real time state
notifications of routes and its neighbors state to facilitate control plane
telemetry.

• The Fabric routing protocol MUST be able handle commission/decommission of


a node as well as any node restart with a minimal data plane impact.
Open Shortest Path First www.orhanergun.net

OSPF in the Service Provider Networks

• OSPF is very commonly used in the Service Provider networks, especially in


the Middle East and Europe, many Service Providers use OSPF in their
network, IS-IS is found in U.S Service Provider networks commonly.

• OSPF is used in Core Networks mostly but some


providers extend OSPF to the Aggregation and
even to the access domains.

• In Seamless MPLS/Unified MPLS architecture, OSPF in the access network


usage will be explained in detail.
os
pf
Open Shortest Path First www.orhanergun.net

OSPF and MPLS Traffic Engineering is used together


in many SP networks

• OSPF is used to create shortest path routing but many Service Providers
use OSPF with MPLS Traffic Engineering so they don’t just use shortest
path between their nodes.

IP/MPLS

Classical Fish Diagram of MPLS Traffic Engineering.


Without MPLS TE, IGP protocols always chooses shortest path.
Source routing is not possible with IGP protocols.
Open Shortest Path First www.orhanergun.net

• OSPF is used to carry the Service Provider network device prefixes in the SP
networks, not the customer routes.

• Customer routes are carried within BGP.

• OSPF is used in Service Provider network as a PE-CE routing protocol if SP is


providing MPLS L3 VPN , or mobile operators are using MPLS L3 VPN at
their 3G UMTS and 4G LTE sites in Unified/MPLS architecture.
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• Unless there is a valid reason, don’t deploy Multi Area OSPF, keep the
design simple, it provides better convergence, less configuration on the
ABR nodes and optimal traffic flow.

• Don’t enable OSPF on the customer facing ports,


for MPLS L3 VPN PE-CE protocol, enable prefix

os
limit, authentication and control plane policing

pf
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• Use OSPF Prefix-suppression feature to remove infrastructure links from


the Type 1 (Router) LSA, it provides scalability if necessary.

• Always start deploying OSPF Area 0 (Backbone


Area), it will provide easier migration when multi

os
area OSPF design is necessary.

pf
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• Use OSPF network type ‘ point to point ‘, it removes the Types 2 LSA from
LSDB, thus better for troubleshooting and high availability also it is good
for fast convergence.

• If there is DR in the OSPF domain, make sure you


don’t have performance problem with it.

os
pf
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• Summarization removes reachability information and it can be done on


either ABR for summary LSA or at ASBR for External Type 5 LSA.

• Summarization may break the MPLS LSP, since


LDP cannot have aggregated FEC unless the RFC

os
5283 – LDP Extension to Inter Area LSP is in use.

pf
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• If PE loopback mask is /24, OSPF advertises it as /32 but LDP assigns a label
for /24, since there is a mismatch between two control plane protocols
(LDP and OSPF), packet is dropped. Because OSPF advertises loopback
interfaces as /32. They should follow each other.

• Either OSPF network type should be point to


point to advertise loopback as /32 so routing
table and LDP is same, or use /32 loopback
subnet mask.

os
pf
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• Don’t redistribute full Internet routing table to OSPF.

• OSPF in the large scale datacenter has flooding


issue, database filter-out can be used to remove
the topology information, towards downstream
TOR switches.

• If you need to deploy Multi Area Design , know that it can create
suboptimal routing in many topologies.
os
pf
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• Don’t deploy more than two ABRs for redundancy, two is enough.

• ABRs slow down the convergence.

os
• Don’t carry customer prefixes with the infrastructure OSPF in Service
Provider networks, customer prefixes should be carried in BGP.

pf
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• OSPF Fast convergence might bring unstability to network, make sure


timers are tuned accordingly for the fast convergence.

• OSPF Fast reroute with LFA may not cover every


topology, especially ring will not be protected,

os
you may need to deploy Remote LFA or MPLS TE
FRR for that , if topology is partial/full mesh, OSPF
and LFA is enough to provide FRR for links or
prefixes.

pf
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• OSPF doesn’t use TLV encoding, it is not extendable, required OSPFv3 for
IPv6 for example.

• OSPF has 11 Type of LSA, compare to 2 Levels of


IS-IS it is considered as more complex.

• Each OSPF LSA has a separate header, IS-IS TLVs share common LSP header,
thus OSPF is seen as less scalable.
os
pf
Open Shortest Path First www.orhanergun.net

OSPF Design Best Practices

• OSPF needs an IP address for adjacency, IS-IS doesn’t require an IP Address


for neighborship, remote attack to the IS-IS is hard if not impossible, thus
IS-IS is seen more secure compare to OSPF.

• OSPF provides MPLS TE supports, similar to IS-IS,


but distance vector protocols don’t.

• OSPF is a good protocols for those who look Enterprise level and standard
base protocol.
os
pf
Open Shortest Path First www.orhanergun.net

OSPF Frequently Asked Questions

• How many routers should be in one OSPF Area ?

• Number of neighbor is more important


question which we should ask.

• Always try to keep router LSA under the


MTU size to avoid fragmentation.

• Routers cannot deal with fragmentation


and reassembly well.
Area 0
Open Shortest Path First www.orhanergun.net

How many ABR (Area Border Router) per OSPF Area ?

ABR
AREA10 AREA20

ABR

ABR

Backbone
ABR Area0

AREA30

ASBR

EIGRP
Open Shortest Path First www.orhanergun.net

• In the previous diagram, there are 2 ABRs in Area 10. For the redundancy
and optimal traffic flow, two is always enough.

• More ABRs will create more Type 3 LSA replication


within the back bone and non-back bone areas.

• In large scale OSPF design, number of ABRs will have an huge impact on
number of prefixes.
os
pf
Open Shortest Path First www.orhanergun.net

How many OSPF area is suitable per OSPF ABR?

AREA 10 AREA 70
AREA 0

• More Areas per ABR might create a resource problem on the ABR.
• Much more Type 3 LSA will be generated by the ABR
• Between the Areas there will not be Type 1 or Type 2 LSA, Type 1 and Type 2 LSA stays in the
area and the reachability information is sent as Type 3 LSA between the Areas.
OSPF
CASE STUDIES
Open Shortest Path First Case Study www.orhanergun.net

ABR Placement

• Where should we place an ABR in the below topology. Why?

D F

A G H B

C E
Open Shortest Path First Case Study www.orhanergun.net

ABR Placement

• Between Router A and Router B there are 1800 different paths. (5x6) x 2 ( 5x6) If we would put all of them in a
same area we would have flooding, convergence, resource utilization, troubleshooting problems.

• If we use Router G or Router H as an ABR, we will have only 32 paths


max (5x6) +2 between Router A and B, this will greatly reduce the load
on the resources, reduces the overall complexity thus makes
troubleshooting easier.

• Put ABR always a place where you can separate the complex topologies.
ab
r
Open Shortest Path First Case Study www.orhanergun.net

Multi-Area OSPF Adjacency

• What is the path from Router C to 192.168.10.0/24 and path from Router D to 192.168.0.0/24 networks? Is
there a problem with the path? Why? What is the possible solution?

A B

AREA 0

C D
192.168.0.0/24 Link 1 192.168.10.0/4
Area 0 Area 10

AREA 10

E F
Open Shortest Path First Case Study www.orhanergun.net

Multi-Area OSPF Adjacency

• If Link 1 is in area 0, router C will choose an path through E, F, and D to 192.168.10.0/24 rather than Link1.

• This is because OSPF always prefers intra-area routes over inter-area


routes.

• If Link 1 is put in area 10, router D will choose an path through B, A, and C to 192.168.0.0/24 with the same
reason.
Open Shortest Path First Case Study www.orhanergun.net

Multi-Area OSPF Adjacency

• This is suboptimal. Placing link into Area 1 and creating virtual link was the temporary solution. Also in this
solution for each additional non-backbone area new OSPF adjacency is required.

• Real solution to this: RFC 5185 -OSPF Multi Area Adjacency.


Open Shortest Path First Case Study www.orhanergun.net

Multi-Area OSPF Adjacency

• Over 1 OSPF adjacency multiple area can be allowed with the RFC 5185.

• Below is a sample configuration from the Cisco device which supports


RFC 5185.

rtr-C(config)# interface Ethernet 0/0


rtr-C(config-if)# ip address 192.168.12.1 255.255.255.0
rtr-C(config-if)# ip ospf 1 area 0
rtr-C(config-if)# ip ospf network point-to-point
rtr-C(config-if)# ip ospf multi-area 2
Open Shortest Path First Case Study www.orhanergun.net

NSSA at the Internet Edge

• Enterprise company wants to run OSPF at the Internet edge between their Internet Gateway routers and the
firewalls, which type of OSPF area is most suitable in this design and why?

ns
Layer 2 Switch

Firewall

sa
Open Shortest Path First Case Study www.orhanergun.net

NSSA at the Internet Edge

• Solution: If OSPF is used at the Internet Edge, IGW(Internet Gateways) don’t need to have full OSPF routing
table.

• Using Stub or NSSA areas is most suitable. Firewalls only need a default
routes from the Internet Gateways.

ns
Default route, partial route or even full route can be received from the BGP neighbor but only default route
is needed by the firewalls.

sa
Open Shortest Path First Case Study www.orhanergun.net

NSSA at the Internet Edge

• It is good practice to redistribute default route from BGP to OSPF.

• If the link fails between the customer and the service provider, BGP goes
down and default route is removed from the OSPF as well.

• Only NSSA allows redistribution into an OSPF Stub areas.

ns • That’s why, if OSPF will be implemented NSSA would be the most

sa
suitable area types on the Internet Edge.
Open Shortest Path First Case Study www.orhanergun.net

OSPF and BGP Interaction

• OSPF is running as an IGP protocol in the below network. Also there is no MPLS in the core and all routers run
BGP.

For scaling purpose company decided to use BGP Route Reflector design.

Router B and C are the Route Reflectors and Router A and D are the Route Reflector clients

Company wants to perform maintenance on the Router B but they don’t want to have any downtime

What would be your design recommendation ?

bg
B BGP Route Reflector

IBGP IBGP
A D

p
BGP RR BGP RR
CLIENT OSPF CLIENT

IBGP IBGP

C BGP Route Reflector


Open Shortest Path First Case Study www.orhanergun.net

OSPF and BGP Interaction

• BGP as an overlay protocol needs next hop reachability. Static routing or the dynamic routing protocol is
used to create an underlay network infrastructure for the overlay protocols such as BGP, LDP, PIM and so on.

• In this case study one of the routers which is in the path towards BGP
next hop will be reloaded. We might have two problems here.

bg
p
Open Shortest Path First Case Study www.orhanergun.net

OSPF and BGP Interaction

• When Router B is reloaded traffic is going to Router B shouldn’t be dropped. Router B should signal the other
OSPF routers. This signaling is done with OSPF Stub Router advertisement feature.

• ‘ max-metric router-lsa ‘ is used by OSPF for graceful restart

• IGP always converges faster than BGP.

bg • Second problem is when the Router B comes back, BGP traffic towards
Router B will be black holed, because IGP process of Router B will
converge faster than its BGP.

p
Open Shortest Path First Case Study www.orhanergun.net

OSPF and BGP Interaction

• IGP should wait to BGP. Router B should take the BGP traffic once BGP prefixes installed in the routing table.

• This is done with the OSPF Stub router advertisement feature as well.

• ‘ max-metric router-lsa on-startup wait-for-bgp ‘ is used by OSPF, so until BGP process is converged, OSPF
doesn’t take traffic.

bg • In this case study, with the OSPF Stub router advertisement feature,
other OSPF routers are signaled for Graceful restart and also OSPF.

p
Open Shortest Path First Case Study www.orhanergun.net

Case Study Key Point

• OSPF interacts with many protocols in the network such as spanning tree, BGP, MPLS and
so on. Understanding the impact of such an interaction is the first step for the robust
network design.
key
poi
nt
Open Shortest Path First www.orhanergun.net

OSPF in the CCDE Exam

• OSPF Areas and LSA Types should be known very well.

• ABR placement is an important topic, When there is


a DC, Branches, WAN modules, where ABR will be
placed?
ine
• OSPF in an MPLS VPN environment , superbackbone, sham-link, route advertisement
should be expected.

xa
m
• In general OSPF Scaling, Multi Area design needs to be
understood very well.
Open Shortest Path First www.orhanergun.net

Summary

• Link state protocols behaviors are explained


su
m
• OSPF Fast Convergence and Fast Reroute
• OSPF Scalability,Multi Area OSPF Design
• Overlay Technologies and OSPF (GRE, mGRE, DMVPN, LISP)
• OSPF in the Datacenter Networks
• OSPF in the Service Provider Networks

ma
• OSPF Design Best Practices
• OSPF Advantages and Disadvantages
• OSPF Frequently Asked Questions – How many Routers in an OSPF Area, How many ABR per
Area?
• OSPF in the CCDE Exam

ry
OSPF
Open Shortest QUIZ
Path First
Open Shortest Path First Quiz www.orhanergun.net

Question 1

How many routers can be placed in any given OSPF area?

A. 50

B. 100

C. 250

D. Less than 50

E. It depends
Open Shortest Path First Quiz www.orhanergun.net

Answer 1

E.It depends

As it is explained in the OSPF chapter, you cannot have a numeric answer for this
question.

There is no numeric answer of this question. It depends on how many links each
router have, stability of the links, hardware resources such as CPU and Memory of
the routers and physical topology of the network.

For example in full mesh topology, every router is connected to each other and
number of links is too much compare to ring or partial topologies.

Thus, in one OSPF network you may place 50 routers in one OSPF area, but other
OSPF network can have 100s of routers in one area.
Open Shortest Path First Quiz www.orhanergun.net

Question 2

Why many different types of LSAs are used in OSPF? (Chose all that
apply)

A. Provides Scalability

B. Allow Multi-Area OSPF design

C. Provides fast convergence

D. Provides High Availability

E. Better Traffic Engineering


Open Shortest Path First Quiz www.orhanergun.net

Answer 2

A.Provides Scalability

B.Allow Multi-Area OSPF design

Question here is asking the reason of having multiple different types of OSPF LSAs.
As you have seen in the OSPF chapter there are 11 different types of OSPF LSAs.

Although there are other reasons to use OSPF LSAs, two important ones are
scalability and Multi-Area design. They don’t help for fast convergence or high
availability LSAs are not related with High Availability or Fast convergence. Although
MPLS Traf c engineering can use OSPF Opaque LSAs for the distributed CSPF
calculation, CSPF is not mandatory and many networks which have MPLS Traf c
engineering uses Of ine Path calculation tool such as Cariden Mate.
Open Shortest Path First Quiz www.orhanergun.net

Question 3

What does topology information mean in OSPF?

A. IP addresses of the directly connected interface.

B. IP addresses of the loopback interfaces of all the routers.

C. Provides an IP reachability information and the metric of all the physical and logical
interfaces.

D. Provides a graph of the OSPF network by advertising connection information such


as which router is connected to which one and the metric of the connections.
Open Shortest Path First Quiz www.orhanergun.net

Answer 3

D. Provides a graph of the OSPF network by advertising connection information such


as which router is connected to which one and the metric of the connections

There are two type of information is provided in link state protocols: Topology and
reachability information.

Reachability information means IP addresses of the physical or logical interfaces of


the routers. Topology information explains, which router is connected to which one,
what is the OSPF metric value between them, thus provide a graph of the OSPF
network.

Based on this information every router runs SPF algorithm to nd a shortest path to
each and every destination in the network.
Open Shortest Path First Quiz www.orhanergun.net

Question 4

Why more than one Area is used in an OSPF network?

A. They are used for high availability.

B. They are used for easier troubleshooting.

C. They are used to provide scalability by having smaller flooding domains.

D. Since topology information is not shared between OSPF areas, they provide better
security.
Open Shortest Path First Quiz www.orhanergun.net

Answer 4

C. They are used to provide scalability by having smaller flooding domains.

OSPF areas are used mainly for scalability. Having smaller domain means, keeping
topology information in an area and not sending between the areas. More than
one area doesn’t provide high availability and doesn’t make troubleshooting easier.

Also in OSPF having more than one area doesn’t prevent a route to be propagated
to other areas by default, it requires manual configuration and even in that case it
doesn’t bring extra security.
Open Shortest Path First Quiz www.orhanergun.net

Question 5

Which router in the below topology should be an ABR?

D F

A G H B

C E

A. G or H B. A or B C. C or D D. E or F E. G
Open Shortest Path First Quiz www.orhanergun.net

Answer 5

A. G or H

Router G or H should be an ABR to separate two full mesh topology from each
other. Otherwise each router in the top full mesh network would run full SPF
algorithm for each other router in the below full mesh network in case link failure,
metric change or when new link or pre x is added.
Open Shortest Path First Quiz www.orhanergun.net

Question 6

In the below topology, Router B needs to be reloaded. Network


operator doesn’t want any traffic loss during and after Router B’s
maintenance operation. Which feature should be enabled on the
Router B?
B
BGP Route Reflector

IBGP IBGP
A D
BGP RR OSPF BGP RR
CLIENT CLIENT

IBGP IBGP

A. Max-metric router-lsa on startup wait-for-bgp. C


BGP Route Reflector

B. OSPF prefix-list.

C. Type2-lsa on-startup wait-for-bgp.

D. IGP LDP synchronization.


Open Shortest Path First Quiz www.orhanergun.net

Answer 6

A. Max-metric router-lsa on startup wait-for-bgp.

BGP as an overlay protocol needs next hop reachability. Static routing or the dynamic
routing protocol is used to create an underlay network infrastructure for the overlay
protocols such as BGP, LDP, PIM and so on.

One of the routers in the forwarding path towards BGP next hop will be reloaded. We might
have two problems here.

When Router B is reloaded, traf c is going to Router B shouldn’t be dropped. Router B


should signal the other OSPF routers.

This signaling is done with OSPF Stub Router advertisement feature. ‘ Max-metric router-lsa
‘ is used by OSPF for graceful restart. Second problem is when the Router B comes back;
BGP traffic towards Router B will be black holed, because IGP process of Router B will
converge faster than its BGP.

IGP should wait to BGP. Router B should take the BGP traf c once BGP pre xes installed in the
routing table.

This is done with the OSPF Stub router advertisement feature as well.
Open Shortest Path First Quiz www.orhanergun.net

Question 7

How many levels in OSPF hierarchy used ?

A. One

B. Two

C. Three

D. As many as possible
Open Shortest Path First Quiz www.orhanergun.net

Answer 7

B.Two

OSPF supports two level of hierarchy. Hierarchy is common network design term,
which is used to identify the logical boundaries. Backbone area and Non-Backbone
areas are the only two areas, which are supported by OSPF, thus it supports only
two level of hierarchy.
Open Shortest Path First Quiz www.orhanergun.net

Question 8

Which below options are correct for OSPF ABR?


(Choose all that apply)

A. It slows down the convergence.

B. It generates Type 4 LSA in Multi Area OSPF design.

C. It does translation between Type7 to Type 5 in NSSA area.

D. It does translation between Type 5 to Type 7 in NSSA area.

E. It prevents topology information between OSPF areas.


Open Shortest Path First Quiz www.orhanergun.net

Answer 8

A.It slows down the convergence.

B.It generates Type 4 LSA in Multi Area OSPF design.

C.It does translation between Type7 to Type 5 in NSSA area.

E.It prevents topology information between OSPF areas.

OSPF ABR slows down the network convergence. Because it needs to calculate for each
Type 1 and Type 2 LSAs, corresponding Type 3 LSAs and send its connected OSPF areas.

OSPF ABR generates Type 4 LSAs in Multi Area OSPF Design. When ABR receives the
external pre xes in an Area, it translates Type 1 LSAs of the ASBR to Type 4 LSA and sends it
to the other areas.

In NSSA Area, ABR translates Type 7 LSA to Type 5 LSA, but there is no Type 5 to Type 7 LSA
translation. It is not allowed.

Topology information is not sent between the OSPF Areas, ABR stops topology information.

Thus the answer of this question is A- B – C- E.


Open Shortest Path First Quiz www.orhanergun.net

Question 9

Why Designated Router is used in OSPF network?

A. It is used to have an ABR in the network

B. It is used to create topology information

C. It is used to centralize the database, instead of keeping distributed OSPF link state
database in every node

D. It is used to avoid flooding information between each device in multi access OSPF
network
Open Shortest Path First Quiz www.orhanergun.net

Answer 9

D.It is used to avoid flooding information between each device in multi access OSPF
network

Designated Router (DR) is used to avoid flooding information between each OSPF
device in Multi-Access networks such as Ethernet or Frame Relay.

Routers only send their update to DR and DR floods this information to the every
router in the segment. Multicast Group addresses 2224.0.0.5 and 224.0.0.6 is used
for communication in IPv4.
Open Shortest Path First Quiz www.orhanergun.net

Question 10

Which below feature is used to avoid blackholing when OSPF and LDP
are used together?

A. OSPF Fast Reroute.

B. OSPF Multi Area Design.

C. IGP LDP Synchronization.

D. Converging OSPF faster than LDP in case of failure.


Open Shortest Path First Quiz www.orhanergun.net

Answer 10

C. IGP LDP Synchronization.

The problem occurs when link or node fails when OSPF and LDP is used together. It
also occurs when IS-IS and LDP is together and the IG-LDP synchronization provides
a label for the IGP pre xes in the Label database, otherwise since IGP converge rst
and then LDP, packets would be blackholed.

Chicken and egg problem is solved and blackholing is avoided.


Open Shortest Path First Quiz www.orhanergun.net

Question 11

Which below option is correct for the given topology?

AREA10 AREA20

A. Area 20 has to be Stub area.


Backbone
B. Sending default route might create
Area0
suboptimal routing for internal Area
20 routers. AREA30

C. ABR of Area 20 has to be Designated


Router.
EIGRP
D. Area 20 doesn’t receive Type 1 and
Type 2 LSAs from the other areas.
Open Shortest Path First Quiz www.orhanergun.net

Answer 11

D. Area 20 doesn’t receive Type 1 and Type 2 LSAs from the other areas.

Area 20 can be any type of OSPF area since there is no given requirement.

Sending default route cannot create suboptimal routing because there is only one
exit point from the Area 20. Sub optimal routing can only be created if there is
more than one exit from the Area.

ABR of Area 20 doesn’t have to DR. In fact, DR and ABR shouldn’t be the same
router. Since both operations are resource intensive and separating these two ask is
a best practice.

Type 1 and Type 2 LSAs cannot be received from the other Areas because topology
information is not allowed between the OSPF areas and in OSPFv2 Type 1 and Type
2 LSAs carry topology information in addition to reachability information.
Open Shortest Path First Quiz www.orhanergun.net

Question 12

In the below topology Area 30 is an NSSA area. Which below option is


true?

AREA10 AREA20

A. There will not be any Type 3 LSA in Backbone


Area 30. Area0
B. ABR of Area 30 will translate Type 7 AREA30
LSA to Type 5 LSA.

C. There will not be any Type 1 or Type 2


LSA. EIGRP

D. EIGRP prfixes will not be allowed in


Area 30.
Open Shortest Path First Quiz www.orhanergun.net

Answer 12

B. ABR of Area 30 will translate Type 7 LSA to Type 5 LSA.

Since Area 30 is an NSSA area; there will be Type 3 LSA, that’s why Option A is
incorrect. There will be Type 1 and Type 2 LSA, but not from the other Areas.

In Are 30, every router generates Type 1 LSAs, and of there is multi- access
network, the DR will generate Type 2 LSA as well.

EIGRP preFIxes will be allowed and they will be seen as Type 7 LSA in the Area 30.

Only Option B is correct, because ABR of Area 30 translate Type 7 LSA which is the
EIGRP pre xes to Type 5 LSA send them to the network.
Open Shortest Path First Quiz www.orhanergun.net

Question 13

In the below topology Area 10 is Totally NSSA Area. Which below


option is true?

AREA10 AREA20

A. Area 10 will not have any Type 1 or Backbone


Type 2 LSA. Area0

B. Area 10 will not have EIGRP prefixes. AREA30

C. Area 10 cannot reach to EIGRP


prefixes. EIGRP
D. Both ABRs of Area 10 will do the Type
7 to Type 5 translation.
Open Shortest Path First Quiz www.orhanergun.net

Answer 13

B. Area 10 will not have EIGRP prefixes.

Area 10 will be able to reach EIGRP network through default route even if it is
Totally NSSA. But Area 10 devices cannot have specific EIGRP prefixes because Type
3, 4, 5 LSAs are not allowed in Totally NSSA Area. Answer of this question is B.
Open Shortest Path First Quiz www.orhanergun.net

Question 14

Which below topology, OSPF is worse than EIGRP in large-scale


implementation?

A. Full Mesh

B. Partial Mesh

C. Hub and Spoke

D. Ring
Open Shortest Path First Quiz www.orhanergun.net

Answer 14

C. Hub and Spoke

In Full Mesh physical topology, Mesh Group feature allows only two routers to flood
LSAs into the area. Mesh Group is supported by both OSPF and IS-IS.

This brings scalability into OSPF.

Ring and Partial mesh topologies are hard for all the routing protocols. Ring and
Partial mesh are cheaper to build but convergence, optimal routing and fast reroute
is very hard in Ring and Partial mesh.

EIGRP is best in Hub and Spoke topology from the scalability point of view, because
it doesn’t require so many configurations for its operation. OSPF on the other hand,
requires a lot of tuning for its operation in Large scale Hub and spoke topology.
Open Shortest Path First Quiz www.orhanergun.net

Question 15

Why OSPF is used as an Infrastructure IGP in an MPLS VPN


environment?

A. To carry the customer prefixes.

B. Reachability between the MPLS VPN endpoints.

C. OSPF is not used in MPLS VPN environment as an Infrastructure IGP protocol but
BGP is used.

D. LDP requires OSPF as an IGP.


Open Shortest Path First Quiz www.orhanergun.net

Answer 15

B. Reachability between the MPLS VPN endpoints.

LDP requires IGP yes but it is not relevant. It could be EIGRP or IS-IS as well.

And the purpose of OSPF or any other IGP.as an Infrastructure protocol is to carry the
loopback interface addresses of the MPLS VPN endpoints.

So the OSPF is used for reachability between the VPN endpoints (PE devices) in SP
networks. OSPF is not used to carry the customer prefixes as an Infrastructure IGP.

Knowing the difference between the Infrastructure IGP and the PE-CE IGP protocol in
MPLS VPN is important. This will be explained in detail in the MPLS chapter.
Open Shortest Path First Quiz www.orhanergun.net

Question 16

Which OSPF feature in MPLS VPN PE-CE is used to ensure MPLS


service is always chosen as primary link?

A. OSPF max-metric

B. OSPF prefer-primary path

C. OSPF sham-link

D. Passive-interface

E. Virtual link
Open Shortest Path First Quiz www.orhanergun.net

Answer 16

C OSPF sham-link

Even domain IDs are the same in both site of the MPLS VPN, without sham-link
feature only Type 3 LSA can be received from the PE by CE.

Sham-link is used to receive Type 1 LSA and even if there is a backup connection
between the CEs, only changing cost on either PE-CE or CE-CE link make MPLS link as
primary.

OSPF as a PE-CE protocol will be explained in detail in the MPLS chapter.


Open Shortest Path First Quiz www.orhanergun.net

Question 17

Which below options are correct for OSPF?


(Choose all that apply)

A. OSPFv2 doesn’t support IPv6 so when IPv6 is needed, OSPFv3 is necessary.

B. OSPF virtual link shouldn’t be used as permanent solution is OSPF design.

C. OSPF and BGP are the two separate protocols so when OSPF cost changes, it
doesn’t affect BGP path selection.

D. OSPF can carry the label information in Segment Routing so LDP wouldn’t be
necessary.

E. OSPF unlike EIGRP, supports MPLS Traffic Engineering with dynamic path
calculation.
Open Shortest Path First Quiz www.orhanergun.net

Answer 17

A.OSPFv2 doesn’t support IPv6 so when IPv6 is needed, OSPFv3 is necessary.

B.OSPF virtual link shouldn’t be used as permanent solution is OSPF design.

D.OSPF can carry the label information in Segment Routing so LDP wouldn’t be
necessary.

E.OSPF unlike EIGRP, supports MPLS Traf c Engineering with dynamic path calculation.

Only incorrect option of this question is C. although they are two separate protocols;
changing the OSPF metric can affect the best BGP exit point.

Taking IGP cost into consideration to calculate best path for the BGP prefixes is called
Hot Potato Routing.

Changing IGP metric can affect BGP best path.


Open Shortest Path First Quiz www.orhanergun.net

Question 18

What is the reason to place all routers in Area 0/Backbone Area, even
at the begiining in OSPF design?

A. You cannot place routers in non-backbone area without backbone area.

B. Type 3 LSAs should be received from the ABR.

C. Future Multi Area design migration can be easier.

D. It is not a best practice to place all the routers in Area 0 in Flat/Single OSPF area
design.
Open Shortest Path First Quiz www.orhanergun.net

Answer 18

C Future Multi Area design migration can be easier.

In OSPF design, all the routers can be placed in any Non-Backbone area. If you have
50 routers in your network, you can place all of them in Area 100 for example.

But having the routers in OSPF Backbone area (Area 0) from the early stage of
network design provides easier migration to Multi Area OSPF design.

This is true for the IS-IS as well. In IS-IS you can have all the routers in the network in
Level 1 domain. But having them in Level 2 allows easier Multi-Level IS-IS design if it
is required in the future. This will be explained in the IS-IS chapter with the case
study.
Open Shortest Path First Quiz www.orhanergun.net

Question 19

In OSPFv2 which LSA types cause Partial SPF run?


(Choose Three)

A. Type 1

B. Type 2

C. Type 3

D. Type 4

E. Type 5
Open Shortest Path First Quiz www.orhanergun.net

Answer 19

C Type 3

D.Type 4

E.Type 5

In OSPFv2, Type 3, 4 and 5 causes Partial SPF run. Not full SPF. Partial SPF is less CPU
intensive process compare to Full SPF run.
Open Shortest Path First Quiz www.orhanergun.net

Question 20

Based on which design attributes, number of maximum routers


change in OSPF area?

A. It depends on how many area is in the OSPF domain.

B. Maximum number of routers in OSPF area should be around 50.

C. Depends on link stability, physical topology, number of links, hardware resources,


rate of change in the network.

D. If there are two or more ABRs, number can be much more


Open Shortest Path First Quiz www.orhanergun.net

Answer 20

C Depends on link stability, physical topology, number of links, hardware resources,


rate of change in the network.

Depends on link stability, physical topology, number of links on the routers, hardware
resources and rate of change in the network. If some links flap all the time, this
affects the routers resources and the scalability of the network.
Open Shortest Path First Quiz www.orhanergun.net

Question 21

How many OSPF ABR routers should be in place in OSPF by keeping


also redundancy in mind?

A. One

B. Two

C. Three

D. If the number of routers in an area is too much, it can be up to 8 ABRs


Open Shortest Path First Quiz www.orhanergun.net

Answer 21

B.Two

In large-scale OSPF design, the number of ABRs will have a huge impact on the
number of prefixes. Thus having two ABRs is good for redundancy for the critical
sites.

For example some of the remote offices or POP locations may not be critical as other
locations and having only one ABR in those locations, can be tolerated by the
company.

In this case that specific location may have only one ABR as well.

Keep in mind that; two is company, three is crowded in design.


Open Shortest Path First Quiz www.orhanergun.net

Question 22

What are the most important reasons of route summarization in


OSPF? (Choose Two)

A. In order to reduce the routing table size so routers have to store and process less
information.

B. In order to increase the availability of the network.

C. Increase the security of the routing domain.

D. In order to reduce the impact of topology changes.

E. In order to provide an optimal routing in the network.


Open Shortest Path First Quiz www.orhanergun.net

Answer 22

A.In order to reduce the routing table size so routers have to store and process less
information.

D. In order to reduce the impact of topology changes.

If there is route summarization, sub optimal routing might occur as it was explained
in the OSPF chapter. Thus Option E is incorrect.

Availability and security doesn’t increase with route summarization. But topology
change affects is de nitely reduced.

Also the routing table size is reduced and this provides better memory and CPU
utilization, fast convergence and better troubleshooting.
Open Shortest Path First www.orhanergun.net

Extra Study Resources

• Books :
• http://www.amazon.com/OSPF---Choosing-Large-Scale-
Networks/dp/0321168798/ref=sr_1_1?ie=UTF8&qid=1436566360&sr=8-
res
our
1&keywords=ospf+and+is-is
• Videos :
• Ciscolive Session – BRKRST -2337
• Articles :
• http://www.cisco.com/web/about/ac123/ac147/archived_issues/ipj_16-2/162_lsp.html
• http://orhanergun.net/2015/02/ospf-design-challenge/
• https://tools.ietf.org/html/rfc4577

ces

You might also like