-
Notifications
You must be signed in to change notification settings - Fork 2
static routes
Pre-Alpha. This page describes behavior that may change.
Ze supports static routes with ECMP, weighted load balancing, BFD-tracked failover, blackhole, and reject. Routes are programmed directly to the kernel via netlink (or VPP when available).
static {
route 0.0.0.0/0 {
next-hop 10.0.0.1 { }
}
}
All next-hops are installed simultaneously as a multipath route:
static {
route 10.0.0.0/8 {
next-hop 192.168.1.1 { }
next-hop 192.168.1.2 { }
next-hop 192.168.1.3 { }
}
}
The weight field controls traffic distribution. Higher weight means more traffic. Default is 1 (equal distribution).
static {
route 0.0.0.0/0 {
next-hop 10.0.0.1 {
weight 3;
}
next-hop 10.0.0.2 {
weight 1;
}
}
}
This sends 75% of traffic via 10.0.0.1 and 25% via 10.0.0.2.
Reference a BFD profile on each next-hop. When the BFD session goes down, that next-hop is removed from the ECMP group and the route is reprogrammed with the remaining active next-hops. When the session recovers, the next-hop is re-added.
bfd {
profile wan-fast {
detect-multiplier 3;
desired-min-tx-us 100000;
required-min-rx-us 100000;
}
}
static {
route 0.0.0.0/0 {
next-hop 10.0.0.1 {
weight 3;
bfd-profile wan-fast;
}
next-hop 10.0.0.2 {
weight 1;
bfd-profile wan-fast;
}
}
}
If all BFD-tracked next-hops go down, the route is withdrawn entirely.
Blackhole silently discards matching packets. Reject discards and sends an ICMP unreachable reply.
static {
route 192.0.2.0/24 {
blackhole { }
}
route 198.51.100.0/24 {
reject { }
}
}
IPv6 routes work the same way. For link-local next-hops, specify the outgoing interface:
static {
route 2001:db8::/32 {
next-hop 2001:db8::1 { }
}
route 2001:db8:1::/48 {
next-hop fe80::1 {
interface eth0;
}
}
}
static {
route 172.16.0.0/12 {
description "internal networks";
metric 100;
tag 42;
next-hop 10.0.0.1 { }
}
}
-
description: operator note (not programmed to kernel). -
metric: kernel route priority (lower is preferred). -
tag: opaque value for route policy matching in redistribute.
ze> show static
Shows all configured static routes with their prefixes, next-hops, weights, and BFD status in JSON format.
Static routes are programmed with RTPROT_ZE (protocol 250), the same identifier used by the FIB kernel plugin. On config reload, the plugin computes the diff between old and new routes and applies only the changes.
Kernel ECMP uses RTA_MULTIPATH with per-next-hop weight mapped from the weight field (kernel weight = weight - 1).
Static routes register as protocol "static" in the redistribute framework. BGP redistribute can import static routes:
redistribute {
destination bgp {
import static { }
}
}
- FIB for how routes reach the forwarding table.
- BFD for the BFD profiles referenced in failover config.
- Policy Routing for L3/L4-based traffic steering.
Adapted from main/docs/guide/static-routes.md.
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