实战Ubuntu下单网卡绑定多IP

just posted @ 2008年12月20日 20:26 in linux , 1354 阅读

常常我们有需要一个网卡象windows一样设置多个IP。

下面我们看看在ubuntu下怎么样做.

我们先打开网络接口的文件


sudo gedit /etc/network/interfaces

照上边eth0添加eth0:0

auto eth0
iface eth0 inet static
name Ethernet Lan card
address 192.168.1.1
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

auto eth0:0
iface eth0:0 inet static
name Ethernet

address 192.168.1.2
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1

重启服务

sudo /etc/init.d/networking restart

测试新的ip地址是否生效

ping 192.168.0.1

ping 192.168.0.2

  • 无匹配
  • 无匹配
BSNL APN Settings 说:
2023年2月07日 15:34

Find the new different Access Network Points to configure for different organizations to access 2G / 3G / 4G high speed BSNL mobile internet, where Today every mobile customer subscribes with unlimited 4G internet plans to access internet on their 3G, 4G smart mobiles or wireless phones, BSNL APN Settings and for the best high speed connectivity, a gateway is required i.e. nothing but BSNL APN Settings or simply BSNL APN.

www.thezeusnetwork.c 说:
2023年7月12日 00:52

Zeus Network provides a dedicated Zeus free trial. Sadly, Zeus does not provide a Zeus free trial period before the membership. The Zeus Network, including documentaries, drama series and reality shows. www.thezeusnetwork.com/activate code firestick Once after downloading, open the application, and “activate Zeus Network” at “thezeusnetwork.com/activate” in search of the available content. Zeus Network without a connecting TV broadcasting service provider the Zeus Network app is available on popular streaming devices.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter