This setup is virtualised, with the main IP configured on the physical server (host). If I add an address from this subnet to the host, it's working without problems. If I add an IP from this subnet to a Debian Linux 7 VM, it's again working fine. The eth0 interface of the VM is bridged with the real eth0 interface of the host machine.
I replicated this configuration in a Mikrotik VM, the setup is basically the same, with ether1 bridged. But it refuses to work. Whatever I do, the Mikrotik VM refuses to use the default gateway, claiming that it's "unreachable", despite I can ping/traceroute it just fine. I'm concluding my findings below with the setups I tried. I'm using Virtio network adapters in all cases on the VMs.
Any help is greatly appreciated.
78.y.y.128/27 - subnet of main IP
78.y.y.132 - main IP
78.y.y.129 - gateway for main IP
88.x.x.178/29 - allocated extra subnet
On the Linux VM:
Code: Select all
# ip addr add 88.x.x.178/29 dev eth0
# ip route add 78.y.y.128/27 dev eth0
# ip route add default via 78.y.y.129
# ip -4 addr
... lo ...
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP qlen 1000
inet 88.x.x.178/29 scope global eth0
# ip route
default via 78.y.y.129 dev eth0
78.y.y.128/27 dev eth0 scope link
88.x.x.176/29 dev eth0 proto kernel scope link src 88.x.x.178
# ping 78.y.y.129 -> working
# ping 78.y.y.132 -> working
# ping 8.8.8.8 -> working
Code: Select all
/ip address
add address=88.x.x.177/29 interface=ether1 network=88.x.x.176
/ip route
add dst-address=78.y.y.128/27 gateway=ether1
add gateway=78.y.y.129
/ip route print detail
Flags: X - disabled, A - active, D - dynamic, C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit
0 S dst-address=0.0.0.0/0 gateway=78.y.y.129 gateway-status=78.y.y.132 unreachable distance=1 scope=30 target-scope=10
1 A S dst-address=78.y.y.128/27 gateway=ether1 gateway-status=ether1 reachable distance=1 scope=30 target-scope=10
2 ADC dst-address=88.x.x.176/29 pref-src=88.x.x.177 gateway=ether1 gateway-status=ether1 reachable distance=0 scope=10
/ping 78.y.y.129 -> NOT WORKING (sometimes working, probably because of gratuitous arp)
/ping 78.y.y.132 -> working
/ping 8.8.8.8 -> NOT WORKING