Default GW for /32

Hi guys,

I have an issue right now where my current provider does not support MAC address resolution due to some proprietary back-end network software.

This means if I have 1.1.1.2/24 as server one, and 2.2.2.2/24 as server two, they cannot talk to each other. If I have 1.1.1.2/32 and 2.2.2.2/32, they can communicate without issue.

Unfortunately if I leave eth0 as DHCP and it receives the /32, it seems to not be able to use the 1.1.1.1 gateway because it is outside of the /32 range (single IP).

Right now, the only way around this is configure each interface as a /24 but add a static route so that if the destination is 1.1.1.0/24, it should use 1.1.1.1 as the default gateway.

Additionally, if I manually set the router eth0 external address as 1.1.1.2/24, it seems to not add 1.1.1.1 as a default gateway for out-going traffic. To get around this, I’ve had to switch to root (sudo su -) and run

Unfortunately it seems that upon a reboot, this route-add for the default-gw seems to not be persistent and disappears.

Additionally (yes, again) after setting the IP address:

It seems to save to the routing table as

Destination        gateway
0.0.0.0/0           1.1.1.2

…Instead of…

Destination        gateway
0.0.0.0/0           1.1.1.1

Any clue what’s going on here?[/code]

It should not be an issue to set it as a /24, 1.1.1.2/24. Thereafter, set up the default static route.

set protocols static route 0.0.0.0/0 next-hop 1.1.1.1