On 2016/09/13 19:29, Sander van Kranenburg wrote:
> Hi,
> 
> As far as i know -netmask doesn't work anymore.
> We need to add the netbits tot the network adres like openvpn is doing with 
> ipv6.

-netmask is expected to work exactly the same as specifying ip/prefix,
and it does work fine here:

# route add -net 192.0.2.0 82.68.199.133 -netmask 255.255.255.0
add net 192.0.2.0: gateway 82.68.199.133
# netstat -rnfinet | grep ^192
192.0.2/24         82.68.199.133      UGS        0        0     -     8 vlan2
# route delete -net 192.0.2.0 -netmask 255.255.255.0
delete net 192.0.2.0
# netstat -rnfinet | grep ^192
# 

Exactly the same behaviour as the prefix:

# route add 192.0.2.0/24 82.68.199.133
add net 192.0.2.0/24: gateway 82.68.199.133
# netstat -rnfinet | grep ^192 
192.0.2/24         82.68.199.133      UGS        0        0     -     8 vlan2
# route delete 192.0.2.0/24
delete net 192.0.2.0/24
# netstat -rnfinet | grep ^192 
# 

I think the problem you ran into was something to do with the gateway
address, handling of this *was* changed relatively recently, and not
the syntax of address format to route(8).

Reply via email to