How can I change the eth0 zero to eth0:1 using ip addr without deleting. When I run
ip addr show eth0
Here is the output
2: eth0: mtu 1500 qdisc mq state UP qlen 1000 link/ether ff:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff inet X.X.X.Y/24 brd X.X.X.255 scope global eth0 inet 10.10.10.17/32 scope global eth0 inet6 XX::XX:XX:XX:XX/64 scope link valid_lft forever preferred_lft forever
I want this to look like without deleting interface.
2: eth0: mtu 1500 qdisc mq state UP qlen 1000 link/ether ff:ff:ff:ff:ff:ff brd ff:ff:ff:ff:ff:ff inet X.X.X.Y/24 brd X.X.X.255 scope global eth0 inet 10.10.10.17/32 scope global eth0:1 inet6 XX::XX:XX:XX:XX/64 scope link valid_lft forever preferred_lft forever
How can I just change label?
ip link set dev <interface> name eth0:1
but says interface is in use.ifconfig down
it is going to stop the device, not just one pseudo-interface with a particular address. So lets dig deeper, why do you think you need to regularly stop & start an interface?