1,通过ifconfig命令
绑定:
ifconfig eth0:1 172.31.21.224 broadcast 172.31.31.255 netmask 255.255.240.0
查看:
ifconfig
解绑:
ifconfig eth0:1 del 172.31.21.224
2,ip命令
绑定:
ip addr add 172.31.21.224/20 dev eth0
查看:
ip addr
解绑:
ip addr delete 172.31.21.224/20 dev eth0
提示:通过ip命令绑定的ip通过ifconfig查看不到