-
Notifications
You must be signed in to change notification settings - Fork 2
bgp route modify
Pre-Alpha. This page describes behavior that may change.
Named route attribute modifier. Modifies route attributes on import or export without filtering. Plugin bgp-filter-modify, filter type modify.
The modifier always applies its declared operations: it unconditionally returns the modify action. For conditional modification, compose it with a match filter earlier in the chain (for example a community-match or AS-path-length filter that rejects first).
Policy.
Defined under bgp { policy { } } and referenced by name in peer filter chains:
bgp {
policy {
modify set-localpref {
set {
local-preference 200;
}
}
modify prepend-twice {
set {
as-path-prepend 2;
}
}
modify bump-pref {
increment {
local-preference 50;
}
}
modify tag-and-scrub {
set {
community-add [ 65000:100 ];
community-remove [ 65000:999 ];
}
}
}
peer upstream {
filter {
import [ set-localpref ];
export [ prepend-twice ];
}
}
}
A modify definition has three blocks: set, increment, and decrement. At least one operation must be present or the config is rejected.
set produces a fixed value at config time.
| Leaf | Type | Description |
|---|---|---|
local-preference |
uint32 | Set LOCAL_PREF. |
med |
uint32 | Set MED. |
origin |
igp, egp, incomplete | Set ORIGIN. |
next-hop |
IP address | Set NEXT_HOP. |
as-path-prepend |
uint8 (1-32) | Prepend own AS N times. |
community-add |
leaf-list | Add standard communities (ASN:value or well-known name). |
community-remove |
leaf-list | Remove standard communities. |
large-community-add |
leaf-list | Add large communities (GA:LD1:LD2). |
large-community-remove |
leaf-list | Remove large communities. |
extended-community-add |
leaf-list | Add extended communities (for example rt:65000:100). |
extended-community-remove |
leaf-list | Remove extended communities. |
Community values are validated at config time. Add and remove are emitted as text directives that the engine maps to wire-level add/remove operations.
increment and decrement read the current attribute value from the UPDATE at runtime and compute a new absolute value. Only three attributes are supported:
| Leaf | Type | Description |
|---|---|---|
local-preference |
uint32 | Add to / subtract from LOCAL_PREF. |
med |
uint32 | Add to / subtract from MED. |
aigp |
uint32 | Add to / subtract from AIGP. |
Each value must be a positive integer. Increment saturates at the uint32 maximum; decrement floors at 0. Targeting the same attribute with both set and increment/decrement is rejected as a conflict.
internal/component/bgp/plugins/filter_modify/
Unreviewed draft. This wiki was authored in bulk and has not been reviewed. File corrections on the issue tracker.
- Overview
- YANG Model
- Editor Workflow
- Archive and Rollback
- System
- Interfaces
- VRRP
- BFD
- FIB
- OSPF
- IS-IS
- MPLS / LDP / RSVP-TE
- RSVP-TE
- SRv6
- Static Routes
- Policy Routing
- Firewall
- Traffic Control
- Class of Service
- L2TP/PPP
- PPPoE
- VPP Data Plane
- RPKI
- IPsec VPN
- TACACS+ AAA
- RADIUS AAA
- AS112 DNS
- Authorization
- Fleet
- BGP
- Starting and Stopping
- Show Commands
- Monitoring
- Flow Export
- DDoS Mitigation
- Anomaly Detection
- Health Checks
- Audit Trail
- Production Diagnostics
- Logging
- Operational Reports
- Healthcheck
- Self-Update
- Zero-Touch Provisioning
- MRT Analysis
- Upgrade and Restart
- Storage
- Policy
- Core
- Resilience
- Validation
- Capabilities
- Address Families
- Protocol
- Subsystems
- Infrastructure
- Route Server at an IXP
- Transit Edge with RPKI
- Public Looking Glass
- ExaBGP Migration Walkthrough
- FlowSpec Injection
- Chaos-Tested Peering
- AS Path Topology