27
Deploying BGP Large Communities Job Snijders [email protected] NTT Communications 5/22/17 SINOG 4.0, Ljubljana, Slovenia 1

Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

  • Upload
    votram

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

DeployingBGPLargeCommunities

[email protected]

NTTCommunications

5/22/17 SINOG4.0,Ljubljana,Slovenia 1

Page 2: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

NetworkOperatorsUseBGPCommunities• RFC1997 stylecommunitieshavebeenavailableforthepast20years– Encodesa32-bitvaluedisplayedas:“16-bitASN:16-bitvalue”

– DesignedtosimplifyInternetroutingpolicies

– Signalsroutinginformationbetweennetworkssothatanactioncanbetaken

• BroadsupportinBGPimplementations• WidelydeployedandrequiredbynetworkoperatorsforInternetrouting

5/22/17 SINOG4.0,Ljubljana,Slovenia 2Source:https://www.us.ntt.net/support/policy/routing.cfm (AS2914)

RFC1997CommunitiesExamples

Page 3: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

NeededRFC1997StyleCommunities,butLarger

• Weknewwe’drunoutof16-bitASNseventuallyandcameupwith32-bitASNs– RIRsstartedallocating32-bitASNsbyrequestin2007,nodistinctionbetween16-bitand32-bitASNsnow

• However,youcan’tfita32-bitvalueintoa16-bitfield– Can’tusenative32-bitASNswithRFC1997communities

• NeededanInternetroutingcommunitiessolutionfor32-bitASNsforalmost10years– ParityandfairnesssoeveryonecanusetheirgloballyuniqueASN

5/22/17 SINOG4.0,Ljubljana,Slovenia 3

Page 4: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

TheSolution:RFC8092“BGPLargeCommunitiesAttribute”

• IdeaprogressedrapidlyfrominceptioninMarch2016

• FirstI-DinSeptember2016toRFCpublicationonFebruary16,2017injustsevenmonths

• Finalstandard,plusanumberofimplementationandtoolsdevelopedaswell

• Networkoperatorscantestanddeploythenewtechnologynow

5/22/17 SINOG4.0,Ljubljana,Slovenia 4CakeandphotocourtesyoftheNTTCommunicationsNOC.

Page 5: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

EncodingandUsage

• Auniquenamespaceforall16-bitand32-bitASNs– NonamespacecollisionsbetweenASNs

• Largecommunitiesareencodedasa96-bitquantityanddisplayedas“32-bitASN:32-bitvalue:32-bitvalue”

• Canonicalrepresentationis$Me:$Action:$You

5/22/17 SINOG4.0,Ljubljana,Slovenia 5

0 1 2 3 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1

+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Global Administrator | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Local Data Part 1 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ | Local Data Part 2 | +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

Operator-DefinedValue(Action)

AutonomousSystemNumber(Me)

Operator-DefinedValue(You)

Page 6: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

PlanningforLargeCommunities

• Theentirenetworkecosystemneedstosupportlargecommunitiesinordertoprovision,deployandtroubleshootthem

• Askyourvendorsandimplementersforsoftwaresupport

• Updateyourtoolsandprovisioningsoftware• Extendyourroutingpolicies,andopenlypublishthisinformation

• Trainyourtechnicalstaff

5/22/17 SINOG4.0,Ljubljana,Slovenia 6

Imagesources:https://www.sunet.se/blogg/all-i-want-for-christmas-is-large-bgp-communities/“Alli wantforchristmas is…LargeBGPCommunities”byFredrik"Hugge"Korsbäck

Page 7: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

DevelopaComprehensiveCommunitiesPolicy

• ClassicRFC1997communitieswillcontinuetobeusedtogetherwithlargecommunities– There’snoflagdaytoconvert,largecommunitiessimplyprovideanadditionalwaytosignalinformation

• Yourexistingroutingpolicywithclassiccommunitiesisstillvalid• Well-knowncommunitiessuchas“no-advertise”,“no–export”,“blackhole”,etc.arestillused

• Extendyourpolicywithlargecommunitiesthatallownetworkoperatorstosignalthesameinformationastheycanwithclassiccommunities

5/22/17 SINOG4.0,Ljubljana,Slovenia 7

Page 8: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

BGPLargeCommunityExamples

• NonamespacecollisionsoruseofreservedASNs• Enablesoperatorstouse32-bitASNsin$Meand$Youvalues5/22/17 SINOG4.0,Ljubljana,Slovenia 8

RFC1997(Current)

BGPLargeCommunities Action

