[SOLVED] Container network on Proxmox 4 / OVH

grobs

Active Member
Apr 1, 2016
56
0
26
37
France
Hi,

I recently installed Proxmox 4 on a dedicated OVH server and then created a container like this:

Code:
pct create 200 /var/lib/vz/template/cache/debian-8.0-standard_8.4-1_amd64.tar.gz
  -rootfs 25
  -hostname myhost.mydomain.com
  -memory 1024
  -nameserver 213.186.33.99
  -net0 name=eth0,hwaddr=02:00:00:aa:bb:cc,ip=11.11.11.11/32,gw=22.22.22.22,bridge=vmbr0
  -storage local
  -onboot 1
  -ostype debian
  -searchdomain mydomain.com
  -swap 512
  -cpulimit 2
  -cpuunits 1024
  -password

My container is now up but network is unreachable.
  • 11.11.11.11 is my container (guest) IP address
  • 22.22.22.22 is my physical (host) IP address
  • 02:00:00:aa:bb:cc is the Virtual Mac Address I generated on the OVH web interface

Physical (host) configuration:
Not modified:
Code:
auto lo
iface lo inet loopback

# for Routing
auto vmbr1
iface vmbr1 inet manual
   post-up /etc/pve/kvm-networking.sh
   bridge_ports dummy0
   bridge_stp off
   bridge_fd 0

# vmbr0: Bridging. Make sure to use only MAC adresses that were assigned to you.
auto vmbr0
iface vmbr0 inet static
   address 22.22.22.22
   netmask 255.255.255.0
   network 22.22.22.0
   broadcast 22.22.22.255
   gateway 22.22.22.254
   bridge_ports eth0
   bridge_stp off
   bridge_fd 0

iface vmbr0 inet6 static
   ...
Code:
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  inet 127.0.0.1/8 scope host lo
  valid_lft forever preferred_lft forever
  inet6 ::1/128 scope host
  valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq master vmbr0 state UP group default qlen 1000
  link/ether 0c:c4:7a:6d:37:32 brd ff:ff:ff:ff:ff:ff
3: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
  link/ether 0c:c4:7a:6d:37:33 brd ff:ff:ff:ff:ff:ff
4: vmbr1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
  link/ether 36:32:8a:2a:c1:3b brd ff:ff:ff:ff:ff:ff
  inet6 fe80::3432:8aff:fe2a:c13b/64 scope link
  valid_lft forever preferred_lft forever
5: vmbr0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
  link/ether 0c:c4:7a:6d:37:32 brd ff:ff:ff:ff:ff:ff
  inet 22.22.22.22/24 brd 22.22.22.255 scope global vmbr0
  valid_lft forever preferred_lft forever
  inet6 2001:40d0:8:2d68::/64 scope global
  valid_lft forever preferred_lft forever
  inet6 fe80::ec3:7aff:fe6d:3732/64 scope link
  valid_lft forever preferred_lft forever
19: veth200i0@if18: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master vmbr0 state UP group default qlen 1000
  link/ether be:26:ca:62:60:82 brd ff:ff:ff:ff:ff:ff link-netnsid 0
  inet6 fe80::bc26:caff:fe62:6082/64 scope link
  valid_lft forever preferred_lft forever

Container (guest) configuration:
Code:
# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
   address 11.11.11.11
   netmask 255.255.255.255
   post-up ip route add 22.22.22.22 dev eth0
   post-up ip route add default via 22.22.22.22
   pre-down ip route del default via 22.22.22.22
   pre-down ip route del 22.22.22.22 dev eth0
Code:
# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
  link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
  inet 127.0.0.1/8 scope host lo
  valid_lft forever preferred_lft forever
  inet6 ::1/128 scope host
  valid_lft forever preferred_lft forever
18: eth0@if19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
  link/ether 02:00:00:aa:bb:cc brd ff:ff:ff:ff:ff:ff
  inet 11.11.11.11/32 brd 11.11.11.11 scope global eth0
  valid_lft forever preferred_lft forever
  inet6 fe80::ff:fe64:a7ba/64 scope link
  valid_lft forever preferred_lft forever

I followed this OVH guide for network configuration: http://guides.ovh.com/Proxmox

Could you please tell me what's going wrong?

Thanks for reading
 
Thank you very much tom and dietmar!
I replaced the last byte of my gateway address with .254 and it worked :)
 
Last edited:

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!