Module bgpd_rs::config[][src]

Expand description

TOML Config Manager Peers and their config are defined in TOML format.

Details of config values:

router_id = "1.1.1.1"        # Default Router ID for the service
default_as = 65000           # Used as the local-as if `local_as` is not defined for a peer

[[peers]]
remote_ip = "127.0.0.2"      # This can also be an IPv6 address, see next peer
remote_as = 65000
passive = true               # If passive, bgpd won't attempt outbound connections
router_id = "127.0.0.1"      # Can override local Router ID for this peer
hold_timer = 90              # Set the hold timer for the peer, defaults to 180 seconds
families = [                 # Define the families this session should support
  "ipv4 unicast",
  "ipv6 unicast",
]

[[peers.static_routes]]      # Add static routes (advertised at session start)
  prefix = "9.9.9.0/24"
  next_hop = "127.0.0.1"
[[peers.static_routes]]
  prefix = "3001:100::/64"
  next_hop = "3001:1::1"
[[peers.static_flows]]       # Add static Flowspec rules too!
afi = 2
action = "traffic-rate 24000"
matches= [
    "source 3001:100::/56",
    "destination-port >8000 <=8080",
    "packet-length >100",
]
as_path = ["65000", "500"]
communities = ["101", "202", "65000:99"]


[[peers]]
remote_ip = "::2"
enabled = false              # Peer is essentially de-configured
remote_as = 100
local_as = 200
families = [
  "ipv6 unicast",
]

Structs

Peer (or peers) config and static advertisements

Global BGP daemon options. router_id, default_as, and poll_interval can be overridden at the peer level

Enums

Specify static route/flow for a PeerConfig

Functions

Parse a TOML config file and return a ServerConfig