BGP Multihoming Examples
BGP Multihoming Examples
47
Two links to the same ISP
(one as backup only)
• Applies when end-site has bought a large
primary WAN link to their upstream a small
secondary WAN link as the backup
– For example, primary path might be an E1, backup
might be 64kbps
48
Two links to the same ISP
(one as backup only)
primary
C
A
AS 100 AS 65534
E B
D
backup
49
Two links to the same ISP
(one as backup only)
• Announce /19 aggregate on each link
– primary link:
• Outbound – announce /19 unaltered
• Inbound – receive default route
– backup link:
• Outbound – announce /19 with increased metric
• Inbound – received default, and reduce local preference
• When one link fails, the announcement of the /19
aggregate via the other link ensures continued
connectivity
50
Two links to the same ISP
(one as backup only)
• Router A Configuration
router bgp 65534
network 121.10.0.0 mask 255.255.224.0
neighbor 122.102.10.2 remote-as 100
neighbor 122.102.10.2 description RouterC
neighbor 122.102.10.2 prefix-list aggregate out
neighbor 122.102.10.2 prefix-list default in
!
ip prefix-list aggregate permit 121.10.0.0/19
ip prefix-list default permit 0.0.0.0/0
!
ip route 121.10.0.0 255.255.224.0 null0
51
Two links to the same ISP
(one as backup only)
• Router B Configuration
router bgp 65534
network 121.10.0.0 mask 255.255.224.0
neighbor 122.102.10.6 remote-as 100
neighbor 122.102.10.6 description RouterD
neighbor 122.102.10.6 prefix-list aggregate out
neighbor 122.102.10.6 route-map routerD-out out
neighbor 122.102.10.6 prefix-list default in
neighbor 122.102.10.6 route-map routerD-in in
!
..next slide
52
Two links to the same ISP
(one as backup only)
ip prefix-list aggregate permit 121.10.0.0/19
ip prefix-list default permit 0.0.0.0/0
!
ip route 121.10.0.0 255.255.224.0 null0
!
route-map routerD-out permit 10
set metric 10
!
route-map routerD-in permit 10
set local-preference 90
!
53
Two links to the same ISP
(one as backup only)
• Router C Configuration (main link)
router bgp 100
neighbor 122.102.10.1 remote-as 65534
neighbor 122.102.10.1 default-originate
neighbor 122.102.10.1 prefix-list Customer in
neighbor 122.102.10.1 prefix-list default out
!
ip prefix-list Customer permit 121.10.0.0/19
ip prefix-list default permit 0.0.0.0/0
54
Two links to the same ISP
(one as backup only)
• Router D Configuration (backup link)
router bgp 100
neighbor 122.102.10.5 remote-as 65534
neighbor 122.102.10.5 default-originate
neighbor 122.102.10.5 prefix-list Customer in
neighbor 122.102.10.5 prefix-list default out
!
ip prefix-list Customer permit 121.10.0.0/19
ip prefix-list default permit 0.0.0.0/0
55
Two links to the same ISP
(one as backup only)
• Router E Configuration
router bgp 100
neighbor 122.102.10.17 remote-as 110
neighbor 122.102.10.17 remove-private-AS
neighbor 122.102.10.17 prefix-list Customer out
!
ip prefix-list Customer permit 121.10.0.0/19
• Router E removes the private AS and customer s subprefixes
from external announcements
• Private AS still visible inside AS100
56
Two links to the same ISP
With Loadsharing
57
Loadsharing to the same ISP
• More common case
• End sites tend not to buy circuits and leave
them idle, only used for backup as in previous
example
• This example assumes equal capacity circuits
– Unequal capacity circuits requires more
refinement – see later
58
Loadsharing to the same ISP
Link one
C
A
AS 100 AS 65534
E B
D
Link two
59
Loadsharing to the same ISP
(with redundancy)
• Announce /19 aggregate on each link
• Split /19 and announce as two /20s, one on each link
– basic inbound loadsharing
– assumes equal circuit capacity and even spread of traffic across
address block
• Vary the split until perfect loadsharing achieved
• Accept the default from upstream
– basic outbound loadsharing by nearest exit
– okay in first approx as most ISP and end-site traffic is inbound
60
Loadsharing to the same ISP
(with redundancy)
• Router A Configuration
router bgp 65534
network 121.10.0.0 mask 255.255.224.0
network 121.10.0.0 mask 255.255.240.0
neighbor 122.102.10.2 remote-as 100
neighbor 122.102.10.2 prefix-list routerC out
neighbor 122.102.10.2 prefix-list default in
!
ip prefix-list default permit 0.0.0.0/0
ip prefix-list routerC permit 121.10.0.0/20
ip prefix-list routerC permit 121.10.0.0/19
!
ip route 121.10.0.0 255.255.240.0 null0
ip route 121.10.0.0 255.255.224.0 null0
61
Loadsharing to the same ISP
(with redundancy)
• Router B Configuration
router bgp 65534
network 121.10.0.0 mask 255.255.224.0
network 121.10.16.0 mask 255.255.240.0
neighbor 122.102.10.6 remote-as 100
neighbor 122.102.10.6 prefix-list routerD out
neighbor 122.102.10.6 prefix-list default in
!
ip prefix-list default permit 0.0.0.0/0
ip prefix-list routerD permit 121.10.16.0/20
ip prefix-list routerD permit 121.10.0.0/19
!
ip route 121.10.16.0 255.255.240.0 null0
ip route 121.10.0.0 255.255.224.0 null0
62
Loadsharing to the same ISP
(with redundancy)
• Router C Configuration
router bgp 100
neighbor 122.102.10.1 remote-as 65534
neighbor 122.102.10.1 default-originate
neighbor 122.102.10.1 prefix-list Customer in
neighbor 122.102.10.1 prefix-list default out
!
ip prefix-list Customer permit 121.10.0.0/19 le 20
ip prefix-list default permit 0.0.0.0/0
• Router C only allows in /19 and /20 prefixes from customer
block
• Router D configuration is identical
63
Loadsharing to the same ISP
(with redundancy)
• Router E Configuration
router bgp 100
neighbor 122.102.10.17 remote-as 110
neighbor 122.102.10.17 remove-private-AS
neighbor 122.102.10.17 prefix-list Customer out
!
ip prefix-list Customer permit 121.10.0.0/19
• Private AS still visible inside AS100
64
Loadsharing to the same ISP
(with redundancy)
• Default route for outbound traffic?
– Use default-information originate for the IGP and
rely on IGP metrics for nearest exit
– e.g. on router A:
65
Loadsharing to the same ISP
(with redundancy)
• Loadsharing configuration is only on customer
router
• Upstream ISP has to
– remove customer subprefixes from external
announcements
– remove private AS from external announcements
• Could also use BGP communities
66
Two links to the same ISP
67
Multiple Dualhomed Customers
(RFC2270)
• Unusual for an ISP just to have one
dualhomed customer
– Valid/valuable service offering for an ISP with
multiple PoPs
– Better for ISP than having customer multihome
with another provider!
• Look at scaling the configuration
– Simplifying the configuration
– Using templates, peer-groups, etc
– Every customer has the same configuration
(basically)
68
Multiple Dualhomed Customers
(RFC2270)
C
A1
AS 65534
AS 100 B1
E D A2
AS 65534
B2
A3
AS 65534
• Border router E in AS100 removes private AS
and any customer subprefixes from Internet B3
announcement
69
Multiple Dualhomed Customers
(RFC2270)
• Customer announcements as per previous
example
• Use the same private AS for each customer
– documented in RFC2270
– address space is not overlapping
– each customer hears default only
• Router An and Bn configuration same as
Router A and B previously
70
Multiple Dualhomed Customers
(RFC2270)
• Router A1 Configuration
router bgp 65534
network 121.10.0.0 mask 255.255.224.0
network 121.10.0.0 mask 255.255.240.0
neighbor 122.102.10.2 remote-as 100
neighbor 122.102.10.2 prefix-list routerC out
neighbor 122.102.10.2 prefix-list default in
!
ip prefix-list default permit 0.0.0.0/0
ip prefix-list routerC permit 121.10.0.0/20
ip prefix-list routerC permit 121.10.0.0/19
!
ip route 121.10.0.0 255.255.240.0 null0
ip route 121.10.0.0 255.255.224.0 null0
71
Multiple Dualhomed Customers
(RFC2270)
• Router B1 Configuration
router bgp 65534
network 121.10.0.0 mask 255.255.224.0
network 121.10.16.0 mask 255.255.240.0
neighbor 122.102.10.6 remote-as 100
neighbor 122.102.10.6 prefix-list routerD out
neighbor 122.102.10.6 prefix-list default in
!
ip prefix-list default permit 0.0.0.0/0
ip prefix-list routerD permit 121.10.16.0/20
ip prefix-list routerD permit 121.10.0.0/19
!
ip route 121.10.0.0 255.255.224.0 null0
ip route 121.10.16.0 255.255.240.0 null0
72
Multiple Dualhomed Customers
(RFC2270)
• Router C Configuration
router bgp 100
neighbor bgp-customers peer-group
neighbor bgp-customers remote-as 65534
neighbor bgp-customers default-originate
neighbor bgp-customers prefix-list default out
neighbor 122.102.10.1 peer-group bgp-customers
neighbor 122.102.10.1 description Customer One
neighbor 122.102.10.1 prefix-list Customer1 in
neighbor 122.102.10.9 peer-group bgp-customers
neighbor 122.102.10.9 description Customer Two
neighbor 122.102.10.9 prefix-list Customer2 in
73
Multiple Dualhomed Customers
(RFC2270)
neighbor 122.102.10.17 peer-group bgp-customers
neighbor 122.102.10.17 description Customer Three
neighbor 122.102.10.17 prefix-list Customer3 in
!
ip prefix-list Customer1 permit 121.10.0.0/19 le 20
ip prefix-list Customer2 permit 121.16.64.0/19 le 20
ip prefix-list Customer3 permit 121.14.192.0/19 le 20
ip prefix-list default permit 0.0.0.0/0
74
Multiple Dualhomed Customers
(RFC2270)
• Router D Configuration
router bgp 100
neighbor bgp-customers peer-group
neighbor bgp-customers remote-as 65534
neighbor bgp-customers default-originate
neighbor bgp-customers prefix-list default out
neighbor 122.102.10.5 peer-group bgp-customers
neighbor 122.102.10.5 description Customer One
neighbor 122.102.10.5 prefix-list Customer1 in
neighbor 122.102.10.13 peer-group bgp-customers
neighbor 122.102.10.13 description Customer Two
neighbor 122.102.10.13 prefix-list Customer2 in
75
Multiple Dualhomed Customers
(RFC2270)
neighbor 122.102.10.21 peer-group bgp-customers
neighbor 122.102.10.21 description Customer Three
neighbor 122.102.10.21 prefix-list Customer3 in
!
ip prefix-list Customer1 permit 121.10.0.0/19 le 20
ip prefix-list Customer2 permit 121.16.64.0/19 le 20
ip prefix-list Customer3 permit 121.14.192.0/19 le 20
ip prefix-list default permit 0.0.0.0/0
76
Multiple Dualhomed Customers
(RFC2270)
• Router E Configuration
– assumes customer address space is not part of upstream s address
block
router bgp 100
neighbor 122.102.10.17 remote-as 110
neighbor 122.102.10.17 remove-private-AS
neighbor 122.102.10.17 prefix-list Customers out
!
ip prefix-list Customers permit 121.10.0.0/19
ip prefix-list Customers permit 121.16.64.0/19
ip prefix-list Customers permit 121.14.192.0/19
78
Multihoming Summary
• Use private AS for multihoming to the same
upstream
• Leak subprefixes to upstream only to aid
loadsharing
• Upstream router E configuration is identical
across all situations
79