You are on page 1of 62

DEPLOYMENT AND

ANALYSIS OF BGP
SESSION RST-2303

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 1

Agenda

• Intro/Basics
• Attributes
• Route Reflectors
• Aggregation
• Dampening

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 2

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Introduction and Basics

RST-2303
9734_05_2004_X2
Presentation_ID ©
© 2003,
2004 Cisco
Cisco Systems,
Systems, Inc.
Inc. All
All rights
rights reserved.
reserved. 3

BGP Basics

Problems:
Peering
• 100,000’s of Prefixes
A C
• Many Autonomous
Organizations
ISP ISP
• Complex, Granular Policy A B
Required
B D
• Can any IGP handle this?

Reasons for BGP:


E
• You need to scale your IGP
• You’re multihomed and
Customer ISP C
need to implement routing F
policy Enterprise
• You need to transit full
A G
Internet routes

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 4

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Reasons for Using BGP

• You need to scale your IGP


• You are multihomed and need to implement routing
policy
• You need to transit full Internet routes

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 5

Interior Routing vs. Exterior Routing

• Interior (IGP)
Automatic discovery of information (neighbors, prefixes)
Generally trust your IGP routers
Routes go to all IGP routers
Periodic announcement of all information
• Exterior (EGP)
Specifically configured peers
Connecting with outside networks - less trust
Set administrative boundaries
Incremental Updates

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 6

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Why Do We Need an EGP?

• Scaling a large network— “Divide and Conquer”


Implement Hierarchy
Control Periodic IGPs/flooding
Isolate network instability
• Complex policies
Control reachability to prefixes
Merge separate organizations
Connect multiple IGPs

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 7

Concept of Autonomous System

• A network(s) sharing the same


routing policy
Possibly multiple IGPs
Usually under single administrative control
• Contiguous internal connectivity
• Globally Unique “AS” Number for Identification
• Numbered from 1 to 65,535
Private range: 64512–65535

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 8

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
IGP of Each AS Is Hidden

Peering
• Instability of one AS is
segmented from others A C
AS AS
• Minimizes topology
information that each 100 101
AS must maintain B D
• Connects different
IGP’s E
• Creates point of AS
summarization
102
• Internal Policy of each
AS remains within the
AS

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 9

Reasons for Using BGP

• You need to scale your IGP


• You are multihomed and need to implement routing
policy
• You need to transit full Internet routes

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 10

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Stub Network

• No need for BGP


AS
ISP advertises the stub B
101
network
Policy confined within ISP A (ISP)
policy
No Need For
• Default to the border AS BGP—UNLESS you
Want to Control
100 which Link Is Used
for which Traffic

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 11

Multihomed Network

• Many situations
possible
AS AS
Multiple links to same
ISP—Without BGP 100 300
A D
Secondary for only
backup—Without BGP B C
Loadshare between AS
primary and
secondary— Without 200
BGP
Selectively use
different ISPs—Need
BGP
Can Still Use Default, UNLESS You
Want to Selectively Use Either ISP
for Optimal Performance

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 12

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Multiple Links to the Same ISP - I

• Can still use default for


outbound routing
ISP
• For inbound routing:
Option1: ISP can use
floating statics, or IGP to
learn your routes and
loadshare
Option2: Can use BGP to
loadshare

AS 201

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 13

Multiple Links to the Same ISP - II

• Simplest scheme is
to use two defaults ISP
“Watershed effect”
• Again, can use statics/IGP at D F
borders, OR use BGP

A B
0.0.0.0 0.0.0.0
AS 201

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 14

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Multiple Links to the Same ISP - III

• Again, can just use two ISP


equal cost defaults to reach
ISP!
• Statics/IGP OR BGP to D F
advertise your routes to ISP
0.0.0.0 0.0.0.0

AS 201

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 15

Why Use BGP for Multihoming?

Tier 1 ISP Tier 1 ISP AS 6


AS 4 AS 5

Tier 1 ISP
Tier 2 ISP AS 3
AS 2 D E

A B
Allows per-prefix
AS 1 selection of exit paths

C
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 16

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Reasons for Using BGP

• You need to scale your IGP


• You are multihomed and need to implement routing
policy
• You need to transit full Internet routes

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 17

You Need to Transit Internet Routes

Rest of the
Internet

AS 100 AS 300
Your
A D
Network
B C
Full Internet Routes
AS 200
(Your
Customer)

In effect, you are now a Service Provider!

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 18

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Back to Basics

• Runs over TCP—Port 179


• Path vector protocol Peering
• Incremental updates
A C
• Internal BGP to distributed AS AS
prefixes throughout your
AS 100 101
• External BGP to connect to B D
other AS
• Learns multiple paths via E
internal and external BGP AS
speakers
• Picks the most preferred
102
path, installs it in the IP
Routing table, forwards to
BGP neighbors
• Policies applied by
influencing the best-path
selection
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 19

General Operation

• Standard TCP connection establishment (port 179)


