linux配置多个ip

来源:互联网 发布:淘宝浙江哈尔斯保温杯 编辑:程序博客网 时间:2024/06/02 16:02
/sbin/ifconfig eth0:1 172.19.121.180 broadcast 172.19.121.255  netmask 255.255.255.0 up
/sbin/route add -host 172.19.121.180 dev eth0:1
/sbin/ifconfig eth0:2 172.19.121.181 broadcast 172.19.121.255  netmask 255.255.255.0 up
/sbin/route add -host 172.19.121.181 dev eth0:2