When running a network with its own ASN, you will likely end up spending some time working with BGP. Knowing how your peer networks connect can help with your own network planning. BGP.Tools is a service that maps out different networks and the routes between them by having networks opt to provide bgp.tools with a BGP session sharing their exportable routes.

This guide will walk you through setting up a BGP.Tools session with a Mikrotik router running RouterOS 7.

BGP Tools Setup

After logging into your BGP.Tools account, visit the manage peering page and create a new session.

Fill in a name for this BGP session, your AS number, your router’s IP.

new bgp.tools peering session

Select “Create Session” and make a note of the remote peering IP and AS number.

bgp session created

Mikrotik RouterOS Setup

Route Filters

Before creating the session, create route filters to prevent any unexpected routes from being exchanged. BGP.Tools should never send you routes from this session, but its best to explicitly tell your router to reject all incoming routes just to be safe. Similarly, you don’t want to send bgp.tools blackhole routes either.

/routing filter rule
add chain=reject comment=reject disabled=no rule=reject
add chain=bgp.tools-out disabled=no rule="if (blackhole) {reject}"
add chain=bgp.tools-out disabled=no rule=accept

route filters

BGP Session

Now you add the BGP session with bgp.tools.

At this time Mikrotik’s BGP implementation does not support addPath, so only your router’s currently active routes will be sent to bgp.tools.

Unlike a normal BGP session, be sure to select both the ip and ipv6 address families, and enable multihop since this BGP session will be over the internet and not a LAN.

Be sure to change the examples to use your ASN and IP.

/routing bgp connection
add add-path-out=all address-families=ip,ipv6 as=64496 \
    disabled=no input.affinity=instance .filter=reject \
    local.address= .role=ebgp-provider multihop=yes \
    name=bgp.tools output.affinity=input .filter-chain=\
    bgp.tools-out .redistribute=bgp remote.address=\ .as=212232 router-id= \

mikrotik bgp settings

mikrotik bgp settings

mikrotik bgp settings

Save and enable the session once done.

BGP Tools Results

Once the session is enabled and active, you should see it listed on your bgp.tools account home page.

bgp.tools established

And when you view your AS page you should see Direct Feed added to your ASN’s tags. For example, here is mine.

bgp.tools tags

Now that you send BGP.Tools a BGP feed, your network’s information will be more accurate and you can use other features such as the Looking Glass!