OSPF Best Practices - AS
OSPF Best Practices - AS
THE SOFTWARE LICENSE AND LIMITED WARRANTY FOR THE ACCOMPANYING PRODUCT
ARE SET FORTH IN THE INFORMATION PACKET THAT SHIPPED WITH THE PRODUCT AND
ARE INCORPORATED HEREIN BY THIS REFERENCE. IF YOU ARE UNABLE TO LOCATE THE
SOFTWARE LICENSE OR LIMITED WARRANTY, CONTACT YOUR CISCO REPRESENTATIVE
FOR A COPY.
The Cisco implementation of TCP header compression is an adaptation of a program developed by the
University of California, Berkeley (UCB) as part of UCB’s public domain version of the UNIX operating
system. All rights reserved. Copyright © 1981, Regents of the University of California.
IN NO EVENT SHALL CISCO OR ITS SUPPLIERS BE LIABLE FOR ANY INDIRECT, SPECIAL,
CONSEQUENTIAL, OR INCIDENTAL DAMAGES, INCLUDING, WITHOUT LIMITATION, LOST
PROFITS OR LOSS OR DAMAGE TO DATA ARISING OUT OF THE USE OR INABILITY TO USE
THIS MANUAL, EVEN IF CISCO OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
CCDE, CCENT, Cisco Eos, Cisco Lumin, Cisco Nexus, Cisco StadiumVision, Cisco TelePresence, Cisco
WebEx, the Cisco logo, DCE, and Welcome to the Human Network are trademarks; Changing the Way We
Work, Live, Play, and Learn and Cisco Store are service marks; and Access Registrar, Aironet, AsyncOS,
Bringing the Meeting To You, Catalyst, CCDA, CCDP, CCIE, CCIP, CCNA, CCNP, CCSP, CCVP, Cisco,
the Cisco Certified Internetwork Expert logo, Cisco IOS, Cisco Press, Cisco Systems, Cisco Systems
Capital, the Cisco Systems logo, Cisco Unity, Collaboration Without Limitation, EtherFast, EtherSwitch,
Event Center, Fast Step, Follow Me Browsing, FormShare, GigaDrive, HomeLink, Internet Quotient, IOS,
iPhone, iQuick Study, IronPort, the IronPort logo, LightStream, Linksys, MediaTone, MeetingPlace,
MeetingPlace Chime Sound, MGX, Networkers, Networking Academy, Network Registrar, PCNow, PIX,
PowerPanels, ProConnect, ScriptShare, SenderBase, SMARTnet, Spectrum Expert, StackWise, The Fastest
Way to Increase Your Internet Quotient, TransPath, WebEx, and the WebEx logo are registered trademarks
of Cisco Systems, Inc. and/or its affiliates in the United States and certain other countries.
All other trademarks mentioned in this document or website are the property of their respective owners.
The use of the word partner does not imply a partnership relationship between Cisco and any other
company.
Corporate Headquarters
Cisco Systems, Inc.
170 West Tasman Drive
San Jose, CA 95134-1706
USA
http://www.cisco.com
Tel: 408 526-4000
800 553-NETS (6387)
Fax: 408 526-4100
Contents
Contents............................................................................................................................................ 2
Introduction ...................................................................................................................................... 5
Objective ...................................................................................................................................... 5
Scope ........................................................................................................................................... 5
Audience ...................................................................................................................................... 5
External Routes.............................................................................................................................. 16
Router ID ......................................................................................................................................... 23
Authentication ................................................................................................................................ 26
IP Addressing ................................................................................................................................. 35
OSPF Cost....................................................................................................................................... 37
Passive Interface............................................................................................................................ 38
Routing protocol design and implementation are generally mature fields, and a good amount of
documentation is available both within and external to Cisco on this topic. Our experience within the
Routing VT pointed to the fact that Cisco’s (especially Advanced Service’s) best practices for routing
protocols implementations are not being captured in one document.
In an effort to address this issue, the Routing VT worked as a team to capture routing protocols deployment
best practices, and provide a way to dynamically update and add to them. This document represents one
phase of this project, capturing best practices for deploying the Open Shortest Path First (OSPF) protocol.
Readers should be familiar with basic routing and experienced in configuring Cisco routers. No attempt is
made to explain and clarify low level functionality, although some examples are provided to help understand
the recommendation in question.
Throughout the document, best practices are given on each OSPF topic with an introduction on the features,
followed by Best Practices bullet points in a text box and then detailed explanations on the Best Practices.
For easy reference, Best Practices are in a box to clearly separate recommendations from explanations.
Disclaimer
This is version 2.0 which is the third released version. This version includes modifications to the previous
version’s (ver 1.0 and 1.5) content and a few new topics. The future versions of the document will contain
more extensive best practices.
Objective
The objective of this document is to:
• Provide comprehensive industry best practices for the Routing Protocols used on Cisco Routers.
• Provide a medium to track and continuously update the technology best practices to ensure the collective
technical experience of Advanced Services Routing VT is recorded, reviewed and updated. In other
words, provide a platform for converting AS expertise to Cisco Intellectual Property.
Scope
• Routing Best Practices for Design, Implementation, Optimization, Planning, Migration, Case Studies
New Features and Caveats
Audience
• This document is for NCEs in Advanced Services, Other Cisco Technical Teams and Cisco Partners and
Customers.
• Advanced Services Tools Team for automation of Best Practices Compliance
This document was intended to be a team effort. The following members contributed to the completion of
different versions of this document:
Version 1.0
Member Name Role
Senthil Palanisamy Project Lead and Contributor
John Samson, Yadhu Govindarajan, Jaswant Singh Contributors
Sina Mirtorabi Contributor and Reviewer
Version 1.5
Member Name Role
Senthil Palanisamy Project Lead and Contributor
Sina Mirtorabi, Shyan Wignarajah Reviewers
Version 2.0
Member Name Role
Faraz Shamim Project Lead , Contributor and Reviewer
Prashant Shukla Contributor
Senthil Palanisamy Reviewer
In addition to the names mentioned above, Cisco internal web pages, CCO web pages and various Cisco
internal news group archives have been referred, to gather information. Also many users of version 1.0 and
1.5 of this document provided valuable feedback and comments for improvement which are included in the
later versions.
OSPF is a link state protocol; routers in an OSPF domain flood the status of each of their connected links state
throughout the domain, which is used by each router to build and maintain a link state database. The topology
of the network is derived from this link state database.
Routing (or flooding) domains are broken up in an OSPF network by dividing the network into areas, with
Area Border Routers (ABRs) providing the ability to route (forward traffic) between two flooding domains. In
order to provide consistent routing throughout an OSPF network, OSPF requires all areas to connect to a
central area, called the backbone, or Area 0. Topology summarization always occurs at a flooding domain
border (ABR), since all destinations are advertised by the ABR as if they are directly connected to the ABR.
Any information about the internal topology of the area is removed from the information transmitted between
areas.
OSPF forces hierarchy within the domain requiring every area connects to Area 0. If the addressing is carefully
allocated within areas attached to Area 0, they can be easily summarized at the ABRs. Address (reachability)
summarization plays a critical role in network scaling by reducing the OSPF database and routing table sizes
and isolating instability within an area.
• By default, a summary route inherits the best metric (lowest cost) of the component routes of the summary.
This is in compliance with RFC 1583. This is the default behavior while summarizing the routes from one
Area into another. Giving no compatible rfc1583 command under OSPF would make the summarized
route to inherit the highest metric of the component routes covered by the summary. Irrespective of whether
the summary carries the highest metric or the lowest metric of the component routes, if that specific
component route changes, then the summary metric also changes. This might cause a routing change in the
Areas the summary is being advertised in to. To prevent this from happening, either the summary should
have a manually configured metric on the ABR, or a loopback interface with appropriate cost be configured
on the ABR so that the summary inherits the loopback interface’s cost. While summarizing routes with
multiple ABR, load balancing can also be achieved. If the network requirement is to loadbalance the traffic
while coming into specific area then this method is recommended. Figure 4 depicts such situation:
Here one could summarize with the range 11.1/16 on both ABR1 and ABR2. The traffic could end up on any
ABR but with splitting the summary range into two blocks, 11.1.0/17 and 11.1.128/17, it will be able to load
balance the traffic and this way an intelligent form of loadbalancing can be achieved. On ABR1 11.1.0/17 is
configured with a cost of 30 and 11.1.128.0/17 is configured with a cost of 80. Similarly on ABR2, 11.1.0/17 is
configured with a cost of 80 and 11.1.128.0/17 is configured with a cost of 30. This means that whenever there
is a traffic destined to 11.1.0/17 range, it will always prefer ABR1 because of the cost of 30. For the range
11.1.128/17 , ABR2 will be preferred.
There are some situations where an area can not be made stub or totally stub to reduce routes in an area. For
those situations LSA type 3 filtering can be used. LSA type 3 filtering will allow you to filter type 3 LSA
based on the prefix lists and only allow limited sets of routes into an area. Type 3 LSA filtering is a Cisco
proprietary feature and it can only be used if the ABR is a Cisco router.
• If a normal OSPF Area needs to know only selective summary LSA from other Areas and not all
the summary LSAs, then configure LSA type 3 filtering at the ABRs.
• The Type -3 Filtering need to be configured on all the ABRs in an Area
• Often there are situation where external routes needs to be injected into an area and area may not be
interested to know about every other area’s routes. Typically, to block other area routes, totally stub
area can be implemented but that will restrict the injections of any external LSA. To accommodate
this situation, an NSSA area can be defined but that will just make things complicated. Even with
NSSA, selective summary LSA from another Area can’t be injected into the NSSA Area. Either
NSSA permits all summary LSA from other areas or no summary route from other area ( in addition to
permitting the external routes in NSSA Area). So , in an Area where you need to permit external
LSAs and selelctive summary LSAs from other Areas we can use Type 3 LSA filtering and leak
selective type 3 routes that need to be known to the area.
Figure 5 shows how Type 3 LSA filtering works. It can be applied either inbound or outbound depending upon
the situation. In this example, area 0 is used with the filter-list but it can be applied with any other area as well.
The outbound filter means do not send any type 3 LSA into that area. The inbound filter means do not send
type 3 LSA outside that area into any other area. The advantage of this method is that you can always pick and
choose what prefix to deny or permit based on the access-list.
Routes redistributed into an OSPF process from any other routing protocol (including another OSPF process)
generate OSPF external routes that are propagated throughout the domain (except Stub and NSSA area) as
Type-5 LSAs. The router redistributing external prefix is called an ASBR (Autonomous System Border
Router).
• Summarize externally learned routes at the redistribution point (ASBR) to reduce the external
LSAs where possible, since external LSAs are flooded throughout the OSPF domain.
• Avoid configuring redistribute connected under the OSPF routing process. Instead, use the
network statement under OSPF process and mark those interfaces as passive.
• If redistribution is required, limit it to as fewer routers as possible.
Before going into best practices of using the Stub Areas, the following table from the CCO gives an overview
of the type of OSPF Areas and restrictions on each Area.
Area Restriction
Normal None
Stub No Type 5 AS-external LSA allowed
Totally Stub No Type 3, 4 or 5 LSAs allowed except the default summary route
NSSA No Type 5 AS-external LSAs allowed, but Type 7 LSAs that convert to Type 5
at the NSSA ABR can traverse
NSSA Totally Stub No Type 3, 4 or 5 LSAs except the default summary route, but Type 7 LSAs
that convert to Type 5 at the NSSA ABR are allowed
For further understanding of each of the Areas, please refer to the following CCO URL:
http://www.cisco.com/en/US/partner/tech/tk365/technologies_tech_note09186a0080094a74.
shtml#typesofospfareas
• Stub Areas do not accept Type-5 LSAs but, all other LSAs are permitted. In other words routes belonging
to external autonomous systems (AS) are not permitted in the Stub Area but all other routes such as inter-
area and intra-area routes are allowed. In order to reach the outside networks, the routers in the stub area
use a default route which is injected into the area by the Area Border Router (ABR).
• Totally Stubby Areas accept only intra-area routes. No other types of routes are allowed in this Area.
• NSSA (Not So Stubby Area) allows the flexibility of having few external routes while maintaining the Stub
Area characteristics. This may be useful in certain situations where there is a necessity to redistribute some
external AS routes into an OSPF Stub Area but do not want to make this Area as a Normal Area. If the
Area is configured as an NSSA Area, the redistributed external routes in this NSSA Area become Type-7
LSAs which are flooded throughout the NSSA area. These Type-7 LSAs are converted into Type-5 LSAs
at the NSSA ABRs which then is flooded throughout the OSPF domain. Please note that the External LSAs
(Type-5) generated at other OSPF Areas are not permitted into the NSSA Area.
• NSSA-Totally Stub Area is similar to the Totally Stubby Area in characteristics with an addition of
permitting redistribution of External AS routes into the NSSA Totally Stub Area. As in the NSSA Area,
these external routes are Type 7 LSAs which are then converted to Type 5 at the NSSA ABRs and flooded
throughout the OSPF domain.
Note: All the points here assume there is more than one ABR present in each Area.
• Use Stub Area where optimal routing to and from within the Area to the rest of the OSPF Areas is needed
but optimal routing to reach the external AS routes from within the Area is not an important consideration.
• Use Totally Stubby Area where optimal routing to and from devices within an area to the rest of the OSPF
domain or external AS routes is not an important consideration.
• Use NSSA Area if Stub Area characteristics are required, but also need to import External AS routes within
this Area.
• Use NSSA Totally Stub Area if Totally Stub Area characteristics are required but also need to import
External AS routes within this Area.
• Consider using an NSSA Area (NSSA or NSSA Totally Stub) if there are many ASBRs in an area
redistributing routes in a way that cannot be summarized at the ASBR (redistributing point) itself, but
combined redistributed external routes can be summarized at the NSSA ABR towards the backbone.
• Configure a loopback address as part of a NSSA Area in an ASBR. This will help avoiding sub-optimal
routing.
Figure 6 Sub-Optimal Path to the ASBRs at NSSA Area Due to Default Forwarding Address
Selection
In the same scenario, if a loopback address is configured on the Router C and included in the OSPF Area 1,
then the ASBR sets the loopback’s address in the forwarding address. In the following figure, the NSSA ASBR
(Router C) redistributed the same RIP domain routes 10.66.66.0/24 into OSPF, but now with a loopback0
interface (10.55.1.1/32) configured and included in OSPF Area 1. Since there is a loopback interface
configured on the Router C, the forwarding address for the Type-7 LSAs is set to10.55.1.1 (L0). The same
forwarding address is maintained while the Type-7 LSAs are translated into Type 5 at the NSSA ABR. Now
from Router E point of view, to reach 10.66.66.0/24 the shorter path is through the Router B (cost=75).
Please note that from 12.2.15T and 12.2.18S a new feature called “OSPF Forwarding Address Suppression in
Translated Type-5 LSAs” is introduced which causes a NSSA Area border router (ABR) to translate Type-7
LSAs to Type-5 LSAs, but use the address 0.0.0.0 for the forwarding address instead of that specified in the
Type-7 LSA. This feature causes routers at the backbone to forward the traffic to the translating NSSA ABRs.
Configuring this feature causes the router to be noncompliant with RFC 1587. For further information about
this feature please refer to the following CCO URL:
http://www.cisco.com/en/US/customer/products/sw/iosswrel/ps1839/products_feature_guide
09186a00801541c9.html
Mutual redistribution between multiple routing processes (another routing protocol or another OSPF process)
should be done carefully as undesired behavior such as sub-optimal routing or flooding loops can occur.
Router A and router B are configured for mutual redistribution between RIP and OSPF. Say router A and router
B receive a RIP route at exactly the same time, and each one generates an OSPF external LSA. Each router's
OSPF external overrides the RIP route in the other router due to the lower admin distance. Once the RIP route
is removed from the routing table, the redistribution is cancelled and the external LSAs are managed. This
eventually causes the RIP route to be installed and the cycle continues.
By configuring the external admin distance of OSPF route higher than RIP, we make sure that each domain’s
prefix is reached though the domain itself and this prevent the prefix to be advertised back to the same domain
For more extensive information on mutual redistribution refer to the following paper:
http://www.cisco.com/en/US/tech/tk365/technologies_white_paper09186a0080531fd2.shtml
OSPF identifies each router with a unique router ID. By default, Cisco IOS assigns the highest IP address of the
loopback interface(s) if available or the highest IP address of an active interface as the Router ID. Configuring
the command router-id <ip_address> under OSPF process changes this behavior. It is recommended to
configure the router ID deterministically using this command.
• Configure a deterministic router ID for OSPF process, using router-id <ip address> command.
• Choose the router ID (IP address) from the same OSPF area address space the router belongs to.
This helps in route summarization, in case these router IDs need to be routed.
• If OSPF router ID needs to be routable, configure a loopback interface with the same IP address
and include it under the OSPF process.
• If applications like DLSW+, IPSec, etc., require optimal routing, configure separate loopback
interface(s) and use IP addresses from a different address space which is not summarized at the
ABRs. These addresses can be leaked as more specific routes to other areas for optimal path
selection.
The process ID is the identification of the OSPF process to which the interface belongs. The process ID is local
to the router, and two OSPF neighbouring routers can have different OSPF process IDs, unlike Enhanced
Interior Gateway Routing Protocol (EIGRP) where the routers need to be in the same Autonomous System
(AS). Cisco IOS can run multiple OSPF processes on the same router, and the process ID merely distinguishes
one process from the other.
In general, most of the Enterprise customers do not run authentication within their OSPF domain. If security is
a concern, then it is recommended to configure Message Digest (MD5) authentication on the routers.
This mode of authentication provides more protection over simple text authentication. With support of key
rollover feature, transition to a new MD5 key will not disturb connectivity.
In the latest IOS versions, it is not necessary to configure authentication on an OSPF area level. Authentication
can be enabled between two routers sharing a common link.
• If security is of primary concern, use MD5 authentication between the OSPF neighbors.
In a broadcast, multi-access network such as Ethernet, Fast Ethernet, Gigabit Ethernet etc., OSPF elects a
Designated Router (DR) and a Backup Designated Router (BDR) for each segment. The DR acts as the pseudo-
node for that segment and sends Network LSA (Type-2 LSA) with information pertaining to that segment. By
configuring the OSPF priority on an interface, you can influence DR/BDR election.
It is a good practice to distribute DR/BDR functionality deterministically so that one router does not end up
being the DR for many segments it is attached to.
In today’s campus environment, the distribution and core layers (and sometimes access layers also) use high
speed layer 3 switches which are connected through logically separate VLANs between the core and
distribution layers. With these designs there are only two OSPF neighbors in a broadcast segment. Instead of
leaving these interfaces as broadcast multi-access, these two neighbor’s interfaces can be configured as ‘point-
to-point’ thereby avoiding DR/BDR election completely. This will reduce the Type-2 LSAs in an OSPF area
(which reduce the number of node in SPF) and also allow the neighbor adjacency to be established slightly
faster as the routers need not go through the DR/BDR election in the adjacency process.
• In a broadcast multi-access LAN segment, deterministically assign the DR and BDR to different routers
so that one router does not end up being the DR for many segments.
• If there are only two neighbors in a broadcast multi-access LAN segment (like Ethernet) and no
additional neighbors will be added, configure the two neighbor’s broadcast interfaces as ‘ospf point-to-
point’ network type.
OSPF configuration on Non-Broadcast Multi-Access networks needs special consideration depending on the
layer 2 topology/protocol such as ATM or Frame Relay. Depending on the design requirements, OSPF network
type configuration can be chosen.
Following is a brief discussion on the “OSPF Network Type” options in NBMA type topologies. Next, there is
a summary of guidelines identified as benefits and risks that can help engineers make the right decision.
The NBMA interface can be configured as following OSPF network types:
• Non-Broadcast Multi-Access mode
• Broadcast Mode
• Point-to-Multipoint mode
• Point-to-point mode.
Broadcast Mode
The overhead of manually configuring the OSPF neighbors on the NMBA/WAN network might increases
depending on the number of eligible neighbors. To avoid this overhead, it is possible to configure the NBMA
cloud as a ‘broadcast’ network by including ‘ip ospf network broadcast’ command. This command makes the
OSPF treat the NBMA/WAN network as a broadcast network and uses multicast addresses for the neighbor
discovery and other updates. As with the NBMA mode, the output cost is assigned per interface, which is used
for all neighbors. In Broadcast mode, full mesh connectivity is required for all the routers in the network as DR
and BDR election is achieved by broadcasting.
Point-to-Multipoint Mode
Point-to-Multipoint mode doesn’t require full mesh connectivity. The point-to-multipoint interface is
considered as a set of numbered point-to-point links in this mode. This mode also has all the benefits of the
point-to-point mode. There is no DR/ BDR election in this mode also. The connectivity is maintained in case of
single PVC failure (as long as the router has PVC to another router in the cloud). Routing between two routers
that are not directly connected will go through the router that has VCs to both routers. This mode supports
OSPF cost per neighbor and also has provision for emulating non-broadcast feature to support non-broadcast
media like ATM SVCs (Classical IP over ATM). This situation is not capable to handle OSPF multicast hellos,
so hellos are sent as unicast by configuring neighbor statements. The difference between this case and NBMA
case is that this case does not elect DR/BDR whereas in NMBA case the router has to elect a DR/BDR.
Another difference is that in NBMA case only one side is required to have neighbor statement but in this case
both sides require to have neighbor statement along with this unique network type to indicate the router not to
elect the DR/BDR but send unicast hellos to the configured neighbors. This feature is called OSPF point-to-
multipoint non-broadcast. The downside in this mode with or without non-broadcast option is every router in
the network sends type 3 link (stub network) which increases the number of host routes in the OSPF database.
• Choosing the appropriate mode of NBMA/WAN network depends on various factors, like the
availability of full mesh / partial mesh, address space conservation, flexibility in per VC cost etc.
Hence it is difficult to give general recommendations. The following table lists the advantages and
disadvantages of each mode, which can help engineers to decide on the right configuration based on
the design constraints and requirements.
Does not require full mesh. Size of the routing table increases.
Ability to use unnumbered interfaces. Size of the OSPF database increases.
Point-to-Point Mode Robustness, flexibility, per link cost, Multiple IP subnets required.
resiliency.
Router Link LSA describes transit Requires Full mesh for any to any connectivity.
network.
Requires the configuration of each neighbour.
Only one IP subnet is required.
Non-Broadcast Mode Does not provide resilience in case of PVC
LSA updates and hellos are sent failure.
unicast.
Selection of DR and BDR.
Only two adjacencies are required for
Non-DR and Non-BDR routers. Cannot configure a separate cost for each
neighbour.
More optimal flooding.
PVC to DR is critical.
No need to configure each neighbour. Requires Full mesh for correct operation.
Router Link LSA describes transit LSA updates and hellos are sent multicast
network. which means that the update must be replicated
Broadcast Mode out of each PVC.
Only one IP subnet is required.
Does not provide resilience in case of PVC
Only two adjacencies are required for failure.
Non-DR or Non-BDR routers.
Cannot configure a separate cost for each
Flooding uses multicast addresses. neighbour.
More optimal flooding. PVC to DR is critical.
Does not require full mesh. Router Link LSA describes local interface as
stub plus each of the attached neighbours as p-
Ability to configure different cost for 2-p link.
each neighbour.
Point-to-Multipoint Mode Multiple host routes created.
Resilient in the event of PVC failure.
Size of the routing table increases.
Robustness, flexibility, resiliency.
Size of the OSPF database increases.
One IP subnet per NBMA cloud.
Multiple adjacencies to maintain.
Fast convergence.
Suboptimal flooding.
Point-to-Multipoint non- Does not require full mesh Requires the configuration of each neighbour
broadcast Mode
Ability to configure different cost for Router Link LSA describes local interface as
each neighbour stub plus each of the attached neighbours as p-
2-p link.
Resilient in the event of PVC failure
Multiple host routes created.
One IP subnet per NMBA cloud
Size of the routing table increases.
LSA Updates and hellos are sent
unicast Size of the OSPF database increases.
OSPF does not perform very well in a full mesh environment. The critical thing that can impact a network
significantly is the flooding behaviour over full mesh network. Flooding behaviour could become worse as the
number of nodes increase. You may require only 6 links to make a full mesh of 4 routers but to connect 6
routers it would take 15 links. The situation gets worse as you increase the number of routes.
The way flooding works is that it will propagate any new information over all the links. The receiving node
will propagate the info to all the other links except the link where the info came from. This process continue
until the new information reaches all nodea in a network,
Therefore it’s a best practice not to go over 6-8 nodes if a full mesh connectivity is required. This number of 6-
8 is excluding the other links that a router may be connected to so the number could be lower if each router in
6-8 full mesh already has hundreds of links of its own. If there are more routers that need to be a part of full
mesh then a full mesh hierarchy can be created which can scale much better than adding every node to the full
mesh cloud.
• OSPF database filter feature could also be use in a fully mesh situation to block flooding manually on few
selected interface but this process could get very tedious as it has to be done manually. You have to define a
mesh group and determine manually which interface should be blocked and which interface should flood the
info. This is why an easiest thing would be not to allow growth of your full mesh network. Whenever number of
routers increases, break the mesh into smaller mesh groups.
OSPF protocol was not designed to handle hub and spoke networks. This is why we see OSPF do not scale
very well in a hub and spoke situation. The problem is with the link state nature of OSPF which requires it to
form and maintain neighbour relationship with every neighbour. A large number of hub and spoke could be a
disaster if not tuned properly.
• When configuring OSPF for hub and spoke environment design the OSPF areas with smaller number of
routers.
IP addressing has a lot to do with a network’s stability and scalability. Proper addressing facilitates easy route-
summarization that contributes to a more stable network. The IP addressing scheme along with route-
summarization affects the size of the routing table and thus convergence time. IP Addresses can be allocated in
many ways. The most recommended ways would be to allocate based on topology and geography or the
combination of both. This type of addressing allocation makes route-summarization easy and improves
stability. The blocks assigned should be on a bit boundary so they can be summarized at the ABRs.
OSPF area 0 is the backbone of the OSPF domain. The primary focus in designing the OSPF backbone area is
to give the highest stability for this area. To achieve this, there are many things that can be considered.
Controlling the size of the area, installing high capacity routers, providing stable, multiple redundant links
between the core routers are some of the steps we can take to ensure the stability of the backbone area (Area 0).
Virtual link configuration is required only when the backbone area is discontinuous or when a non-backbone
area is not directly connected to the backbone area 0.
Virtual Links should generally be avoided in a network. In situations where it is used as the only work around,
summarization of internal backbone route if configured will be ignored for the transit area in which the virtual
link is configured.
OSPF cost of an interface is calculated automatically (unless the cost is set manually) based on OSPF auto-cost
reference bandwidth command and it is a function of the bandwidth of the interface. Configuring the “OSPF
auto-cost reference bandwidth” to the highest bandwidth in the network may not give needed granularity within
the network for the smaller bandwidth links. But considering the advantages, configuring OSPF reference
bandwidth to the highest denominator is recommended.
In general, the non-backbone areas with smaller bandwidth links need more granular OSPF costing. A hybrid
approach can be considered. Usually the backbone area is the one that houses the highest bandwidth links.
Other non-backbone areas may not have higher bandwidth links than that of the backbone area. In these
circumstances, reference bandwidth can be assigned with respect to the area and its highest bandwidth links.
Very careful study needs to be done regarding the future requirements and also the links types in the ABRs that
connect multiple areas. There are many pitfalls that might lead to sub-optimal routing due to wrong costing in
this scenario.
The OSPF process does not need to send hellos on user VLANs/interfaces or ‘stub networks’ as there are no
neighbors on those interfaces. The stub network interfaces/VLANs can be included under OSPF but they may
be configured as passive-interface. Even if there are two routers available for redundancy using HSRP or
similar protocol, their interfaces can be configured as passive interface. If redundancy is required between these
two routers, a separate ‘transit link’ is recommended and OSPF can be enabled on this ‘transit link’.
Configuring passive interface default under OSPF routing process and specifically enabling the interfaces
using no passive interface <interface #> is recommended on the routers. This gives more control for
administering OSPF.
• Configure passive interface default under OSPF routing process. And, enable specific interfaces
using no passive interface <interface#>.
• Configure passive interface for the user VLANS and stub-networks.
OSPF by default allows up to 4 equal cost paths to be installed in the routing table for load balancing purpose.
The default behavior can be changed to install up to 6 equal cost paths for load balancing (…in certain code in
12.0 it can be even 8). If there are more than 4 redundant paths the default value needs to be increased.
If there are multiple equal cost paths available through many interfaces to the same destination, only the first 4
routes are installed i.e. there might be 4 different next-hops from the same VLAN or interface even though
there are routes available through other VLANs/interfaces. In this case, even though we have 4 equal cost paths
across many interfaces, the packets go out of only one interface to many different next hops.
The traffic-share min across interfaces command installs the routes from many ‘different’ interfaces if there
are equal cost paths available through multiple interfaces.
• If multiple equal cost paths are available to the same destination through multiple VLANs/interfaces,
configure traffic-share min across-interfaces command under OSPF routing process.
• In a switched environment with multiple VLANS on the same physical trunk, OSPF forms neighbor
relationship on many VLANS which may be unnecessary. There should be clear distinction between
transit networks and local networks. For OSPF to exchange routing information, it doesn’t have to
form neighbor relationship with all the VLANS on the trunk. Instead, a dedicated VLAN can be used
for OSPF neighbor relationship and transit network. These VLANS can also be designed to eliminate
spanning-tree convergence issues. Passive-interface can be used to limit the neighbor relations.
During network maintenance, it may be necessary to reload an OSPF router with less disruption to the existing
network traffic. This is more important for the network core routers, as there may be hundreds flows actively
passing through the router that needs to be reloaded.
In many enterprise networks, there are situations when two or more OSPF routers need to be connected through
GRE tunnels. Though connectivity through the GRE tunnel instead of a direct physical link is not preferred
due to various reasons such as the packet overhead, larger MTU and fragmentation and router performance
issues etc., there are circumstances when GRE is the only viable alternative for the customers. Also, with the
some of the latest platforms where GRE packets are switched at the hardware level, more customers are
implementing GRE Tunnels as the solution to their connectivity needs. Please note that this section does not
address the advantages or disadvantages of using GRE Tunnels. Rather it attempts to guide the configuration
practices if GRE Tunnels are considered for implementation.
By default, the OSPF cost of the GRE tunnel interface is 11111, which is high. So if we leave it to the default
values, probably the packet might still take the sub-optimal path as shown in the following diagram.
In the following diagram, if the GRE tunnel cost is changed to same as direct link cost, say GRE tunnel OSPF
cost = 64, then the packets would flow as expected. Please note that the GRE Tunnel cost of 64 is an example.
It is not a hard and fast rule to keep the Tunnel cost equal to the directly connected link cost. In case of link
failures as shown in the diagram, the cumulative cost to reach the remote destination through optimal path (in
our diagram, from Router A through GRE tunnel to Router B and then to Router C) should be less than the
cumulative cost of the sub-optimal path (From Router A to Router B to Router D and then to Router A). With
modified cost, the packet would traverse as shown in the following diagram.
Figure 12 Optimal Routing After the OSPF Cost Changed on GRE Tunnel
Flood reduction is a technique to limit the amount of flooding in OSPF network. With the help of this feature
OSPF do not age the LSAs over the link, hence will not refresh those LSA’s every 30 minutes.
• OSPF Flood reduction can be enabled on any router as long as the feature is supported, no harm can
be done by this fature
• OSPF Flood reduction is used to minimize the LS aging process over a link so its usage is universal
• OSPF Flood reduction may not work properly if neighboring router do not support DC bit(RFC
1793)
Cisco Systems has more than 200 offices in the following countries and regions. Addresses, phone numbers, and fax numbers are listed on the
Argentina • Australia • Austria • Belgium • Brazil • Bulgaria • Canada • Chile • China • Colombia • Costa Rica • Croatia • Czech Republic Denmark • Dubai, UAE Finland •
France • Germany • Greece • Hong Kong SAR • Hungary • India • Indonesia • Ireland • Israel • Italy • Japan • Korea • Luxembourg • Malaysia • Mexico
The Netherlands • New Zealand • Norway • Peru • Philippines • Poland • Portugal • Puerto Rico • Romania • Russia • Saudi Arabia • Singapore • Slovakia • Slovenia South
Africa • Spain • Sweden • Switzerland • Taiwan • Thailand • Turkey • Ukraine • United Kingdom • United States • Venezuela • Vietnam • Zimbabwe