BGP on MikroTik
bgp on mikrotik, To add a BGP peer in a MikroTik router, follow these steps:
β Step 1: Enable BGP on MikroTik
Before adding a BGP peer, ensure BGP is enabled:
-
AS Number: Your autonomous system number (e.g.,
65001
) -
Router ID: Typically the highest IP on the router (e.g.,
192.168.1.1
)
Example:
β Step 2: Add BGP Peer
Now, add the BGP peer:
-
PEER_IP: The IP of your BGP neighbor
-
PEER_AS: The AS number of your neighbor
-
YOUR_INTERFACE: Interface for the BGP session (or leave blank to use the main route)
Example:
β Step 3: Add Networks to Advertise
Specify which networks you want to advertise via BGP:
Example:
π¨ Make sure this network exists in your routing table (/ip route print
).
β Step 4: Verify BGP Peer Status
Check if the peer is established:
Expected State: established
β
β Step 5: Check Advertised and Received Routes
See advertised routes:
See received routes:
β Step 6: (Optional) Apply BGP Filters
If you want to filter which routes are advertised/accepted:
-
Allow all incoming routes:
-
Allow all outgoing routes:
For custom filters, use prefix lists or match rules.
π― Summary
-
Enable BGP β Set AS number & Router ID
-
Add BGP Peer β Define the remote IP & AS
-
Advertise Networks β Add networks to BGP
-
Check Peer Status β Verify itβs “established”
-
Monitor Routes β Check advertised & received routes
-
(Optional) Apply Filters β Control route flow
Let me know if you need help!