Professional Documents
Culture Documents
Deploying BGP
Session 309
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 2
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 1
Overview
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 3
Recap of BGP
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 4
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 2
Bottom Line?
• Implementation of routing
policies that are:
• Scalable
• Stable
• Simple (we hope!)
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 5
More Details...
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 3
External BGP
Router A
router bgp 109
neighbor 131.108.10.2 remote-as 110
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 7
Internal BGP
A B
Neighbor in same AS
next-hop unchanged
May be several hops away
Don’t forward other IBGP routes
Router B
router bgp 109
neighbor 131.108.30.2 remote-as 109
Router A
router bgp 109
neighbor 131.108.20.1 remote-as 109
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 8
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 4
BGP Attributes: NEXT_HOP
EBGP - next-hop set to self
150.10.1.1 150.10.1.2
F
AS 200
150.10.0.0/16 D E AS
C 300
150.1.1.1
192.0.0.0/24 150.1.1.3
150.10.0.0/16 150.10.1.1
3rd Party EBGP 192.0.0.0/24 150.10.1.1
150.1.1.2 150.1.1.3 IBGP next-hop unmodified
B A Overriding Defaults:
AS 201
AS 301 192.0.0.0/24 EBGP NLRI only:
neighbor x.x.x.x next-hop-self
route-map override:
set ip next-hop { A.B.C.D | peer-address}
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 9
BGP Attributes
Used to shape 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
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 10
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 5
BGP UPDATES
WITHDRAWS
ATTRIBUTES
PREFIXES
(Next Layer Reachability Information)
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 11
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 6
Problem: Indicate Best Path into AS
Solution: MED
690 1883
1755 1880
200 209
Non-transitive attribute
Conveys the relative preference of entry points
Comparable if paths from same AS
Unless “bgp always-compare-med” configured
route-map: set metric { metric | internal}
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 13
666
660
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 14
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 7
Problem: Override local preference
Solution: WEIGHT
690
1755 1880
666
660
Customer A Customer B
Full Routes Customer Routes
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 16
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 8
BGP ATTRIBUTES: COMMUNITY
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 18
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 9
BGP ATTRIBUTES: COMMUNITY
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 19
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 10
Route Map “Set” Capabilities
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 21
BGP Attributes
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 11
Basic Decision Algorithm
Highest WEIGHT
Highest LOCAL PREFERENCE
LOCALLY ORIGINATED (eg network/aggregate)
Shortest AS-PATH
Lowest ORIGIN (IGP < EGP < incomplete)
Lowest MED
EBGP
IBGP
Lowest IGP METRIC to next-hop
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 23
Synchronization
690
A 1880
209
B
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 12
General Issues
So Far….
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 26
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 13
Deploying Internal BGP
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 27
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 28
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 14
Guidelines for Scaling IBGP
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 30
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 15
What Is a Peer Group?
13 Routers =>
78 IBGP
Sessions!
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 32
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 16
Using Route Reflectors
RR
RR
Cluster A
Cluster B
RRC
RR
Cluster C RRC
RR
309 Cluster D
0945_05f9_c2x © 1999, Cisco Systems, Inc. 33
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 34
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 17
Deploying Route Reflectors
Hierarchical RR
Router id
RR 140.10.1.1
141.153.30.1
A RR Router id
141.153.17.1
• Example: B C
RouterB>sh ip bgp 198.10.10.0 Router id D
141.153.17.2
BGP routing table entry for 198.10.10.0/24
3
141.153.14.2 from 141.153.30.1 (141.153.17.2)
Origin IGP, metric 0, localpref 100, valid, internal, 141.153.14.2
best
Originator : 141.153.17.2 AS3
Cluster list: 144.10.1.1, 141.153.17.1 198.10.0.0
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 36
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 18
BGP ATTRIBUTES: ORIGINATOR_ID
• ORIGINATOR_ID
Router ID of IBGP speaker that reflects
RR client routes to non-clients
Overridden by: bgp cluster-id x.x.x.x
• Useful for troubleshooting and loop
detection
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 37
• CLUSTER_LIST
String of ORIGINATOR_IDs through
which the route has passed
• Useful for troubleshooting and loop
detection
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 38
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 19
So Far….
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 39
Customer Issues
ISP Issues
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 40
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 20
Customer Issues
• Steps:
Configure BGP
Generate a stable aggregate
Set inbound policy
Set output policy
Configure loadsharing/multihoming
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 41
Connecting to an ISP
AS 200
AS100 is a customer of AS200
10.0.0.0
Usually directly connected A
.1
Router B: 10.200.0.0
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 21
What Is Aggregation?
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 43
How to Aggregate
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 22
Why aggregate?
BGP Attributes
ATOMIC AGGREGATE
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 23
BGP Attributes: Aggregator
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 47
Aggregate Attributes
NEXT_HOP = local
WEIGHT = 32768
LOCAL_PREF = best
AS_PATH = AS_SET or nothing
ORIGIN = worst
MED = none
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 48
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 24
Why Inbound Policy?
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 49
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 50
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 25
Load-sharing - single path
Router A:
interface loopback 0
ip address 10.60.0.1 255.255.255.255
!
router bgp 100
neighbor 10.200.0.2 remote-as 200
neighbor 10.200.0.2 update-source loopback0
neighbor 10.200.0.2 ebgp-multi-hop 2
Loopback 0
10.200.0.2
A
100 200
Router A:
router bgp 100
neighbor 10.200.0.1 remote-as 200
neighbor 10.300.0.1 remote-as 200
maximum-paths 6
A
100 200
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 26
What is Multihoming?
Types of Multihoming
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 54
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 27
Default from all providers
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 55
AS 100
160.10.0.0/16
AS 200 AS 300
D E
0.0.0.0 0.0.0.0
A B
C chooses lowest
IGP metric to
AS 400
default
C
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 56
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 28
Customer+default from all
providers
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 57
Customer
AS 100
160.10.0.0/16
Provider Provider
AS 200 AS 300
D E
A B
C chooses shortest
AS path
AS 400
C
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 58
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 29
Customer routes from all
providers
Customer
AS 100
160.10.0.0/16
Provider Provider
AS 200 AS 300
D E
800
A B
C chooses highest AS 400 ip prefix-list AS100 permit
local-preference 16.10.0.0/16
route-map AS300in permit 10
C
match ip address prefix-list AS100
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. set local-preference 800 59
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 60
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 30
Full routes from all providers
AS 100 AS 500
AS 200 AS 300
D E
A B
C chooses shortest
AS path
AS 400
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 61
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 62
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 31
Controlling Inbound Traffic?
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 63
Provider Provider
AS 200 AS 300
D E
A B
AS 400
10.1.0.0 ip prefix-list AS100 permit 10.1.0.0/16
route-map AS300out permit 10
C match ip address prefix-list AS100
set as-path prepend 400
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 64
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 32
Using an advertise-map
R2 R4
10.15.7/24
1.10.6/24
1.10.6.1 10.15.7.4
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 65
So Far….
Stability through:
Aggregation
Multihoming
Inbound/Outbound Filtering
Scalability of memory/CPU:
default, customer routes, full routes
Simplicity using “standard” solutions
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 66
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 33
ISP Issues
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 67
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 68
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 34
Customer Aggregation
CORE
cust-default peer-group
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 35
cust-full outgoing route-map
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 71
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 72
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 36
cust-cust peer-group
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 73
cust-routes route-map
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 74
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 37
default route peer-group
default-route route-map
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 76
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 38
Peer groups for NAPs
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 78
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 39
Peer groups for NAPS
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 79
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 40
Peer groups for NAPS:
sanity-check prefix-list
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 81
Summary
• Scalability:
Use attributes, especially community
Use peer-groups and route-reflectors
• Stability:
Use loopback addresses for IBGP
Generate aggregates
Apply passwords
Always filter inbound and outbound
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 82
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 41
Summary
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 83
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 42
Thank You!
• Related presentations:
Advanced BGP and Troubleshooting
• Questions?
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 85
309
606
0945_05f9_c2x
0921_04F9_c3 © 1999, Cisco Systems, Inc. 86
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 43
309
0945_05f9_c2x © 1999, Cisco Systems, Inc. 87
Copyright © 1998, Cisco Systems, Inc. All rights reserved. Printed in USA.
0945_05f9_c2x.scr 44