您的位置:首页 > 其它

debian 系列 ubuntu..让一个网卡支持多个IP

2011-05-26 10:52 204 查看
目标: 让一个网卡,支持多个IP



1. 修改配置文件(为了让重启之后仍然有用)

/etc/network/interfaces 文件内容如下:

auto lo

iface lo inet loopback

auto eth0

iface eth0 inet static

address 192.168.2.151

netmask 255.255.255.0

gateway 192.168.2.1

auto eth0:0 /*为了调试开发板,开发板IP是192.168.1.6,要向开发板传送bin文件*/

iface eth0:0 inet static

address 192.168.1.151

netmask 255.255.255.0

gateway 192.168.1.1





2. 重启网络服务

/etc/init.d/networking restart



3. 看运行是否正常

ping 192.168.1.150 /*我的Windows XP主机,嘿嘿*/



4. OK啦
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: