Proxmoxnetworkingconfiguration

我最近买了一个testing专用服务器来testingproxmox。 安装进行顺利,但我卡在networkingconfiguration

我给了IP:192.151.154.146/29

proxmox安装后, interfaces

 # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 iface eth0 inet static address 192.151.154.146 netmask 255.255.255.248 network 192.151.154.144 broadcast 192.151.154.151 gateway 192.151.154.145 # dns-* options are implemented by the resolvconf package, if installed dns-nameservers 127.0.0.1 dns-search nocix.net 

我遵循proxmox教程,并将/etc/network/interfaces的内容更改为

 auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.151.154.146 netmask 255.255.255.248 gateway 192.151.154.145 post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp auto vmbr0 iface vmbr0 inet static address 192.151.154.147 netmask 255.255.255.0 bridge_ports none bridge_stp off bridge_fd 0 

我的目标是创build一个地址为192.151.154.148的LXC。 这是configuration:

LXC创作

这是创build的LXC容器的interfaces

LXC接口

不幸的是,创build的LXC容器无法连接到互联网。

有谁能告诉我我做错了什么?

谢谢!

 bridge_ports none 

您应该在vmbr0中为您的LXC声明一个接口:replace为:

 bridge_ports eth0 

更确切地说,在你的proxmox服务器configuration中,你应该有:

 auto lo iface lo inet loopback auto eth0 auto vmbr0 iface vmbr0 inet static address 192.151.154.146 netmask 255.255.255.0 bridge_ports eth0 bridge_stp off bridge_fd 0 

并在你的LXC:

 auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.151.154.148 netmask 255.255.255.0 etc... 

您是否尝试创build您的CIDR等于32的LXC容器:

192.151.154.148/32而不是192.151.154.148/29。

如果它不起作用,如果您使用IP故障转移,您的服务器提供商将给您一个mac地址设置您的容器使用这个IP。

你的MAC地址集是提供商的吗?