• Both peers attempt to connect—algorithm to resolve
“connection collisions”
• EXCHANGE messages to open and confirm the connection
parameters
• Initial exchange of entire table
• Incremental updates thereafter
• KEEPALIVE messages exchanged when there are no updates

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 20

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
What Are Incremental Updates?

• IGPs typically re-advertise routes


• BGP runs over TCP => reliable data delivery
• Once BGP sends a route to a peer, it assumes the
peer will keep it unless:
A replacement route is sent—Implicit
withdraw of old route
The route is withdrawn—Explicit withdraw
The BGP session goes down (keepalive failure)

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 21

Four Basic Message Types

1. OPEN MESSAGE
Exchange AS, router ID, holdtime
Capability negotiation
2. NOTIFICATION
Example: “peer in wrong AS”
3. KEEPALIVE - When no updates
4. UPDATES - Carries the prefix information
(incremental)

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 22

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
External BGP

• Between BGP speakers


in different AS AS 2
2.0.0.0
• Usually directly connected
• Sets next-hop to self .1 B

Router A
router bgp 1
neighbor 2.0.1.1 remote-as 2 2.0.1.0

Router B
router bgp 2
neighbor 2.0.1.2 remote-as 1
AS 1 A .2

1.0.0.0

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 23

Internal BGP

• Neighbor in same AS
• Next-hop unchanged
• May be several hops away
A B
• IBGP routes are not forwarded
to IBGP peers
• (Thus a full IBGP mesh is
required)
scaling problem!
• Router A
router bgp 1
neighbor 2.0.1.1 remote-as 1

• Router B
router bgp 1
neighbor 2.0.1.2 remote-as 1

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 24

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Attributes

RST-2303
9734_05_2004_X2
Presentation_ID ©
© 2003,
2004 Cisco
Cisco Systems,
Systems, Inc.
Inc. All
All rights
rights reserved.
reserved. 25

BGP Update Packet

Withdraws

Attributes
Prefixes
(Network-Layer
Reachability Information)

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 26

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
BGP Attributes—Tools for Routing Policy

1: ORIGIN 7: AGGREGATOR
2: AS-PATH 8: COMMUNITY
3: NEXT-HOP 9: ORIGINATOR_ID
4: MED 10: CLUSTER_LIST
5: LOCAL_PREF
14: MP_REACH_NLRI
6: ATOMIC_AGGREGATE
15: MP_UNREACH_NLRI

Some Attributes have more influence on path selection than others.

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 27

Decision Process

• Long answer: Read the next 4 slides


• Longer answer:
http://www.cisco.com/warp/public/459/25.shtml

• For all paths of a prefix:


Compare path ‘a’ to path ‘b’
Flag the better path as the best path
Compare that best path to path ‘c’ and repeat until
all paths for that prefix have been checked

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 28

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Decision Process

• Path vs Path Comparison Rules:


• 1st—Eliminate “bad” paths
Do not consider paths with our own AS # in the AS_PATH
Do not consider “received-only” paths
Do not consider “not synchronized” paths
Do not consider paths whose NEXT_HOPs are
“inaccessible”
Do not consider paths that are “dampened”

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 29

Decision Process

• 2nd—Compare path ‘a’ to path ‘b’ in the order specified below


• The process ends at the first step a difference can be found
1. Highest Weight
2. Highest LOCAL_PREF
3. Prefer locally originated route
A locally sourced path is better than a locally aggregated path
4. Shortest AS_PATH
This step is skipped if 'bgp bestpath as-path ignore’ is enabled
5. Lowest ORIGIN code
IGP < EGP < Incomplete

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 30

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Decision Process

6. Lowest Multi-Exit Discriminator (MED)


IF the path has no MED value
IF ‘bgp bestpath missing-as-worst’ is enabled, MED will be 4,294,967,295
ELSE MED will be 0
IF ’bgp deterministic-med’ is enabled, order the paths before comparing
http://www.cisco.com/warp/customer/459/37.html
MEDs are only compared if paths are from the same neighbor AS.
IF ‘bgp bestpath med confed’ is enabled, then compare paths whose AS_PATHs consist of
only Sub Autonomous Systems
IF ‘bgp always-compare-med’ is enabled then compare MED for all paths

7. Prefer an External path over an Internal path


8. Lowest IGP metric to the NEXT_HOP

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 31

Decision Process

9. IF multipath is enable, the router may install up to N parallel


paths in the routing table when the following are true:
If using multipath without confederations both routes must have
the name ‘neighbor’ AS
If using multipath with confederations both paths must have the
same neighbor sub_AS
10. For External paths prefer the “oldest” path to
minimize route-flap
This step is skipped if any of the following are true:
The “bgp best path compare-routerid” command is enabled
The router ID is the same for multiple paths, since the routes
were received from the same router
There is no current best path. An example of losing the current
best path occurs when the neighbor offering the path goes
down
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 32

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Decision Process

11. Lowest Router-ID


Originator-ID is considered for reflected routes

12. Shortest Cluster-List


Client must be aware of RR attributes!

13. Lowest neighbor IP address

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 33

Attribute - Agenda

• Eliminate Bad Paths


