Configuration
polad reads this file at startup. See polad for command-line options.
Example
global:
pcep:
address: "192.0.2.254"
port: 4189
grpcServer:
address: "127.0.0.1"
port: 50052
log:
path: "/var/log/pola/"
name: "polad.log"
level: "info"
ted:
enable: true
source: "gobgp"
asn: 65000
gobgp:
grpcClient:
address: "127.0.0.1"
port: 50051
usidMode: false
GoBGP listens on port 50051 by default, and pola connects to that port by default.
This example puts polad’s gRPC server on 50052 instead, so run pola -p 50052.
Keys
All keys are under global. Unknown keys are rejected.
| Key | Required | Default | Description |
|---|---|---|---|
pcep.address | yes | PCEP listen address. A literal IPv4 or IPv6 address; hostnames are not resolved. | |
pcep.port | yes | PCEP listen port. The standard port is 4189. | |
pcep.keepalive | no | 30 | Keepalive in seconds (0-255) advertised in Pola’s Open. |
pcep.deadTimer | no | 4 × keepalive, capped at 255 | DeadTimer in seconds (0-255) advertised in Pola’s Open. Set it to 0 if keepalive is 255. |
pcep.minKeepalive | no | no lower bound | Lowest Keepalive accepted from a peer (0-255). |
pcep.maxKeepalive | no | no upper bound | Highest Keepalive accepted from a peer (0-255). |
pcep.allowNegotiation | no | true | Propose acceptable timers to a peer instead of rejecting its Open. |
grpcServer.address | yes | gRPC API listen address. A literal IPv4 or IPv6 address; hostnames are not resolved. | |
grpcServer.port | yes | gRPC API listen port. | |
log.path | yes | Log directory, created with mode 0750 if missing. Prepended to name as is; include a trailing /. | |
log.name | yes | Log file name. Opened for appending; its mode is set to 0600, even for an existing file. | |
log.level | no | info | debug, info, warn, or error (lowercase). |
ted | yes | TED section. Required even when the TED is disabled. | |
ted.enable | no | false | Build a TED from BGP-LS. |
ted.source | when enabled | TED source. Only gobgp is supported. | |
ted.asn | when enabled | AS number of the topology; non-zero. | |
gobgp.grpcClient.address | when source is gobgp | GoBGP gRPC API address. | |
gobgp.grpcClient.port | when source is gobgp | GoBGP gRPC API port. | |
usidMode | no | false | Treat SRv6 SIDs in explicit segment lists as uSID. See SRv6. |
All port values can be written as numbers or strings.
Timer behavior is described in PCEP Sessions, and the TED in Traffic Engineering Database.
Validation
polad checks the file at startup and exits on the first stage that fails.
Read errors
If the file cannot be opened or parsed, the error begins with failed to read config file:.
Examples: a missing file, invalid YAML, or an unknown key.
Validation errors
Violations of these rules are reported together in one error beginning with invalid config file:. Timer rules apply after defaults are filled in.
- Every key marked
yesunder Required is present; string values are non-empty. log.levelisdebug,info,warn, orerror.- If
ted.enableistrue,ted.sourceisgobgp,ted.asnis non-zero, andgobgp.grpcClient.addressandportare set. Otherwise, these keys are not checked. - If
keepaliveis 0,deadTimeris 0. - If
keepaliveis non-zero,deadTimeris 0 or greater thankeepalive. minKeepaliveis not greater thanmaxKeepalive.
Startup errors
A listen address that is not a literal IP address causes an error when its listener starts.
JSON Schema
polad_config.json provides editor completion and catches most single-key errors.
Rules that span keys, such as the timer rules, are checked only by polad.
Security
- The gRPC API has no TLS and no authentication: anyone who can reach it can create and delete SR Policies. Bind it to loopback or a trusted management network.
- The PCEP listener has no TLS, TCP-MD5, or TCP-AO, and accepts any PCC that connects. Restrict access with network controls.
- The connection to GoBGP is plaintext gRPC.