linux配置多个ip

/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

你可能感兴趣的:(linux)