目前,我有以下与eth0接口关联的IPv4地址:
T60:~ # ip -V
ip utility, iproute2-ss110629
T60:~ # ip addr show dev eth0
2: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN qlen 1000
link/ether 00:15:58:2a:84:3e brd ff:ff:ff:ff:ff:ff
inet 10.11.12.2/24 scope global eth0
inet 10.11.12.3/24 scope global secondary eth0
inet 10.11.12.4/24 scope global secondary eth0
inet6 fe80::215:58ff:fe2a:843e/64 scope link
valid_lft forever preferred_lft forever
T60:~ #
我想将10.11.12.3/24地址替换或更改为10.11.12.6/24。这该怎么做?如果执行ip addr change 10.11.12.6/24 dev eth0
,ip addr replace 10.11.12.6/24 dev eth0
则将10.11.12.6添加到eth0中。另外,在更改/替换的情况下,语法是否应为change/replace from 10.11.12.3/24 to 10.11.12.6/24
?我知道我可以使用ip addr del
命令,但是如何使用ip addr change
or 来实现ip addr replace
呢?
NO
P0
()