BGPCTL(8)

NAME
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, s s for show summary.

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:

fib couple
    Insert the learned routes into the Forwarding Information Base a.k.a. the kernel routing table.

fib decouple
    Remove the learned routes from the Forwarding Information Base a.k.a. the kernel routing table.

neighbor peer up
    Take the BGP session to the specified neighbor up. peer may be the neighbor's address or description.

neighbor peer down
    Take the BGP session to the specified neighbor down. peer may be the neighbor's address or description.

neighbor peer clear
    Stop and restart the BGP session to the specified neighbor. peer may be the neighbor's address or description.

neighbor peer 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.

network add prefix
    Add the specified prefix to the list of announced networks.

network delete prefix
    Remove the specified prefix from the list of announced networks.

network flush
    Remove all dynamically added prefixes from the list of announced networks.

network show 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.

show fib filter
    Show 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:

    connected
        Show only connected routes.
    static
        Show only static routes.
    bgp Show only routes originating from bgpd(8) itself.
    nexthop
        Show only routes required to reach a BGP nexthop.

show interfaces
    Show the interface states.

show neighbor peer modifier
    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.
    timers
        Show the BGP timers.

show nexthop
    Show 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:

    address
        Show best matching route for address.
    address/len
        Show RIB entry for this CIDR prefix.
        address/len all Show all entries in the specified range.
    as as
        Show all entries with as anywhere in the AS path.
    source-as as
        Show all entries with as as rightmost AS.
    transit-as as
        Show all entries with as anywhere but rightmost.
    empty-as
        Show all entries that are internal routes with no AS's in the AS path.
    neighbor peer
        Show only entries from the specified peer.
    summary
        This is the same as the show summary 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.

show summary
    Show a list of all neighbors, including information about the session state and message counters.

FILES
/etc/bgpd.conf
    default bgpd(8) configuration file

SEE ALSO
bgpd.conf(5), bgpd(8)

HISTORY
The bgpctl program first appeared in OpenBSD 3.5.