65400:peer-as 2914:65400:peer-as DonotAdvertisetopeer-as inNorthAmerica(NTT)

43760:peer-as 43760:1:peer-as Announceaprefixtoacertainpeer(INEX)

0:43760 43760:0:peer-as Preventannouncementofaprefixtoacertainpeer (INEX)

65520:nnn 2914:65520:nnn Lower LocalPreferenceinCountrynnn (NTT)

2914:410 2914:400:10 RouteReceived FromaPeeringPartner(NTT)

2914:420 2914:400:20 RouteReceivedFromaCustomer(NTT)

Page 9: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

CommunitiesPolicyDevelopment

• draft-ietf-grow-large-communities-usage isanewRFC1998styleI-DintheIETFGROWWorkingGroup

• Providesexamplesandinspirationfornetworkoperatorstouselargecommunities

• Alsoprovidesmanyexamplesonhowtodevelopacommunitiespolicy– Informationalcommunities– Actioncommunities

5/22/17 SINOG4.0,Ljubljana,Slovenia 9

Page 10: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

InformationalCommunities

• Aninformationallabeltomarkaroutewith– Itsorigin:ISO3166-1numericcountryIDandUMM.49geographicregion

– Relationorpropagation:internal,customer,peer,transit• Providesinformationfordebuggingorcapacityplanning• TheGlobalAdministratorfieldissettotheASNthatlabelstheroutes

• MostusefulfordownstreamnetworksandtheGlobalAdministratoritself

5/22/17 SINOG4.0,Ljubljana,Slovenia 10

Page 11: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

InformationCommunitiesExample

• Forexample,acommunitiesvalueof“64497:1:52864497:2:15064497:3:2”wouldindicatedthatiswaslearnedintheNetherlands,inEurope,fromacustomer

5/22/17 SINOG4.0,Ljubljana,Slovenia 11

ISO3166-1CountryID + UNM.49Region + Relation

LargeCommunity Description Large

Community Description LargeCommunity Description

64497:1:528 Netherlands 64497:2:2 Africa 64497:3:1 Internal64497:1:392 Japan 64497:2:9 Oceania 64497:3:2 Customer64497:1:840 USA 64497:2:145 Western Asia 64497:3:3 Peering

64497:2:150 Europe 64497:3:4 Transit

Page 12: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

British PostalCodes(~31Bits) or GPSCoordinatesLargeCommunity PostalCode LargeCommunity Location

64497:9:849701135 E1W1LB (London) 64497:10:1281024 Amsterdam64497:9:1345374681 M901QX (Manchester) (52.37783,4.87995)

CDN/EyeballExample– Youdoalotwith32bits!

• Locationencodingcanbeusedtoprovideveryaccuratelocationinformationattachedtomore-specificroutesannouncedtoCDNcaches

• Britishpostalcodescanbeencodedbystrippingthewhitespaceanddoingasimplebase36tobase10conversion

• GPScoordinatescanbeencodedwithGeohash– Forexample52.37783,4.87995(Amsterdam)encodedwith600meterprecision– Python:importGeohash;Geohash.encode(52.37783,4.87995,precision=6)– Geohash result:“u173zp”– Convert“u173zp”frombase32tobase10=1281024

5/22/17 SINOG4.0,Ljubljana,Slovenia 12

Page 13: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

ActionCommunities

• AnactionlabeltorequestthataroutebetreatedinaparticularwaywithinanAS– Propagationcharacteristics:export,selectiveexport,noexport– Localpreference:influenceingresstrafficwithintheAS– ASPath:influencetrafficfromoutsidetheAS

• TheGlobalAdministratorfieldissettotheASNwhichhasdefinedthefunctionalityofthecommunity– AlsoistheASthatisexpectedtoperformtheaction

• MostusefulfortransitproviderstakingactiononbehalfofacustomerortheGlobalAdministrator

5/22/17 SINOG4.0,Ljubljana,Slovenia 13

Page 14: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

ActionCommunitiesExample

• Selectivenoexport– ASNbasedselectivenoexport– Locationbasedselectivenoexport

• SelectiveASpathprepending– ASNbasedselectiveASpathprepending– LocationbasedselectiveASpath

• Localpreference– Globallocalpreference– Regionbasedlocalpreference

5/22/17 SINOG4.0,Ljubljana,Slovenia 14

ASNBasedNoExportLarge

Community Description

64497:4:64498 AS6449864497:4:64499 AS6449964497:4:65551 AS65551

LocationBasedNoExportLarge

Community Description

64497:5:528 Netherlands64497:5:392 Japan64497:5:840 USA

