How to list BGP prefixes announced to Upstreams in Mikrotik RouterOS 7

shape
shape
shape
shape
shape
shape
shape
shape

To list the BGP prefixes announced to Upstreams in Mikrotik RouterOS 7, you can use the following commands in the RouterOS terminal. These commands allow you to view actively advertised BGP routes.

  1. Access the BGP session:
   /routing/bgp/connection/advertisements
  1. Display announced BGP prefixes: To see all the prefixes announced to a particular peer, you can use:
   /routing/bgp/connection/advertisements/print

Or, if you want to specify a specific peer:

   /routing/bgp/connection/advertisements/print where peer=<peer-name>
  1. Filter ads by specific attributes: You can also add filters for specific attributes. For example, to list only prefixes with a given AS_PATH:
   /routing/bgp/connection/advertisements/print where as-path=<AS_PATH>
  1. Example of a complete command: To list all the prefixes announced to the peer called “ISP1”:
   /routing/bgp/connection/advertisements/print where peer="ISP1-1"

Note: For the above command, remember to put the suffix “-1” at the end of the peer’s name. For example, for a peer called “ISP1”, use “ISP1-1” as in the command above.

These commands provide a clear view of the BGP prefixes that are being announced to each of the peers configured in Mikrotik RouterOS 7.

Leave a Reply

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

Latest news

Latest news directly from our blog.