Solving Mikrotik Bgp Multihop not adding correct gateway when using Gre Tunnel

I decided to write down this article because i confronted myself with same issue first because my background expertise is on Linux mainly i didn`t expected that Mikrotik behave like this but afterwards reading on some Mikrotik forums i saw they promise they will resolv it on v7 but i made it possible on v6.29.1 on Mikrotik CCR but i suppose that the software packages are the same on all Mikrotik Routers.

First the infrastructure :

gretunnelbgpmultihopmikrotik

Networking Config

Mikrotik CCR
Internet config
Real IP : 1.1.1.2
Netmask : 255.255.255.0
Gateway : 1.1.1.1
Gre tunnel config :
Ip on gre interface : 10.10.101.2
Netmask : 255.255.255.0
Linux server
Internet config
Real IP : 2.2.2.2
Netmask : 255.255.255.0
Gateway : 2.2.2.1
Gre tunnel config :
Ip on gre interface : 10.10.101.1
Netmask : 255.255.255.0

The tunnel was put it in state enable on Mikrotik CCR with basic config with specific routes to function , same on Linux Server.

Afterwards i setup a bgp instances between them using the private as numbers, and bumped like the other users which are expecting that Mikrotik solves the issue of multihop to take the next-hop address of the tunnel not of the internet connection.

What i  did it was a little trick which i learned it can be done on linux using quagga forcing the next-hop address using bgp filter so on mikrotik i setup a routing filter called bgp-in with action accept  , set target scope 30  , with set nexthop direct “Gre Interface” and set out nexthop : 10.10.101.1  and check gateway none and added this filter to the specific peer which i wanted to force the next-hop.

 

Leave a Reply

Your email address will not be published.

captcha

Please enter the CAPTCHA text