/etc/bgpd.conf
default bgpd(8) configuration file
Control the bgp routing daemon
bgpctl [-jnV]
[-s
socket]
command
[argument ...]
The bgpctl program controls the bgpd(8) daemon. Commands may be abbreviated to the minimum unambiguous prefix; for example, s su for show summary.
The options are as follows:
-j
Create output as JSON object.
-n
Show neighbors' IP addresses instead of their description.
-s socket
Use socket to communicate with bgpd(8) instead of the default /run/openbgpd/bgpd.sock.<rdomain> where <rdomain> is the routing domain bgpctl is running in. To administer bgpd(8) in a different routing domain, run bgpctl in said routing domain.
-V
Show the version and exit.
The commands are as follows:
fib [table number] couple Insert the learned routes into the specified Forwarding Information Base a.k.a. the kernel routing table.
fib [table number] decouple Remove the learned routes from the specified Forwarding Information Base a.k.a. the kernel routing table.
flowspec add family rule [set argument ...]Add the specified flowspec rule to the list of announced rules. Currently family can be either inet or inet6. It is possible to set various path attributes with additional arguments. Adding a rule will replace an existing equal rule, including rules loaded from the configuration. See bgpd.conf(5) for information on how to write a flowspec rule.
flowspec delete family ruleRemove the specified flowspec rule from the list of announced rules.
flowspec flushRemove all dynamically added (i.e. with bgpctl flowspec add) flowspec rules from the list of announced rules.
flowspec show familyShow all announced flowspec rules. family, if given, limits the output to the given address family. The supported families are inet and inet6.
log briefDisable verbose debug logging.
log verboseEnable verbose debug logging.
neighbor peer clear [reason]Stop and restart the BGP session to the specified neighbor. If a reason is provided, the reason is sent as Administrative Shutdown Communication to the neighbor. peer may be the neighbor's address, description or the word group followed by a group description.
neighbor peer destroyDestroy a previously cloned peer. The peer must be down before calling this function. peer may be the neighbor's address, description or the word group followed by a group description.
neighbor peer down [reason]Take the BGP session to the specified neighbor down. If a reason is provided, the reason is sent as Administrative Shutdown Communication to the neighbor. peer may be the neighbor's address, description or the word group followed by a group description.
neighbor peer refreshRequest the neighbor to re-send all routes. Note that the neighbor is not obliged to re-send all routes, or any routes at all, even if it announced the route refresh capability. peer may be the neighbor's address, description or the word group followed by a group description.
neighbor peer upBring the BGP session to the specified neighbor up. peer may be the neighbor's address, description or the word group followed by a group description.
network add prefix [argument ...]Add the specified prefix to the list of announced networks. It is possible to set various path attributes with additional arguments. Adding a prefix will replace an existing equal prefix, including prefixes loaded from the configuration.
network bulk add [argument ...] Bulk add specified prefixes to the list of announced networks. Prefixes should be sent via stdin. It is possible to set various path attributes with additional arguments.
network bulk deleteBulk remove the specified prefixes from the list of announced networks. Prefixes should be sent via stdin.
network delete prefixRemove the specified prefix from the list of announced networks.
network flushRemove all dynamically added (i.e. with bgpctl network add) prefixes from the list of announced networks.
network mrt file file filterImport networks from an MRT table dump for debugging purposes. filter can be specified similarly to the show mrt command. Only networks matching the filter will be imported.
network show familyShow all announced networks. family, if given, limits the output to the given address family. The supported families are inet and inet6.
reload [reason]Reload the configuration file. Changes to the following neighbor options in bgpd.conf(5) only take effect when the session is reset: ipsec and tcp md5sig.
show fib filterShow routes from bgpd(8)'s view of the Forwarding Information Base. filter can be an IP address, in which case the route to this address is shown, or a flag:
bgpShow only routes originating from bgpd(8) itself.
connectedShow only connected routes.
inetShow only IPv4 routes.
inet6Show only IPv6 routes.
nexthopShow only routes required to reach a BGP nexthop.
staticShow only static routes.
table numberShow the routing table with ID number instead of the default routing table with ID 0.
show interfacesShow the interface states.
show metricsDump various BGP statistics in OpenMetrics format.
show mrt [options] filter Show routes from an MRT table dump file. filter can be an IP address, a CIDR prefix, an AS filter, a combination or nothing:
Show best matching route for address.
Show RIB entry for this CIDR prefix.
address/len all Show all entries in the specified range.
address/len or-shorter Show all entries covering and including the specified prefix.
as asShow all entries with as anywhere in the AS path.
empty-asShow all entries that are internal routes with no AS's in the AS path.
neighbor ipShow only entries from the specified peer.
peer-as asShow all entries with as as leftmost AS.
source-as asShow all entries with as as rightmost AS.
transit-as asShow all entries with as anywhere but rightmost.
Additionally, the following options are defined:
detailShow more detailed output for matching routes.
Limit the output to the given address family.
file nameRead the MRT dump from file name instead of using stdin.
peersPrint the neighbor table of MRT TABLE_DUMP_V2 dumps. Using this on other table dumps will only show the neighbor of the first entry.
Multiple options and filters can be used at the same time.
show neighbor peer modifierShow detailed information about the neighbor identified by peer, according to the given modifier:
messagesShow statistics about sent and received BGP messages.
terseShow statistics in an easily parseable terse format. The printed numbers are the sent and received open, sent and received notifications, sent and received updates, sent and received keepalives, and sent and received route refresh messages plus the current and maximum prefix count, the number of sent and received updates, sent and received withdraws, the neighbor's address (or subnet, for a template), AS number, and finally description.
timersShow the BGP timers.
peer may be the neighbor's address, description or the word group followed by a group description.
show nexthopShow the list of BGP nexthops and the result of their validity check.
show rib [options] filter Show routes from the bgpd(8) Routing Information Base. filter can be an IP address, a CIDR prefix, an AS filter or nothing:
Show best matching route for address.
Show RIB entry for this CIDR prefix.
address/len all Show all entries in the specified range.
address/len or-shorter Show all entries covering and including the specified prefix.
as asShow all entries with as anywhere in the AS path.
avs (valid | unknown | invalid)Show all entries with matching ASAP Validation State (AVS).
community communityShow all entries with community community.
empty-asShow all entries that are internal routes with no AS's in the AS path.
large-community large-communityShow all entries with large-community large-community.
memoryShow RIB memory statistics.
neighbor peerShow only entries from the specified peer.
neighbor group descriptionShow only entries from the specified peer group.
ovs (valid | not-found | invalid)Show all entries with matching Origin Validation State (OVS).
path-id pathidShow only entries which match the specified pathid. Must be used together with either neighbor or out.
peer-as asShow all entries with as as leftmost AS.
source-as asShow all entries with as as rightmost AS.
summaryThis is the same as the show summary command.
table ribShow only entries from the specified RIB table.
transit-as asShow all entries with as anywhere but rightmost.
Additionally, the following options are defined:
bestAlias for selected.
detailShow more detailed output for matching routes.
disqualifiedShow only routes which are not eligible.
errorShow only prefixes which are marked invalid and were treated as withdrawn.
Limit the output to the given address family.
filteredShow only routes which were filtered out. Requires rde rib Loc-RIB include filtered to be set in the config.
inShow routes from the unfiltered Adj-RIB-In. The neighbor needs to be specified.
leakedShow only routes where a route leak was detected.
outShow the filtered routes sent to a neighbor. The neighbor needs to be specified.
selectedShow only selected routes.
ssvShow each RIB entry as a single line, with fields separated by semicolons. Only works if detail is specified.
Options are silently ignored when used together with summary or memory. Multiple options can be used at the same time and the neighbor filter can be combined with other filters.
show rtrShow a list of all RTR sessions, including information about the session state.
show setsShow a list summarizing all roa-set, as-set, prefix-set, and origin-set tables.
show summaryShow a list of all neighbors, including information about the session state and message counters:
Description of the neighbor.
Autonomous system number.
Number of messages received from the neighbor.
Number of messages sent to the neighbor.
Number of outgoing messages queued.
Number of days and hours that the session has been up.
State of the session / Number of routes received. The session is up if there is no information for the State column (Established is not displayed).
show summary terseShow a list of all neighbors, including information about the session state, in a terse format.
show tablesShow a list of all currently loaded fib routing tables.
/etc/bgpd.conf
default bgpd(8) configuration file
/run/openbgpd/bgpd.sock
default bgpd(8) control socket
2 releases since Debian 12 (Bookworm); the text changed 1 time.