Repository navigation
Attribute Reference
A-Z reference for all BGP path attributes supported by ExaBGP
This comprehensive guide covers all BGP attributes that ExaBGP can announce, receive, and manipulate.
- Overview
- Well-Known Mandatory Attributes
- Well-Known Discretionary Attributes
- Optional Transitive Attributes
- Optional Non-Transitive Attributes
- Extended Attributes
- Alphabetical Index
- Quick Reference Tables
BGP attributes are classified into four categories based on RFC 4271:
| Category | Propagation | Required | Examples |
|---|---|---|---|
| Well-Known Mandatory | Always propagated | Required in UPDATE | ORIGIN, AS_PATH, NEXT_HOP |
| Well-Known Discretionary | Always propagated | Optional | LOCAL_PREF, ATOMIC_AGGREGATE |
| Optional Transitive | Propagated to neighbors | Optional | AGGREGATOR, COMMUNITY |
| Optional Non-Transitive | Not propagated | Optional | MED, ORIGINATOR_ID |
ExaBGP sends the path attributes of an UPDATE in ascending type order, MP_REACH_NLRI and MP_UNREACH_NLRI first and then the others by type code, AS4_PATH, AS4_AGGREGATOR and OTC included, and never puts the same attribute in one UPDATE twice. On receipt, the Partial bit of the flags is ignored for every attribute (RFC 4271 4.3, RFC 7606 3(c)), where an ORIGIN with the bit set used to make the route a withdrawal.
A received UPDATE with a malformed attribute which is treated as withdraw, discarded or ignored, or whose routes are withdrawn for a missing mandatory attribute or a rejected AS_PATH, is logged once, as an error, with the reason, its NLRI and the UPDATE in hex (RFC 7606 6):
update.malformed peer=<address> reason="<attribute> <action>: <why>" nlri=[<routes>] update=<hex>
At most 16 NLRI are named and 4096 octets of the message shown. Some of these cases used to be logged at debug level or not at all, and none named the routes or the message.
In configuration files:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
origin igp;
as-path [ 65001 65002 ];
community [ 65001:100 ];
local-preference 200;
med 50;
}
}Via Text API:
announce route 10.0.0.0/24 next-hop 192.168.1.1 origin igp as-path [ 65001 65002 ] community [ 65001:100 ]Via JSON API (a route received from an IBGP neighbor, as ExaBGP 6.0 writes it on one line, shown indented):
{
"exabgp": "6.0.0",
"time": 1790847770.52,
"host": "exabgp-host",
"pid": 12345,
"ppid": 1,
"counter": 3,
"type": "update",
"neighbor": {
"address": { "local": "192.168.1.2", "peer": "192.168.1.1" },
"asn": { "local": 65001, "peer": 65001 },
"router-id": "192.168.1.2",
"direction": "receive",
"message": {
"update": {
"attribute": {
"origin": "igp",
"as-path": { "0": { "element": "as-sequence", "value": [ 65001, 65002 ] } },
"med": 50,
"local-preference": 200,
"community": [ [ 65001, 100 ] ]
},
"announce": {
"ipv4 unicast": {
"192.168.1.1": [ { "nlri": "10.0.0.0/24" } ]
}
}
}
},
"negotiated": {
"message_size": 65535, "hold_time": 180, "asn4": true, "multisession": false,
"operational": false, "refresh": "absent", "families": [ "ipv4 unicast" ],
"nexthop": [], "add_path": { "send": [], "receive": [] }
}
}
}These attributes MUST be present in every BGP UPDATE message advertising a route.
Category: Well-Known Mandatory RFC: 4271 Purpose: Indicates the origin of the route information
Values:
-
igp(0) - Route learned from IGP (most preferred) -
egp(1) - Route learned from EGP (historical) -
incomplete(2) - Route learned by other means (e.g., static, redistribution)
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
origin igp; # Most common
}
route 10.0.1.0/24 {
next-hop 192.168.1.1;
origin incomplete; # For redistributed routes
}
}Text API:
announce route 10.0.0.0/24 next-hop 192.0.2.1 origin igp
announce route 10.0.1.0/24 next-hop 192.0.2.1 origin incompleteRoute Selection: IGP > EGP > Incomplete (in tie-breaking)
See also: RFC 4271 Section 5.1.1
Category: Well-Known Mandatory RFC: 4271, 4893 (4-byte ASN) Purpose: Lists autonomous systems that routing information has traversed
Segment Types:
-
AS_SEQUENCE(Type 2) - Ordered list of ASNs -
AS_SET(Type 1) - Unordered set of ASNs (for aggregation) -
AS_CONFED_SEQUENCE(Type 3) - BGP confederation -
AS_CONFED_SET(Type 4) - BGP confederation set
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
as-path [ 65001 65002 65003 ]; # AS_SEQUENCE
}
route 10.0.1.0/24 {
next-hop 192.168.1.1;
as-path [ 65001 ] ( 65002 65003 ); # AS_SEQUENCE then AS_SET
}
route 10.0.2.0/24 {
next-hop 192.168.1.1;
as-path confed-sequence [ 65010 ] [ 65001 ]; # 6.0.0+, see Confederations
}
}Segments follow each other: [ ] is an AS_SEQUENCE, ( ) an AS_SET, and
confed-sequence [ ] / confed-set [ ] the confederation segments. The path is sent as
written. AS_SET and AS_CONFED_SET are deprecated by RFC 9774: since 6.0.0 ExaBGP treats a
received route carrying either as withdrawn, unless the neighbor has as-set accept;.
RFC 4271 5.1.2 has a speaker put its own AS first in the AS_PATH it sends to an external
peer. ExaBGP sends the path it is given, so when a route sent to an external peer has an
AS_PATH which does not start with our AS, as-path [ ] included, it logs a
route.as_path.not_ours warning and sends the route unchanged.
An AS_PATH from an external neighbour holding AS_CONFED_SEQUENCE or AS_CONFED_SET segments is
malformed (RFC 5065 5), and its routes are treated as withdrawn, whether or not the neighbor
has a confederation block. Earlier 6.0.0 snapshots accepted such a path when no
confederation was configured. Internal neighbours are unchanged.
Text API:
announce route 10.0.0.0/24 next-hop 192.0.2.1 as-path [ 65001 65002 65003 ]
announce route 10.0.1.0/24 next-hop 192.0.2.1 as-path [ 65001 ] ( 65002 65003 )AS Path Prepending (for traffic engineering):
# Prepend AS 65001 three times to make path less preferred
announce route 10.0.0.0/24 next-hop 192.0.2.1 as-path [ 65001 65001 65001 ]4-Byte ASN Support:
ExaBGP fully supports 4-byte ASNs (RFC 4893):
announce route 10.0.0.0/24 next-hop 192.0.2.1 as-path [ 4200000000 65001 ]Route Selection: Shortest AS path length wins (major tie-breaker)
Loop Detection: A router rejects a route whose AS_PATH holds its own ASN. ExaBGP does not: it passes such a route to the API
See also: RFC 4271 Section 5.1.2, RFC 4893
Category: Well-Known Mandatory (for IPv4 unicast) RFC: 4271 Purpose: Specifies the IP address to forward packets to
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1; # Explicit next-hop
}
route 10.0.1.0/24 {
next-hop 192.168.1.1; # Explicit next-hop (recommended)
}
}
⚠️ Warning:next-hop selfis an EXPERIMENTAL feature. For production use, specify an explicit next-hop IP address instead.
Text API:
announce route 10.0.0.0/24 next-hop 192.168.1.1
announce route 10.0.1.0/24 next-hop 192.168.1.1EBGP Behavior: A router changes the next-hop to its own IP. ExaBGP sends the next-hop the route was given (next-hop self for its own address)
IBGP Behavior: Next-hop is preserved (not changed)
Route Reflector: Can preserve or change next-hop
IPv6 Next-Hop:
For IPv6, next-hop is carried in MP_REACH_NLRI (not NEXT_HOP attribute):
announce route 2001:db8::/64 next-hop 2001:db8::1
announce route 2001:db8:1::/64 next-hop 2001:db8::1A next hop which is an address of the peer the route is sent to is refused, as RFC 4271
5.1.3 forbids sending it: the configuration does not load. A route announced from the API
with such a next hop is not sent to that peer, a route.skipped warning is logged, and the
other selected peers still get it; the command fails only when no selected peer can take
the route.
A peer of a passive range is only known once it connects, so the configuration can not check
its address. When it connects, a route of the range whose next hop is that peer's address is
not sent to it, with a route.skipped warning, and the other peers of the range still get
it. Earlier 6.0.0 snapshots only checked the first address of the range.
A malformed NEXT_HOP attribute in an UPDATE whose routes are all in MP_REACH_NLRI is ignored (RFC 4760 3): those routes carry their own next hop, and they used to be withdrawn for it.
See also: RFC 4271 Section 5.1.3
These attributes are well-known but not required in every UPDATE.
Category: Well-Known Discretionary RFC: 4271 Purpose: Indicates degree of preference for a route (IBGP only)
Range: 0-4294967295 (32-bit unsigned integer) Default: 100 (implementation-dependent) Higher value = More preferred
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
local-preference 200; # Highly preferred
}
route 10.0.1.0/24 {
next-hop 192.168.1.1;
local-preference 50; # Less preferred
}
}Text API:
announce route 10.0.0.0/24 next-hop 192.0.2.1 local-preference 200
announce route 10.0.1.0/24 next-hop 192.0.2.1 local-preference 50Use Cases:
- Primary/backup links: Higher LOCAL_PREF on primary
- Traffic engineering: Control inbound traffic preference
- Policy routing: Prefer certain paths within AS
Route Selection: LOCAL_PREF is checked FIRST (after weight, if supported)
EBGP: LOCAL_PREF is stripped when advertising to EBGP peers
See also: RFC 4271 Section 5.1.5
Category: Well-Known Discretionary RFC: 4271 Purpose: Indicates route was aggregated and information was lost
Configuration:
static {
route 10.0.0.0/16 {
next-hop 192.168.1.1;
atomic-aggregate; # No value needed
}
}Text API:
announce route 10.0.0.0/16 next-hop 192.0.2.1 atomic-aggregatePurpose: Informs downstream routers that AS path information may be incomplete due to aggregation.
Used with: AGGREGATOR attribute
See also: RFC 4271 Section 5.1.6
Propagated to neighbors even if not recognized.
Category: Optional Transitive RFC: 4271, 4893 Purpose: Identifies the AS and router that performed route aggregation
Format: <ASN>:<IP>
Configuration:
static {
route 10.0.0.0/16 {
next-hop 192.168.1.1;
atomic-aggregate;
aggregator 65001:192.168.1.2; # AS:IP
}
}Text API:
announce route 10.0.0.0/16 next-hop 192.0.2.1 aggregator 65001:192.168.1.24-Byte ASN Support:
announce route 10.0.0.0/16 next-hop 192.0.2.1 aggregator 4200000000:192.168.1.2See also: RFC 4271 Section 5.1.7, Configuration Example
Category: Optional Transitive RFC: 1997 Purpose: Tags routes for policy application
Format: <ASN>:<Value> (both 16-bit, 0-65535)
Well-Known Communities:
-
NO_EXPORT(65535:65281 / 0xFFFFFF01) - Don't advertise to EBGP peers -
NO_ADVERTISE(65535:65282 / 0xFFFFFF02) - Don't advertise to any peer -
NO_EXPORT_SUBCONFED(65535:65283 / 0xFFFFFF03) - Don't export outside confederation -
NOPEER(65535:65284 / 0xFFFFFF04) - Don't advertise to peers (RFC 3765)
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
community [ 65001:100 ]; # Single community
}
route 10.0.1.0/24 {
next-hop 192.168.1.1;
community [ 65001:100 65001:200 ]; # Multiple communities
}
route 10.0.2.0/24 {
next-hop 192.168.1.1;
community no-export; # Well-known community
}
route 10.0.3.0/24 {
next-hop 192.168.1.1;
community [ 65001:100 no-advertise ]; # Mixed
}
}Text API:
announce route 10.0.0.0/24 next-hop 192.0.2.1 community [ 65001:100 ]
announce route 10.0.1.0/24 next-hop 192.0.2.1 community [ 65001:100 65001:200 ]
announce route 10.0.2.0/24 next-hop 192.0.2.1 community no-export
announce route 10.0.3.0/24 next-hop 192.0.2.1 community [ 65001:100 no-advertise ]Common Use Cases:
- Traffic engineering: Tag routes for specific policies
- Customer identification: Tag customer routes
- Geographic tagging: Identify route origin location
- Blackhole triggering: Trigger remote blackhole (RTBH)
- DDoS mitigation: Trigger FlowSpec rules
Example - Remote Triggered Blackhole (RTBH):
# Cisco/Juniper RTBH: Tag with 65535:666 (blackhole community)
announce route 10.0.0.1/32 next-hop 192.0.2.1 community [ 65535:666 ]See also: RFC 1997, Configuration Example
Category: Optional Transitive RFC: 4360, 5668 Purpose: Extended community tags (8 bytes vs 4 bytes for standard communities)
Types:
-
Route Target (RT):
target:ASN:Value- VPN route filtering -
Route Origin (RO):
origin:ASN:Value- VPN route origin -
Link Bandwidth:
bandwidth:ASN:Value- Unequal cost multipath -
Redirect:
redirect:ASN:Value- FlowSpec traffic redirect -
Traffic Rate:
then { rate-limit <value>; }in a flow route - FlowSpec rate limiting -
Traffic Action:
then { action sample|terminal|sample-terminal; }in a flow route - FlowSpec actions -
Traffic Marking:
then { mark <dscp>; }in a flow route - FlowSpec DSCP marking
The route distinguisher is not an extended community: it is part of a VPN route, written rd.
Configuration:
static {
# VPN route with Route Target
route 10.0.0.0/24 {
rd 65001:100;
label 16;
next-hop 192.168.1.1;
extended-community [ target:65001:100 ];
}
}
# FlowSpec redirect: flow is a section of the neighbor, next to static
flow {
route block-attack {
match { source 10.0.0.0/8; }
then { redirect 65001:666; } # Extended community redirect
}
}Text API:
# VPN route
announce route 10.0.0.0/24 rd 65001:100 label 16 next-hop 192.0.2.1 extended-community [ target:65001:100 ]
# FlowSpec redirect
announce flow route { match { source 10.0.0.0/8; } then { redirect 65001:666; } }FlowSpec Extended Communities:
# Rate limit to 1 Mbps
announce flow route { match { source 10.0.0.0/8; } then { rate-limit 1000000; } }
# Mark DSCP
announce flow route { match { source 10.0.0.0/8; } then { mark 10; } }
# Redirect to VRF
announce flow route { match { source 10.0.0.0/8; } then { redirect 65001:100; } }Format Variants:
-
target:ASN:Value- 2-byte ASN, 4-byte value -
target:IP:Value- IPv4 address, 2-byte value -
target:4ByteASN:Value- 4-byte ASN, 2-byte value
See also: RFC 4360, FlowSpec Actions
Category: Optional Transitive RFC: 8092 Purpose: Large communities (12 bytes) for large ASNs
Format: <ASN>:<Value1>:<Value2> (all 32-bit unsigned integers)
Advantages over Standard Communities:
- All three fields are 32-bit (vs 16-bit)
- Supports 4-byte ASNs natively
- More namespace for values
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
large-community [ 65001:100:200 ];
}
route 10.0.1.0/24 {
next-hop 192.168.1.1;
large-community [ 4200000000:1:2 ]; # 4-byte ASN
}
}Text API:
announce route 10.0.0.0/24 next-hop 192.0.2.1 large-community [ 65001:100:200 ]
announce route 10.0.1.0/24 next-hop 192.0.2.1 large-community [ 4200000000:1:2 ]Use Cases:
- Organizations with 4-byte ASNs
- Need more than 65535 community values
- Encoding additional metadata (location, customer ID, service tier)
See also: RFC 8092, Configuration Example
Not propagated to neighbors.
Category: Optional Non-Transitive RFC: 4271 Purpose: Influences route preference from neighboring AS (lower = better)
Range: 0-4294967295 (32-bit unsigned integer) Default: 0 (if not present) Lower value = More preferred
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
med 50; # More preferred
}
route 10.0.1.0/24 {
next-hop 192.168.1.1;
med 100; # Less preferred
}
}Text API:
announce route 10.0.0.0/24 next-hop 192.0.2.1 med 50
announce route 10.0.1.0/24 next-hop 192.0.2.1 med 100Use Cases:
- Multi-homed networks: Signal preferred entry point
- Cold potato routing: Ask the neighbor to hand traffic over at the entry point the announcing network prefers
- Traffic engineering: Control inbound traffic from specific AS
Comparison Rules:
- Only compared for routes from same neighboring AS
- Missing MED treated as 0 (or infinity, depending on router config)
See also: RFC 4271 Section 5.1.4
Category: Optional Non-Transitive RFC: 4456 Purpose: Route reflector loop prevention
Created by: Route reflectors Value: Router ID of the route originator
Configuration:
ExaBGP does not reflect routes, so it never generates this attribute on its own. You set it per route, in the configuration or through the API.
neighbor 192.168.1.1 {
router-id 192.168.1.2;
local-address 192.168.1.2;
local-as 65001;
peer-as 65001;
static {
route 10.0.0.0/24 next-hop 192.168.1.2 originator-id 192.168.1.10;
}
}Purpose: Prevents routing loops in route reflector topologies
See also: RFC 4456, Route Reflection
Category: Optional Non-Transitive RFC: 4456 Purpose: Route reflector cluster loop prevention
Created by: Route reflectors Value: List of cluster IDs the route has passed through
Configuration:
ExaBGP does not reflect routes, so it never generates this attribute on its own. You set it per route, listing the cluster identifiers the route is meant to have passed through.
neighbor 192.168.1.1 {
router-id 192.168.1.2;
local-address 192.168.1.2;
local-as 65001;
peer-as 65001;
static {
route 10.0.0.0/24 next-hop 192.168.1.2 cluster-list [ 192.168.1.10 ];
}
}Purpose: Prevents routing loops between route reflector clusters
See also: RFC 4456
Category: Optional Non-Transitive RFC: 4760 Purpose: Multiprotocol reachability (for non-IPv4 unicast)
Used for:
- IPv6 unicast
- VPNv4/VPNv6
- FlowSpec
- EVPN
- BGP-LS
- L2VPN/VPLS
- MVPN
Configuration:
ExaBGP automatically encodes routes in MP_REACH_NLRI based on address family.
neighbor 192.168.1.1 {
family {
ipv6 unicast; # Uses MP_REACH_NLRI
ipv4 flow; # Uses MP_REACH_NLRI
ipv4 mpls-vpn; # Uses MP_REACH_NLRI
}
}
static {
# IPv6 route - automatically uses MP_REACH_NLRI
route 2001:db8::/64 {
next-hop 2001:db8::1;
}
}Text API:
# IPv6 - uses MP_REACH_NLRI
announce route 2001:db8::/64 next-hop 2001:db8::1
# FlowSpec - uses MP_REACH_NLRI
announce flow route { match { source 10.0.0.0/8; } then { discard; } }An empty MP_REACH_NLRI, one whose length runs past the attributes, or one whose header is cut short, ends the session with 3/9 Optional Attribute Error, the attribute as the Data field (RFC 7606 3(j) and 5.3, RFC 4760 7). The same applies to MP_UNREACH_NLRI. Earlier 6.0.0 snapshots treated one sent beside an IPv4 NLRI field as withdraw, keeping the session up, and answered one alone with 3/1.
See also: RFC 4760
Category: Optional Non-Transitive RFC: 4760 Purpose: Multiprotocol unreachability (withdraw non-IPv4 unicast routes)
Text API:
# Withdraw IPv6 route
withdraw route 2001:db8::/64
# Withdraw FlowSpec rule
withdraw flow route { match { source 10.0.0.0/8; } }A labelled unicast or VPN route (SAFI 4 or 128) is withdrawn with one Compatibility field of 0x800000 where its labels were, whatever the Multiple Labels Capability says (RFC 8277 2.4). 5.x withdrew it with the label stack it was announced with, which a receiver reads as part of the prefix once more than one label is sent.
See also: RFC 4760
Category: Optional Transitive RFC: 6514 Purpose: Provider Multicast Service Interface (for MVPN)
Used in: MVPN configurations
Configuration: ExaBGP decodes PMSI_TUNNEL in the routes it receives. The configuration has no keyword to set it.
See also: RFC 6514, MVPN Configuration
Category: Optional Non-Transitive RFC: 7311 Purpose: Accumulated IGP Metric
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
aigp 100;
}
}Whether AIGP is sent and accepted is decided per session (RFC 7311 3.3). Left unset, it is
on for iBGP sessions and towards members of our confederation, and off for every other
neighbour; aigp true; or aigp false; in the neighbour's capability block decides
instead, in both directions. Before this change an iBGP neighbour left at the default was
sent AIGP and then discarded it on receipt, and aigp false; did not stop it being sent.
An AIGP received on a session where it is disabled is discarded, and the first one is
logged as attribute.aigp.ignored.
The value 18446744073709551615 (all ones) is refused in the configuration and on the API: RFC 7311 3.2 has a receiver treat it as malformed, and ExaBGP discards an AIGP received with that value.
Text API:
announce route 10.0.0.0/24 next-hop 192.0.2.1 aigp 100Use Cases: Seamless MPLS, inter-domain metric comparison
See also: RFC 7311
Category: Optional Transitive RFC: 8669 Purpose: Segment Routing prefix segment identifier
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
label 16;
bgp-prefix-sid [ 100 ];
}
}See also: SRv6 and MUP, Configuration Example
ExaBGP supports announcing arbitrary BGP attributes using generic attribute syntax.
Configuration:
static {
route 10.0.0.0/24 {
next-hop 192.168.1.1;
attribute [ 0x99 0xc0 0x01020304 ]; # type code, flags, value, all in hexadecimal
}
}Text API:
announce route 10.0.0.0/24 next-hop 192.0.2.1 attribute [ 0x99 0xc0 0x01020304 ]Codes 14, 15, 17 and 18 (MP_REACH_NLRI, MP_UNREACH_NLRI, AS4_PATH and AS4_AGGREGATOR) are refused, in the configuration and on the API. ExaBGP builds those attributes itself, so a raw copy was sent a second time, or sent between two four octet AS speakers where RFC 6793 4.1 forbids it.
See also: Configuration Example
Quick alphabetical lookup of all attributes.
| Attribute | Type | Category | RFC |
|---|---|---|---|
| AIGP | 26 | Optional Non-Transitive | 7311 |
| AGGREGATOR | 7 | Optional Transitive | 4271 |
| AS_PATH | 2 | Well-Known Mandatory | 4271 |
| ATOMIC_AGGREGATE | 6 | Well-Known Discretionary | 4271 |
| CLUSTER_LIST | 10 | Optional Non-Transitive | 4456 |
| COMMUNITY | 8 | Optional Transitive | 1997 |
| EXTENDED_COMMUNITY | 16 | Optional Transitive | 4360 |
| LARGE_COMMUNITY | 32 | Optional Transitive | 8092 |
| LOCAL_PREF | 5 | Well-Known Discretionary | 4271 |
| MED (MULTI_EXIT_DISC) | 4 | Optional Non-Transitive | 4271 |
| MP_REACH_NLRI | 14 | Optional Non-Transitive | 4760 |
| MP_UNREACH_NLRI | 15 | Optional Non-Transitive | 4760 |
| NEXT_HOP | 3 | Well-Known Mandatory | 4271 |
| ORIGIN | 1 | Well-Known Mandatory | 4271 |
| ORIGINATOR_ID | 9 | Optional Non-Transitive | 4456 |
| PMSI_TUNNEL | 22 | Optional Transitive | 6514 |
| PREFIX_SID | 40 | Optional Transitive | 8669 |
BGP route selection order (simplified):
- Highest Weight (Cisco proprietary, not in ExaBGP)
- Highest LOCAL_PREF ← ExaBGP supports
- Locally originated (prefer local routes)
- Shortest AS_PATH ← ExaBGP supports
- Lowest ORIGIN (IGP < EGP < Incomplete) ← ExaBGP supports
- Lowest MED (from same AS) ← ExaBGP supports
- EBGP > IBGP
- Lowest IGP metric to NEXT_HOP
- Oldest route (stability)
- Lowest Router ID
Attributes ExaBGP can manipulate for traffic engineering:
- LOCAL_PREF (IBGP preference)
- AS_PATH (prepending for less preferred paths)
- MED (hint to neighbor AS)
- COMMUNITY (trigger policies)
| Goal | Attribute | Action |
|---|---|---|
| Prefer inbound path (IBGP) | LOCAL_PREF | Set higher value (e.g., 200) |
| Deprefer inbound path (IBGP) | LOCAL_PREF | Set lower value (e.g., 50) |
| Make path less attractive (outbound) | AS_PATH | Prepend local AS multiple times |
| Hint preferred entry (to neighbor AS) | MED | Set lower value (e.g., 50) |
| Trigger remote policy | COMMUNITY | Tag with agreed community |
| Blackhole traffic | COMMUNITY | Tag with 65535:666 (RTBH) |
| Don't advertise to EBGP | COMMUNITY | Add NO_EXPORT |
| Mark VPN route | EXTENDED_COMMUNITY | Set Route Target |
FlowSpec actions are implemented as Extended Communities.
| Action | Extended Community Type | Example |
|---|---|---|
| Discard | Traffic Rate of 0 (0x8006) | then { discard; } |
| Rate Limit | Traffic Rate (0x8006) | then { rate-limit 1000000; } |
| Redirect to VRF | Redirect (0x8008) | then { redirect 65001:100; } |
| Redirect to IP | Redirect-to-IP, draft-ietf-idr-flowspec-redirect-ip (0x010C) | then { redirect 1.2.3.4; } |
| Mark DSCP | Traffic Marking (0x8009) | then { mark 10; } |
| Sample | Traffic Action (0x8007) | then { action sample; } |
| Terminal | Traffic Action (0x8007) | then { action terminal; } |
See also: FlowSpec Actions Reference
L3VPN routes use Extended Communities for route filtering.
| Attribute | Type | Purpose | Example |
|---|---|---|---|
| Route Distinguisher (RD) | Special | VPN instance identifier | rd 65001:100 |
| Route Target (RT) | Extended Community | Import/export filter | target:65001:100 |
| Route Origin (RO) | Extended Community | VPN route origin | origin:65001:100 |
Configuration:
static {
route 10.0.0.0/24 {
rd 65001:100; # Route Distinguisher
label 16; # MPLS label, required with rd
next-hop 192.168.1.1;
extended-community [ target:65001:100 ]; # Route Target
}
}See also: L3VPN Overview
- Configuration Syntax - Attribute syntax
- Directives Reference - All configuration directives
- Text API Reference - API attribute syntax
- JSON API Reference - JSON attribute format
- IPv4/IPv6 Unicast - Basic attributes
- FlowSpec - Extended communities
- L3VPN - Route targets and distinguishers
- EVPN - EVPN extended communities
- Communities - Community usage patterns
- Route Reflection - ORIGINATOR_ID, CLUSTER_LIST
- RFC Compliance - Complete RFC implementation list
- conf-attributes.conf - All attributes showcase
- conf-largecommunity.conf - Large communities
- parse-community.conf - Standard communities
- Examples Index - Browse the examples
Getting Started
Configuration
- Configuration Syntax
- Neighbor Configuration
- Directives A-Z
- Syntax Reference
- Templates
- Environment Variables
- Process Configuration
API
- API Overview
- Text API Reference
- JSON API Reference
- API Commands
- Writing API Programs
- Error Handling
- Production Best Practices
Address Families
- Overview
- IPv4 Unicast
- IPv6 Unicast
- FlowSpec
- EVPN
- L3VPN
- BGP-LS
- VPLS
- SRv6 / MUP
- Multicast
- RT Constraint
Features
Use Cases
Tools
Operations
Reference
- Architecture
- Design
- Attribute Reference
- Command Reference
- BGP State Machine
- Capabilities
- Communities
- Examples Index
- Glossary
- RFC Support
Integration
Migration
Community
External