大网数据广告活动
服务器运维问答

Proxmox networking configuration

· 52CE 我爱测

I have recently bought a test dedicated server to test proxmox. The installation went smoothly, but i get stuck in the network configuration I'm given the IP: 192.151.154.146/29 After proxmox installation, the interfaces was # Th…

问题原文

原帖链接 · aye · CC BY-SA 3.0

I have recently bought a test dedicated server to test proxmox. The installation went smoothly, but i get stuck in the network configuration

I'm given the IP: 192.151.154.146/29

After proxmox installation, the interfaces was

# 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

I followed proxmox tutorial and change the content of the /etc/network/interfaces to

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

My objective is to create a LXC that has address 192.151.154.148. This is the configuration:

LXC creation

This is the interfaces of the created LXC container:

LXC interfaces

Unfortunately the created LXC container cannot connect to internet.

Could any one tell me what i am doing wrongly?

Thanks!

已采纳解答

原帖链接 · Sorcha · CC BY-SA 3.0

bridge_ports none

You should have an interface declared in vmbr0 for yours LXC : replace by :

bridge_ports eth0

More precisely, In your proxmox server configuration, you should have :

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

and in your LXC :

auto lo
iface lo inet loopback

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

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2016-08-15)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 3.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。