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!