Community discussions

MikroTik App
 
wintech2003
just joined
Topic Author
Posts: 10
Joined: Fri Jun 09, 2006 6:56 pm

Move host to other location and route /28 over tunnel

Mon Mar 27, 2023 12:41 am

Hello,

I have the following setup as in the schematic.
Router1 has a 10G uplink to the internet, no BGP, no IP space announcements etc - just a single WAN IPv4 for now.
Router2 has 1G uplink, announces a /24 via BGP.
The two routers are in two different datacenters in the same city - rtt between them is less than 1ms.

What I want to do is move server2 which is on VLAN2 (x.x.x.65/28) to the other datacenter, but I want to continue using the same subnet.
(VLAN2 or the particular subnet are not used from any other servers - it's exclusive to server2)

I tried to create an EoIP tunnel between the two routers, to extend the l2 broadcast domain, but it's acting like a hub - and all traffic going from router2 to switch2 also goes over the eoip tunnel to router1. So even though there's nothing behind router1 at the moment, I see 100-200mbps inbound traffic on router1 over the eoip link (when you look at the traffic graph it's like 1:1 the same traffic that goes to switch2).
When I connected an RPi4 to router1, and used one of the available IPs of one of the VLANs on router2, while everything worked right away and I had network connectivity etc, it felt very unstable - connections would drop, and I could not get more than 260Mbps with iperf.

So my next thought was to setup a GRE tunnel between the two routers, but I'm not sure if this can be done with a subnet smaller than /24 using public IPs?
I understand that I will need to setup an IP in each side of the tunnel of a /30 subnet. ie 10.10.10.1/30 for router1 and 10.10.10.2/30 for router2.
Then I will need to delete the VLAN and IP address from router2 and create it on router1.
Finally I would add a static route on router2 for x.x.x.65/28 dst 10.10.10.1
How will I route all outbound traffic from server2 through the GRE tunnel and out to the internet via router2, without affecting router1 to reach the internet via the WAN?
Should I use routing-mark for this?

If you have any suggestions or other ideas about how I can do this, let me know.
Thanks!
You do not have the required permissions to view the files attached to this post.
 
wiseroute
Member
Member
Posts: 352
Joined: Sun Feb 05, 2023 11:06 am

Re: Move host to other location and route /28 over tunnel

Mon Mar 27, 2023 1:42 pm

hello.
Router2 has 1G uplink, announces a /24 via BGP.

The two routers are in two different datacenters in the same city - rtt between them is less than 1ms.
so, the *maximum* available bandwidth for your r1-r2 tunnel would be 1gb. and the rtt doesn't necessarily mimick the real interconnection sla.
What I want to do is move server2 which is on VLAN2 (x.x.x.65/28) to the other datacenter, but I want to continue using the same subnet.
(VLAN2 or the particular subnet are not used from any other servers - it's exclusive to server2)
as long as you have made your vlan set on the r1 the next step would be the tunnel setting.

i think mt has a lot of tunnels available to offer : eoip. bcp. gre. ipip. wireguard. vxlan etc. you might want to read the wiki.
When I connected an RPi4 to router1, and used one of the available IPs of one of the VLANs on router2, while everything worked right away and I had network connectivity etc, it felt very unstable - connections would drop, and I could not get more than 260Mbps with iperf.
well, maybe your current r2 network already uses the rest of the bandwidth available for the tunnel? and that any kind of tunnel overhead will make it even smaller bandwidth to deliver.


So my next thought was to setup a GRE tunnel between the two routers, but I'm not sure if this can be done with a subnet smaller than /24 using public IPs?
I understand that I will need to setup an IP in each side of the tunnel of a /30 subnet. ie 10.10.10.1/30 for router1 and 10.10.10.2/30 for router2.
it really depends on how was the tunnel setup.

your bgp Network advertisement will or won't be affected by the tunnel setup as long as the both local and remote vlan is reachable. wether via igp or static etc.

ok, have a great time with the work and good luck 👍🏻

Who is online

Users browsing this forum: No registered users and 15 guests