no default gateway in c7

seechiller

Renowned Member
Jan 5, 2014
18
1
68
Hi all

I've installed a new server for testing with proxmox 4 and imported my in proxmox 3 working centos7 templates. Creation of new containers works fine but the new container is not reachable from outside. Indside the container I can ping the other containers and the host and also the hosts on the same subnet. I’ve found out that the default gateway is not added at container starting, if I enter the container and just execute “route add default gw x.x.x.x” all works as it should but if I restart the container or the network inside the container the default gateway is gone again.

I’ve played with the network settings inside the container, nothing worked, I’ve tried to add “GATEWAY” to /etc/sysconfig/network and also played with /etc/sysconfig/network-scripts/ifcfg-eth0 and /etc/sysconfig/network-scripts/ifup-post, also tried to execute the “route add….” Line after container startud doesn’t help. My centos7 template was made for proxmox3, so I also tried the centos7 template which was downloadable inside proxmox, same here. Gateway is set inside the contrainer config.

Any idea what’s wrong here?

Thanks
 
I just tested this using the default centos7 template. Everything works as expected here. I added the network setting on the host side using the GUI.
 
Thanks Dietmar, the problem was solved with redownloading of the template and I also found out that in the old proxmox 3 templates the following lines must be removed to work in proxmox 4:
Code:
GATEWAYDEV="venet0"
NETWORKING_IPV6="yes"
IPV6_DEFAULTDEV="venet0"
 

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!