equivalent for ifconfig dev 0.0.0.0

marshelgot asked:

When I need to create a temporary bridge with interface on Linux I would use the following:

brctl addbr br0
brctl addif br0 eth0
ifconfig eth0 0.0.0.0
ifconfig br0 192.168.10.100 netmask 255.255.255.0
ifconfig br0 up

I have been updating my process to use the ip command, However, I do not find the equivalent for removing the IP stack (ifconfig eth0 0.0.0.0) via the ip command

I have tried the following:

ip addr add 0.0.0.0 dev eth0
ip addr add 0.0.0.0/24 dev eth0

but it does not work to remove the existing ip on that device.

would anyone happen to know if this is possible with the ip command

My answer:


You can’t delete an IP address with the add command!

If you want to delete an IP address from an interface, you del it.

ip addr del 203.0.113.187 dev eth0

View the full question and any other answers on Server Fault.

Creative Commons License
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.