• Local Preference
• AS-PATH
• Origin
• MED
• Router ID

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 34

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
NEXT_HOP

• The next hop to reach a network AS 2


eBGP
IP address of the peer 2.0.0.0
iBGP
.1 B
NEXT_HOP advertised by
eBGP
IGP should carry route to
NEXT_HOPs
2.0.1.0
Recursive route lookup
Unlinks BGP from the physical
topology
Allows IGP to make intelligent .2 A
forwarding decision 1.0.0.0

AS 1

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 35

BGP Attributes: NEXT_HOP


EBGP—next-hop set to self
6.0.1.1 6.0.1.2
AS 1 F
AS 2
2.0.0.0/8 D E 6.0.0.0/8

4.0.0.0/8 5.1.1.3
C
5.1.1.1 4.0.0.0/8 6.0.1.1
2.0.0.0/8 6.0.1.1
3rd Party EBGP
IBGP next-hop unmodified
5.1.1.2 5.1.1.3 Overriding defaults:

B A EBGP NLRI only:


neighbor x.x.x.x next-hop-self
AS 3 AS 4
4.0.0.0/8
route-map:
set ip next-hop { A.B.C.D | peeraddress}

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 36

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Details: Overriding Next-Hop (Cont.)

• set ip next-hop peer-address


If used in an inbound route-map, the next-hop
of the received (matching) routes will be set to
be the neighbor peering address, thus overriding any third-
party next-hops. The same route-map
can be applied to multiple BGP peers.
If used in an outbound route-map, the next-hop
of the advertised (matching) routes will be set
to be the peering address of the local router,
thus disabling the next-hop calculation. This command
has finer granularity than the per-neighbor “next-hop-self”
command.

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 37

Synchronization

A AS 1
AS 2
AS 3
IGP Carries
all Inter AS Routes B

• Relic from the “dark ages”, before pervasive IBGP :-)


• SYCHRONIZATION RULE: B only advertises prefixes
from AS2 that are also know by an IGP
• Run IBGP, and disable synchronization:
router bgp 1
no synchronization

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 38

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Problem: Override AS-path/MED?
Solution: LOCAL PREFERENCE

AS 4
AS 3 AS 2

AS 5
AS 1

• Attribute local to AS—Mandatory for IBGP updates


• Highest LOCAL_PREF is preferred—Default 100
• route-map: set local-preference

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 39

LOCAL_PREF: Configuration

AS 4
AS 3 AS 2
B

AS 5
• Configuration (rtr A): A
router bgp 1 AS 1
neighbor x.x.x.x remote-as 2
neighbor x.x.x.x route-map foo in
!
route-map foo permit 10
match as-path 2
set local-preference 120
! “bgp regular expression” - match any
ip as-path access-list 2 permit ^2_ AS path beginning with “2”

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 40

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
LOCAL_PREF

• Indication of preferred path to exit the local AS


• Universal inside the local AS
• Paths with highest LOCAL-PREF are
most desirable (default = 100)
bgp default local-preference value

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 41

Problem: Loop Detection, Policy


Solution: AS-PATH

AS 1
- AS SEQUENCE 2.0.1/24
List of ASNs that a AS 2
A 2.0.2/24
route has traversed
B
- AS SET AS 4
Summarizes 2.0.0/24
AS 3
contributing D 2.0.3/24
sequence
C
Sequence E
ordering is lost A: 2.0.2.0/24, ASPATH = 4 2
B: 2.0.0.0/24, ASPATH = 4
C: 2.0.1.0/24. ASPATH = 4 1
- route-map prepend: E: 2.0.0.0/22, ASPATH = 4 {1 2 3}
set as-path prepend
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 42

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Detail: as-set

• AS_SET
unordered set of all Autonomous Systems traversed
helps avoid loops

• advertise the prefix and the components AND


include AS_SET information in
the path

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 43

as-set (Cont.)

A: 2.0.2.0/24 4 2 AS 1
B: 2.0.0.0/24 4 2.0.1/24
C: 2.0.1.0/24 4 1 AS 2
A 2.0.2/24
E: 2.0.0.0/22 4 {1 2 3}
B
AS 4
2.0.0/24
AS 3
D 2.0.3/24

E C
• Example: Router D
router bgp 4
network 2.0.1.0 mask 255.255.255.0
aggregate-address 2.0.0.0 255.255.252.0 as-set
ip route 2.0.1.0 255.255.255.0 null0 254

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 44

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
AS PATH and Routing Decisions

• In the absence of configured policy, the BGP route


with the shortest AS PATH is selected as the best
path
• right or wrong, traffic via the Internet takes the
path through the least number of ISPs
• BUT: path through ISP A may actually be worse
than the path through ISP B plus ISP C
• How can we influence the decision?

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 45

AS_PATH—Pre-Pending
AS 4
B AS 3 AS 2
9.0.0.0/24

• Configuration (rtr B): A


router bgp 4 AS 1
neighbor x.x.x.x remote-as 5
neighbor x.x.x.x route-map prepend out AS 5
!
route-map prepend permit 10
match as-path 2
set as-path prepend 4 4 AS 1 Sees:
! 9.0.0.0/24 2 3 4
ip as-path access-list 2 permit ^$ 9.0.0.0/24 5 4 4 4

