Trouble Shooting BGP on FreeBSD

FreeBSD Networking

   We use BGP on our main borger router and need to check or test out BGP connectivity every now and then.  This article shows most of the common commad that we use to check out BGP connections and troubleshoot any issues.  We have a FreeBSD 6.2 box running Quagga but most of these commands will work on just about and system.

Checking BGP Connectivity

    Once you are logged into the FreeBSD router box, telnet into the BGP Quagga daemon

# telnet localhost 3605

To see a summary of BGP connections

# show ip bgp summary

    The last number (State/PfxRcd) is the important number. This shows the number of routes received from the neighbour. If it says “Idle” then there is a problem with the connection. If it is 0 (Zero) then the connection is working but you haven’t received any routes.  If you have just setup the connection, it may say “Active”. This means that it was able to conntact the remote end but it is still setting up the link.

To see details about each BGP neighbour

# show ip bgp neighbors

    To see the bgp routes from only one neighbour. Use the neighbours AS number in the regexp expression. For example:

# show ip bgp regexp ^64646

    The above example shows all BGP routes that start with AS 64646

Checking Routing

    Once you are logged into the FreeBSD router box, telnet into the Quagga daemon

# telnet localhost 2601

    To see all the routes that Quagga has.

# show ip route

    Not that this can (and will be) a long list since we get a number of full feeds.

    To see what routes are available for a given ip.

# show ip route [ipaddress]

    The above will tell you what route was chosen by quagga. If the route is a BGP route, then more information can be found by telneting into the BGP daemon ( port 2605) and issuing the following command.

# show ip bgp [ip address]

Resetting Routes

    After a configuration change or if there is connection troubles, you may want to reset the routing and have the routes resent. These command must be done while telneted into the BGP daemon (port 2605) (NOTE: Resetting the routes can be disruptive and will cause short connection outages)

    To cause the remote system to resend it’s routes, use the following command.

# clear ip bgp [AS] in

    To resend our routes to the remote end

# clear ip bgp [AS] out

Leave a Comment

Your email address will not be published. Required fields are marked *