Page 15: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

GettingStartedWithLargeCommunities• 2018istheyearoflargeBGPcommunities– Preparation,testing,traininganddeploymentcantakeweeks,monthsorevenoverayear

– Starttheworknow,soyouarereadywhencustomerswanttouselargecommunities

• Lotsofresourcesareavailabletohelpnetworkoperatorslearnaboutlargecommunities– BGPspeakerimplementations– Analysisandecosystemtools– Presentations(http://largebgpcommunities.net/talks/)– Documentationforeachimplementation– Configurationexamples(http://largebgpcommunities.net/examples/)

5/22/17 SINOG4.0,Ljubljana,Slovenia 15

Page 16: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

LargeCommunitiesBeaconPrefixes• ThefollowingprefixesareannouncedwithASpath2914_15562$– 192.147.168.0/24(lookingglass)

– 2001:67c:208c::/48(lookingglass)

– BGPLargeCommunity:15562:1:1

5/22/17 SINOG4.0,Ljubljana,Slovenia 16

route-views>show ip bgp 192.147.168.0BGP routing table entry for 192.147.168.0/24, version 98399100Paths: (39 available, best #30, table default)Not advertised to any peerRefresh Epoch 1701 2914 15562137.39.3.55 from 137.39.3.55 (137.39.3.55)Origin IGP, localpref 100, valid, externalunknown transitive attribute: flag 0xE0 type 0x20 length 0xCvalue 0000 3CCA 0000 0001 0000 0001

rx pathid: 0, tx pathid: 0

COLOCLUE1 11:06:17 from 94.142.247.3] (100/-) [AS15562i] Type: BGP unicast univBGP.origin: IGP BGP.as_path: 8283 2914 15562 BGP.next_hop: 94.142.247.3BGP.med: 0 BGP.local_pref: 100 BGP.community: (2914,410) (2914,1206) (2914,2203) (8283,1) BGP.large_community: (15562, 1, 1)

CiscoIOSOutput(WithoutLargeCommunitiesSupport)

BIRDOutput(WithLargeCommunitiesSupport)

Page 17: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

BGPSpeakerImplementationStatus

5/22/17 SINOG4.0,Ljubljana,Slovenia 17

Implementation Software Status Details

Arista EOS Planned FeatureRequestedBUG169446

Cisco IOSXE Planned 16.9.1(FCSJuly2018)source

Cisco IOSXR ✔ Done! Beta(perhapsin6.3.2forreal?)

cz.nic BIRD ✔ Done! BIRD1.6.3(commit)

ExaBGP ExaBGP ✔ Done! PR482

FreeRangeRouting frr ✔ Done! Issue46 (commit)

Juniper Junos OS Planned SecondHalf2017(perhaps17.3R1?)

MikroTik RouterOS Won’tImplementUntilRFC FeatureRequested2016090522001073

Nokia SROS Planned ThirdQuarter2017

nop.hu freeRouter ✔ Done!

OpenBSD OpenBGPD ✔ Done! OpenBSD6.1(commit)

OSRG GoBGP ✔ Done! PR1094

rtbrick Fullstack ✔ Done! FullStack 17.1

Quagga Quagga ✔ Done! Quagga1.2.0875

Ubiquiti EdgeOS Planned InternalEnhancementRequested

VyOS VyOS Requested FeatureRequestedT143

Page 18: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

ToolsandEcosystemImplementationStatus

5/22/17 SINOG4.0,Ljubljana,Slovenia 18

Implementation Software Status DetailsDE-CIX pbgpp ✔ Done! PR16

FreeBSD tcpdump ✔ Done! PR213423

Marcod’Itri zebra-dump-parser ✔ Done! PR3

OpenBSD tcpdump ✔ Done! OpenBSD6.1(patch)

pmacct.net pmacct ✔ Done! PR61

RIPENCC bgpdump ✔ Done! Issue41 (commit)

tcpdump.org tcpdump ✔ Done! PR543 (commit)

YoshiyukiYamauchi mrtparse ✔ Done! PR13

Wireshark Dissector ✔ Done! 18172(patch)

Visithttp://largebgpcommunities.net/implementations/ fortheLatestStatus

Page 19: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

TestingLargeCommunities

• TheBGPLargeCommunitiesPlaygroundprovidesaneasywayrunseveralimplementationstogetherinalabenvironment

• SupportsBIRD,ExaBGP,GoBGP,Quaggaandpmacct• Dockerimagesareavailable• Usetheplaygroundto– Becomefamiliarwithlargecommunities– Testinteroperabilitywithyourvendor’sBGPimplementations– Design,configureandverifyyournewcommunitypolicies

5/22/17 SINOG4.0,Ljubljana,Slovenia 19BGPLargeCommunitiesPlayground:https://github.com/pierky/bgp-large-communities-playground

Page 20: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

Questions?Presentationcreatedby:

[email protected]@greg_hankins

[email protected]@JobSnijders

5/22/17 SINOG4.0,Ljubljana,Slovenia 20

Visithttp://LargeBGPCommunities.net/ fortheLatestInfoReuseofthisslidedeckispermittedandencouraged!

Page 21: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

ConfigurationandOutputExamples

5/22/17 SINOG4.0,Ljubljana,Slovenia 21

Page 22: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

BIRDConfiguration# matchif ((8283, 1, 2) ~ bgp_large_community) then return true;

# scrub / deletebgp_large_community.delete([(8283, *, *)]);bgp_large_community.delete([(8283, 0, 1)]);

# setbgp_large_community.add((8283, 0, 100));bgp_large_community.add([(8283, 0, 100), (8283, 2, 333)]);

5/22/17 SINOG4.0,Ljubljana,Slovenia 22

Page 23: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

IOSXRConfiguration(EFT– Beta“JustLikeCommunity”)

# matchroute-policy set-somethingif large-community matches-any (8283:4:3) thenset local-preference 120

endifend-policy

# scrub / deleteroute-policy set-somethingdelete large-community in (8283:*:*)delete large-community in (8283:4:3)

end-policy

# setroute-policy set-somethingset large-community (8283:45:29)additive

end-policy

5/22/17 SINOG4.0,Ljubljana,Slovenia 23

Page 24: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

NokiaSROSConfigurationpolicy-options

community "set" members "8283:45:29"community "match" members "8283:4:3"community "delete" members "8283:4:3"

5/22/17 SINOG4.0,Ljubljana,Slovenia 24

policy-statement "set-something"entry 10

description "match"from

community "match"exit action accept

local-preference 120exit

exit entry 20

description "scrub / delete"action accept

community remove "delete"exit

exit entry 30

description "set" action accept

community add "set"exit

exit exit

Page 25: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

OpenBGPD Configuration# matchallow from any large-community 8283:1:2match from any large-community 8283:1:2 set localpref 300deny to any peer-as neighbor-as \

large-community 8283:6:neighbor-as

# scrub / deletematch from any set { large-community delete 8283:*:* }match from any set { large-community delete 8283:1:2 }

# setmatch from any set { large-community 8283:1:2 }match from any set { large-community 8283:1:2 \

large-community 8283:4034:24824 }

