53
Multihoming

Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

  • Upload
    others

  • View
    5

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Multihoming

Page 2: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Customer’s Expectation

Page 3: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

But it’s really just…

Page 4: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Until this happens

Page 5: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Why Multihome?

•  Redundancy –  Avoid a circuit down taking your business down –  Multiple ways of doing this

•  Performance –  Maybe provider A’s connectivity is different to provider B’s –  Asia focus, Europe focus –  Satellite versus fibre

•  Money –  Good, Fast, Cheap – Pick Two –  Buy transit but also peer where you can

Page 6: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

6

Achieving Redundancy •  More than one path to the same ISP

–  Dual-homed

YOU

YOU ISP

ISP YOU

ISP

Single-homed

Dual-homed

Page 7: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

7

Achieving Redundancy – Multihoming

•  More than one upstream ISP –  Multi-homed

ISP2

ISP1

YOU

YOU

ISP2

ISP1

Page 8: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Achieving redundancy - Multihoming

•  Logical conclusion

8

ISP2

ISP1

YOU

ISP2

ISP1

Page 9: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

9

Multihoming with peering

•  One upstream and local peering

You

ISP-A

Internet

Transit

Local Peer Peering

Page 10: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

10

Multihoming

•  More than one upstream ISP and local peering

You

ISP-B ISP-A

Internet

Transit

Local Peer Peering

Page 11: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

11

Multihoming

•  More than one upstream ISP with local and public peering

You

ISP-B ISP-A

Internet

Transit

Local Peer Peering

IXP

Peering

Page 12: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Traffic Engineering

•  Remember the prefixes YOU ACCEPT control how YOU SEND traffic

•  Prefixes YOU ANNOUNCE can influence the path traffic RETURNING to you –  There is no guarantee as the other party has control over sending

traffic towards you

12

Page 13: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Traffic Engineering – Accept

•  Use Local Preference to control that path you set as the best path as it is the first BGP selection criterion

•  Often you will see the Local Preference set so that –  Customer > Peer > Transit –  Follow the money!

•  Just because someone sends you a prefix doesn’t mean you have to accept it

13

Page 14: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Traffic Engineering – Announce

•  You can use AS path prepending to try to influence your neighbour’s best path but they may be using Local Preference too

•  Sometimes a more specific aggregate can help if you announce them to the preferred path but not others –  Remember to send the least specific aggregate to everyone –  Tag the more specific aggregates with the “no_export” community if

possible –  Be careful that you only do this to YOUR aggregates

•  Use MED when there are multiple links to the same AS to signal a preferred path (may be ignored without prior negotiation)

14

Page 15: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Two Upstream – One backup

15

•  Both incoming and outgoing traffic via R1

•  R2 path to be used only if the path via R1 fails

–  AS-PATH to control inbound traffic –  LOCAL-PREF for outbound

AS 17821

AS 30 AS 20

Internet

Primary Backup

R1 R2

Page 16: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

•  Always announce the aggregate on both!

•  R1 (main link) config:

16

Two Upstream – One backup

router bgp 17821network 100.100.0.0 mask 255.255.224.0neighbor 20.20.20.1 remote-as 20neighbor 20.20.20.1 prefix-list AGGR outneighbor 20.20.20.1 prefix-list DEF in!ip prefix-list AGGR permit 100.100.0.0/19ip prefix-list DEF permit 0.0.0.0/0!ip route 100.100.0.0 255.255.224.0 null0

Prefix-list applied to outbound routes

Prefix-list applied to inbound routes

Advertise aggregate in BGP

Define the prefix-lists

Aggregate should exist in the routing table

(pull-up route)

Page 17: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

•  R2 (backup) config:

17

