Module 8 - Introduction To MP-BGP and Advanced
Module 8 - Introduction To MP-BGP and Advanced
Module 7:
Implementing BGP in the Service Provider Network
1
Agenda
2
Objectives
3
Objectives
– Describe BGP terminology
– Describe autonomous systems in BGP networks
– Describe BGP routing between autonomous systems
– Describe BGP path vectors
– Describe BGP routing policies
– Describe features of BGP
– Describe the tables used by a router to store BGP
information
– Describe the four BGP message types
– Describe the multiprotocol extensions add to BGP to
support IPv6
– Describe MPLS VPNs
BGP Terminology
– Autonomous system: A collection of networks under a
single administrative domain
– Interdomain routing: Routing between the customer and
the service provider
– Internal routing: Uses IGP protocol (RIP, OSPF, IS-IS,
and so on) to exchange routing information inside the
autonomous system
– External routing: Uses EGP protocol (BGP) to exchange
routes between autonomous systems
– Two BGP implementations:
• Internal BGP (IBGP): When BGP is used inside an AS
• External BGP (EBGP): When BGP is used between autonomous systems
IBGP
AS 65001 EBGP 10.1.1.1 10.1.1.2
AS 65002
192.168.1.1 192.168.1.2
Autonomous System
–An autonomous system (AS) is a collection of networks under
a single technical administration.
• 16-bit numbers (as of January 2009, 32-bit numbers are available)
• Ranging from 1 to 65535
• Private AS: 64512–65535
AS 65020
BGP BGP
AS 65010 AS 65040
BGP
AS 65030
BGP BGP
Path Vector Functionality
–BGP announces this information:
• Paths (set of AS numbers)
• Networks that are reachable at the end of the path
AS 65010 AS 65020
BGP
–Keepalive
–Update
• Information for one path only (could be to multiple networks)
• Includes path attributes and networks
–Notification
• When an error is detected
• BGP connection closed after message is sent
Multiprotocol Extensions for BGP4
–BGP originally designed for IPv4:
• Carries IPv4 prefix reachability information
• Uses IPv4 for transport
–IPv6-specific extensions:
• Scoped addresses: NEXT_HOP contains a global IPv6 address and potentially a link-local address.
• NEXT_HOP and NLRI are expressed as IPv6 addresses and prefixes in the multiprotocol attributes.
Company A Internet
Site 1
MPLS VPN
PE
PE
P
IGP PE PE
Company A Company A
IGP
Site 2 Site 3
IGP
Summary
–BGP is the external routing protocol used between
autonomous systems.
–Autonomous system is a collection of networks under a single
administration and is represented by 16-bit or 32-bit number.
–Forwarding is based on policies and not on best path. BGP
routers exchange network reachability information, called
path vectors, which are made up of path attributes.
–BGP announces set of AS numbers and netwroks that are
reachable at the end of the path. The path is described by
attributes.
–BGP router can advertise to neighboring autonomous
systems only those routes that it actually uses.
Summary (Cont.)
–BGP routers establish a TCP session and then exchange
routing tables. After that, BGP peers send only incremental
triggered updates.
–BGP uses three databases: neighbor table, BGP table, and
routing table.
–The four BGP message types are open, keepalive, update,
and notification.
–BGP4, with multiprotocol extensions, enables the use of
many address families. Address families define the type of
addressews being carried.
–MPLS VPNs are used by customers with multiple locations
that do not want to use expensive Layer 2 technologies.
Objectives
17
Objectives
– Describe planning for BGP deployments
– Describe the basic configuration steps for EBGP
– Describe how networks are advertised in BGP networks
– Describe the basic configuration steps for IBGP
– Describe full-mesh IBGP networks
– Describe how to shut down a BGP neighbor
– Describe next-hop behavior in BGP
– Describe the BGP next hop self feature
– Describe configuration template support in Cisco IOS XR Software
– Describe the BGP neighbor states
– Describe BGP neighbor authentication
– Describe clearing the BGP session
Objectives (Cont.)
– Describe how to monitor BGP routes
– Describe the importance of the BGP path attributes in the path selection
– Describe the BGP weight attribute
– Describe the BGP local preference attribute
– Describe the BGP AS path attribute
– Describe the BGP multi-exit discriminator attribute
Planning for BGP
– Define network requirements.
– Define internal connectivity.
– Define external connectivity to service provider.
– Gather required parameters.
AS numbers?
Neighbor IP address?
Networks to be advertised?
Configure Basic EBGP
router bgp 64500
1. Define the BGP address-family ipv4 unicast
process. !
neighbor 192.168.101.11
2. Establish an EBGP remote-as 64501
router bgp 64501
neighbor relationship.
neighbor 192.168.101.10 remote-as 64500 address-family ipv4 unicast
RP/0/RSP0/CPU0:PE1#show bgp
< text omitted >
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.1/32 0.0.0.0 0 32768 i
*> 10.1.10.1/32 192.168.101.11 0 0 64501 i
Use Loopback 0
BGP AS 64501 for IBGP peering. BGP AS 64500
IBGP IBGP
192.168.101.11
192.168.101.10
Lo0 Lo0 Lo0 Lo0
10.1.10.2 10.1.10.1 10.1.1.1 10.0.1.1
BGP AS 64501
IBGP
Lo0 Lo0
10.0.1.1 10.0.1.2
Lo0
10.0.1.3
IBGP modifies
next hop.
The neighbor-group helps you apply the same configuration to one or more neighbors.
router bgp 1
neighbor-group nbrgroup1
Define neighbor group.
!
router bgp 1
neighbor-group nbrgroup1 Use neighbor group.
address-family ipv4 unicast
Cisco IOS/IOS XE
The BGP peer group groups BGP neighbors who share the same policies.
BGP Table
show bgp
Routing
BGP path table
BGP Table selection
Route Selection Decision Process
•Consider only (synchronized) routes with no AS loops and a valid next hop. The next steps
in the evaluation process are:
R4 R3 R2
AS 65040
BGP Local Preference
– Used to select the outbound EBGP path
– Sent to IBGP neighbors only (and only within the AS)
– Stripped in the outgoing EBGP updates except in the EBGP updates
with confederation peers
– Local preference attribute is well known and discretionary
– Default value = 100
– Paths with highest local preference value are preferred
AS 65010 AS 65020 AS 65030
172.16.0.0
R4
LP = 200
Traffic
AS 65040 AS 65050 R1 needs to
go to
AS 65010
R2
LP = 150 R3
BGP AS Path
–Fourth BGP path selection criteria
–Prefer shorter AS paths (only length is compared)
–Influences the inbound path selection in a
multihomed AS
–Manual manipulation of AS path length—AS path
prepending
–AS path prepending specified per neighbor by
complex criteria
BGP Multi-Exit Discriminator
–The paths with the lowest MED (also called the metric) value
are the most desirable.
–MED is used to advertise an exit path to be used by EBGP
neighbors to reach networks owned by this AS.
–The MED attribute is optional and nontransitive.
AS 65010
172.20.0.0
R2
R3
MED = 150
MED = 200
AS 65020
172.16.0.0
R1
R1
Summary
– For a BGP configuration, the following must be defined: BGP
requirements, BGP parameters, and connectivity.
– Basic EBGP configuration requires three main steps: define the
BGP process, establish the neighbor relationship, and advertise
the networks into BGP.
– Networks can be advertised into BGP using the network command
or by redistribution.
– It is recommended to use Loopback interfaces when establishing
IBGP sessions.
– Full-mesh IBGP is required because of the split horizon rule.
– To exchange IPv6 networks over BGP, you have to activate a
neighbor for IPv6 address family.
– You can use the shutdown command to manually shut down a
BGP neighbor.
Summary (Cont.)
– By default, next-hop over EBGP session is IP address of a router
that is sending the update. Next-hop over IBGP session is as
advertised by EBGP, and should not change.
– You can use the next-hop-self command to change the default
next-hop behavior.
– You can use configuration templates to group configuration that
can be applied to several BGP neighbors.
– When establishing a BGP session, the BGP goes through the
following states: idle, connect, open sent, open confirm, and
established.
– BGP supports MD5 authentication to authenticate each received
routing packet.
– You should trigger a BGP update by resetting a BGP session
when you change routing policy.
Summary (Cont.)
– Use various show commands to verify BGP operations.
– After BGP receives updates about multiple destinations from
different autonomous systems, it follows a multiple-step process
for selecting the best route to reach a destination; the best route is
a candidate for the routing table.
– Weight is Cisco‘s proprietary attribute that is configured locally on
a router and is not propagated to any other routers.
– Local preference is a well-known discretionary attribute that
provides information to routers in the AS about the path that is
preferred for exiting the AS.
– AS path length is the fourth path selection criteria. The shortest AS
path is preferred.
– MED is an indication to EBGP neighbors about the preferred path
into an AS.
Objectives
45
Objectives
– Provide an overview of route maps
– Describe route maps processing when processing a routing update
– Describe route maps syntax
– Provide a route map example
– Describe the characteristics of RPL
– Provide an RPL example
– Describe RPL pass and drop actions
– Describe RPL conditions
– Describe RPL operators
– Describe RPL boolean operators
– Describe how to nest statements in RPL
– Describe how to set attributes and parameters in RPL
– Describe how to set BGP attributes and parameters using RPL
Objectives (Cont.)
– Show an example of setting BGP attributes and parameters using RPL
– Describe how to set OSPF and IS-IS parameters using RPL
– Describe how to use parameterization in RPL
– Describe how to apply routing policies
– Describe how to maintain routing policies
– Describe value sets that can be used in RPL
– Describe AS path sets
– Describe standard community sets
– Describe prefix sets
– Describe how to monitor routing policies
– Describe how to test routing policies
– Describe how to translate route maps to routing policies
Route Maps Overview
–Route maps are a simple language to support complex
routing policies, in addition to filtering.
–Route maps are uniquely identified by a case-sensitive name.
–Each route map consists of one or more statements.
–Each statement contains zero or more match commands.
–Each statement contains zero or more set commands used to
modify routing updates.
–Route maps are available in Cisco IOS/IOS XE Software.
(Cisco IOS XR Software uses the Routing Policy Language.)
Route Map Processing for Routing Update
Route Map
Statement 10
Yes Yes No
Update Match? Permit Set Send Update
No Yes
No Drop Set
Statement 20
Yes Yes No
Match? Permit Set Send
No Yes
No Drop Set
Statement N
Yes Yes No
Match? Permit Set Send
No Yes
No Implicit drop Drop Set
Route Maps Syntax
•Additional route-map options:
– The continue command can be used to jump to another statement
instead of exiting.
– Policy lists can be used to modularize and group match statements.
end
Example: Route Maps (Cont.)
–The first route-map
statement processes
routes matched by
prefix list PL1 or PL2 route-map Policy1 permit 10
match ip address prefix-list PL1 PL2
and AS path access match as-path APACL1
list APACL1. set local-preference 200
set metric 1000
–These routes are !
external peers. !
router bgp 1
–A routing policy is neighbor 1.2.3.4
remote-as 64111
required to forward address-family ipv4 unicast
updates. route-policy PermitAll out
!
!
!
RPL Pass and Drop Actions
– Using the explicit pass
command continues the route-policy DropOrPass1
Drop!
end-policy
processing of route policy.
– Using the explicit drop route-policy DropOrPass2
pass Pass!
command stops end-policy
processing of route policy.
route-policy DropOrPass3
– The default action is drop. drop Drop!
end-policy
– If any modification is
applied to a route (e.g. route-policy DropOrPass4
Pass!
set med 100
set), it is an implicit pass. end-policy
route-policy DropOrPass5
pass Drop!
drop
pass
end-policy
RPL Conditions
–RPL uses various match options for conditional update
processing.
–Condition syntax: route-policy SetLP
if med eq 10 then
if attribute operator value then set local-preference 200
elseif med eq 20 then
… do something … set local-preference 150
else
elseif attr operator value then set local-preference 50
endif
… do something else … end-policy
else
… do something else …
endif
RPL Operators
Comparing attributes against values supports these operators:
• eq : An attribute numerically equal to specified value
• le : An attribute numerically lower than or equal to a specified value
• ge : An attribute numerically greater than or equal to a specified value
• is : An attribute equal to a specified value
• in : An attribute contained in a value set
• Many other attribute-specific options
route-policy SetLP
if med le 19 then
set local-preference 200
Simple elseif med eq 20 then
conditions set local-preference 150
elseif med ge 21 then
set local-preference 50
endif
end-policy
RPL Boolean Operators
–Multiple match options can be combined using Boolean
operators:
• and : both conditions must match
• or : at least one condition must match
• not : negate the following condition
Using composite
conditions
route-policy SetLP
if med eq 10 and not local-preference eq 100 then
set local-preference 200
elseif med eq 20 or local-preference eq 200 then
set local-preference 150
else
set local-preference 150
endif
end-policy
RPL Boolean Operators (Cont.)
–Multiple match options can be combined using Boolean
operators:
• not : highest precedence
• and : higher precedence than or, lower than not
• or : lowest precedence
vs.
if med eq 10 and (not local-preference eq 100 or med eq 50) then
vs.
if med eq 10 and not (local-preference eq 100 or med eq 50) then
RPL Nesting
–Two types of nesting are supported:
• “if” statement within another “if” statement
• A routing policy within another routing policy
route-policy SetLP
set local-preference 100
set local-preference 200
set local-preference 300
end-policy
• MED attribute:
set med {[+|-]value | igp-cost | max-reachable}
RPL Setting BGP Attributes and Parameters (Cont.)
• Delete standard BGP community attributes:
• delete community {all | [not] in community-set}
• Prepend AS path:
• prepend as-path {AS | most-recent} [count]
1100 points
1000
Forget Limit
t
Halve
Time
dampened
router bgp 1
address-family ipv4 unicast
bgp dampening route-policy BDamp
!
!
route-policy BDamp
if destination in (0.0.0.0/0 ge 25) then
set dampening max-suppress 30 halflife 10 reuse 750 suppress 1000
elseif destination in (0.0.0.0/0 ge 21) then
set dampening max-suppress 15 halflife 7 reuse 750 suppress 2000
elseif destination in (0.0.0.0/0 ge 17) then
set dampening max-suppress 10 halflife 5 reuse 750 suppress 3000
else
set dampening max-suppress 5 halflife 3 reuse 750 suppress 4000
endif
end-policy
RPL Setting OSPF and IS-IS Parameters
• OSPF metric type:
• set metric-type {type-1 | type-2]
• OSPF metric:
• set ospf-metric value
default orig.
Static routes
filter in/out
filter intf. in/out Connected routes
Applying Routing Policies (Cont.)
• Validity Checking
–RPL validity checking is done in two phases:
• Syntax checking and value checking are performed during policy configuration.
RP/0/RP1/CPU0:CRS(config-rpl)#set med 289314790283408912634789
^
% Invalid input detected at '^' marker.
route-policy RP route-policy RP
if as-path is-local then if as-path in (ios-regex '^$')
set local-preference 200 then
endif set local-preference 200
if as-path neighbor-is '20' endif
then if as-path in (ios-regex '^20_')
set local-preference 190 then
endif set local-preference 190
if as-path originates-from '20' endif
then if as-path in (ios-regex '_20$')
set local-preference 180 then
endif set local-preference 180
if as-path passes-through '20' endif
then if as-path in (ios-regex '_20_')
set local-preference 170 then
endif set local-preference 170
end-policy endif
end-policy
Standard Community Sets
–Define a standard community set using the community-set
command.
–Use one or more comma-separated match options:
• ios-regex commands to define regular expressions that define set membership
• numbered membership matching
• membership matching using well-known standard communities
route-policy Comm2LP
if community matches-any ImpComms then
set local-preference 200
endif
end-policy
Standard Community Set Numbered Matching
•Use numbered matching:
–AS:num
–AS:[range] Setting Local Preference
based on numbered
–AS:* community matching
community-set ImpComms
123:1010
123:[2000..2099]
999:*
end-set
!
route-policy Comm2LP
if community matches-any ImpComms then
set local-preference 200
endif
end-policy
Standard Community Set Named Matching
•Use identifiers for well-known communities:
– Internet : Match all communities.
– local-as :Keep tagged prefixes in the local AS.
– no-advertise :Prevent tagged prefixes from being advertised to any peer.
– no-export :Prevent tagged prefixes from being announced to EBGP peers.
Translated routing
policy
route-policy RP
if destination in PL-Set1 then
set local-preference 200
elseif destination in PL-Set2 then
set local-preference 150
endif
end-policy
Summary
– Route maps are a simple language to support complex routing policies.
– A route map is processed in a top-down fashion.
– Route maps support modularity and reusability.
– There is implicit deny at the end of a route map.
– The RPL is a newer mechanism that was introduced into Cisco IOS XR
Software as a replacement and improvement upon the route maps.
– In Cisco IOS XR Software, BGP updates are not forwarded to an external
neighbor unless an outbound policy is attached to the neighbor.
– Set action in a route policy also implicitly allows an update.
– RPL uses conditional statement syntax that is found in many programming
languages.
– RPL conditions can use a variety of operators, such as eq, le, ge and others.
– You can use boolean operators to create complex compound conditions.
Summary (Cont.)
– You can nest one routing policy inside another to achieve modularity and
reusability.
– You can use the set RPL action to modify attributes.
– You can use RPL to manipulate BGP attributes.
– BGP route flap dampening is a feature designed to make BGP more stable
and scalable by punishing routes that flap.
– You can use RPL to change OSPF or IS-IS parameters.
– In order to make policies modular and reusable, you can use parameters in
place of fixed values when calling nested policies.
– You can apply routing policies to many attach points, such as redistribution
between any pair of routing protocols.
– Editing a routing policy requires the use of one of three available editors.
– Value sets are objects that are used to modularize routing policies. Various
types of sets exist for different types of parameters and attributes.
Summary (Cont.)
– AS path set can contain one or more regular expressions which describe a set
of AS paths.
– You can use community sets to group multiple BGP communities.
– You can use a prefix set to match routes based on prefix-list-like criteria.
– You can use the show rpl command to display a policy configuration, including
all the dependencies.
– Policies can be combined with the show bgp command to display only those
BGP entries that are permitted by the policy.
– When you translate route maps to routing policies it is important to understand
the relationship between multiple conditions in a single route map statement.
Objectives
96
Objectives
– Describe the use of BGP weights to influence the BGP route selection
process
– Describe how to configure per-neighbor weights
– Describe how to change BGP weights using RPLs or Route Maps
– Describe the order of operation in setting BGP weights
– Describe how the BGP local preference attribute influences BGP route
selection
– Describe how to change the local preference
– Describe how to monitor the local preference values
– Describe the function of AS path prepending and how you can use it to
facilitate proper return path selection
– Describe design considerations for implementing AS path prepending
– Describe how to configure AS path prepending
Objectives (Cont.)
– Describe how to monitor AS path prepending
– Describe how AS path prepending can impact AS path filtering
– Describe how MED can be used to facilitate proper return path selection
– Describe how to change the MED
– Describe how to monitor MED values
– Describe how BGP communities facilitate proper return path selection
– Describe how to configure BGP Communities
– Describe BGP named community lists
– Describe the use of sequenced entries in extended community lists
– Describe how to set attributes based on community values
– Describe how to monitor BGP community values
– Show examples of using BG communities
Influencing BGP Route Selection
Outbound Traffic
–BGP routing policy can be specified by using:
• Weight: provides local routing policy (within a router)
• Local preference: provides AS-wide routing policy
SP2
SP4
Changing Weights with RPLs or Route Maps
– Weights can be set with RPLs (Cisco IOS XR) or route maps
(Cisco IOS/IOS XE) in complex scenarios.
– Routes can be matched on any combination of prefix lists, AS
path filters, or other BGP attributes.
route-policy from_SP3 route-policy from_SP4
set weight 150 set weight 100 router bgp SP1-AS
end-policy end-policy neighbor SP3-AS
address-family ipv4 unicast
route-map from_SP1 route-map from_SP2 route-policy from_SP3 in
set weight 150 set weight 100 neighbor SP4-AS
address-family ipv4 unicast
route-policy from_SP4 in
router bgp Customer-AS
neighbor Primary-SP route-map from_SP1 in
neighbor Backup-SP route-map from_SP2 in SP1 SP3
Customer
SP2 SP4
BGP Weight Attachment Points
BGP Local Preference
– You can use local preference to ensure AS-wide route selection
policy.
– Any BGP router can set local preference when it is processing
incoming route updates, doing redistribution, or sending
outgoing route updates.
– Local preference is used to select routes with equal weight.
– Local preference is stripped in outgoing EBGP updates, except
in EBGP updates with confederation peers.
BGP Local Preference (Cont.)
–Local preference is the second highest attribute in the BGP
route selection sequence.
–Remember the BGP route selection rules:
• Highest weight preferred (local to router)
• Highest local preference preferred (global within AS)
• Other BGP route selection rules
Customer
SP4
SP2
Monitoring Local Preference
RP/0/RSP0/CPU0:PE1#show bgp
< text omitted > Nondefault LP is
Origin codes: i - IGP, e - EGP, ? - incomplete displayed.
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.1/32 0.0.0.0 0 32768 i LP from the IBGP
*> 10.1.10.1/32 192.168.101.11 0 0 64501 i
peer is displayed.
*>i10.2.1.1/32 10.2.1.1 0 100 0 i
*>i10.2.10.1/32 10.2.1.1 0 100 0 64502 i
< text omitted >
Customer SP1
Return Path Selection in a Multihomed AS
– Requirement: The return traffic to the customer must
arrive over the highest-speed access link.
– Result: The return traffic flows over the path with the
shortest AS path length.
Proper Return Path Selection
• Q: How do you select the proper return path from AS 387?
• A: Use local preference in AS 387.
• Q: Will the administrator of AS 387 configure it?
• A: Unlikely.
AS Path Prepending
–BGP route selection uses these criteria:
• Prefer largest weight.
• Prefer largest local preference.
• Prefer routes that the router originated.
• Prefer shorter AS paths.
• Use other route selection rules.
–Manipulating the outgoing AS path length (called AS path
prepending) could result in proper return path selection.
–The AS path should be extended with multiple copies of the
AS number of the sender.
–AS path prepending is used to achieve these goals:
• Ensure proper return path selection.
• Distribute the return traffic load for multihomed customers.
AS Path Prepending (Cont.)
–Result: The return traffic flows over the desired return path.
AS Path Prepending
Design Considerations
– There is no exact mechanism to calculate the required prepended
AS path length.
– If a primary and backup scenario is desired, consider this strategy:
• Use a long prepended AS path over the backup link to ensure that the primary AS path
will always be shorter.
• A long backup AS path consumes memory on every Internet router.
• Experiment with various AS path lengths until the backup link
is idle.
• Add a few more AS numbers for additional security (unexpected changes in the
Internet).
– If traffic load distribution is desired, consider this strategy:
• Start with a short prepended AS path, monitor the link use, and extend the prepended
path length as needed.
• Continuously monitor the link use and change the prepended
AS path length if required.
Configuring AS Path Prepending
Prepends the specified AS
number sequence to the routes route-policy to_SP4
prepend as-path 10 2
matched by the RPL entry
router bgp 10
route-map to_SP2 permit neighbor SP4
set as-path prepend 99 99 address-family ipv4 unicast
route-policy to_SP4 out
router bgp Customer-AS
neighbor SP2 route-map to_SP2 out
SP1 (AS 10) SP3 (AS 30)
Customer (AS 99)
^([0-9]+)(_\1)*$
bgp deterministic-
Changes the BGP route selection procedure to a
med default
deterministic but slower one.
Monitoring the MED
RP/0/RSP0/CPU0:PE1#show bgp
< text omitted > MED is displayed as metric.
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.1.1.1/32 0.0.0.0 0 32768 i
*> 10.1.10.1/32 192.168.101.11 0 0 64501 i
*>i10.2.1.1/32 10.2.1.1 0 100 0 i
*>i10.2.10.1/32 10.2.1.1 0 100 0 64502 i
< text omitted >
RP/0/RSP0/CPU0:PE1#show bgp 10.1.10.1/32
< text omitted > MED is displayed only for those
Paths: (1 available, best #1) routes that contain a MED
Advertised to peers (in unique update groups): attribute.
10.0.1.1
Path #1: Received by speaker 0
Advertised to peers (in unique update groups):
10.0.1.1
64501
192.168.101.11 from 192.168.101.11 (10.1.10.1)
Origin IGP, metric 0, localpref 100, valid, external, best, group-best
Received Path ID 0, Local Path ID 1, version 9
Customer SP1
Both the original and the
modified routes are
displayed when inbound
soft reconfiguration is
configured.
BGP Communities Overview
–BGP communities are a means of tagging routes to ensure a
consistent filtering or route selection policy.
–The community attribute is a transitive optional attribute. Its
value is a 32-bit number (range 0 to 4,294,967,200).
–The standards define several filtering-oriented communities:
• no-advertise: Do not advertise routes to any peer.
• no-export: Do not advertise routes to real EBGP peers.
• local-as: Do not advertise routes to any EBGP peers.
• internet: Advertise this route to the Internet community.
AS 23456 Prepend
AS 64511 Communities Communities AS 64123
(Customer) Local Preference (Peering
1 2
Service
(Service Provider)
Provider)
Example 2: Standard Community Set
Filter routes are based
on standard community
attributes, using simple
numbered matching.
community-set ImpComms
BGP Update 23456:10
NLRI: 10.1.1.0/24 end-set
!
Next-hop: 192.168.1.1
route-policy RP1
Origin: igp if community matches-any ImpComms then
AS Path: 10 20 30 pass
Community: endif
23456:10 end-policy
!
23456:20
23456:30
route-policy RP2
if community matches-every ImpComms then
pass
endif
end-policy
!
Example 3: Standard Community Set
Filter routes are based
on standard
community attributes,
using range matching.
community-set ImpComms
BGP Update 23456:999,
NLRI: 10.1.1.0/24 23456:[10..30]
end-set
Next-hop: 192.168.1.1
!
Origin: igp route-policy RP1
AS Path: 10 20 30 if community matches-any ImpComms then
Community: pass
23456:10 endif
end-policy
23456:20
!
23456:30 route-policy RP2
if community matches-every ImpComms then
pass
endif
end-policy
!
Example 4: Standard Community Set
Filter routes, based on
standard community
attributes, using
regular expressions.
community-set ImpComms
BGP Update ios-regex ‘23456:999',
NLRI: 10.1.1.0/24 ios-regex '23456:[1-3]0'
end-set
Next-hop: 192.168.1.1
!
Origin: igp route-policy RP1
AS Path: 10 20 30 if community matches-any ImpComms then
Community: pass
23456:10 endif
end-policy
23456:20
!
23456:30 route-policy RP2
if community matches-every ImpComms then
pass
endif
end-policy
!
Example 5: Standard Community Set
–On incoming updates, delete all communities that have no
meaning in your AS 23456.
Original BGP Update
NLRI: 10.1.1.0/24
Next-hop: 192.168.1.1 New BGP Update
Delete unused
Origin: igp extended community NLRI: 10.1.1.0/24
AS Path: 10 20 30 attributes. Next-hop: 192.168.1.1
Community: Origin: igp
23456:10 community-set AllMyCommunities
AS Path: 10 20 30
23456:20 23456:*
end-set Community:
23456:30 23456:10
!
64111:12 route-policy RP1 23456:20
64222:33 delete community not in 23456:30
AllMyCommunities
end-policy
!
Example 6: Standard Community Set
–On outgoing updates, delete all communities that have no
meaning in peering AS 64111.
Original BGP Update
NLRI: 10.1.1.0/24
Next-hop: 192.168.1.1 New BGP Update
Delete extended
Origin: igp community attributes NLRI: 10.1.1.0/24
AS Path: 10 20 30 not used in peering AS. Next-hop: 192.168.1.1
Community: Origin: igp
23456:10 route-policy RP
AS Path: 10 20 30
23456:20 delete community not in
(peeras:*) Community:
23456:30 64111:12
end-policy
64111:12 !
64222:33
Example 7: Standard Community Set
–Delete all communities except well-known communities (e.g.
no-export, no-advertise, local-as)
Original BGP Update
NLRI: 10.1.1.0/24
Next-hop: 192.168.1.1 New BGP Update
Delete all communities
Origin: igp except well-known NLRI: 10.1.1.0/24
AS Path: 10 20 30 communities. Next-hop: 192.168.1.1
Community: Origin: igp
no-export route-policy RP
AS Path: 10 20 30
23456:20 delete community all
end-policy Community:
23456:30 no-export
!
64111:12
64222:33
Summary
– BGP weights can be used to influence the BGP route selection process.
– Weight can be configured on a BGP session and is applied to incoming
BGP updates.
– Weight can be changed using route maps or RPL.
– Weight setting is applicable only on incoming routes because a router
never propagates the weight attribute to its neighbors.
– Local preference is similar to the weight attribute in that you can use
both to influence BGP path selection, but it differs from the BGP weight
attribute in that weight is local to the specific router on which it is
configured.
– Local preference is set to 100 by default and can be changed using
route maps and RPL.
– You can determine local preference of a route by examining the BGP
table.
Summary (Cont.)
– You can use AS path prepending to influence incoming path selection.
– AS path prepending is performed on outgoing EBGP updates over the
nondesired return path, or the path where the traffic load should be reduced.
– You can configure AS path prepending using route maps or RPL.
– When you are monitoring AS path prepending, the router doing the prepending
is not the proper point to observe the results of the AS path prepend operation.
– Service providers should take into account possible AS path prepending done
by customers when designing AS path filters.
– The MED is a “weak” parameter in the route selection process; it is used only if
weight, local preference, AS path, and origin code are equal. By default, the
MED is compared only for paths that were received from the same AS.
– You can use the RPL or a route map to set the MED on incoming or outgoing
updates.
Summary (Cont.)
– You can determine MED of a route by examining the BGP table.
– BGP communities are a means of tagging routes to ensure consistent filtering
or routing policy.
– You can use the BGP community attribute to create an AS-wide routing policy
or to provide services to neighboring autonomous systems.
– The BGP named community lists feature allows the network operator to assign
meaningful names to community lists.
– BGP support for sequenced entries allows automatic sequencing of individual
entries in BGP extended community lists.
– You can use the RPL or route maps to match routes that carry specific BGP
communities.
– You can use the show bgp prefix command to examine BGP communities
that the route is tagged with.
– You can use BGP communities to allow customers to signal preference of a
specific path to the SP. SP than performs route manipulation based on
received communities.
Objectives
140
Objectives
–Explain the need for BGP route reflectors in BGP transit core
networks and how route reflectors modify traditional IBGP
split-horizon rules
–List the network design rules for implementing BGP route
reflectors
–Describe configuration of route reflectors in the service
provider network
–Describe the need for BGP confederations in BGP transit
backbones and basic design rules that network designers
should follow when planning a transit AS for BGP
confederations
IBGP Scalability Issues
SP
IBGP
IBGP
IBGP
Client
IBGP
IBGP
Client
IBGP
Client
IBGP IBGP
Client
EBGP Peer
IBGP
2. Routes received from a client
are propagated to all other peers
Route
EBGP Route Reflector
Client
EBGP Peer Client
1. Routes received from
EBGP peers are propagated
to all internal peers
Regular IBGP
RR-Client IBGP
Route Reflector Split-Horizon Rule
(Cont.)
1. Routes received from
EBGP peers are propagated
Route to all internal peers
Reflector
Client
EBGP Peer
IBGP
2. Routes received from
nonclients are sent to EBGP
peers and clients only
Route
EBGP Route Reflector
Client
EBGP Peer Client
3. Routes received from
IBGP peer are sent to EBGP
peers
Regular IBGP
RR-Client IBGP
Route Reflector Split-Horizon Rule (Cont.)
Type of Receiving Router Incoming Update From Is Forwarded To
Classic (nonclient) EBGP peer All peers (IBGP and EBGP)
IBGP peer EBGP peers
Route reflector EBGP peer All peers (IBGP and EBGP)
Nonclient IBGP peer EBGP peers and clients
Client IBGP peer All peers but the sender
Client EBGP peer All peers (IBGP and EBGP)
IBGP peer EBGP peers
Redundant Route Reflectors
Route
Reflector
Client
EBGP Peer
Route
Reflector
Client
IBGP
EBGP Peer
The redundant route reflector
might introduce a loop.
Route
EBGP Route Reflector
IBGP
Client
IBGP
EBGP Peer
Route
EBGP Route Reflector
Reflector Reflector
Router is a
reflector in cluster
22 and client is in Cluster 10
cluster 27
Regular IBGP
RR-Client IBGP
Route Reflector Backbone Migration
–Divide the AS into areas (clusters).
• Assign a cluster ID to each area.
10.0.0.1 10.0.0.2
SP
AS 123
209.165.201.128/28
EBGP Peer
65001
SP 65002 Intraconfederation
AS 123 EBGP Session
IBGP Session
65003 65004
EBGP Peer
Network X
65001
SP 65002
AS 123
Customer 1
65003 65004 AS 345
X 123 234
Intraconfederation EBGP Session Properties
–Behaves like EBGP session during session establishment:
• The EBGP neighbor has to be directly connected, or you have to configure EBGP multihop on the
neighbor.
164
Objectives
165
Objectives
–Describe the purpose and operation of BGP route dampening
–Describe features that are used to improve convergence in
BGP networks
–Describe BGP timers and intervals
BGP Route Dampening
–Designed to reduce router processing load caused by
unstable routes
–Minimizes the amount of BGP update processing in the
Internet by suppressing unstable (flapping) routes
–Does not suppress routes that occasionally flap
–Suppresses routes that are likely to flap in the future, based
on the history of their behavior
Route-Dampening Operation
SP
Customer 1 Customer 2
AS 123
209.165.201.144/28
–Implement BFD:
• Reduces BGP convergence by fast detection of neighbor failure.
• Used to reduce the impact that a fault in one address family has on another
address family
• Has to be enabled
PMTU Discovery
• Used to automatically determine TCP MSS used for TCP connections from
a router
• Default TCP MSS value for BGP is 536 bytes
• Small TCP MSS affects BGP convergence:
• Higher TCP MSS can improve BGP convergence
Increasing Input Queue Depth
–Available on Cisco IOS and IOS XE Software only.
–Input queue on an interface specifies how many packets can
be queued before dropping the packets.
–BGP routers with several peers might experience packet
drops on an interface due to a large number of TCP ACK
segments.
–The default input hold queue is platform-dependent.
–A length of 1000 will normally resolve problems caused by
input queue drops of TCP ACKs.
Configuration
Enables PMTU
SP
discovery AS 123 Enables PMTU
discovery
ip tcp path-mtu-discovery
! tcp path-mtu-discovery
interface GigabitEthernet0/0/0
hold-queue 1000 in
SP
Customer CE1 PE1 Internet
AS 123
CE2
PE2
SP
Customer CE1 PE1 AS 123
CE2
PE2
router bgp 234 route-policy ALL
address-family ipv4 unicast pass
bgp additional-paths install end-policy
address-family ipv6 unicast !
bgp additional-paths install router bgp 234
address-family ipv4 unicast
additional-paths selection route-policy ALL
Enable BGP PIC address-family ipv6 unicast
additional-paths selection route-policy ALL
SP
AS 123
interface GigabitEthernet0/0/0
bfd interval 100 min_rx 100 multiplier 3 router bgp 123
! bfd minimum-interval 100
router bgp 123 bfd multiplier 3
neighbor 10.0.0.6 fall-over bfd Enable BFD on neighbor 10.0.101.1
an interface bfd fast-detect
Enable BFD
support for BGP Enable BFD
support for BGP
Project: MAN-E VNPT Hanoi Expansion 2017
189