Default routing with a /32 mask
Posted: Mon Aug 20, 2012 2:05 am
Hi guys,
I have a MT router in a hosting datacentre, and by default they allocate me a /32 address (long story, but this is how it is!). Let's assume my MT IP is 20.1.1.1/32 and their next hop IP is 40.2.2.254 with a MAC of 00:11:22:33:44:55.
Their standard configuration for a redhat box is as follows (they don't natively support Mikrotik, so I have to improvise):
... which basically says - proxy arp for the next hop 40.2.2.254 via eth0, then add a default route via that host/mac.
So I configured what I believe to be the equivalent in MT:
But it doesn't work. The default route says 40.2.2.254 is unreachable, even though it is:
Now, if I just add the default route via gateway=ether1, it works. But, as expected, we use proxy-arp for every IP address. This isn't good - fills up the arp table, and the hosting provider doesn't like it also. Below arp output is after adding the gateway=ether1 and using proxy-arp:
Anyone got any thoughts on how I configure a next hop IP that is not on the directly connected subnet? I also tried creating a static ARP entry incase that helped, but it didn't.
Cheers,
Rich
I have a MT router in a hosting datacentre, and by default they allocate me a /32 address (long story, but this is how it is!). Let's assume my MT IP is 20.1.1.1/32 and their next hop IP is 40.2.2.254 with a MAC of 00:11:22:33:44:55.
Their standard configuration for a redhat box is as follows (they don't natively support Mikrotik, so I have to improvise):
Code: Select all
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
BOOTPROTO=none
ONBOOT=yes
USERCTL=no
IPV6INIT=no
PEERDNS=yes
TYPE=Ethernet
NETMASK=255.255.255.255
IPADDR=20.1.1.1
GATEWAY=40.2.2.254
ARP=yes
HWADDR=<whatever>
/etc/sysconfig/network-scripts/route-eth0
40.2.2.254 dev eth0
default via 40.2.2.254 dev eth0
So I configured what I believe to be the equivalent in MT:
Code: Select all
/ip route add dst-address=40.2.2.254 gateway=ether1
/ip route add dst-address=0.0.0.0/0 gateway=40.2.2.254
Code: Select all
[admin@MT-FR-01] /ip route> print
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
# DST-ADDRESS PREF-SRC GATEWAY DISTANCE
0 S 0.0.0.0/0 40.2.2.254 1
1 ADC 20.1.1.1/32 20.1.1.1 ether1 0
2 A S 40.2.2.254/32 ether1 1
Code: Select all
[admin@MT-FR-01] /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=40.2.2.254 gateway-status=40.2.2.254 unreachable distance=1 scope=30 target-scope=10
1 ADC dst-address=20.1.1.1/32 pref-src=20.1.1.1 gateway=ether1 gateway-status=ether1 reachable distance=0 scope=10
2 A S dst-address=40.2.2.254/32 gateway=ether1 gateway-status=ether1 reachable distance=1 scope=30 target-scope=10
Code: Select all
[admin@MT-FR-01] /ip route> /ping 40.2.2.254
HOST SIZE TTL TIME STATUS
40.2.2.254 56 255 44ms
40.2.2.254 56 255 1ms
40.2.2.254 56 255 2ms
sent=3 received=3 packet-loss=0% min-rtt=1ms avg-rtt=15ms max-rtt=44ms
Code: Select all
[admin@MT-FR-01] /ip route> /ip arp print
Flags: X - disabled, I - invalid, H - DHCP, D - dynamic
# ADDRESS MAC-ADDRESS INTERFACE
0 D 129.82.138.38 00:11:22:33:44:55 ether1
1 D 78.159.107.102 00:11:22:33:44:55 ether1
2 D 2.51.47.253 00:11:22:33:44:55 ether1
3 D 40.2.2.254 00:11:22:33:44:55 ether1
4 D 194.164.127.4 00:11:22:33:44:55 ether1
Cheers,
Rich