I am always trying to familiarize myself with different technologies, vendors, protocols, tools and techniques. This is why today I will be exploring BGP, specifically eBGP.
BGP or Border Gateway Protocol is what the internet relies on. Your ISP uses BGP to peer with other ISPs and services (for example Google). BGP dynamically advertises routes to other routers.
This post isn’t intend to be a tutorial and I’m assuming you have basic BGP knowledge, this is just to demonstrate a basic Mikrotik setup.
I used 3 routers, a hAP lite, a hAP AX lite LTE6, and an RB5009.
I started by assigning each routers respective ports an IP link between each router, for example 192.168.150.1 for ether7 on port 7 of the RB5009, 192.168.150.2 on port 2 of the hAP AX, and 192.168.151.1 on port 3 of the hAP AX and 192.168.151.2 on port 4 of the hAP lite etc etc.
Then we can start creating our BGP connections. My ASN numbers will be as follows:
AS65000 – RB5009
AS65001 – hAP AX lite
AS65002 – hAP lite
We can add this, and the respective link addresses for each router respectively in the Mikrotik webfig interface:
We repeat this for all 3 routers in the respective web interfaces.
Now, we need to advertise some routes to the other routers, since the RB5009 is also connected to my home LAN, I will use it to demonstrate.
Open the BGP page and open the “Filter” section, then we create a new Output Network, this can be called what you like. Mine will be called “bgp-out”.
We then go into the IP -> Firewall -> Address Lists tab and click “Add New”. Then set the address range you would like to advertise to other routers, and set the list to the “bgp-out” network that we created:
I setup 2 networks, 192.168.55.0/24, which is my home LAN accessible on port 8 of the RB5009, and 192.168.10.0/24 which is the RB5009’s own LAN:
We can now test our setup by connecting to the other routers and checking those networks are reachable:
Success! We can now ping my LAN subnet and the RB5009’s subnet even when connecting through the hAPs! The routes are being advertised.
No comment yet, add your voice below!