Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1180587
  • 博文数量: 233
  • 博客积分: 6270
  • 博客等级: 准将
  • 技术积分: 1798
  • 用 户 组: 普通用户
  • 注册时间: 2010-01-26 08:32
文章分类

全部博文(233)

文章存档

2011年(31)

2010年(202)

我的朋友

分类: LINUX

2010-09-14 10:56:48

ubuntu下一个网卡设置多个IP
要加一个 192.168.0.111 的 ip
sudo ifconfig eth0:0 192.168.0.111 up
就搞定了。

如果需要开机自动绑定的话,
就写到 /etc/network/interfaces 中,仿照 eth0 写个 eth0:0

auto eth0:0
iface eth0 inet static
address 192.168.0.5
netmask 255.255.255.0
gateway 192.168.0.1

auto eth0:1

iface eth0:0 inet static
address 192.168.0.25
netmask 255.255.255.0
gateway 192.168.0.1

iface eth0:1 inet static
address 192.168.0.36
netmask 255.255.255.0
gateway 192.168.0.1

阅读(1152) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~