BGP Communities List
BGP Community string |
Local Preference | Description |
3327:170 | 170 | Set localpref to 170 (highest possible) |
3327:160 | 160 | Set localpref to 160 (IP Transit customer) |
3327:150 | 150 | Set localpref to 150 (preferred private peering) |
3327:140 | 140 | Set localpref to 140 (public peering) |
3327:130 | 130 | Set localpref to 130 (backup private peering) |
3327:120 | 120 | Set localpref to 120 (primary uplink) |
3327:110 | 110 | Set localpref to 110 (backup uplink) |
3327:90 | 90 | Set localpref to 90 (lowest possible) |
3327:104 | – | Set localpref -= 5 |
3327:106 | – | Set localpref += 5 |
Peer relationship
y=0 Announce as is
y=1 Prepend +1
y=2 Prepend +2
y=3 Prepend +3
y=5 Prepend +5
y=8 Prepend +8
y=9 Do no export
3327:5120y $y to Sprint (AS 1239)
3327:5130y $y to KPN EuroRings (AS 286)
3327:5140y $y to EUnet (AS 6667)
3327:5150y $y to Cogent/PSI (AS 174)
3327:5199y $y to all uplinks
3327:5211y $y to Tallinn Internet Exchange (TIX-LAN)
3327:5212y $y to Tallinn Internet Exchange (TLLIX)
3327:5221y $y to Moscow Internet Exchange (MSK-IX)
3327:5231y $y to Latvian Internet eXchange (LIX)
3327:5241y $y to Frankfurt Internet Exchange (DE-CIX)
3327:5242y $y to KleyRex (Frankfurt)
3327:5251y $y to Amsterdam Intenet Exchange (AMS-IX)
3327:5299y $y to all peers
3327:666 Don’t announce to customers and peers, let upstreams blackhole it (only /32 accepted)
NOTE: All BGP communities checked in the same order they are listed here. Any number of them can be used together.
NOTE: Default actions for customers are:
set localpref 160
announce as is to all primary uplinks and customers
announce as is or with some perpends to backup uplinks
announce as is or not at all to different peers
ROUTE ORIGIN BGP COMMUNITIES – NOT SETTABLE BY CUSTOMERS
3327:30CCC CCC is ISO 3166 Country Code
3327:3001 Public peer
3327:3003 Private peer
3327:3004 IPT customer
Trouble & Security issue : [email protected]
Applying BGP Community string with sample configuration
1. Get the latest BGP community string from your ISP/upstream provider or check www.ShowipBGP.com
2. Pick the best BGP community string for your traffic shaping plan (mainly incoming traffic). Most of ISPs are providing BGP community string with local preference and AS prepending option. Cannot tell which one is better than the other. It will depend on your global traffic shaping plan.
3. Follow the below commands ( Cisco only )
The below Sample configuration will tag the 10.0.0.0/24 route with [ISP AS]:120 or [ISP AS]:3 and will not tag any other routes.
router#config t
router(config)#ip bgp-community new-format
router(config)#access-list 10 permit 10.0.0.0 0.0.0.255
router(config)#access-list 10 deny any
router(config)#route-map [to-ISP] permit 10
router(config-route-map)#match ip address 10
router(config-route-map)#set community [ISP AS]:120 <—- using Local Preference
or
router(config-route-map)#set community [ISP AS]:3 <——- using AS prepending
router(config-route-map)#route-map [to-ISP] permit 20
router(config-route-map)#exit
router(config)#router bgp [xxxx] <——————————- xxxx = customer’s ASN
router(config-router)#neighbor x.x.x.x send-community
router(config-router)#neighbor x.x.x.x route-map [to-ISP] out
router(config-router)#exit
router(config)#exit
router#copy running-config startup-config
4. And then, go to www.RouteServer.org and pick one of route server on the map to see your announcement. If you are using AS prepending option, you will see your AS prepends on route servers. Sometime you might not see your route with particular ISP path.
In most of case it might not be any routing problem, just the route path was dropped at somewhere by BGP best path selection scheme. Try Oregon route server, if you can see your route. The Oregon route server is providing many possible and available paths between BGP speakers and neighbors.
If you don’t see your route on there? check other route servers and also check your
BGP configuration. You might need to contact your upstream provider to check what they are learning BGP route from you.