/etc/bgpd.conf
Default bgpd configuration file.
Border gateway protocol (bgp) routing daemon
bgpd [-cdnvV]
[-D
macro=value]
[-f
file]
bgpd is a Border Gateway Protocol (BGP) daemon which manages the network routing tables. Its main purpose is to exchange information concerning "network reachability" with other BGP systems. bgpd uses the Border Gateway Protocol, Version 4, as described in RFC 4271.
BGP is an exterior gateway protocol using a multiple step decision process to find the best path. Advanced filtering can be used to influence the route decision for traffic engineering. The session engine of bgpd is responsible for maintaining the TCP session with each neighbor. Updates are passed to the Route Decision Engine (RDE) where the paths are filtered and used to compute a Routing Information Base (RIB). The parent process is responsible for keeping the RIB in sync with the kernel routing table.
The route decision process selects the best path by evaluating all paths to the same destination. The decision process continues to the next step if paths have equal attributes. Paths that are less preferred are taken out of consideration until there is only one path left.
All paths with errors or loops are not eligible.
Paths with an unreachable nexthop are not eligible. After this step all remaining paths are valid.
The path with the highest LOCAL_PREF is selected.
The path with the shortest AS path attribute is selected.
The ORIGIN attribute is compared. The order is IGP before EGP before incomplete origins.
The path with the lowest MULTI_EXIT_DISC metric is selected. Normally, this value is only considered when choosing between multiple routes sent by the same neighbouring AS. However, if “rde med compare always” is set in the configuration, the metric is compared for routes sent by any AS.
Comparison of the BGP session type. Paths learned over an external (EBGP) session are preferred over those learned via an internal (IBGP) session.
The path with the highest local weight is selected.
If “rde route-age evaluate” is set then the oldest path is selected.
The path coming from the neighbor with the lowest BGP ID wins. If the ORIGINATOR_ID attribute is present, that value will be used in the comparison instead.
The path with the shortest CLUSTER_LIST attribute is selected. If it is not present then a length of 0 is used in the comparison.
The path coming from the peer with the lowest IP address is selected. IPv4 sessions will be preferred over IPv6 ones.
Attributes set by filters can be used to tip the decision process to prefer particular paths over others. This can be achieved by changing the localpref, med, or weight attributes. AS path prepending or changing the med or origin attribute can be used to influence the routing behaviour on remote systems.
To have bgpd enabled at boot time, use “rcctl enable bgpd”, which sets
bgpd_flags=""
in rc.conf.local(8).
When bgpd starts up, it reads settings from a configuration file, typically bgpd.conf(5). A running bgpd process can be controlled using the bgpctl(8) utility.
The options are as follows:
-c
Force bgpd to do carp(4) demotion at startup when the demote functionality is used. Normally, bgpd will only do demotion at startup when the demotion counter for the group in question is already greater than 0. bgpd will start handling demotion after all sessions with demotion configured for the given group have been successfully established. At system startup, rc(8) has the demotion counter for the group carp increased until after bgpd is started, so this option should not be used in rc.conf(8).
-D macro=value
Define macro to be set to value on the command line. Overrides the definition of macro in the configuration file.
-d
Do not daemonize. If this option is specified, bgpd will run in the foreground and log to stderr.
-f file
Use file as the configuration file, instead of the default /etc/bgpd.conf.
-n
Configtest mode. Only check the configuration file for validity.
-v
Produce more verbose output.
-V
Show the version and exit.
/etc/bgpd.conf
Default bgpd configuration file.
/run/openbgpd/bgpd.sock.<rdomain>
Default bgpd control socket, where <rdomain> is the routing domain in which bgpd has been started.
11 releases since Debian 3.0 (Woody); the text changed 7 times.
-D since Debian 12 (Bookworm);
-V since Debian 12 (Bookworm);
-c since Debian 12 (Bookworm);
-n since Debian 12 (Bookworm).
--bgp_port until Debian 9 (Stretch);
--config-file until Debian 9 (Stretch);
--config_file until Debian 10 (Buster);
--daemon until Debian 10 (Buster);
--dryrun until Debian 10 (Buster);
--group until Debian 10 (Buster);
--help until Debian 10 (Buster);
--int_num until Debian 10 (Buster);
--module until Debian 10 (Buster);
--moduledir until Debian 10 (Buster);
--pathspace until Debian 10 (Buster);
--pid_file until Debian 10 (Buster);
--retain until Debian 9 (Stretch);
--skip_runas until Debian 10 (Buster);
--socket until Debian 10 (Buster);
--terminal until Debian 10 (Buster);
--user until Debian 10 (Buster);
--version until Debian 10 (Buster);
--vty_addr until Debian 10 (Buster);
--vty_port until Debian 10 (Buster);
--vty_socket until Debian 10 (Buster);
-A until Debian 10 (Buster);
-C until Debian 10 (Buster);
-I until Debian 10 (Buster);
-M until Debian 10 (Buster);
-N until Debian 10 (Buster);
-P until Debian 10 (Buster);
-S until Debian 10 (Buster);
-g until Debian 10 (Buster);
-h until Debian 10 (Buster);
-i until Debian 10 (Buster);
-p until Debian 9 (Stretch);
-r until Debian 9 (Stretch);
-t until Debian 10 (Buster);
-u until Debian 10 (Buster);
-z until Debian 10 (Buster).