[SOLVED] fresh installed guest LXC: Network is unreachable

proxbob

Member
May 15, 2016
20
0
21
58
Hello,

I have a fresh installed proxmox 5 dedicated server.
Code:
 pveversion
pve-manager/5.2-12/ba196e4b (running kernel: 4.15.18-9-pve)

when I create a CT with the default CentOS6 or 7 image, the guest can't connect to the internet.

from guest :
Code:
[root@CentOS6 /]# ping 8.8.8.8
connect: Network is unreachable
[root@CentOS6 /]# ifconfig
eth0      Link encap:Ethernet  HWaddr 02:00:00:xx:xx:xx
          inet6 addr: fe80::xx:xxxx:xxxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:19 errors:0 dropped:0 overruns:0 frame:0
          TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1126 (1.0 KiB)  TX bytes:714 (714.0 b)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

from host:
Code:
root@proxmox_host:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback


# vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
auto vmbr0
iface vmbr0 inet static
        address IP.IP.IP.IP/24
        gateway IP.IP.IP.254
        bridge_ports eno1
        bridge_stp off
        bridge_fd 0

What's strange is if I go on proxmox interface to Guest Network, and change the network device name from eth0 to anything else (like xxx123) while the guest is running, the guest become with full connectivity:

Code:
[root@CentOS6 /]# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=121 time=4.12 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=121 time=4.23 ms
^C
--- 8.8.8.8 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1911ms
rtt min/avg/max/mdev = 4.125/4.180/4.235/0.055 ms
[root@CentOS6 /]# ifconfig
eth01     Link encap:Ethernet  HWaddr 02:00:00:xx:xx:xx
          inet addr:IP.IP.IP.IP  Bcast:0.0.0.0  Mask:255.255.255.255
          inet6 addr: fe80::xx:xxxx:xxxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:413 errors:0 dropped:1 overruns:0 frame:0
          TX packets:96 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:24269 (23.7 KiB)  TX bytes:4904 (4.7 KiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

But if I reboot the guest, the problem occure again.



What can cause this ?

Regards,
 
* resolved

that ip was configured on another running CT, even if it was pointing to the centOS6 mac, he could not use it.

I found it adding :
Code:
IPV4_FAILURE_FATAL=yes
to :
/etc/sysconfig/network-scripts/ifcfg-eth0

and restarting network :
Code:
service network restart
it gave
Code:
[root@centos /]# service network restart
Shutting down interface eth0:                              [  OK  ]
Shutting down loopback interface:                          [  OK  ]
Bringing up loopback interface:                            [  OK  ]
Bringing up interface eth0:  Determining if ip address IP.IP.IP.IP is already in use for device eth0...
Error, some other host (02:00:00:xx.xx.xx) already uses address  IP.IP.IP.IP
                                                           [FAILED]

not I just deleted that IP from the other CT and rebooted it.
 

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!