How to temporarily delete a "secondary IP address" using command?

How to temporarily delete a "secondary IP address" using command?

#ip a
...
9: bond-bond1: <BROADCAST,MULTICAST,UP,LOWER_UP400> mtu 1500 qdisc noqueue state UP qlen 1000
    link/ether 00:f1:f3:1f:da:28 brd ff:ff:ff:ff:ff:ff
    inet 10.10.10.7/24 brd 10.10.10.255 scope global bond-bond1
       valid_lft forever preferred_lft forever
    inet 10.10.10.2/24 scope global secondary bond-bond1
       valid_lft forever preferred_lft forever
    inet6 fe80::2f1:f3ff:fe1f:da28/64 scope link 
       valid_lft forever preferred_lft forever
...

I tried the command "ip addr del 10.10.10.2/24 scope global secondary bond-bond1",
but it gave an error: "ip: either 'local' is duplicate, or 'secondary' is garbage."

ip a d 10.10.10.2/24 dev bond-bond1

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.