linux 单网卡多ip设置

添加eth0:1 192.168.1.117

ifconfig eth0:1 192.168.1.117 broadcast 192.168.1.225 netmask 255.255.255.0 up
route add -host 192.168.1.117 dev eth0:1

添加eth0:2 192.168.1.118

ifconfig eth0:2 192.168.1.118 broadcast 192.168.1.225 netmask 255.255.255.0 up
route add -host 192.168.1.118 dev eth0:2

posted @ 2013-05-26 18:45  sunsweet  阅读(225)  评论(2编辑  收藏  举报