BGP and The Internet
BGP and The Internet
BGP and The Internet
Communities
Private AS
C
A
AS 100 AS 65534
B
Loadsharing Using E D
Communities
4 links – Private AS • AS100 removes private AS and any customer
subprefixes from Internet announcement
Communities Communities
Private AS Private AS
• Vary the split until “perfect” loadsharing neighbor 122.102.10.2 prefix-list default in
achieved !
..next slide
use the no-export community for subprefixes
Cisco ISP Cisco ISP
Workshops © 2004, Cisco Systems, Inc. All rights reserved. 5 Workshops © 2004, Cisco Systems, Inc. All rights reserved. 6
1
Communities Communities
Private AS Private AS
Communities Communities
Private AS Private AS
• Router E Configuration
ip prefix-list subblocks2 permit 121.10.0.0/19 router bgp 100
ip prefix-list subblocks2 permit 121.10.24.0/21 neighbor 122.102.10.17 remote-as 110
! neigbhor 122.102.10.17 remove-private-AS
ip prefix-list secondblock permit 121.10.24.0/21 !
ip prefix-list default permit 0.0.0.0/0
! • Router E removes the private AS from external
route-map routerD-out permit 10 announcements
match ip address prefix-list secondblock
• Router E automatically removes subprefixes
set community no-export
with no-export community set
route-map routerD-out permit 20
• Private AS still visible inside AS100
Cisco ISP Cisco ISP
Workshops © 2004, Cisco Systems, Inc. All rights reserved. 9 Workshops © 2004, Cisco Systems, Inc. All rights reserved. 10
Communities
Private AS
2
Communities Communities
Public AS Public AS
Communities Communities
Public AS Public AS
Communities Communities
Public AS Public AS
3
Communities Communities
Public AS Public AS
Communities Communities
Public AS Public AS
• Router E Configuration
router bgp 100 • AS100 routers will not advertise prefixes
neighbor 122.102.10.17 remote-as 110 marked with community no-export to other ASes
neighbor 122.102.10.17 filter-list 1 out
! • AS100 ISP has no configuration work to do
ip as-path access-list 1 permit ^130$ AS130 ISP can control his own loadsharing
ip as-path access-list 1 permit ^$
• Only a single /19 prefix is announced to the
• Router E only has to announce AS130 in the same Internet - no routing table bloat! :-)
way it announces other ASes
RFC1998
• Informational RFC
• Describes how to implement loadsharing and backup
on multiple inter-AS links
BGP communities used to determine local preference in
RFC1998 upstream’s network
4
RFC1998 RFC1998
RFC1998 RFC1998
RFC1998
• Supporting RFC1998
many ISPs do, more should
check AS object in the Internet Routing
Registry Two links to the same ISP
if you do, insert comment in AS object in the
IRR One link primary, the other link backup only
5
Two links to the same ISP
Two links to the same ISP
(one as backup only)
primary
C
A
• Announce /19 aggregate on each link
AS 100 AS 65534
primary link makes standard announcement
E B
D backup link sends community
backup
• When one link fails, the announcement of
• AS100 proxy aggregates for AS 65534 the /19 aggregate via the other link ensures
continued connectivity
Two links to the same ISP Two links to the same ISP
(one as backup only) (one as backup only)
• Router B Configuration
• Router A Configuration router bgp 65534
router bgp 65534
network 121.10.0.0 mask 255.255.224.0
network 121.10.0.0 mask 255.255.224.0
neighbor 122.102.10.6 remote-as 100
neighbor 122.102.10.2 remote-as 100
neighbor 122.102.10.6 description RouterD
neighbor 122.102.10.2 description RouterC
neighbor 122.102.10.6 send-community
neighbor 122.102.10.2 prefix-list aggregate out
neighbor 122.102.10.6 prefix-list aggregate out
neighbor 122.102.10.2 prefix-list default in
neighbor 122.102.10.6 route-map routerD-out out
!
neighbor 122.102.10.6 prefix-list default in
ip prefix-list aggregate permit 121.10.0.0/19
neighbor 122.102.10.6 route-map routerD-in in
ip prefix-list default permit 0.0.0.0/0
!
!
..next slide
Cisco ISP Cisco ISP
Workshops © 2004, Cisco Systems, Inc. All rights reserved. 33 Workshops © 2004, Cisco Systems, Inc. All rights reserved. 34
Two links to the same ISP Two links to the same ISP
(one as backup only) (one as backup only)
6
Two links to the same ISP Two links to the same ISP
(one as backup only) (one as backup only)
• Router E Configuration
router bgp 100
network 121.10.0.0 mask 255.255.224.0
neighbor 122.102.10.17 remote-as 110
neighbor 122.102.10.17 filter-list 1 out
!
ip as-path access-list 1 deny ^(65534_)+$
ip as-path access-list 1 permit ^$
Two links to different ISPs
ip route 121.10.0.0 255.255.224.0 null0
One link primary, the other link backup only
• Router E removes prefixes in the private AS from
external announcements
• Private AS still visible inside AS100
Cisco ISP Cisco ISP
Workshops © 2004, Cisco Systems, Inc. All rights reserved. 39 Workshops © 2004, Cisco Systems, Inc. All rights reserved. 40
Internet
• Announce /19 aggregate on each link
main link sends community 100:100 – this sets
AS 100 AS 120
local pref in AS100 to 100
C D
backup link sends community 120:80 – this sets
Announce /19 block local pref in AS120 to 80
Announce /19 block with special community
A B • When one link fails, the announcement of
the /19 aggregate via the other link ensures
AS 130
continued connectivity
Cisco ISP Cisco ISP
Workshops © 2004, Cisco Systems, Inc. All rights reserved. 41 Workshops © 2004, Cisco Systems, Inc. All rights reserved. 42
7
Two links to different ISPs Two links to different ISPs
(one as backup only) (one as backup only)
• Router A Configuration
router bgp 130
network 121.10.0.0 mask 255.255.224.0
• Note that this assumes that AS100 and neighbor 122.102.10.1 remote-as 100
AS120 are interconnected neighbor 122.102.10.1 prefix-list aggregate out
neighbor 122.102.10.1 route-map routerC-out out
• If they are not, AS path length “stuffing” has neighbor 122.102.10.1 prefix-list default in
to be used too !
ip prefix-list aggregate permit 121.10.0.0/19
but that can be done on a per community basis
ip prefix-list default permit 0.0.0.0/0
also
!
route-map routerC-out permit 10
set community 100:100
Cisco ISP Cisco ISP
Workshops © 2004, Cisco Systems, Inc. All rights reserved. 43 Workshops © 2004, Cisco Systems, Inc. All rights reserved. 44
• Router D
sees path from router B with community 120:80
set – sets local preference to 80 • Router D
sees path from peering with AS100 – default local Only requires RFC1998 configuration
preference is 100
no per customer configuration
local-pref comes before AS Path length
scalability!
highest local-pref wins
traffic for AS130 is sent to AS100
Cisco ISP Cisco ISP
Workshops © 2004, Cisco Systems, Inc. All rights reserved. 47 Workshops © 2004, Cisco Systems, Inc. All rights reserved. 48
8
Two links to different ISPs Two links to different ISPs
(one as backup only) (one as backup only)
Internet
Background
9
Some ISP Examples Some ISP Examples
AAPT MCI Europe
aut-num: AS2764 aut-num: AS702
as-name: ASN-CONNECT-NET descr: MCI EMEA - Commercial IP service provider in Europe
descr: AAPT Limited remarks: MCI uses the following communities with its customers:
admin-c: CNO2-AP 702:80 Set Local Pref 80 within AS702
tech-c: CNO2-AP 702:120 Set Local Pref 120 within AS702
remarks: Community support definitions 702:20 Announce only to MCI AS'es and MCI customers
remarks:
702:30 Keep within Europe, don't announce to other MCI AS's
remarks: Community Definition
remarks: ------------------------------------------------ 702:1 Prepend AS702 once at edges of MCI to Peers
remarks: 2764:2 Don't announce outside local POP 702:2 Prepend AS702 twice at edges of MCI to Peers
remarks: 2764:4 Lower local preference by 15 702:3 Prepend AS702 thrice at edges of MCI to Peers
remarks: 2764:5 Lower local preference by 5 Advanced communities for customers
remarks: 2764:6 Announce to customers and all peers 702:7020 Do not announce to AS702 peers with a scope of
(incl int'l peers), but not transit National but advertise to Global Peers, European
remarks: 2764:7 Announce to customers only Peers and MCI customers.
remarks: 2764:14 Announce to AANX 702:7001 Prepend AS702 once at edges of MCI to AS702
notify: [email protected]
peers with a scope of National.
mnt-by: CONNECT-AU
702:7002 Prepend AS702 twice at edges of MCI to AS702
changed: [email protected] 20050225
peers with a scope of National.
source: CCAIR
(more)
More at http://info.connect.com.au/docs/routing/general/multi-faq.shtml#q13
Cisco ISP Cisco ISP
Workshops © 2004, Cisco Systems, Inc. All rights reserved. 55 Workshops © 2004, Cisco Systems, Inc. All rights reserved. 56
10
Creating your own community policy Communities
Cisco ISP
Workshops © 2004, Cisco Systems, Inc. All rights reserved. 63
11