常常我们有需要一个网卡象windows一样设置多个IP。
下面我们看看在ubuntu下怎么样做.
我们先打开网络接口的文件
sudo vi /etc/network/interfaces
只需eth0添加eth0:0
auto eth0
iface eth0 inet static
address 192.168.1.1
netmask 255.255.255.0
gateway 192.168.1.1
auto eth0:0
iface eth0:0 inet static
address 192.168.1.2
netmask 255.255.255.0
gateway 192.168.1.1
重启服务
sudo /etc/init.d/networking restart
本文介绍如何在Ubuntu系统中为一个网卡配置多个IP地址的方法。通过编辑网络接口文件,可以轻松实现同一网卡上的多个静态IP地址配置,并提供具体的命令示例。
1万+

被折叠的 条评论
为什么被折叠?



