- scripts/in-namespace.sh set CARGO_TARGET_DIR to the empty string when it was unset, which cargo refuses, and dropped RUSTFLAGS, so the run in the namespace rebuilt what kernel-tests.sh had just built. Each is passed on only where set. - The README's list of unsupported features still had route reflection and graceful restart, both of which exist; the command-line reference lacked SIGUSR1 and exit status 75; the HTTP API reference did not say what errors look like. - The event stream said "missed 0 events" for the best-routes stream, which does not count what it missed; it leaves the count out now. - CI lints bgp-bench with its count-memory feature, which nothing built. - bgp-bench had two unused dev-dependencies; bgp-integration-tests had three dependencies that only its tests and examples use. - install.sh updates apt before installing; two-routers.sh loses an unused variable; small things in the web crate. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
3.0 KiB
3.0 KiB
+++ title = "Command-Line Reference" description = "Describes the syntax, options, environment variables, and signals of the bgp command." weight = 2
[extra] nav = "Command Line" +++
Syntax
bgp [OPTIONS] <CONFIG>
Description
Starts the Ferrix BGP daemon with the specified configuration file, or validates the file.
Options
| Option | Description |
|---|---|
<CONFIG> |
Path to the configuration file. See Configuration Reference. |
--check |
Validates the configuration file and exits. The daemon does not listen on any port and does not modify any route. |
-l, --level <LEVEL> |
Specifies the minimum log level for the daemon's messages: error, warn, info, debug, or trace. Default: info. At debug and lower, the daemon logs every UPDATE message and every advertised route. |
-V, --version |
Displays the version and exits. |
-h, --help |
Displays help and exits. |
Exit Status
| Status | Meaning |
|---|---|
| 0 | With --check: the configuration is valid. Otherwise: the daemon stopped in response to SIGTERM or SIGINT. |
| 1 | The configuration is invalid, or the daemon failed. The error is written to standard error. |
| 75 | The daemon exited in response to SIGUSR1, to be started again. The systemd unit restarts it on this status (RestartForceExitStatus=75). See Upgrading Ferrix. |
Environment Variables
| Variable | Description |
|---|---|
RUST_LOG |
Specifies the log level for components other than the daemon's own crates, for example RUST_LOG=axum=debug for the HTTP server. |
Signals
| Signal | Action |
|---|---|
SIGTERM, SIGINT |
Sends a Cease NOTIFICATION message with the subcode Administrative Shutdown to every neighbor, removes the daemon's routes from the kernel, and exits with status 0. |
SIGUSR1 |
Starts a graceful restart (RFC 4724): neighbors on which graceful restart is in use retain the routes of Ferrix for the restart time, other neighbors receive a Cease NOTIFICATION message with the subcode Administrative Shutdown, the routes stay in the kernel, and the daemon exits with status 75. See Upgrading Ferrix. |
Ferrix does not reload its configuration while it runs. To apply a new configuration, restart the daemon. See Changing the Configuration.
Examples
To validate a configuration file:
bgp --check /etc/ferrix/server.textpb
/etc/ferrix/server.textpb is in order: AS64500, peers: 3, routes originated: 2
If the file is invalid, the command displays the error and exits with status 1:
Error: Invalid configuration
Caused by:
peer "x": endpoint is invalid: fe80::1 is a link-local address, which needs the interface it is on: fe80::1%eth0, for example
To start the daemon with debug logging:
bgp /etc/ferrix/server.textpb --level debug