“bgp regular expression” - match any


empty AS path - i.e. all routes from
the local AS, AS4.
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 46

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Problem: Indicate Best Path into AS
Solution: MED
CITY A CITY A
AS 6 AS 3

AS 1 AS 2
AS 5 AS 4

CITY B
• Conveys relative preference of entry points.
• Lowest MED is best—Default is no MED==0
• Comparable only if paths are from same AS
• Non-transitive—Do not pass MED from one AS to
another.
• route-map: set metric
set metric-type internal
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 47

Setting MED to Match IGP Cost

• set metric-type internal AS 6


• enable BGP to advertise a
MED which corresponds to
the IGP metric values A
• changes are monitored (and
re-advertised if needed) AS 1 AS 2
every 600s
• Prevents inconsistent
decision by BGP in some B
corner cases (mostly for
large ISP)
• Should always be enabled
on new network rollouts
AS

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 48

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
deterministic-med

• Configuration:
router bgp 1
bgp deterministic-med
bgp dynamic-med-interval <secs>
neighbor x.x.x.x remote-as 2
neighbor x.x.x.x route-map set_MED out
!
route-map set_MED permit 10
match as-path 2
set metric-type internal
• http://www.cisco.com/warp/customer/459/37.html

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 49

Least Useful Attribute Award: ORIGIN

• IGP—network statement under


router bgp
• EGP—Redistributed from EGP
• Incomplete—redistribute <IGP process> under
router bgp
• To avoid confusion BGP bestpath decisions, use a
route-map to: set origin igp for all BGP routes

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 50

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
BGP Attributes

75k1#sh ip bgp 10.0.0.0


