Configure routes and policy
Start with one file
Wren loads TOML from /etc/wren/wren.toml or the path supplied with --config. Use a unique 32-bit router ID. The ID is still written as an IPv4 address on a router with only IPv6 transport.
router-id = "192.0.2.10"
[[static]]
prefix = "198.51.100.0/24"
via = "192.0.2.1"
Save it as router.toml and check it:
wren check --config router.toml
The result reports one static route. A check validates the file only; verify reachability with a peer and a kernel route lookup.
Apply an explicit eBGP policy
This complete example permits a single peer prefix in and a single local prefix out. Both filters reject everything else.
flowchart LR
peer[Peer 192.0.2.20<br/>AS 65002] -->|"import: from-peer<br/>203.0.113.0/24 only"| rib[Wren RIB]
rib -->|"export: to-peer<br/>198.51.100.0/24 only"| peer
router-id = "192.0.2.10"
[[filter]]
name = "from-peer"
default = "reject"
[[filter.rule]]
prefix = ["203.0.113.0/24"]
action = "accept"
[[filter]]
name = "to-peer"
default = "reject"
[[filter.rule]]
prefix = ["198.51.100.0/24"]
action = "accept"
[bgp]
enabled = true
local-as = 65001
network = ["198.51.100.0/24"]
[[bgp.neighbor]]
address = "192.0.2.20"
remote-as = 65002
import = "from-peer"
export = "to-peer"
With default RFC 8212 policy, a session can be Established and exchange no usable routes in a direction with no attached policy. Verify the filters in a running lab.
Protocol configuration
| Section | Example |
|---|---|
[bgp] | IPv4 routes over an IPv6-only link |
[ospf] | Two IPv4 neighbors on a point-to-point link |
[ospf3] | IPv6 link-local adjacency |
[rip] and [ripng] | Advertise static routes by family |
[babel] | Observe a Babel neighbor and route |
[isis], [bfd], [[vrf]], [[vrrp]] | IS-IS, BFD, VRFs, VRRP |