IPv6 地址切换

-4 linux python shell ip ipv6

我在基于 Linux 的服务器上有 IPv6 地址。如何将当前地址切换到新地址?有没有办法使用shell命令来做到这一点?使用Python怎么样?

谢谢。

小智 5

易:ip -6 address add 2001:dead:beef::2/64 dev eth0

删除也是一样: ip -6 address delete 2001:dead:beef::1/64 dev eth0

要显示您的地址: ip -6 address show