The ifconfig command can change both the ip address and netmask of a network interface:
ifconfig eth0 10.10.10.10 netmask 255.255.255.0
Is it possible to change the netmask of the network interface eth0 without knowing (and changing) it's ip address?
I've tried
ifconfig eth0 netmask 255.255.255.0
but I get the error
ifconfig: ioctl (SIOCAIFADDR): Invalid argument