router bgp 17821network 100.100.0.0 mask 255.255.224.0neighbor 30.30.30.1 remote-as 30neighbor 30.30.30.1 route-map BACKUP-OUT outneighbor 30.30.30.1 route-map BACKUP-IN in!ip prefix-list AGGR permit 100.100.0.0/19ip prefix-list DEF permit 0.0.0.0/0!ip route 100.100.0.0 255.255.224.0 null0!route-map BACKUP-OUT permit 10 match ip address prefix-list AGGR set as-path prepend 17821 17821 17821!route-map BACKUP-IN permit 10 match ip address prefix-list DEF set local-preference 80

Route-map applied to outbound routes

Advertise aggregate in BGP

Define the prefix-lists

BACKUP-OUT prepends the AS-PATH for all

outbound BGP updates

Route-map applied to inbound routes

BACKUP-IN sets lower local-pref for all inbound

BGP updates

Two Upstream – One backup

Page 18: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Two Upstream – Load Sharing (Inbound Traffic)

18

•  Always announce aggregate to both! –  Announce one sub-aggregate on first,

and the other on the second link.

•  Requires good address planning (or luck) –  Customers need to be assigned from

both address blocks

AS 17821

AS 30 AS 20

Internet

Load Share

R1 R2

Page 19: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

19

Two Upstream – Load Sharing (Inbound Traffic)

router bgp 17821network 100.100.0.0 mask 255.255.224.0network 100.100.0.0 mask 255.255.240.0neighbor 20.20.20.1 remote-as 20neighbor 20.20.20.1 prefix-list SUB-A outneighbor 20.20.20.1 prefix-list DEF in!ip prefix-list SUB-A permit 100.100.0.0/19ip prefix-list SUB-A permit 100.100.0.0/20ip prefix-list DEF permit 0.0.0.0/0!ip route 100.100.0.0 255.255.224.0 null0ip route 100.100.0.0 255.255.240.0 null0

Advertise sub-aggregate along with

the aggregate

Advertise both aggregate and first sub-prefix in BGP

Sub-aggregate should exist in the routing

table (pull-up route)

•  R1 config:

Page 20: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

20

Two Upstream – Load Sharing (Inbound Traffic) •  R2 config:

router bgp 17821network 100.100.0.0 mask 255.255.224.0network 100.100.16.0 mask 255.255.240.0neighbor 30.30.30.1 remote-as 30neighbor 30.30.30.1 prefix-list SUB-B outneighbor 30.30.30.1 prefix-list DEF in!ip prefix-list SUB-B permit 100.100.0.0/19ip prefix-list SUB-B permit 100.100.16.0/20ip prefix-list DEF permit 0.0.0.0/0!ip route 100.100.0.0 255.255.224.0 null0ip route 100.100.16.0 255.255.240.0 null0

Advertise sub-aggregate along with

the aggregate

Advertise both aggregate and second

sub-prefix in BGP

Sub-aggregate should exist in the routing

table (pull-up route)

Page 21: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Load Sharing – Outbound (Partial)

21

•  Select some Internet routes for “special” treatment –  Accept default from AS20 –  Default plus routes from AS30 (better connected than AS20) –  filter to only accept prefixes originated by AS30 and its neighbor

ASes (AS-Path ACLs) •  Higher pref those routes •  Low pref the default route •  so that other traffic goes via AS20

–  Traffic to rest of Internet via AS20

Page 22: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

22

AS 17821

AS 30

AS 20

Internet

Rest of the Internet

R1 R2

AS X

Load Sharing – Outbound (Partial)

Page 23: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

23

router bgp 17821neighbor 20.20.20.1 remote-as 20neighbor 20.20.20.1 prefix-list DEF in!ip prefix-list DEF permit 0.0.0.0/0!

•  R1 configuration:

Load Sharing – Outbound (Partial)

Page 24: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

24

•  R2 config:

Load Sharing – Outbound (Partial)

