一个网卡配置多个ip:[root@localhost ~]# ifconfig eth0:1 192.168.10.64 netmask 255.255.255.0 up

来源:互联网 发布:网络安全教育主题班会 编辑:程序博客网 时间:2024/06/15 10:57

[root@localhost ~]# ifconfig eth0:1 192.168.10.63 netmask 255.255.255.0 up  (新增IP在这个网卡上)

啊,仅此一句

[root@localhost ~]# ifconfig -a

删除
[root@localhost ~]# ip addr del 192.168.10.63 dev eth0:1

Warning: Executing wildcard deletion to stay compatible with old scripts.
         Explicitly specify the prefix length (192.168.10.63/32) to avoid this warning.
         This special behaviour is likely to disappear in further releases,
         fix your scripts!

[root@localhost ~]# ip addr del 192.168.10.63/32 dev eth0:1


原创粉丝点击