AJSPR 12.a-R SGv2
AJSPR 12.a-R SGv2
Routing
12.a
Student Guide
Volume 2
Juniper Networks reserves the right to change, modify, transfer, or otherwise revise this publication without notice.
YEAR 2000 NOTICE
Juniper Networks hardware and software products do not suffer from Year 2000 problems and hence are Year 2000 compliant. The Junos operating system has
no known time-related limitations through the year 2038. However, the NTP application is known to have some difficulty in the year 2036.
SOFTWARE LICENSE
The terms and conditions for using Juniper Networks software are described in the software license provided with the software, or to the extent applicable, in an
agreement executed between you and Juniper Networks, or Juniper Networks agent. By using Juniper Networks software, you indicate that you understand and
agree to be bound by its license terms and conditions. Generally speaking, the software license restricts the manner in which you are permitted to use the Juniper
Networks software, may contain prohibitions against certain uses, and may state conditions under which the license is automatically terminated. You should
consult the software license for further details.
Contents
This four-day course is designed to provide students with detailed coverage of OSPF, IS-IS, BGP, and routing policy. Through
demonstrations and hands-on labs, students will gain experience in configuring and monitoring the Junos operating system
and in monitoring device and protocol operations. This course uses Juniper Networks MX Series 3D Universal Edge Routers
for the hands-on component, but the lab environment does not preclude the course from being applicable to other Juniper
hardware platforms running the Junos OS. This course is based on the Junos OS Release 12.3R3.4.
Objectives
After successfully completing this course, you should be able to:
• Describe the various OSPF link-state advertisement (LSA) types.
• Explain the flooding of LSAs in an OSPF network.
• Describe the shortest-path-first (SPF) algorithm.
• List key differences between OSPFv2 and OSPFv3.
• Describe OSPF area types and operations.
• Configure various OSPF area types.
• Summarize and restrict routes.
• Identify some scenarios in a service provider network that can be solved using routing policy or specific
configuration options.
• Use routing policy and specific configuration options to implement solutions for various scenarios.
• Explain the concepts and operation of IS-IS.
• Describe various IS-IS link-state protocol data unit (PDU) types.
• List IS-IS adjacency rules and troubleshoot common adjacency issues.
• Configure and monitor IS-IS.
• Display and interpret the link-state database (LSDB).
• Perform advanced IS-IS configuration options.
• Implement IS-IS routing policy.
• Explain the default operation in multiarea IS-IS.
• Describe IS-IS address summarization methods.
• Configure and monitor a multiarea IS-IS network.
• Describe basic BGP operation.
• List common BGP attributes.
• Explain the route selection process for BGP.
• Describe how to alter the route selection process.
• Configure some advanced options for BGP peers.
• Describe various BGP attributes in detail and explain the operation of those attributes.
• Manipulate BGP attributes using routing policy.
• Explain the causes for route instability.
• Describe the effect of damping on BGP routing.
• Explain the default behavior of damping on links.
• Describe the operation of BGP route reflection.
• Configure a route reflector.
Day 1
Chapter 1: Course Introduction
Chapter 2: OSPF
OSPF Multiarea Networks Lab
Chapter 3: OSPF Areas
OSPF Route Summarization Lab
Chapter 4: OSPF Case Studies and Solutions
Advanced OSPF Options and Routing Policy Lab
Day 2
Chapter 5: IS-IS
IS-IS Configuration and Monitoring Lab
Chapter 6: Advanced IS-IS Operations and Configuration Options
Advanced IS-IS Configuration Options and Routing Policy Lab
Chapter 7: Multilevel IS-IS Networks
Configuring a Multilevel IS-IS Network Lab
Day 3
Chapter 8: BGP
BGP and BGP Attributes Lab
Chapter 9: BGP Attributes and Policy—Part 1
BGP Attributes: Next-Hop, Origin, MED, and AS Path Lab
Day 4
Chapter 10: BGP Attributes and Policy—Part 2
BGP Attributes: Local Preference and Communities Lab
Chapter 11: Route Reflection and Confederations
Scaling BGP Lab
Chapter 12: BGP Route Damping
BGP Route Damping Lab
Franklin Gothic Normal text. Most of what you read in the Lab Guide
and Student Guide.
CLI Input Text that you must enter. lab@San_Jose> show route
GUI Input Select File > Save, and type
config.ini in the Filename field.
CLI Undefined Text where the variable’s value is Type set policy policy-name.
the user’s discretion or text where
ping 10.0.x.y
the variable’s value as shown in
GUI Undefined the lab guide might differ from the Select File > Save, and type
value the user must input filename in the Filename field.
according to the lab topology.
Chapter 8: BGP
Advanced Junos Service Provider Routing
We Will Discuss:
• Basic BGP operation;
• Common BGP attributes;
• The route selection process;
• The alteration of the route selection process; and
• The configuration of some advanced options for BGP peers.
Review of BGP
The slide lists the topics we will discuss. We discuss the highlighted topic first.
What Is BGP?
The Border Gateway Protocol (BGP) is a routing protocol between autonomous systems (ASs) and is sometimes referred to as
a path-vector routing protocol because it uses an AS path, used as a vector, to prevent interdomain routing loops. The term
path vector, in relation to BGP, means that BGP routing information includes a series of AS numbers, indicating the path that
a route takes through the network. Although BGP is primarily used for inter-AS routing, BGP is also used in large networks for
MPLS-based VPNs and is used to separate large OSPF domains. BGP is much more scalable and offers a greater amount of
control through policy than an IGP.
BGP exchanges routing information among ASs. An AS is a set of routers that operate under the same administration. BGP
routing information includes the complete route to each destination. BGP uses the routing information to maintain an
information base of Network Layer reachability information (NLRI), which it exchanges with other BGP systems.
BGP is a classless routing protocol, that supports prefix routing, regardless of the class definitions of IP version 4 (IPv4)
addresses. BGP routers exchange routing information between peers. The peers must be connected directly for inter-AS BGP
routing (unless certain configuration changes are done). The peers depend on established TCP connections, which we
address later in this chapter.
BGP version 4 (BGP4) is essentially the only exterior gateway protocol (EGP) currently used in the Internet. It is defined in
RFC 4271, which made the former standard of more than 10 years, RFC 1771, obsolete.
BGP Attributes
The primary purpose of BGP is not to find the shortest path to a given destination; rather, its purpose is to find the best path.
Each AS determines the best path to a prefix by determining its own outbound routing preferences, the inbound routing
preferences of the route’s originator (as updated by ASs along the path between the source and destination ASs), and some
information that is collected about the path itself. All this information is contained in path attributes that describe the path to
a prefix. The path attributes contain the information that BGP uses to implement the routing policies of source, destination,
and transit ASs.
The slide lists some common BGP attributes. We cover the listed attributes in greater detail on subsequent pages.
Loopback Peering
You maintain only one IBGP session between each internal peer. The IGP is used to maintain reachability between the
loopback addresses regardless of the physical topology, allowing the IBGP sessions to stay up even when the physical
topology changes.
The physical topology is relevant in one respect: each router along the path between BGP speakers must have enough
information to make consistent routing decisions about packet forwarding. In many cases, this requirement means that all
routers along all possible physical paths between BGP speakers must run BGP; however, in some networks this requirement
is not necessary.
Interface Peering
Recall that EBGP sessions are simply BGP sessions between two routers in different autonomous systems. When two EBGP
peers have a single path between them, EBGP sessions are usually established over the shared subnet between two peers,
using the IP addresses assigned to the interfaces on that subnet as the session endpoints. By establishing the EBGP session
using the IP address assigned to the interfaces on the shared subnet, you gain many advantages. One of these advantages
is that you prevent either AS from needing to maintain any routing information about the other AS (besides what it received
through BGP). You also ensure that all traffic flows over this particular shared subnet.
Configuring BGP
The slide illustrates the sample configuration.
In this configuration example, we see some parameters defined under the [edit routing-options] and [edit
protocols bgp] hierarchies. Under the [edit routing-options] hierarchy, we defined the system’s router
identifier (RID) and the local AS number. Optionally, you can configure the system’s local AS number under the global BGP
hierarchy for a specific BGP group, or, for a specific BGP neighbor, use the local-as configuration option. When the AS
number is configured at multiple hierarchy levels, the AS number specified at the most specific hierarchy level is used. The
ability to specify different AS numbers at different hierarchy levels can be quite useful, especially when merging networks
with different AS numbers.
Because we are using loopback-based peering for the internal BGP group, we must reference loopback addresses in the
related BGP configuration. In this case, the neighbor address is the remote peer’s loopback address. The
local-address is the local device’s loopback address. If the local address is not specified, the system uses the interface
address of the egress interface used to reach the referenced peer address. Because the peer is expecting to form an IBGP
peering session using the 192.168.100.1 address, you must specify that address as the local-address in the
configuration.
Continued on the next page.
BGP Authentication
All BGP protocol exchanges can be authenticated to guarantee that only trusted routing devices participate in the AS’s
routing. By default, authentication is disabled. You can configure Message Digest 5 (MD5) authentication. The MD5
algorithm creates an encoded checksum that is included in the transmitted packet. The receiving routing device uses an
authentication key (password) to verify the packet’s MD5 checksum.
BGP Operations
The slide highlights the topic we discuss next.
Hidden Routes
You might expect all routes received from a BGP peer would be installed in the RIB-LOCAL table and be visible using the
show route protocol bgp command. But hidden BGP routes occur for several reasons:
• The route might be a martian route;
• An import policy might exist that prevents the route from being installed; or
• The route’s protocol next-hop might be unresolvable.
Unresolvable Next-Hop
The most common reason for hidden BGP routes is an unresolvable next-hop. The BGP Update message contains a protocol
next-hop IP address. If the router cannot resolve this address using its routing table, the route cannot be used and is not
installed in the routing table.
The number of hidden routes is always shown in the output of the show route command. To view why routes are hidden,
issue the show route hidden extensive command.
Configure multipath on R1
The configuration of the R1 router now contains the multipath command within the peer group for AS 2. After committing
the configuration, we examine the contents of the local routing table. We still see the four routes advertised from AS 2, and
each listing of the prefix still contains two versions of the route. As before, the routes from the R2 router are marked active
while the routes from the R3 router are marked inactive.
The effect of the multipath command on the routes from AS 2 is that the next hop for the routes from R3 (10.222.29.2)
are now added to the version of the route from R2. The next-hop information for the inactive route version does not change in
this environment.
Because each active route now has two next hops in the routing table, the default Junos OS load-balancing process can be
used. Each route has a single next hop selected, and this single next hop is placed into the forwarding table. All traffic for
each route uses just that single next hop. The overall benefit of this system is the total amount of traffic sent from AS 1 to
AS 2 can now be load-balanced over the two inter-AS links. In our small example, the 172.16.20.4/30 and 172.16.20.16/30
routes are using the 10.222.28.2 next hop, while the other two routes use the 10.222.29.2 next hop. As more routes are
announced between the AS networks, the selection of the next hops becomes more evenly distributed.
Continued on the next page.
Load Balancing
You can alter the default behavior of the Junos OS to install a single next hop per route in the forwarding table with a routing
policy. The policy should contain the action of then load-balance per-packet and be applied as an export policy to
the forwarding table within the [edit routing-options] configuration hierarchy.
After committing the configuration, we see the same 172.16.20.4/30 route in the routing table of the local router. The same
protocol information is displayed and again, a single next hop has been selected. This selection mechanism is not affected
by our load-balancing policy, so we cannot verify whether it is working by examining the routing table. Instead, a look at the
forwarding table shows the outcome of our policy. Both the 10.10.1.1 and the 10.10.2.1 next hops are listed as valid
outbound interfaces for the 172.16.20.4/30 route. Traffic destined for this route is now forwarded across both available next
hops using a microflow hashing algorithm. The default inputs to the microflow hash are the incoming router interface, the
source IP address, and the destination IP address. You can modify the inputs to the hashing algorithm at the [edit
forwarding-options hash-key family inet] configuration hierarchy. Specifying the layer-4 command at this
configuration hierarchy incorporates Layer 4 source and destination port information into the hash key.
Configuration Options
The slide highlights the topic we discuss next.
passive Option
By default, a local router initiates a BGP open message to the remote router to establish the session. The passive
command stops this default action, and no open message is sent. The IP address and AS of the remote peer are still
configured, but the remote router must initiate the BGP session.
allow Option
The related option of allow also stops the sending of a BGP open message to the remote router. In addition, the allow
command also relaxes the requirement of explicitly configuring the remote router’s IP address by allowing you to define a
subnet range for connections. BGP processes any open message received from an IP address within the configured range
and initiates a session with that remote router.
Graceful Restart
Graceful restart (GR) addresses the situation described on the previous slide. GR allows a router undergoing a restart event,
including a restart of the routing protocol daemon (rpd), to inform its adjacent neighbors and peers of its condition. The
restarting router requests a grace period from the neighbor or peer, which can then cooperate with the restarting router.
When a restart event occurs and GR is enabled, the restarting router can still forward traffic during the restart period, and
convergence in the network is not disrupted. The neighbors or peers of the restarting router, also known as helper routers,
hide the restart event from other devices not directly connected to the restarting router. In other words, the restart is not
visible to the rest of the network, and the restarting router is not removed from the network topology.
The GR request occurs only if the following conditions are met:
• The network topology is stable;
• The neighbor or peer cooperates;
• The restarting router is not already cooperating with another restart already in progress; and
• The grace period does not expire.
GR Support
As shown on the slide, GR is supported by several standards-based protocols. A number of RFCs and drafts exist that
document the operational details for GR and each of the protocols for which GR is supported. While these different protocols
implement GR slightly differently, the basic concepts and operations are the same from a high availability point of view.
GR Requirements
Routers must have GR enabled to support both GR router modes—the restarting router mode and helper router mode. By
default, Junos devices can operate as helper routers but not as restarting routers; restarting router mode functionality must
be enabled through configuration. We cover GR configuration on subsequent slides.
In addition to having the GR functionality enabled, the router must support nonstop forwarding operations, which simply
means the router must be able to continue forwarding traffic during times of control plane instability. Nonstop forwarding is
an inherent attribute of Junos devices because of the architectural design, which cleanly separates the control and
forwarding planes.
We Discussed:
• Basic BGP operation;
• Common BGP attributes;
• The route selection process for BGP;
• The alteration of the route selection process; and
• The configuration of some advanced options for BGP peers.
Review Questions
1.
2.
3.
4.
5.
We Will Discuss:
• Various BGP attributes in detail and explains the operation of those attributes; and
• The manipulation of BGP attributes using routing policy.
BGP Policy
The slide lists the topics we cover will discuss. We discuss the highlighted topic first.
Next Hop
The slide highlights the topic we discuss next.
Other AS Networks
Note that routers in AS 30 use AS 20 to reach the networks in AS 1, because of a shorter AS-path length through AS 20. Also,
routers in AS 20 use AS 2 to reach the networks in AS 1, because of a shorter AS-path length. Finally, routers in AS 10 use AS
3 to reach the networks in AS 1, because of a shorter AS-path length. Why should AS 40 be the only AS confused about the
best way to reach AS 1?
AS Path
The slide highlights the topic we discuss next.
AS-Path Prepending
The only standard approach to alter the AS-path attribute is to add information to it by prepending. You can use a routing
policy to extend (by prepending) AS-path information artificially onto an existing AS path. This type of a policy is often an
attempt to influence traffic coming into an AS from another AS.
Continued on the next page.
Regular Expressions
Often, administrative BGP routing policies require that route announcements or prefixes be found and acted on based on the
information contained within the AS-path attribute. This requirement might be to enforce some administrative policy
regarding other AS networks. Sometimes, it is just easier to find routes based on their AS path than by looking for many
specific prefixes and routes individually.
Other Uses
The slide lists some examples of the types of information that must be found in the AS path.
Context-Sensitive Matching
Regular expressions allow information in a string to be found within a specific context, not just in isolated instances. You can
use regular expressions in conjunction with the BGP AS-path attribute to match routes within a policy.
Each AS Is an Entity
Within the Junos AS-path regular expression syntax, the term is a complete AS value. You can use the wildcard character of
the dot ( . ) to represent a single AS number as well. Thus, the Junos OS detects an AS number of 1024 (for example) not as
the four character text string of 1, 0, 2, 4, but as the single entity of 1024. To the Junos OS, AS numbers are not sequences
of characters.
Format
Both the definition and application of the AS-path regular expressions occurs within the policy-options configuration
hierarchy. The regular expression in proper term operator format is given a name with the as-path statement.
AS-Path Name
You can reference the regular expression name within a policy.
Given a Policy
Consider the routing policy shown on the slide.
We Discussed:
• Various BGP attributes in detail and explained the operation of those attributes; and
• How to manipulate BGP attributes using routing policy.
Review Questions
1.
2.
3.
4.
We Will Discuss:
• The BGP attributes local preference and communities and explains the operation of those attributes; and
• The manipulation of those BGP attributes using routing policy.
Local Preference
The slide lists the topics we will discuss. We discuss the highlighted topic first.
Local-Preference Power
The BGP attribute of local preference is the highest tiebreaker in the BGP path selection process. If a BGP next hop is
reachable, and BGP knows multiple routes, BGP always chooses the route with the highest local preference. Thus, local
preference is the first BGP attribute that favors one path over another.
Pay Attention
When it comes to routing policy configurations, make sure to change local preference on the BGP routes, not the preference
of the BGP protocol as a whole!
Local AS Only
The slide points out the local nature of local preference. Consider another AS called ISP E linked by two lower-speed, but
equal, links to ISP A. Which link should ISP E use to reach 192.168.27.0/24 in ISP B?
Because EBGP does not propagate the local-preference values used inside ISP A, the ISP E AS has no knowledge of the
local-preference routing decisions made within ISP A with regard to the 192.168.27.0/24 route. ISP A, of course, still wants
traffic from ISP E to flow towards R2 to avoid shuttling all this traffic across its backbone.
Communities
The slide highlights the topic we discuss next.
Overlapping Communities
You should also avoid having too many overlapping communities. Customer routes belonging to multiple communities can
also be an issue.
When it comes to communities, simplicity is always a worthwhile goal.
Well-Known Communities
Certain well-known communities have a global meaning and special purposes. They are defined in RFC 1997. All BGP
implementations that understand communities (communities are optional, but transitive) must know these communities
and respect their functions.
Community Format
The BGP community attribute itself is just a list of the individual community attribute values associated with the route (tags).
Because no real limit exists on the number of tags in the list, a route can belong to many communities. No predefined, upper
limit exists on the number of communities allowed on a route.
Continued on the next page.
No-Export
The no-export community typically makes sure that route aggregation is optimal by suppressing more specific routes. The
no-export-subconfed just extends this aggregate concept to the sub-AS.
No-Advertise
The no-advertise community has a very narrow scope. Routes go to a BGP peer and no farther, usually because peers know
the routes through other means. This community is often used in a LAN-connected router environment or when two BGP
peers have multiple links between them.
No-Export Example
The slide shows a typical use of the BGP no-export community.
AS 1 has multiple BGP sessions to its neighbor, AS 2. AS 1 also uses AS 2 as a transit AS for connectivity to the Internet. AS
1 wants to advertise 172.17.0.0/16 to the Internet because AS 1 owns that entire address space. In addition, AS 1 also
wants to advertise more specific route information (shown as 172.17.0/17 and 172.17.128/17) only to its peer, AS 2.
Advertising the specifics as well as the aggregate to AS 2 would assist AS 2 to route user traffic into AS 1 more efficiently
because load sharing could be used on the more specific routes, as shown on the slide. However, why should the whole
Internet know or care about these specifics?
To assist AS 2 in finding and rejecting the more specific routes, AS 1 assigns the no-export community to the 172.17.0.0/17
and the 172.17.128.0/17 routes. The BGP edge routers in AS 2 that connect to the Internet automatically suppress and do
not readvertise the /17 routes. Only the /16 route is readvertised to the Internet.
Enforcing Communities
Of course, setting local preferences in other AS networks with communities requires all the AS administrators to cooperate.
Nothing makes an AS respect the community attribute value.
Configuring Communities
You configure BGP communities in the Junos OS at the [edit policy-options] CLI hierarchy level. You simply give the
community a name and a number of members in the form of the community ID. When you define multiple community
members, a logical AND is between them. Thus, a given name represents Community1, AND Community2, AND
Community3, and so on.
Community ID Format
The community ID has an as-number:community-value format, with a colon (:) separating the high-order and
low-order octets. You can use the keywords no-export, no-advertise, and no-export-subconfed to specify the
well-known community values.
Default Is to Send
If you do not delete community attribute values, by default, all BGP communities are sent to all peers inside an AS and
outside the AS. Why clutter up the routing updates with useless and potentially harmful information?
We Discussed:
• The BGP attributes local preference and communities in detail and explained the operation of those attributes;
and
• How to manipulate those BGP attributes using routing policy.
Review Questions
1.
2.
3.
4.
We Will Discuss:
• The operation of BGP route reflection;
• How to configure a route reflector;
• The operation of a BGP confederation;
• How to configure confederations; and
• Peering relationships in a confederation.
Cluster List
The cluster list attribute is analogous to the AS path attribute and is used to prevent loops. If an RR receives a route with its
own cluster ID in the cluster list, it drops the route. In addition, each router in the network can use this attribute in the BGP
path selection algorithm prior to using the peer IP address attribute. BGP chooses the route with the shortest cluster list
length. This process follows the same theory as the AS path attribute.
The cluster ID is very similar to an AS number and should be unique within an individual AS. The cluster ID is added to the
cluster list attribute when a route is sent to clients and non-clients.
Originator ID
The originator ID attribute provides the router ID of the first router to advertise the route in the AS. It also is used for loop
prevention in the rare case where the cluster list does not prevent a loop.
Route Propagation
The next series of slides shows the flow of routing information in a route reflection network using a basic topology.
We begin with a client in the left-most cluster advertising the 10.10.10.0/24 route to the cluster’s route reflector.
The slide details how the 10.10.10.0/24 route is readvertised to all other clients in the cluster as well as to all non-client
IBGP peers of the reflector. This process applies to all other routes the route reflector receives from a client in its cluster.
This slide shows how the other route reflectors in the network readvertise all routes received from IBGP peers (the other
reflectors in this example) to all of their cluster clients.
BGP Confederations
The slide highlights the topic we discuss next.
Within a Sub-AS
The confederation sub-AS networks act just like a real AS; they require a full mesh of IBGP connectivity within themselves.
Should the full mesh of the sub-AS grow too large, route reflection might be used within a sub-AS to scale the network.
Each sub-AS must have a unique AS number defined, and most administrators use a private AS number from the 64512 to
65535 range.
Continued on the next page.
AS Confederation Sequence
As a route is advertised over a CBGP link, BGP modifies the AS path attribute to include the sub-AS number. BGP places this
sub-AS number into an AS confederation sequence, as denoted by parentheses, within the AS path attribute. The sequence
is a new AS path segment attribute with a type code of 3.
The sub-AS values are sequenced in the order in which the route has traversed the network, with the primary purpose being
loop prevention within the confederation network. The confederation sequence is not used in the calculation of AS path
length for the BGP active route selection algorithm. For routers within a confederation network, the confederation sequence
appears as a single, internal BGP AS network.
AS Confederation Set
Should some routing aggregation occur within the confederation network, the granularity of the confederation sequence
might be lost. This process is very similar to conventional BGP route aggregation.
In this situation, the AS confederation sequence becomes an AS confederation set and is denoted by curly braces within the
AS path output. The set is also a new AS path segment attribute with a type code of 4.
The routers within the confederation view the AS confederation set in the same manner as a sequence. That is, the set is still
used for loop prevention even though the ordering of the sub-AS numbers is no longer significant.
Confederation Peering
The slide shows an example of a BGP confederation network. The global AS of 201 is split up into five sub-AS networks—
65000, 65001, 65002, 65003, and 65004. The sub-AS networks are connected with EBGP-like connections (sometimes
called CBGP). Because the CBGP links behave like EBGP, there is no need for a full-mesh topology between each sub-AS.
Therefore, you can provision CBGP connections wherever it is logically, or physically, convenient.
Some of the sub-AS networks on the slide are using route reflection within the sub-AS to eliminate the need for a full IBGP
mesh. The combination of BGP confederations and route reflection simultaneously allows for great flexibility in scaling your
AS to hundreds or thousands of routers.
We Discussed:
• Operation of BGP route reflection;
• How to configure a route reflector;
• The operation of a BGP confederation;
• How to configure BGP confederations; and
• Peering relationships in a BGP confederations.
Review Questions
1.
2.
3.
4.
5.
6.
We Will Discuss:
• The causes for route instability;
• The effect of damping on BGP routing;
• The default behavior of damping on links;
• How to control damping using routing policy; and
• How to view damped routes using command-line interface (CLI) commands.
Routing Is Dynamic
In any real network, routes can appear and disappear rapidly if a link fails and restores itself repeatedly in a short period of
time. This is because any routes (and there could be thousands) that use the failed interface as a next hop must respond to
the failure, and the change in next hop must propagate to all other routers on the network. This rapid changing of routing
next hops is called route flapping or just flapping as the link flaps up and down.
Update/Withdrawn Pairs
Flapping results in a rapid sequence of BGP update or withdrawn messages. Recall that BGP routers must maintain separate
memory tables for inbound and outbound traffic on a per-peer basis. In addition, the BGP routing protocol propagates
information on an as-needed basis. These two factors make BGP unstable in the face of a flapping link.
Every BGP router that receives one of these update or withdrawn messages must send this information on to all its BGP
router peers. Much like the link-state IGPs of OSPF and IS-IS, BGP must also recalculate its routing tables and databases
every time a new update is received. If the new information alters the path selection process, a new route is chosen for the
RIB-LOCAL, and the new route must be sent downstream to all BGP peers.
Continued on the next page.
Bad Links
Routes in a network can flap for any number of reasons. Quite possibly, the most frequent reason for a link flap is because of
faulty circuit that is on the brink of outright failure. Any link that rapidly changes from seemingly operational to failing is a
potential source of route flapping.
Unstable IGPs
Route flapping is not totally a BGP phenomenon. IGPs that are unstable because of faulty links can affect BGP when IGP
routes are injected into BGP for advertising. BGP stability is always desirable and can be enhanced with careful use of static
definitions and aggregates instead of injecting raw IGP routes into BGP.
Route Damping
Because route flapping can be so harmful to BGP, the protocol was extended to support route damping. RFC 2439, BGP
Route Flap Damping (November 1998), defines route damping. Sometimes the term dampening is seen and used.
EBGP Only
Route damping is only applied to routes received from an EBGP peer. EBGP sessions can carry information about thousands
of routes. Each EBGP session must update or withdraw these routes as required. Route damping seeks to reward route
stabilities while penalizing route flapping. Once damping is enabled, the router begins to maintain a database of instability. If
an EBGP-received route experiences enough flaps, the local BGP process ignores information about that route. This reaction
results in not including this information in the route selection process and not advertising route changes to downstream BGP
peers. Note that some ISPs no longer use damping.
Default Value = 0
When a previously unknown (that is, new) route arrives at a BGP router that has damping enabled, the new route is assigned
a figure of merit value of 0.
Continued on the next page.
Point Reduction
The points given to a route decay (that is, reduce in value) at a certain rate, known as the half-life. As long as points
decay faster than they accumulate, the route is not suppressed.
εc ≤ εr e(t/λ)(ln 2)
where εr is the figure of merit reuse threshold, t is the maximum suppression (hold-down) time in minutes, and λ is the
half-life in minutes.
Cutoff Threshold
The figure-of-merit value interacts with the damping parameters. The slide lists these parameters.
The suppress variable is the configured threshold where a BGP route is considered unstable and is not used. This variable
represents the value of the penalty that establishes the point at which damping is initiated. When this value is reached, the
route is cutoff (suppressed). The default value of suppress is 3000. Possible values range from 1–20000. If changed, this
value must be less than or equal to the merit ceiling εc, or damping never occurs.
Reuse Threshold
The reuse variable is the configured threshold where a BGP route is considered usable once again. This variable is the
value to which the penalty must decay before the router considers the route in its path selection. The default value of the
reuse is 750. Possible values range from 1–20000.
Decay Half-Life
The half-life variable is the rate at which the figure of merit is decreased to half its value once the value is larger than 0.
The default value of the half-life is 15 minutes. Possible values range from 1–45 minutes.
Continued on the next page.
Damping History
The slide shows the output from the show route damping history command.
Any routes displayed by this command were withdrawn from the router. However, the router retains a record of these routes
should they be readvertised to the local router. Some notable details in the display include the following:
• The route is currently hidden. We see this in both the State: <Hidden Ext> field as well as the
Preference: /-101 field. Notice that no Junos OS protocol preference value is defined.
• There is a field (Merit) for the current figure-of-merit value. The two values that follow list the value after the
last BGP update (or withdrawal), and the current value after experiencing some decay. For this route, the values
are Merit: 2777/2454. Thus, the value at the last update/withdrawal was 2777 (note that this value need
not necessarily exceed the default suppress threshold of 3000), and the current value is 2454.
• The default parameters are used (Default damping parameters used). If this route were evaluated by
a policy with a damping action, the new damping profile name would appear in the output.
Damped Routes
The slide shows the output from the show route damping suppressed command.
Any routes displayed by this command were advertised to the router, but these routes have a figure of merit that is currently
above the suppress threshold, and the route is unusable.
Manual Clearing
The route remains in this state until the figure of merit crosses below the reuse threshold. A route can have the figure of
merit reduced to 0 administratively by using the clear bgp damping command.
On the slide, the route 200.200.200.0/24 is currently suppressed and hidden. After we issue the clear bgp damping
command, the route is no longer hidden.
We Discussed:
• The causes of route instability;
• The effect that route damping has on BGP routing;
• The default behavior of damping on links;
• Controlling damping using the routing policy framework; and
• Viewing damped routes using CLI commands.
Review Questions
1.
2.
3.
4.
5.
www.juniper.net
Advanced Junos Service Provider Routing
www.juniper.net
Acronym List
ABR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . area border router
ARP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Address Resolution Protocol
AS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . autonomous system
ASBR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . autonomous system boundary router
BFD. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Bidirectional Forwarding Detection
BGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Border Gateway Protocol
BGP4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Border Gateway Protocol version 4
CLI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .command-line interface
CLNP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Connectionless Network Protocol
CLNS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Connectionless Network Service
CSNP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . complete sequence number PDU
DIS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . designated intermediate system
DoS. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . denial-of-service
DR. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .designated router
EGP. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . exterior gateway protocol
ES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . end system
ES-IS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . End System–to–Intermediate System
GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .graphical user interface
IAB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Internet Advisory Board
IANA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Internet Assigned Numbers Authority
IBGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . internal BGP
ICMP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Internet Control Message Protocol
IGP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . interior gateway protocol
IPv4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .IP version 4
IPv6 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .IP version 6
IS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Intermediate System
ISO . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . International Organization for Standardization
ISP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Internet service provider
JNCP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Juniper Networks Certification Program
LSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . link-state advertisement
LSDB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . link-state database
LSP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .link-state PDU
MD5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Message Digest 5
MED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . multiple exit discriminator
MOSPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Multicast Open Shortest Path First
NET . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . network entity title
NLPID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . network layer protocol identifier
NLRI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . network layer reachability information
NSSA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . not-so-stubby area
OSI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Open Systems Interconnection
PDU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .protocol data unit
PFE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .Packet Forwarding Engine
PSNP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . partial sequence number PDU
RIB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Routing Information Base
RID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . router ID
rpd . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . routing protocol daemon
SNPA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .subnetwork point of attachment
SPF . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .shortest path first
TED . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . traffic engineering database
TLV . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . type/length/value
ToS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . type of service
TTL . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . time-to-live