Tao

Tao obeys its own inherent Nature

Add two ips to one NIC in ubuntu

edit file: /etc/network/interfaces

the original content should be something like:

# The primary network interface
auto eth0
iface eth0 inet static
address 192.168.0.5
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.0.1 

add the following settings in the file:

auto eth0:1
iface eth0:1 inet static
address 192.168.0.6
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1

# dns-* options are implemented by the resolvconf package, if installed dns-nameservers 192.168.0.1

 

run command in root mode:

/etc/init.d/networking restart

that's all. you can run ifconfig to check if it works.

I tested it in ubuntu 6.10.


 

posted on 2007-09-25 14:37 wade 阅读(450) 评论(0)  编辑  收藏 所属分类: Linux


只有注册用户登录后才能发表评论。


网站导航:
 

导航

<2007年9月>
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456

统计

常用链接

留言簿(7)

随笔分类

随笔档案

相册

Photo

搜索

最新评论

阅读排行榜

评论排行榜