router bgp 17821neighbor 30.30.30.1 remote-as 30neighbor 30.30.30.1 filter-list 30 inneighbor 20.20.20.1 prefix-list ALL inneighbor 30.30.30.1 route-map DEF-LOW in!ip prefix-list DEF permit 0.0.0.0/0prefix-!ip prefix-list ALL deny <bogons-rfc1918>ip prefix-list ALL permit 0.0.0.0/0 le 32!ip as-path access-list 30 permit ^(30_)+$ip as-path access-list 30 permit ^(30_)+_[0-9]+$!route-map DEF-LOW permit 10 match ip address prefix-list DEF set local-preference 90route-map DEF-LOW permit 20

Accept full internet feed except bogon routes and

RFC 1918 routes

Filter inbound routes with AS-PATH ACL using filter-list

Purely for redundancy (if path via AS 20 fails)

Accept routes local to and received from AS30

(AS-path prepend included)

Received from AS30 and its direct neighbor ASes

Low-pref default route

Page 25: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Using Communities

25

•  Community attribute provides greater flexibility for traffic shaping than prefix-list –  Simplifies BGP configuration –  Greater policy control

•  Not sent by default to BGP peers –  explicitly send (neighbor x.x.x.x send-community)

•  Can carry policy information –  Example:

•  ASN:80 (set local-pref 80) •  ASN:1 (set as-path prepend ASN) •  ASN:888 (set ip next-hop 192.0.2.1 – Cymru bogons)

Page 26: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

COMMUNITY recap •  Used to group prefixes (incoming/outgoing) and apply

policies to the communities –  A prefix can belong to more than one community

•  Originally a 32-bit integer –  Represented as two 16-bit integers [ASN:number]

•  Works well for 2-byte ASN

•  With 4-byte ASNs –  Common to see [private-ASN:number] –  RFC 8092 (BGP Large Communities): 96-bit integer

•  [32-bit ASN:32-bit:32-bit]

26

Page 27: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Well-known Communities •  Many well-known communities defined

–  http://www.iana.org/assignments/bgp-well-known-communities/bgp-well-known-communities.xhtml

•  The most commonly used: –  no-export: do not advertise/export to any eBGP peers (RFC1997)

•  only extend to the neighbor AS

–  no-advertise: do not advertise to any BGP peers (RFC1997) –  no-peer: do not advertise to any bilateral peer (RFC3765) –  blackhole: null route the prefix (RFC7999)

•  Trigger blackholing •  Signal neighboring ASes (upstream) to drop any traffic being sent towards this

