Operational BGP Communities
Prefix redistribution control
Route server peers are able to manipulate outbound routing policies via an in-band mechanism using BGP communities,
Currently, we offer the following options:
BGP Community |
BGP Extended Community |
BGP Large Community |
Description |
0:peer-as |
RT:0:peer-as |
63529:0:peer-as |
Do not announce a prefix to a certain peer |
63529:peer-as |
RT:63529:peer-as |
63529:1:peer-as |
Announce a prefix to a certain peer |
0:63529 |
RT:0:63529 |
63529:0:0 |
Do not announce a prefix to any peer |
63529:63529 |
RT:63529:63529 |
63529:1:0 |
Announce a prefix to all peers |
| | | |
65003:peer-as |
RT:65003:peer-as |
63529:103:peer-as |
Prepend 3 time to peer-as |
65002:peer-as |
RT:65002:peer-as |
63529:102:peer-as |
Prepend 2 time to peer-as |
65001:peer-as |
RT:65001:peer-as |
63529:101:peer-as |
Prepend 1 time to peer-as |
For destination peers employing a
32-bit ASN, please consider using BGP Extended Communities or BGP Large Communities.
With BGP Large Communities Attribute
[RFC8092], Network operators can continue to build upon well-established practises in the tradition of
[RFC1997].
The Use of BGP Large Communities is also described in
[RFC8195].
Example
- {63529:63529} or no community
- This route will be advertised to anyone (Default)
- {63529:63529 0:63529} or {0:63529}
- This route will not be advertised to anyone
- {0:65001}
- This route will be advertised to everyone except AS 65001
- {0:65001 0:65002}
- This route will be advertised to everyone except AS 65001 and AS 65002
- {0:65003 63529:65003}
- This route will be advertised to everyone except AS 65003
- {0:63529 63529:65001}
- This route will be advertised toward AS 65001 only
- {0:63529 63529:65001 63529:65002}
- This route will be advertised toward AS 65001 and AS 65002 only
- {0:63529 63529:65001 63529:65002 63529:65003 0:65002}
- This route will be advertised toward AS 65001 and AS 65003 only
Config guide
ip classless
ip bgp-community new-format
!
router bgp (your AS)
.
.
.
address-family ipv4
neighbor 203.159.68.68 activate
neighbor 203.159.68.69 activate
neighbor BKNIX-RS-v4 send-community
neighbor BKNIX-RS-v4 next-hop-self
neighbor BKNIX-RS-v4 route-map BKNIX-out out
neighbor BKNIX-RS-v4 route-map BKNIX-in in
!
route-map BKNIX-in permit 10 #Accept all prefixes from RS
!
route-map BKNIX-out permit 10 #Do not announce this prefixes to everyone
match ip address prefix-list filter-out
set community 0:63529 additive
!
route-map BKNIX-out permit 20
match community ..... #Announce all route matched these community to everyone
set community 63529:63529
route-map BKNIX-out permit 30
match community ..... #Deny route matched these community to ASN131071 (32 bits ASN)
set extcommunity rt 0:131071
!
ip prefix-list filter-out seq 10 permit x.x.x.x/y
!
Graceful BGP Session Shutdown
BKNIX Route servers accept this well-known BGP Community,
RFC 8326 (Graceful BGP Session Shutdown), which indicate our route servers to recalculate and redistribute an alternate path (if available) for your prefixes announcement.
*It is recommended that all RS clients apply GRACEFUL_SHUTDOWN at the inbound direction towards your RS BGP sessions. NLNOG has a good example
here.
Example : Operations at Maintenance Time
- Member announces all prefixes with BGP Community GRACEFUL_SHUTDOWN (65535:0) to route servers.
- Route servers will set BGP local_preference of these prefixes to 0.
- Route servers will recalculate the alternative path of these prefixes.
- if prefixes have an alternative path, new advertised prefixes will be redistributed to clients.
- if prefixes do not have an alternative path, the same prefixes remain advertised with the BGP Community GRACEFUL_SHUTDOWN.
- Other RS clients have learned alternate paths and forward traffic through the new paths. At this point, a member can safely shutdown their BGP session.