bgpctl
control the Border Gateway Protocol daemon
SYNOPSIS
bgpctl
[-n]
[-s socket]
command
[arguments]...
DESCRIPTION
The
bgpctl
program controls the
bgpd(8)
daemon.
Commands to switch between displays may be abbreviated to the
minimum unambiguous prefix; for example,
-ss
for
-showsummary.
The options are as follows:
-n
Show neighbors' IP addresses instead of their description.
-s socket
Use
socket
instead of the default
/var/run/bgpd.sock
to communicate with
bgpd(8).
The commands are as follows:
-fibcouple
Insert the learned routes into the Forwarding Information Base
a.k.a. the kernel routing table.
-fibdecouple
Remove the learned routes from the Forwarding Information Base
a.k.a. the kernel routing table.
-irrfilter
[options]
as
[arguments]
Get the
aut-num
object from the
Internet Routing Registry
and generate bgpd filters from the policy specified therein.
The aut-num object as well as the associated as-set and route objects
have to be in RPSL format.
The options are as follows:
-o directory
Use
directory
to write the filter files to.
-neighborpeer-up
Take the BGP session to the specified neighbor up.
peer
may be the neighbor's address or description.
-neighborpeer-down
Take the BGP session to the specified neighbor down.
peer
may be the neighbor's address or description.
-neighborpeer-clear
Stop and restart the BGP session to the specified neighbor.
peer
may be the neighbor's address or description.
-neighborpeer-refresh
Request 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 or description.
-networkadd prefix
Add the specified prefix to the list of announced networks.
-networkdelete prefix
Remove the specified prefix from the list of announced networks.
-networkflush
Remove all dynamically added prefixes from the list of announced networks.
-networkshow family
Show all announced networks.
family,
if given, limits the output to the given address family.
The supported families are
inet
and
inet6.
-reload
Reload the configuration file.
-showfib filter
Show routes from
bgpd(8/Ns)
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:
Show detailed information about the neighbor identified by
peer,
which may be the neighbor's address or description,
according to the given
modifier:
-messages
Show statistics about sent and received BGP messages.
-terse
Show 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, and withdraws.
-timers
Show the BGP timers.
-shownexthop
Show the list of BGP nexthops and the result of their validity check.
-showrib
[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:
address
Show best matching route for address.
address
Show RIB entry for this CIDR prefix.
address-all
Show all entries in the specified range.
-asas
Show all entries with
as
anywhere in the AS path.
-source-asas
Show all entries with
as
as rightmost AS.
-transit-asas
Show all entries with
as
anywhere but rightmost.
-peer-asas
Show all entries with
as
as leftmost AS.
-empty-as
Show all entries that are internal routes with no AS's in the AS path.
-communitycommunity
Show all entries with community
community.
-neighborpeer
Show only entries from the specified peer.
-summary
This is the same as the
showsummary
command.
-memory
Show RIB memory statistics.
Additionally, the following
options
are defined:
-detail
Show more detailed output for matched routes.
family
Limit the output to the given address family.
-in
Show routes from the unfiltered Adj-RIB-In.
This is only possible if
softreconfig in
is enabled for the neighbor.
-out
Show the filtered routes sent to a neighbor also known as Adj-RIB-Out.
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.
-showsummary
Show a list of all neighbors, including information about the session state
and message counters.
-showsummary terse
Show a list of all neighbors, including information about the session state,
in a terse format.