Routes were announced and withdrawn through an HTTP form, each tagged with a free-text owner and checked against an allow-list and a per-owner limit. That was the lab's interface, not a router's. Routes now come from 'originate' entries in the configuration file and are in the local RIB before any session starts. The local RIB holds one route per prefix with no notion of owners or policy. local_route_policy is gone from the configuration. The HTTP API keeps its GET endpoints (status, config, peers, originated and received routes, events, metrics). The announce, withdraw, wire-bytes and well-known-community endpoints are removed, and the status page loses the announce form, the community presets and the byte decoder. Community text parsing moves from the web crate to bgp-packet so the configuration can use it. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
36 lines
1.1 KiB
Protocol Buffer Text Format
36 lines
1.1 KiB
Protocol Buffer Text Format
# A worked example; the fields are documented in
|
|
# crates/server/proto/config.proto.
|
|
router_id: "10.0.0.1"
|
|
local_asn: 65000
|
|
|
|
# Where to accept BGP connections. Port 179 needs privileges; pick another
|
|
# port to run unprivileged against a peer that dials a custom port.
|
|
listen_endpoints { address: "127.0.0.1" port: 179 }
|
|
listen_endpoints { address: "::1" port: 179 }
|
|
|
|
# A peer we connect to (and accept connections from).
|
|
peers {
|
|
name: "r1"
|
|
endpoint { address: "127.0.0.1" port: 1791 }
|
|
remote_asn: 65001
|
|
hold_time_seconds: 30
|
|
}
|
|
connect_retry_seconds: 5
|
|
|
|
# Let a restarted peer replace a stale Established session immediately
|
|
# (RFC 4271 CollisionDetectEstablishedState). Default false.
|
|
collision_detect_established_state: false
|
|
|
|
# Routes this router originates, announced to every peer.
|
|
originate { prefix: "10.100.0.0/16" }
|
|
originate {
|
|
prefix: "2001:db8:100::/48"
|
|
med: 50
|
|
communities: "65000:100"
|
|
large_communities: "65000:1:2"
|
|
}
|
|
|
|
# Read-only status page, JSON API and metrics. It has no authentication:
|
|
# keep it on loopback or behind a reverse proxy.
|
|
http_endpoint { address: "127.0.0.1" port: 8080 }
|