Conatainers have no network access.

risho

New Member
Sep 3, 2019
4
0
1
36
I switched around my network hardware in the house and during the process my proxmox server lost network access. I've managed to get the host back on the network and working fine, but for the life of me I can't figure out how to get my containers to get network access.

HOST:
ifconfig
Code:
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        inet6 fe80::42:cff:fe63:99d2  prefixlen 64  scopeid 0x20<link>
        ether 02:42:0c:63:99:d2  txqueuelen 0  (Ethernet)
        RX packets 8233  bytes 2450474 (2.3 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 12044  bytes 4093143 (3.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.152  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::ec4:7aff:feaa:636e  prefixlen 64  scopeid 0x20<link>
        ether 0c:c4:7a:aa:63:6e  txqueuelen 1000  (Ethernet)
        RX packets 251768  bytes 286712612 (273.4 MiB)
        RX errors 0  dropped 5  overruns 0  frame 0
        TX packets 125448  bytes 69683867 (66.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xf7400000-f747ffff  

eno2: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 0c:c4:7a:aa:63:6f  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device memory 0xf7300000-f737ffff  

fwbr100i0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 96:45:3f:b2:26:56  txqueuelen 1000  (Ethernet)
        RX packets 20  bytes 3926 (3.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 108 (108.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

fwbr110i0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 4a:fa:0c:3c:35:70  txqueuelen 1000  (Ethernet)
        RX packets 87  bytes 19575 (19.1 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 2  bytes 108 (108.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

fwln100i0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 96:45:3f:b2:26:56  txqueuelen 1000  (Ethernet)
        RX packets 5  bytes 470 (470.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 16  bytes 3790 (3.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

fwln110i0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 4a:fa:0c:3c:35:70  txqueuelen 1000  (Ethernet)
        RX packets 44  bytes 9496 (9.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 44  bytes 11351 (11.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

fwpr100p0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 36:a7:08:d8:84:3f  txqueuelen 1000  (Ethernet)
        RX packets 16  bytes 3790 (3.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5  bytes 470 (470.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

fwpr110p0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::285b:6dff:fe7b:ff9c  prefixlen 64  scopeid 0x20<link>
        ether 2a:5b:6d:7b:ff:9c  txqueuelen 1000  (Ethernet)
        RX packets 44  bytes 11351 (11.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 44  bytes 9496 (9.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 34657  bytes 59786271 (57.0 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 34657  bytes 59786271 (57.0 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth100i0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether fe:63:08:d7:2a:05  txqueuelen 1000  (Ethernet)
        RX packets 15  bytes 3736 (3.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5  bytes 470 (470.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth101i0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::fc5d:78ff:fe13:9324  prefixlen 64  scopeid 0x20<link>
        ether fe:5d:78:13:93:24  txqueuelen 1000  (Ethernet)
        RX packets 35  bytes 10466 (10.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 62  bytes 12189 (11.9 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth110i0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether fe:82:50:f9:6e:0d  txqueuelen 1000  (Ethernet)
        RX packets 43  bytes 11297 (11.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 44  bytes 9496 (9.2 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth1cb9f17: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::3c97:6dff:fe76:4a67  prefixlen 64  scopeid 0x20<link>
        ether 3e:97:6d:76:4a:67  txqueuelen 0  (Ethernet)
        RX packets 3110  bytes 1749577 (1.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6481  bytes 1530071 (1.4 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth348c3de: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::a0c0:81ff:fe9c:1301  prefixlen 64  scopeid 0x20<link>
        ether a2:c0:81:9c:13:01  txqueuelen 0  (Ethernet)
        RX packets 660  bytes 49974 (48.8 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4048  bytes 1414459 (1.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth423ede2: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::28ca:b7ff:feb5:e4e2  prefixlen 64  scopeid 0x20<link>
        ether 2a:ca:b7:b5:e4:e2  txqueuelen 0  (Ethernet)
        RX packets 2309  bytes 596060 (582.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 5261  bytes 1686586 (1.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth5e712d9: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::3c5f:2aff:fe81:dd77  prefixlen 64  scopeid 0x20<link>
        ether 3e:5f:2a:81:dd:77  txqueuelen 0  (Ethernet)
        RX packets 1381  bytes 92079 (89.9 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 6090  bytes 3042357 (2.9 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

veth82fb095: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::944f:8cff:fe3e:8e87  prefixlen 64  scopeid 0x20<link>
        ether 96:4f:8c:3e:8e:87  txqueuelen 0  (Ethernet)
        RX packets 773  bytes 78046 (76.2 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3981  bytes 1723992 (1.6 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethe41085d: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::406c:dbff:fe9d:1b  prefixlen 64  scopeid 0x20<link>
        ether 42:6c:db:9d:00:1b  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3452  bytes 1325654 (1.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vethe9c9887: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::4041:10ff:feb2:70cb  prefixlen 64  scopeid 0x20<link>
        ether 42:41:10:b2:70:cb  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 3450  bytes 1325522 (1.2 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

vmbr0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet6 fe80::a00f:2cff:fe42:f33a  prefixlen 64  scopeid 0x20<link>
        ether 36:a7:08:d8:84:3f  txqueuelen 1000  (Ethernet)
        RX packets 16  bytes 3566 (3.4 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 27  bytes 4295 (4.1 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

/etc/network/interfaces

Code:
cat /etc/network/interfaces
# network interface settings; autogenerated
# Please do NOT modify this file directly, unless you know what
# you're doing.
#
# If you want to manage parts of the network configuration manually,
# please utilize the 'source' or 'source-directory' directives to do
# so.
# PVE will preserve these directives, but will NOT read its network
# configuration from sourced files, so do not attempt to move any of
# the PVE managed interfaces into external files!

auto lo
iface lo inet loopback

auto eno1
iface eno1 inet dhcp

auto eno2
iface eno2 inet dhcp

auto vmbr0
iface vmbr0 inet manual
    bridge-ports none
    bridge-stp off
    bridge-fd 0

I've tried messing around with the vmbr0 and even just using it as it is set up by default in proxmox's webui but i can't get networking no matter what I do. I can't ping 8.8.8.8. I can't ping 192.168.1.1. It says "Network is unreachable".

Interestingly my dream machine router does show the hostnames for my containers under the list of clients. Anyone have any ideas?
 
Sadly I have a same issue here, and still no solution. Older times with Centos 6 host + LXC all worked fine, but with Proxmox not working this. Please share at this topic if you found a solution, you will help for others too.
 
Without a config of the container at hand I have to guess a bit, but I do think that your vmbr0 config is missing a bridge port.
bridge-ports none is not using any of the physical NICs.

Can you try to set the bridge_port to either eno1 or eno2, depending on which physical NIC the containers should use.
 
if i enable the bridge port on the port the host is using then the entire network stack stops working. i only have 1 ethernet cable plugged in. Well.. actually technically 2 since I also have an ipmi port, but that doesn't even seem to be picked up by the os.

cat-ing the lxc config outputs this:

memory: 8192
nameserver: 1.1.1.1
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=D2:1C:FD:8C:70:97,ip=dhcp,type=veth
ostype: ubuntu
rootfs: server_data-lxc:subvol-100-disk-0,size=500G
searchdomain: 1.1.1.1
swap: 2048


that said even if I make new containers it still doesn't work also changing the networking stuff around doesnt seem to fix it either.
 
Well, you have it in you container config that it will use vmbr0 as bridge to connect to any other network.

Your network config needs to be adapted then.

An example config that you would also get if you use the installer or GUI to set up your network would be:
Code:
iface eno1 inet manual

auto vmbr0
iface vmbr0 inet static
        address  YOUR_ADDRESS
        netmask  YOUR_NETMASK
        gateway  YOUR_GATEWAY
        bridge-ports eno1
        bridge-stp off
        bridge-fd 0

If you have to use eno1 or eno2 depends on which of the two NICs you are using.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!