我想在我的系统上设置两个IP地址,以便通过局域网访问。这是我在另一个系统上的配置。

我的桌面安装与通过网络管理器添加的多个IP一起运行,通过LAN和wifi。
在我的服务器安装上,我已经编辑了/etc/network/interfaces如下:
auto eth0
auto eth0:1
# IP-1
iface eth0 inet static
address 172.16.35.35
network 172.16.34.1
netmask 255.255.254.0
broadcast 172.16.35.255
dns-nameservers 172.16.100.221 8.8.8.8
# IP-2
iface eth0:1 inet static
address 172.16.34.34
network 172.16.34.1
netmask 255.255.254.0
gateway 172.16.34.1
broadcast 172.16.35.255通过/etc/init.d/networking restart重新启动后,我收到
未能打开0:1
我做错了什么?
发布于 2013-10-29 10:05:28
发布于 2013-10-30 14:18:18
我已经很久没有发这个问题了。虽然我从来没有用多个地址来配置旧服务器,但下面是我目前在另一个服务器上使用的一个工作配置。
auto eth0
iface eth0 inet static
address 172.16.100.125
netmask 255.255.255.0
network 172.16.100.0
broadcast 172.16.100.255
gateway 172.16.100.1
dns-nameservers 172.16.100.221 208.67.222.222
auto eth0:0
iface eth0:0 inet static
name Ethernet alias LAN card
address 172.16.100.123
netmask 255.255.255.0
network 172.16.100.0
broadcast 172.16.100.255
gateway 172.16.100.1发布于 2016-04-18 23:10:42
我知道这件事来得有点晚了,但我猜你可以做以下几件事:
编辑/etc/network/interfaces
auto venet 0:0
iface venet 0:0 inet static
address XXX.XX.XXX.XXX
netmask 255.XXX.XXX.XXX
auto venet 0:1
iface venet 0:1 inet static
address XXX.XX.XXX.XX1
netmask 255.XXX.XXX.XXX
auto venet 0:2
iface venet 0:2 inet static
address XXX.XX.XXX.XX2
netmask 255.XXX.XXX.XXXhttps://askubuntu.com/questions/199181
复制相似问题