5/22/17 SINOG4.0,Ljubljana,Slovenia 25

Page 26: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

tcpdump 4.9.0PacketCapture# ./tcpdump -i eth3 -n -v -c 1 src port 179tcpdump: listening on eth3, link-type EN10MB (Ethernet), capture size 262144 bytes16:22:08.992920 IP (tos 0xc0, ttl 64, id 41807, offset 0, flags [DF], proto TCP (6), length 181)94.142.247.3.179 > 94.142.247.6.33785: Flags [P.], cksum 0xabce (incorrect -> 0x1e40), seq

58743671:58743800, ack 2012368616, win 2270, options [nop,nop,TS val 857977378 ecr 149127175], length 129: BGP

Update Message (2), length: 129Origin (1), length: 1, Flags [T]: IGPAS Path (2), length: 34, Flags [T]: 38930 1299 3910 721 27065 1554 1555 1501Next Hop (3), length: 4, Flags [T]: 94.142.247.3Multi Exit Discriminator (4), length: 4, Flags [O]: 0Local Preference (5), length: 4, Flags [T]: 100Atomic Aggregate (6), length: 0, Flags [T]:Aggregator (7), length: 8, Flags [OT]: AS #1501, origin 144.105.202.0Community (8), length: 8, Flags [OT]: 1299:20000, 8283:14Large Community (32), length: 12, Flags [OTP]:

8283:6:14Updated routes:

136.210.249.0/24

5/22/17 SINOG4.0,Ljubljana,Slovenia 26

Page 27: Deploying BGP Large Communitieslargebgpcommunities.net/presentations/SINOG2017_Snijders_Large... · 5/22/17 SINOG 4.0, Ljubljana ... –Documentation for each implementation ... MikroTik

Wireshark2.3.0(Prerelease)PacketCapture

5/22/17 SINOG4.0,Ljubljana,Slovenia 27