BGP routing table entry for 10.0.0.0/24, version 13926781
Paths: (1 available, best #1)
Not advertised to any peer
AS path AS aggregat
60 50 {10 20}, (aggregated by 50 16.0.0.2)
next hop IGP metric peer IP peer
10.0.10.4 (metric 10) from 10.0.0.1 (10.0.0
Origin IGP, metric 100, localpref 230, valid, aggre
internal (or external or local),
atomic-aggregate, best
Community: 64:3 10:0 20:10
Originator: 10.0.0.1, Cluster list: 16.0.0.4, 16.0.

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 51

Summary: The Decision Algorithm

• Consider only (synchronized) routes with no AS loops


and valid next-hop, then prefer:
• Highest WEIGHT
Highest LOCAL PREFERENCE
LOCALLY ORIGINATED (e.g. network/aggregate)
Shortest AS-PATH
Lowest ORIGIN (IGP < EGP < incomplete)
Lowest MED
EBGP
IBGP
Lowest IGP METRIC to next-hop
Neighbor with lowest ROUTE_ID
• www.cisco.com/warp/public/459/25.shtml

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 52

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Where Is Distance?

• Distance:
Does not effect BGP bestpath selection.
Is applied to the bestpath prior to insertion in the IP routing
table
Lowest DISTANCE is chosen when multiple routing
protocols have the same route

• Not part of BGP

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 53

Distance

A AS 1
AS 2
AS 3
IGP Carries
All Inter AS Routes B

• B only advertises prefixes from AS2 also in IGP


(=>admin distance of EBGP must be < all IGPs)
• However, if synchronization is disabled: do you really
EVER want to prefer EBGP over your IGP? If no, then:
router bgp 1
no synchronization
distance 200 200 200
EBGP IBGP LOCAL (e.g. “network” command)
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 54

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
BGP Global Settings

• For BGP config templates from now on, it is


assumed you’ve already done these:
router bgp 1
bgp deterministic-med
no synchronization
no auto-summary
distance 200 200 200

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 55

So Far…

• BGP scales Internet routing


• Connects ISPs with AS numbers
• Not required to connect to the Internet—May be useful for
multihomed customers
• Useful to scale enterprise routing
• External and Internal BGP modes
• TCP port 179—Incremental updates
• BGP attributes: ASPATH, NEXT_HOP, MED, LOCAL_PREF—
Allow routing policy via route-map
• Understand the bestpath decision in order to understand
BGP!

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 56

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Communities

RST-2303
9734_05_2004_X2
Presentation_ID ©
© 2003,
2004 Cisco
Cisco Systems,
Systems, Inc.
Inc. All
All rights
rights reserved.
reserved. 57

How To Scale Routing Policy

• Communities!
• NOT in decision algorithm
• BGP route can be a member of many communities
• Typical communities:
Destinations learned from customers
Destinations learned from ISPs or peers
Destinations in VPN—BGP community is fundamental to
the operation of BGP VPNs

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 58

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Communities
Communities:
1:100—Customer Routes
1:80—ISP Routes ISP 2

ISP 1

ISP 3 ISP 4

0.0.0.0

Customer 1 Customer 2
(No Default, (Uses Default,
Wants Full Routes)
RST-2303 Wants Your Routes)
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 59

Communities
Communities: Set Community
1:100—Customer Routes 1:80
1:80—ISP Routes ISP 2
Match Community
ISP 1 1:100

Match Community
Match Community
1:100 1:80
1:100

ISP 3 ISP 4
Set Community
1:100 0.0.0.0

Customer 1 Customer 2
(No Default, (Uses Default,
Wants Full Routes)
RST-2303 Wants Your Routes)
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 60

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Communities

• Activated per neighbor/peer-group:


neighbor {peer-address | peer-group-name} send-community

• Carried across AS boundaries


• Common convention is string
of four bytes: <AS>:[0-65536]

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 61

Communities

• Each destination can be a member of


multiple communities
• Using a route-map: set community
<1-4294967295> community number
aa:nn community number in aa:nn format
additive Add to the existing community
none No community attribute
local-AS Do not send to EBGP peers (well-known
community)
no-advertise Do not advertise to any peer (well-known
community)
no-export Do not export outside AS/confed (well-known
community)

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 62

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Community Filters

• Filter based on Community Strings


ip community-list <1-99> [permit|deny] comm
ip community-list <100-199> [permit|deny] regexp

• Per neighbor
Inbound or outbound route-maps
match community <number> [exact-match]
exact match only for standard lists

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 63

Community Filters

• Example 1:
Mark some prefixes as part of the 1:120 community (+remove existing
community!)
• Configuration:
router bgp 1
neighbor 10.0.0.1 remote-as 2
neighbor 10.0.0.1 send-community
neighbor 10.0.0.1 route-map set_community out
!
route-map set_community 10 permit
match ip address 1
set community 1:120
!
access-list 1 permit 10.10.0.0 0.0.255.255

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 64

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Community Filters

• Example 2:
Set LOCAL_PREF depending on the community that the prefix
belongs to.
• Configuration:
router bgp 1
neighbor 10.0.0.1 remote-as 2
neighbor 10.0.0.1 route-map filter_on_community in
!
route-map filter_on_community 10 permit
match community 1
set local-preference 150
!
ip community-list 1 permit 2:150

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 65

Regular Expression Syntax—URL

• Overview of IOS regular


expression syntax:
http://www.cisco.com/univercd/cc/td/doc/product/software/i
os11/arbook/arapptrn.htm

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 66

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
BGP Route Reflectors

RST-2303
9734_05_2004_X2
Presentation_ID ©
© 2003,
2004 Cisco
Cisco Systems,
Systems, Inc.
Inc. All
All rights
rights reserved.
reserved. 67

Route Reflectors

• Basics
• Attributes
• Multiple Tiers
• Migration
• Cluster ID comparison
• Redundancy

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 68

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Why Route Reflectors?

• Provides a scalable
alternative to the iBGP full
mesh problem
• Relaxes rule which says a
route from one iBGP peer
cannot be advertised to
another iBGP peer n(n-1)/2 iBGP
• A Route Reflector (RR) Sessions!
can advertise a route from
an iBGP peer to a Route
Reflector Client (RRC)
• The ORIGINATOR_ID and
CLUSTER_LIST attributes
are used to perform loop
detection
• neighbor x.x.x.x route-
reflector client
• RFC 2796 n=1000 => Nearly Half a Million iBGP Sessions!

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 69

Route Reflectors—Terminology
Non-client Route Reflector

Clients

Clusters Clients
Lines Represent Both Physical Links and BGP Logical Connections
• Route reflector - Router that reflects the iBGP information
• Client - Routers between which the RR reflects updates (may be fully
meshed among themselves)
• Cluster - Set of one or more RRs and their clients
(may overlap)
• Non-client - iBGP neighbor outside the cluster
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 70

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Propagation

• What does a RR do with the best path?


• It depends on who sent us the path:
From an eBGP peer, send the path to everyone
From a RRC, reflect the path to RRCs and iBGP peers, send the
path to eBGP peers
From a regular iBGP peer, reflect the path to RRCs and send the
path to eBGP peers
• When a route is reflected the RR appends his ROUTER_ID or
“bgp cluster-id” to the CLUSTER_LIST

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 71

Route Reflectors - Deploying

• Divide network into multiple clusters


• Each cluster contains at least one
RR. Clients can peer with RRs in other clusters for
redundancy
• RRs are fully meshed via iBGP
• Still use single IGP—next-hop unmodified by RR
unless via explicit route-map

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 72

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors - Topology

• RR topology should
Backbone
follow physical topology
RR RR
A RRC should not peer
through RR1 to get to Cluster B
RR2 unless RRC is also RRC
peering with RR1 RRC
Defining two RRs in a
POP and having every RR
router in that POP peer
to those RRs is ok
Dedicated routers can RR
be used as RR’s
Cluster A
RR’s do not have to be
directly inline with the
clients, but should be RRC
placed so not to detract RRC
from redundancy RR
• Black holes and routing
loops can occur
otherwise
Cluster C RR
Cluster D

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 73

Route Reflectors

• Basics
• Attributes
• Multiple Tiers
• Migration
• Cluster ID comparison
• Redundancy

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 74

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors - Attributes

• ORIGINATOR_ID
Router ID of IBGP speaker that injects
route into AS—applied by RR

• Useful for troubleshooting and


loop detection

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 75

Route Reflectors - Attributes

• CLUSTER_LIST
String of CLUSTER_IDs through which the route has
passed

• Usually CLUSTER_ID = ROUTER_ID


• CLUSTER_ID is overridden by “bgp cluster-id
x.x.x.x”
• Useful for troubleshooting and
loop detection

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 76

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors - Attributes

Router id
RR
1.3.1.1

1.4.1.1 RRC Router id


A 1.2.1.1
• Example: RR
RouterB>sh ip bgp 3.0.0.0 C
RRC
BGP routing table entry for 3.0.0.0/8 B Router id D
3 1.1.1.1
1.0.1.2 from 1.4.1.1 (1.1.1.1)
Origin IGP, metric 0, localpref 100, valid, internal, best

1.0.1.2

Originator: 1.1.1.1 AS3


3.0.0.0
Cluster list: 1.3.1.1, 1.2.1.1

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 77

Route Reflectors

• Basics
• Attributes
• Multiple Tiers
• Migration
• Cluster ID comparison
• Redundancy

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 78

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors - Hierarchy

• RRs are required to


maintain a full mesh
among themselves
• Unlimited levels or tiers
of route-reflectors can Level 1
be used to ease the
pain of maintaining a
full mesh among RRs
Level 2
• Clusters may be
configured
hierarchically
• RRs in a cluster are
clients of RRs in a
higher level
• Provides a “natural”
method to limit routing
information sent to
lower levels
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 79

Route Reflectors

• Basics
• Attributes
• Multiple Tiers
• Migration
• Cluster ID comparison
• Redundancy

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 80

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Deploying Route Reflectors

• Divide backbone into multiple clusters


• Each cluster contains at least one
RR; Clients can peer with RRs in other clusters for
redundancy
• RRs are fully meshed via IBGP
• Still use single IGP—next-hop unmodified by RR;
unless via explicit inbound route-map

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 81

Route Reflectors—Migration

• Where to place the route reflectors?


Follow the physical topology!
This will guarantee that the packet forwarding won’t be
affected

• Configure one RR at a time


Eliminate redundant iBGP sessions
Place one RR per cluster

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 82

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors - Migration

• Migration is easy
Configure one RR at a time
Eliminate redundant iBGP sessions
Place one RR per cluster

• Repeat as needed…

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 83

Route Reflectors - Migration

• Problem:
A full iBGP mesh
A
A

B C

D
E

Logical Links
Physical AND Logical Links

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 84

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors - Migration

• Step 1:
configure D
as a RR; E A
A
is the client

B C

D RR
E

Logical Links
Physical AND Logical Links

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 85

Route Reflectors - Migration

• Step 2: eliminate
unnecessary iBGP
links A
A

B C

D RR
E

Logical Links
Physical AND Logical Links

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 86

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors - Migration

• Step 3:
repeat for other
clusters A
A
and iBGP
links.
• Finished!! B C
RR RR

D RR
E

Logical Links
Physical AND Logical Links

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 87

Route Reflectors

• Basics
• Attributes
• Multiple Tiers
• Migration
• Cluster ID comparison
• Redundancy

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 88

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors - Redundancy

• A RRC may peer with more than one reflector, in


different clusters
A RRC that peers to only one RR has a single point of
failure
RRC should peer to at least two RRs to provide
redundancy

• The million dollar question


Should redundant RRs be in the same cluster or should
they be in separate clusters?

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 89

Same Cluster-ID

• RRs A and C have the same cluster-id 10


Cluster-ID
• C will deny routes reflected C A
RR2 RR1
from A due to cluster-list loop
detection
• If session from C to D fails, C B D
will not be able to reach
10.0.0.0/8
• If session from B to A fails, B
will not be able to reach
10.0.0.0/8 eBGP

• D has some redundancy, but


not 100% 10.0.0.0/8

Lines Represent Both Physical


Links and BGP Logical Connections

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 90

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Same Cluster-ID

• Technically not 100% redundant cluster-id 10


• If loopback peering is used then the
chances of CÆD or BÆA failure are C A
greatly reduced
RR2 RR1
• Using same Cluster-ID with
loopback peering is fine
B D

eBGP

10.0.0.0/8

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 91

Different Cluster-ID

• RRs A and C have different cluster-id 10 cluster-id 20


Cluster-IDs
• C will not deny routes reflected C A
RR2 RR1
from A
• C will know about 10.0.0.0/8
from A and D B D
• If C to D session fails, C can
still reach 10.0.0.0/8 via A
• If B to A session fails, B can
still reach 10.0.0.0/8 via C eBGP
• D has true redundancy 10.0.0.0/8
Lines Represent Both Physical
Links and BGP Logical Connections

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 92

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Different Cluster-ID

• C has two paths to 10.0.0.0/8 but cluster-id 10 cluster-id 20


only had one path in “Same
Cluster-ID” topology C A
• Unique Cluster-IDs mean more
RR2 RR1
paths on RRs which translates to
more memory
B D

eBGP

10.0.0.0/8

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 93

Cluster-ID Comparison

Redundancy Admin Attribute RR Memory


Factors Combos Consumption

~100% with Easy to ID One path


Same Cluster-ID loopback POPs based Medium from each
peering on Cluster-ID RRC

One path
Different Easy to ID from each
Cluster-ID 100% router based High RRC and
on Cluster-ID one from
each RR

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 94

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors

• Basics
• Attributes
• Multiple Tiers
• Migration
• Cluster ID comparison
• Redundancy

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 95

Route Reflectors - Redundancy

• Can a RRC have too much redundancy?


• RRC will receive an additional view for each extra RR it peers with,
which will consume extra memory.
• Each RR in Cluster A has 4 paths to 10.0.0.0/8
• Only one exit point for this prefix but we learn about it from 4 peers
• Increases memory consumption on RRs
Cluster A Cluster B
10.0.0.0/8

RRC - A RRC - B

RRs RRs

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 96

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Reflectors - Redundancy

• Some redundancy is needed


• Too much burns memory on RRCs because the
client learns the same information from each RR
• Also burns memory on the RRs because they learn
multiple paths for each route introduced by a RRC
• Two or three reflectors per cluster should be plenty

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 97

Route Reflectors - Summary

• ORIGINATOR_ID and CLUSTER_LIST provide loop detection


mechanism. Allows BGP to advertise a route from one iBGP
speaker to another
• Migration from iBGP full mesh to Route Reflectors is painless
• If one tier is not enough additional tiers of RRs can be used
• Too much redundancy can be a bad thing
• Dedicated RR’s are helpful (don’t need to be directly inline,
should be close)
• Remember: Follow the physical topology

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 98

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Confederations - RR Alternative

• RFC 3065 - Autonomous System Confederations for BGP


• Another alternative to iBGP full mesh
• An AS is split into multiple Sub-Autonomous Systems but still
looks like a single AS to eBGP peers
• Sub-AS numbers should come from private AS range
64512 - 65535
• BGP between each Sub-AS is similar to eBGP
Preserve NEXT_HOP across the Sub-AS (IGP carries this
information)
Preserve LOCAL_PREF and MED

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 99

Confederations - RR Alternative

• AS_CONFED_SEQUENCE provides loop detection


mechanism. Allows BGP to advertise a route from one
iBGP speaker to another
• Transition from iBGP full mesh to Confederations is
difficult. Same story when moving away from Confeds
• For more info:
http://www.cisco.com/univercd/cc/td/doc/cisintwk/ics/icsbgp4.htm#6834

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 100

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
RRs or Confederations

External Multi-Level Policy Migration


Connectivity Hierarchy Control Scalability Complexity

Anywhere
In the Medium
Confederations Yes Yes Medium To High
Network

Route Anywhere
In the
Reflectors Yes Yes Very High Very Low
Network

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 101

BGP Aggregation

RST-2303
9734_05_2004_X2
Presentation_ID ©
© 2003,
2004 Cisco
Cisco Systems,
Systems, Inc.
Inc. All
All rights
rights reserved.
reserved. 102

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
What Is Aggregation?

• Summarization based on specifics from the BGP


table, not the routing table
1.1.1.0 255.255.255.0
1.1.254.0 255.255.255.0
=> 1.1.0.0 255.255.0.0

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 103

How to Aggregate

• aggregate-address 1.1.0.0 255.255.0.0 {as-set}


{summary-only} {route-map}
• Use as-set to include AS_PATH and community info
from components
• summary-only suppresses component routes of
1.1.0.0/16
• route-map sets other attributes

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 104

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Why Aggregate?

• Reduce number of Internet prefixes—advertise only


your CIDR block
• Increase stability—aggregate stays
even if specifics come and go
• Stable aggregate generation:
Nail down a component route (1.1.1.1/32)
router bgp 100
aggregate-address 1.1.0.0 255.255.0.0
network 1.1.1.1 255.255.255.255
!
ip route 1.1.1.1 255.255.255.255 Null0 254

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 105

BGP Attribute: Atomic Aggregate

• Indicates loss of AS-PATH information


• Must not be removed once set
• Only present when an aggregate route is created
without the as-set keyword
• Informational attribute only
It doesn’t really do anything

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 106

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
BGP Attribute: Aggregator

• AS number and IP address of router generating


aggregate
• Useful for troubleshooting
• Only set by aggregate-address; NOT set by the
network statement

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 107

Dampening

RST-2303
9734_05_2004_X2
Presentation_ID ©
© 2003,
2004 Cisco
Cisco Systems,
Systems, Inc.
Inc. All
All rights
rights reserved.
reserved. 108

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Dampening

• Route flap
The bouncing up and down of a path
• A flap ripples through the entire Internet
• Consumes CPU cycles, causes instability
• Solution: Reduce scope of route flap propagation
History predicts future behavior
Suppress oscillating routes
Advertise stable suppressed routes

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 109

Route Dampening: Operation

• Add penalty for each flap


• Exponentially decay penalty
• Penalty above suppress-limit—
do not advertise up route
• Penalty decayed below reuse-limit—advertise route
• Maintain a history for flapping paths
• Dampening is only for external paths
• Alternate paths still usable
• Suppress-limit, reuse-limit and half-life time give control

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 110

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Route Dampening

Suppress-Limit

3
Penalty

2 Reuse-Limit

0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25

Time
RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 111

Selective Dampening

• Selective dampening based on


AS-PATH
Community
Prefix

• Variable dampening

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 112

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Dampening Configuration

• bgp damping <halflife-time> <reuse> <suppress> <maximum-


suppress-time>
• Example:
router bgp 109
bgp dampening route-map SELECTIVE _DAMPENING
!
access-list 110 permit ip any 255.255.255.0 0.0.0.255
access-list 111 permit ip any any
!
route-map SELECTIVE_DAMPENING permit 10
match ip address 110
set dampening 30 125 2000 120
!
route-map SELECTIVE_DAMPENING permit 20
match ip address 111
set dampening 25 750 2000 45
!

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 113

Dampening

• A route can only be suppressed when receiving an


advertisement.
Not when receiving a WITHDRAW
Attribute changes count as a flap (1/2 penalty)
• In order for a route to be suppressed the following must be
true:
The penalty must be greater than the suppress-limit
An advertisement for the route must be received while the penalty
is greater than the suppress-limit
A route will not automatically be suppressed if the suppress-limit
is 1000 and the penalty reaches 1200. The route will only be
suppressed if an advertisement is received while the penalty is
decaying from 1200 down to 1000

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 114

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Dampening – Deployment

• Configurable parameters:
half-life – The number of minutes it takes for the penalty to
decay by 1/2
reuse-limit – If a route is suppressed the penalty must
decay to this value to be unsuppressed
suppress-limit – The penalty must be greater than this
threshold when an advertisement is received for a route to
be suppressed
max-suppress-time – The maximum number of minutes a
route may be suppressed

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 115

Dampening – Deployment

• Calculated parameters:
max-penalty – The maximum penalty a route may have that will
allow the penalty to decay to reuse-limit within max-suppress-
time
max-penalty = reuse-limit * 2^(max-suppress-time/half-life)
If half-life is 30, reuse-limit is 800, and max-suppress-time is 60
then the max-penalty would be 3200
If we allowed the penalty to reach 3201 it would be impossible
for the penalty to decay to 800 within 60 minutes
• IOS will generate a warning message if the max-penalty is
above 20,000 or less than the suppress-limit

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 116

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Dampening – Example

• Small suppress window:


Half-life of 30 minutes, reuse-limit of 800, suppress-limit of
3000, and max-suppress-time of 60
max-penalty is 3200
• Advertisement must be received while penalty is
decaying from 3200 down to 3000 for the route to
be suppressed
A 3 min 45 second (rough numbers) window exist for an
advertisement to be received while decaying from 3200 to
3000.

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 117

Dampening – Example II

• No window:
Half-life of 30 minutes, reuse-limit of 750, suppress-limit of 3000,
and max-suppress-time of 60
max-penalty = 750 * 2^(60/30) = 3000
Here the max-penalty is equal to the suppress-limit
• The penalty can only go as high as 3000.
The decay begins immediately, so the penalty will be lower than
3000 by the time an advertisement is received.
A route could consistently flap several times a minute and never
be suppressed

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 118

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Summary

• BGP is used to interconnect Autonomous Systems and to


scale enterprise routing
• Consists of both external and internal BGP modes
• Uses attributes to carry information about routes: AS_PATH,
NEXT_HOP, MED, LOCAL_PREF
• The bestpath decision algorithm is used to determine route
preference
• Communities are useful for implementing policy
• Route Reflectors help iBGP mesh scaling
• Aggregation reduces the number of prefixes and adds
stability
• Dampening suppresses route flapping

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 119

Other References

ISBN: 0321127005 ISBN: 1587051095 ISBN: 0201379511

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 120

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
Recommended Reading

• Continue your
Networkers learning
experience with further
reading for this session
from Cisco Press.
• Check the
Recommended
Reading flyer for
suggested books.

Available on-site at the Cisco Company Store

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 121

Complete Your Online Session Evaluation!

WHAT: Complete an online session evaluation


and your name will be entered into a
daily drawing
WHY: Win fabulous prizes! Give us your feedback!
WHERE: Go to the Internet stations located
throughout the Convention Center
HOW: Winners will be posted on the onsite
Networkers Website; four winners per day

RST-2303
9734_05_2004_X2 © 2004 Cisco Systems, Inc. All rights reserved. 122

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr
RST-2303
9734_05_2004_X2
Presentation_ID ©
© 2003,
2004 Cisco
Cisco Systems,
Systems, Inc.
Inc. All
All rights
rights reserved.
reserved. 123

Copyright © 2001, Cisco Systems, Inc. All rights reserved. Printed in USA.
9734_05_2004_X2.scr

You might also like