How do we calculate Down/Upstreams?


BGP itself has no direct way to encode the relationship between two networks. So bgp.tools has to do an educated guess to figure this out.

To do this. Let’s look at a single prefix.

ASN Path graph

bgp.tools displays the upstream list to look like this.

ASN Path graph

In the background, bgp.tools simply sees paths like:

PREFIX_AS_PATH: 185.230.223.0/24 [[4777 2516 1299 3170 206924]]
PREFIX_AS_PATH: 185.230.223.0/24 [[198290 2914 44684 206924]]
PREFIX_AS_PATH: 185.230.223.0/24 [[41157 3257 1299 3170 206924]]
PREFIX_AS_PATH: 185.230.223.0/24 [[20080 2914 3170 206924]]

To simplify, bgp.tools considers any ASN in the path for a prefix that contains a tier 1 to be in a upstreaming relationship. For example:

PREFIX_AS_PATH: 185.230.223.0/24 [[198290 2914 44684 206924]]

In this case we see that 2914 (NTT, a ASN that bgp.tools considers to be a tier 1) connects to 44684 (Mythic) that then connects to our originator 206924. Meaning that bgp.tools will see 44684 as a upstream for 206924.

These relationships are also ported backwards to establish as providers downstreams.

Any relationship between two ASNs seen on the path are shown as peers on the site. Just because two providers are peering with eachother does not mean that bgp.tools can see this. bgp.tools needs to be able to see the routing table inside that ASN (or one of it’s downstreams) to be able to see this.

If you want to help coverage, please email the contact address at the bottom of this site!


Last updated: 1st May 2021