Ifconfig command ?

What would be the command to remove the IP address from an interface?

I want to remove the ip from this interface:

ce3: flags=1000803<UP,BROADCAST,MULTICAST,IPv4> mtu 1500 index 5
inet 155.216.13.74 netmask fffffff0 broadcast 155.216.13.79
ether 0:3:ba:da:a6:96

Try:

# ifconfig ce3 unplumb

or, if you have another IP address you want to use:

# ifconfig ce3 new.ip.addr.here up


man ifconfig

HTH

1 Like

perfect, thanks.

If you want to completely disable the interface:

ifconfig ce3 unplumb # as already stated
rm /etc/hostname.ce3

If you want to remove the IP address but keep the interface active (eg: for snooping):

ifconfig ce3 0.0.0.0
echo "0.0.0.0" > /hostname/ce3