Ubuntu下单网卡绑定多个IP
来源:互联网 发布:淘宝店招怎么加热点 编辑:程序博客网 时间:2024/05/17 22:57
常常我们有需要一个网卡象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.2
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.254
auto eth0:0
iface eth0:0 inet static
name Ethernet Lan card
address 192.168.1.3
netmask 255.255.255.0
network 192.168.1.1
broadcast 192.168.1.255
gateway 192.168.1.254
然后重启服务
sudo /etc/init.d/networking restart
测试新的ip地址
ping 192.168.1.2
ping 192.168.1.3
如果ifdown了eth0,那么那个eth0:0也自动被down掉了。因为eth0:0是属于eth0的,是其的一个虚拟接口。如果要配置其他的ip还可以eth0:1之类的。
- Ubuntu下单网卡绑定多个IP
- ubuntu下单网卡绑定多个IP
- Ubuntu 单网卡绑定多个IP
- linux系统下单网卡绑定多个IP地址
- ubuntu下一块网卡绑定多个ip
- centos 和 ubuntu 下单网卡设置多个IP
- ubuntu 多个网卡绑定一个IP
- Solaris下网卡绑定多个IP
- ubuntu单网卡绑定多IP (解决ubuntu下用局域网时不能连接到外网问题)
- windows、ubuntu、Red Hat、Solaris 单网卡绑定多个IP
- CentOS6.6系统下单网卡绑定多个IP地址
- Solaris为单块网卡配置绑定多个IP
- linux系统单网卡绑定多个IP地址
- linux 系统单网卡绑定多个IP地址方法
- linux系统单网卡绑定多个IP地址
- Linux下为网卡绑定多个IP地址
- FreeBSD下一块网卡绑定多个IP
- FreeBSD下一块网卡绑定多个IP
- ubuntu 低配置设置 推荐几个省资源的小软件
- 在Window下编译、安装、使用GDAL
- 软件加密几点好办法
- JAVA-清除txt中重复内容
- 面向对象常见问题总结
- Ubuntu下单网卡绑定多个IP
- Removing the trailing file name and backslash from a path
- Qt 学习总结
- mandriva2010 xp ubuntu10.04 三系统的安装
- 针对java加密防止反编译的办法
- 关于pass-by-reference-to-const和pass-by-value
- void指针介绍
- csdn举办的云计算大会——总结思考篇
- IE6与IE7及IE8若干兼容问题