prefix (victim's IP addresses)

27

Page 28: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Equinix MLPE Communities •  Equinix introduced controls over route announcements on their

multi-lateral peering exchange using a set of BGP communities •  Note these are using 16 bit AS numbers, will need to assign 16

bit private AS numbers to ISPs using 32 bit AS numbers •  Some of their communities are:

–  Default Open (Announce to All) 24115:24115 –  Default Open Except AS12345 24115:24115 0:12345 –  Default Closed (Announce to None) 0:24115 –  Default Closed Except AS12345 0:24115 24115:12345 –  Include AS24115 in BGP –  Path to all participants 65501:24115 –  Prepend 1x to AS12345 65501:12345 –  Prepend 2x to AS12345 65502:12345 –  Prepend 3x to AS12345 65503:12345

28

Page 29: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Equinix Example Community Usage •  Default Open, except with AS10, AS20, and AS30 router bgp 17821 neighbor 202.79.197.126 remote-as 24115 neighbor 202.79.197.126 route-map eqixsg-in in neighbor 202.79.197.126 route-map eqixsg-out out # set default-open community on outbound and restrict # announcements from AS10, 20 and 30. route-map eqixsg-out permit 10 set community 24115:24115 0:10 0:20 0:30 # reject routes received from AS 10, 20 and 30 route-map eqixsg-in deny 10 match as-path 10 ip as-path access-list 10 permit ^(10|20|30)_

29

Page 30: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Configuring filtering

•  Don’t do it manually, build a process –  Even if it’s simple now, it won’t be that way forever

•  Register your routes and any customer AS numbers in an IRR –  Allows others to easily built filters too

•  You can build your own tools but why reinvent the wheel?

30

Page 31: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Tools to create router configuration

•  Typically use Internet Routing Registry (IRR) data –  Mostly communicate with RADB, which mirrors other registry data

•  IRRToolSet –  The first public tool set, newest release 5.1.2, on 15 Oct 2019,

included IOS XR support

•  BGPQ3 –  Newer tool, currently actively developed –  Creates filters so you will need to script using it

Page 32: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

IRRToolSet

•  https://github.com/irrtoolset/irrtoolset

•  Can create router configurations from policy defined in Routing Policy Specification Language (RPSL)

•  Uses autnum, as-set and route objects

•  rtconfig – creates configuration file

•  peval – queries IRR data

•  Example policy in autnum objects – AS2764 & AS7575

Page 33: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

BGPQ3

•  https://github.com/snar/bgpq3

•  Creates AS path or route filters based on IRR data

•  Supports a variety of formats –  IOS (both “classic” and XR), JUNOS, JSON, Bird –  Can also DIY format

Page 34: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

BGPQ3 Example (IOS-XR)

% bgpq3 -PXl prefixset-as38442 AS38442

no prefix-set prefixset-as38442

prefix-set prefixset-as38442

27.123.128.0/18,

43.245.56.0/22,

103.244.228.0/22,

183.81.128.0/20

end-set

Page 35: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Using communities for filters

•  Set a community when you import a route from a customer or create a static (aggregate) route

•  Use that community to control export to peers & transit

•  Don’t allow peers or transits to set it though

•  Now when you add a prefix on a router it will automatically get exported on other routers without updating their prefix lists

Page 36: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Example: Adding communities

•  Junos example of adding communities on import of a peer

36

group PEERS-IPv4 { type external; traceoptions {

flag policy detail; } metric-out igp; family inet {

any; } export [ peers-ipv4-export redistribute-ipv4 no-small-prefixes ]; remove-private; neighbor 80.81.192.166 {

description "Headlight Housing Factory GmbH"; import [ as6666-ipv4-import no-private-asns ]; peer-as 6666; } }

Page 37: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Example: Adding communities

•  Junos example of adding communities on import of a peer –  rs-as6666 route filter generated from IRR data –  Communities provide information on type of route, origin router,

locality of import –  Local preference is also adjusted

37

policy-statement as6666-ipv4-import { term as6666 { from policy rs-as6666; then { local-preference 90; community add peers; community add router-tag; community add european; next policy; } } term reject { then reject; } }

Page 38: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Using communities for export control

•  When only using communities for export control use presence of a community to reject a prefix –  Harder for someone to remove a community than add one –  If exporting customer prefixes to peer or transit then reject peer or

transit tagged prefixes first

38

Page 39: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Example: Two Transits and IXP

39

AS 17821

AS 6461 AS 2914

Internet

Transit

IXP

Peering

AS 15169 AS 20940

R1 R2

R3

Page 40: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Define local preference rules

•  Follow the money

•  Prefer to send traffic to a customer (earns money)

•  If the route isn’t from a customer prefer an announcement seen from a peer (free)

•  Else send to a transit (costs money) –  Might have a preference between transit providers

•  Local preference values should follow this plan –  Customer > Peer > Transit

40

Page 41: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Base BGP configuration

41

router bgp 17821 bgp log-neighbor-changes bgp deterministic-med bgp maxas-limit 50 neighbor INTERIOR-IPv6 peer-group neighbor INTERIOR-IPv6 remote-as 17821 neighbor INTERIOR-IPv6 update-source Loopback0 neighbor INTERIOR-IPv4 peer-group neighbor INTERIOR-IPv4 remote-as 17821 neighbor INTERIOR-IPv4 update-source Loopback0 neighbor PEER-IPv4 peer-group neighbor PEER-IPv6 peer-group neighbor TRANSIT-IPv4 peer-group neighbor TRANSIT-IPv6 peer-group

Set some BGP parameters

Define peer-groups for classes of neighbors

Page 42: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Base BGP configuration (cont)

42

router bgp 17821 address-family ipv4 neighbor INTERIOR-IPv4 activate neighbor INTERIOR-IPv4 next-hop-self neighbor INTERIOR-IPv4 send-community neighbor PEER-IPv4 activate neighbor PEER-IPv4 send-community neighbor PEER-IPv4 remove-private-as neighbor PEER-IPv4 route-map PEER-IPv4-EXPORT out neighbor TRANSIT-IPv4 activate neighbor TRANSIT-IPv4 send-community neighbor TRANSIT-IPv4 remove-private-as neighbor TRANSIT-IPv4 route-map TRANSIT-IPv4-EXPORT out

Define common policies applied to all neighbors on the peer-group -  Send communities -  Remove private

ASNs -  Common export

policy per type

Page 43: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Configuration for aggregates

43

router bgp 17821 address-family ipv4 network 100.100.0.0 mask 255.255.224.0 route-map STATIC-IPV4-EXPORT network 100.100.0.0 mask 255.255.240.0 route-map STATIC-IPV4-EXPORT ! ip route 100.100.0.0 255.255.224.0 null0 ip route 100.100.0.0 255.255.240.0 null0

Create aggregates, less specific on each edge router, more specific will differ on each

Don’t forget to create the static routes for the aggregates

Page 44: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Per neighbor configuration

44

router bgp 17821 neighbor 80.81.192.108 remote-as 15169 neighbor 80.81.192.108 peer-group PEER-IPv4 neighbor 80.81.192.108 description “Peer: Google” neighbor 80.81.192.108 remote-as 20940 neighbor 80.81.192.108 peer-group PEER-IPv4 neighbor 80.81.192.108 description “Peer: Akamai” ! address-family ipv4 neighbor 80.81.192.108 peer-group PEER-IPv4 neighbor 80.81.192.108 route-map AS15169-IPv4-1-IMPORT in neighbor 80.81.192.283 peer-group PEER-IPv4 neighbor 80.81.192.283 route-map AS20940-IPv4-1-IMPORT in

Apply specific inbound routing policies

Page 45: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Some community access lists

45

ip community-list 20 permit 17821:1000 ip community-list 21 permit 17821:1001 ip community-list 22 permit 17821:1002 ip community-list 23 permit 17821:1003 ! ip community-list expanded LOCAL_COMM 17821:.*

Define our communities 17821:1000 customer 17821:1001 no-export

aggregate 17821:1002 peer

17821:1003 transit

Select all of our communities

Page 46: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Route maps

46

route-map STATIC-IPV4-EXPORT permit 10 match ip address prefix-list pl100 set local-preference 100 set community 17821:1000 ! route-map STATIC-IPV4-EXPORT permit 20 match ip address prefix-list pl101 set local-preference 100 set community 17821:1000 17821:1001 ! route-map PEER-IPv4-EXPORT permit 10 match ip address prefix-list pl105 match community 20 set comm-list LOCAL_COMM delete ! route-map AS15169-IPv4-1-IMPORT permit 10 match ip address prefix-list pl110 set metric 0 set local-preference 90 set community 17821:1002 ! route-map AS20940-IPv4-1-IMPORT permit 10 match ip address prefix-list pl111 set metric 0 set local-preference 90 set community 17821:1002 !

Customer prefixes have higher local pref than

peers and transits, first part matches on least

specific aggregate, second on more specifics

On export match on prefix list and community

and delete our communities

Specific import policy for each peer. Match prefixes

we expect from them and then clear the MED, set a local preference

and communities

Page 47: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Location info via communities

•  For Transit/Upstream: –  Tier-1 ISPs (or ISPs who are run properly) use communities to group

their regional prefixes –  Filter based on those to shape outbound traffic to Internet!

•  Ex: receive US routes from one ISP, and Europe routes from the other

–  Example: •  https://www.us.ntt.net/support/policy/routing.cfm •  NTT US – 2914:3000 •  NTT Europe – 2914:3200 •  NTT Asia – 2914:3400 •  NTT South America – 2914:3600

47

Page 48: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Balancing traffic to two transits

•  For Inbound traffic: –  We can use our sub-prefixes to balance incoming traffic

–  Ex: Advertise half of our routes to one, and the other half to the other •  keep playing until we reach symmetry!

–  But remember to announce the aggregate to both (REDUNDANCY!)

–  Use “no-export” community to avoid polluting global routing table •  And incurring the wrath of the “network police”

48

Page 49: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Two Transits (different policies) •  R1 configuration:

–  Let us assume NTT (AS2914) as transit here

49

router bgp 17821 neighbor 29.29.29.1 remote-as 2914 neighbor 29.29.29.1 description eBGP with NTT ! address-family ipv4 neighbor 29.29.29.1 send-community neighbor 29.29.29.1 route-map NTT-IN in neighbor 29.29.29.1 route-map NTT-OUT out ! ! We want Asia, US and SA routes ip community-list 1 permit 2914:3000 !US ip community-list 1 permit 2914:3400 !AS ip community-list 1 permit 2914:3600 !SA ip community-list 2 permit 2914:3200 !EU

-  Send communities -  Apply inbound and

outbound routing policies

Define communities for NTT global routes -  In this example, we

will source US and Asia routes from NTT

Page 50: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Two transits (different policies) •  R1 configuration (contd..):

50

! route-map NTT-IN permit 10 match community 1 set local-preference 80 route-map NTT-IN permit 20 set local-preference 70 ! route-map NTT-OUT permit 10 match community 21 set community no-export ! route-map NTT-OUT permit 20 match community 20 !

Route-map to influence outbound traffic -  Set higher local-pref for US,

Asia, and SA routes (outbound traffic)

-  Still lower than IX!

Lower local-pref for EU routes (will prefer the second ISP, but available if that link fails)

Route-map to influence inbound traffic -  Send our aggregate (in case

ISP2 fails) -  And half of our sub-prefixes

Page 51: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Two transits (different policies) •  R2 configuration:

–  Let us assume Zayo (AS6461) as transit here

51

router bgp 17821 neighbor 64.64.64.1 remote-as 6461 neighbor 64.64.64.1 description eBGP with Zayo ! address-family ipv4 neighbor 64.64.64.1 send-community neighbor 64.64.64.1 route-map ZAYO-IN in neighbor 64.64.64.1 route-map ZAYO-OUT out ! ! Zayo Europe routes ip community-list 3 permit 6461:5996 ip community-list 3 permit 6461:5998 ip community-list 3 permit 6461:5999 ! Zayo Global routes ip community-list 4 permit 6461:5997

-  Send communities -  Apply inbound and

outbound routing policies

Define communities for Zayo global routes -  In this example, we

will source EU routes from Zayo

Page 52: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

Two transits (different policies) •  R2 configuration (contd..):

52

! route-map ZAYO-IN permit 10 match community 3 set local-preference 80 route-map ZAYO-IN permit 20 set local-preference 70 ! route-map ZAYO-OUT permit 10 match community 21 set community no-export ! route-map ZAYO-OUT permit 20 match community 20 !

Route-map to influence outbound traffic -  Set higher local-pref for EU

routes (outbound traffic) -  Still lower than IX!

Lower local-pref for global routes (NTT is preferred, but will work if that link fails)

Route-map to influence inbound traffic -  Send our aggregate (in case

ISP1 fails), and -  other second-half of our sub-

prefixes

Page 53: Multihoming...Equinix MLPE Communities • Equinix introduced controls over route announcements on their multi-lateral peering exchange using a set of BGP communities • Note …

53