Professional Documents
Culture Documents
BGP and The Internet: Definitions
BGP and The Internet: Definitions
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 1 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 2
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 3 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 4
ISP Transit
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 5 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 6
1
ISP Transit ISP Transit
• Router A Configuration
router bgp 130
• Router B announces default to Router A, only • Router C announces default to Router D, only
accepts customer /19 accepts customer /19
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 9 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 10
• Router D Configuration
router bgp 100
• This is simple case:
network 219.0.0.0 mask 255.255.224.0 if AS130 or AS100 get another address block, it
neighbor 222.222.20.2 remote- as 120 requires AS120 and their own filters to be
neighbor 222.222.20.2 prefix- list upstream out changed
neighbor 222.222.20.2 prefix- list default i n some ISP transit provider are better skilled at doing
! this than others!
ip prefix- list default permit 0.0.0.0/0 May not scale if they are frequently adding new
ip prefix- list upstream permit 219.0.0.0/19 prefixes
!
ip route 219.0.0.0 255.255.224.0 null0
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 11 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 12
2
ISP Transit
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 13 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 14
• Router A Configuration
router bgp 130
AS 120 A AS 130
B network 221.10.0.0 mask 255.255.224.0
neighbor 222.222.10.2 remote- as 120
C neighbor 222.222.10.2 prefix- list upstream out
AS 100 !
ip prefix- list upstream permit 221.10.0.0/19
!
• AS120 is transit provider between AS130 and ip route 221.10.0.0 255.255.224.0 null0
AS100
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 15 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 16
• Router B announces AS120 and AS100 prefixes • Router C announces default to Router D, only
to Router A, only accepts customer /19 accepts customer /19
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 17 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 18
3
ISP Transit ISP Transit
• Router D Configuration
router bgp 100
network 219.0.0.0 mask 255.255.224.0 • AS130 only hears AS120 and AS100
neighbor 222.222.20.2 remote- as 120 prefixes
neighbor 222.222.20.2 prefix- list upstream out
neighbor 222.222.20.2 prefix- list default i n inbound AS path filter on Router A is optional,
! but good practice (never trust a peer)
ip prefix- list default permit 0.0.0.0/0
inbound Martian prefix-list filters are mandatory
ip prefix- list upstream permit 219.0.0.0/19
on all Internet peerings
!
ip route 219.0.0.0 255.255.224.0 null0
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 19 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 20
ISP Transit
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 21 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 22
• Router A Configuration
AS 105 router bgp 130
network 221.10.0.0 mask 255.255.224.0
AS 120 A AS 130
B neighbor 222.222.10.2 remote- as 120
AS 104
neighbor 222.222.10.2 prefix- list upstream- out out
C AS 101 AS 103 neighbor 222.222.10.2 filter- list 5 out
D AS 102
neighbor 222.222.10.2 prefix- list upstream- in in
AS 100 !
ip route 221.10.0.0 255.255.224.0 null0 250
!
• AS130 has several customer ASes connecting
..next slide
to its backbone
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 23 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 24
4
ISP Transit ISP Transit
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 25 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 26
• Router B Configuration
! Inbound Martian prefixes to be blocked from eBGP peers
router bgp 120
ip prefix-list upstream-in deny 0.0.0.0/8 le 32
ip prefix-list upstream-in deny 10.0.0.0/8 le 32 neighbor 222.222.10.1 remote- as 130
ip prefix-list upstream-in deny 127.0.0.0/8 le 32 neighbor 222.222.10.1 prefix- list rfc1918 -sua in
ip prefix-list upstream-in deny 169.254.0.0/16 le 32 neighbor 222.222.10.1 prefix- list rfc1918 -sua out
ip prefix-list upstream-in deny 172.16.0.0/12 le 32
neighbor 222.222.10.1 filter- list 10 i n
ip prefix-list upstream-in deny 192.0.2.0/24 le 32
ip prefix-list upstream-in deny 192.168.0.0/16 le 32 neighbor 222.222.10.1 filter- list 15 out
ip prefix-list upstream-in deny 224.0.0.0/3 le 32 !
ip prefix-list upstream-in deny 0.0.0.0/0 ge 25 ip as- path access- list 15 permit ^$
! Extra prefixes
ip as- path access- list 15 permit ^100$
ip prefix-list upstream-in deny 221.10.0.0/19 le 32
ip prefix-list upstream-in permit 0.0.0.0/0 le 32 Router B announces AS120 and AS100 prefixes to
! Router A, and accepts all AS130 customer ASes
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 27 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 28
• Router C Configuration
router bgp 120 • Router D Configuration
router bgp 100
neighbor 222.222.20.1 remote-as 100
network 219.0.0.0 mask 255.255.224.0
neighbor 222.222.20.1 default-originate
neighbor 222.222.20.2 remote- as 120
neighbor 222.222.20.1 prefix-list Customer100 in
neighbor 222.222.20.2 prefix- list upstream out
neighbor 222.222.20.1 prefix-list default out neighbor 222.222.20.2 prefix- list default i n
! !
ip prefix-list Customer100 permit 219.0.0.0/19 ip prefix- list default permit 0.0.0.0/0
ip prefix-list default permit 0.0.0.0/0 ip prefix- list upstream permit 219.0.0.0/19
!
• Router C announces default to Router D, only ip route 219.0.0.0 255.255.224.0 null0
accepts customer /19
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 29 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 30
5
ISP Transit
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 31 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 32
• Router A Configuration
• Router A configuration is greatly
router bgp 130
simplified
network 221.10.0.0 mask 255.255.224.0 route -map setcomm
all prefixes to be announced to upstream are neighbor 222.222.10.2 remote-as 120
marked with community 130:5100 neighbor 222.222.10.2 prefix-list upstream-out out
neighbor 222.222.10.2 route-map to-AS120 out
route -map on outbound peering implements
community policy neighbor 222.222.10.2 prefix-list upstream-in in
!
Martian prefix-lists still required
ip route 221.10.0.0 255.255.224.0 null0 250
!
..next slide
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 35 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 36
6
ISP Transit ISP Transit
! • Router E Configuration
ip community-list 5 permit 130:5100 router bgp 130
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 41 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 42
7
Exchange Point
Exchange Point Router A configuration
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 47 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 48
8
Exchange Point
• Issues:
AS100 needs to know all the prefixes its peers are
announcing
New prefixes requires the prefix-lists to be updated
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 49 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 50
AS200
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 51 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 52
Exchange Point
Router A configuration Exchange Point
interface fastethernet 0/0 neighbor 220.5.10.2 remote-as 110
description Exchange Point LAN neighbor 222.5.10.2 peer-group ixp-peers
ip address 220.5.10.2 mask 255.255.255.224 neighbor 222.5.10.2 prefix-list peer110 in
ip verify unicast reverse-path neighbor 220.5.10.3 remote-as 120
no ip directed-broadcast neighbor 222.5.10.3 peer-group ixp-peers
no ip proxy-arp neighbor 222.5.10.3 prefix-list peer120 in
no ip redirects neighbor 220.5.10.4 remote-as 130
! neighbor 222.5.10.4 peer-group ixp-peers
router bgp 100 neighbor 222.5.10.4 prefix-list peer130 in
network 221.10.0.0 mask 255.255.224.0 neighbor 220.5.10.5 remote-as 140
neighbor ixp-peers peer -group neighbor 222.5.10.5 peer-group ixp-peers
neighbor ixp-peers soft -reconfiguration in neighbor 222.5.10.5 prefix-list peer140 in
neighbor ixp-peers prefix-list rfc1918-sua out neighbor 220.5.10.6 remote-as 150
neighbor ixp-peers filter-list 10 out neighbor 222.5.10.6 peer-group ixp-peers
..next slide neighbor 222.5.10.6 prefix-list peer150 in
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 53 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 54
9
Exchange Point Exchange Point
!
ip route 221.10.0.0 255.255.224.0 null0
!
• Notice the change in router A’s
ip as-path access -list 10 permit ^$ configuration
ip as-path access -list 1 0 permit ^200$
ip as-path access -list 1 0 permit ^201$
filter-list instead of prefix-list permits local and
!
customer ASes out to exchange
ip prefix- list myprefixes permit 221.10.0.0/19
prefix-list blocks Special Use Address prefixes
ip prefix- list peer110 permit 222.0.0.0/19
– rest get out, could be risky
ip prefix- list peer120 permit 222.30.0.0/19
ip prefix- list peer130 permit 222.12.0.0/19 • Other issues as previously
ip prefix- list peer140 permit 222.18.128.0/19
ip prefix- list peer150 permit 222.1.32.0/19
!
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 55 Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 56
Cisco ISP Workshops © 2003, Cisco Systems, Inc. All rights reserved. 57
10