OpenVz guests can't coneckt to the internet

AmokPaule

Member
May 10, 2010
44
0
6
Hello,
i know this asked quit ofetn but i can't get a solution so far.
Its a debian 6 template from the proxmox site but the ones from openvz also do not work.
I have not setup the vmbr0 interface yet if it has somethiong todo with it.
i post some outputs here from inside one of my guests:

Code:
ifconfig -a
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:16436  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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

venet0    Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:127.0.0.1  P-t-P:127.0.0.1  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  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:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

venet0:0  Link encap:UNSPEC  HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00
          inet addr:212.227.135.150  P-t-P:212.227.135.150  Bcast:0.0.0.0  Mask:255.255.255.255
          UP BROADCAST POINTOPOINT RUNNING NOARP  MTU:1500  Metric:1
Code:
# Auto generated lo interface
auto lo
iface lo inet loopback

# Auto generated venet0 interface
auto venet0
iface venet0 inet static
        address 127.0.0.1
        netmask 255.255.255.255
        broadcast 0.0.0.0
        up route add -net 192.0.2.1 netmask 255.255.255.255 dev venet0
        up route add default gw 192.0.2.1
auto venet0:0
iface venet0:0 inet static
        address 212.227.135.150
        netmask 255.255.255.255
        broadcast 0.0.0.0
Code:
netstat -r
Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface
192.0.2.1       *               255.255.255.255 UH        0 0          0 venet0
default         192.0.2.1       0.0.0.0         UG        0 0          0 venet0
 
Hello,
thats what i get.
Code:
cat /etc/network/interfaces
auto lo eth0
iface lo inet loopback

# The primary network interface
#allow-hotplug eth0
iface eth0 inet dhcp

Edit:
i just saw there is also a file called interfaces.new
Code:
# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto vmbr0
iface vmbr0 inet static
        address  212.227.135.134
        netmask  255.255.255.0
        gateway  0.0.0.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
 
Last edited:
Have you rebooted your host after changing the system/network setting as requested ?

Attention: Network configuration changed. Please reboot to activate changes. (view changes)

You can also move the interfaces.new to interfaces, and /etc/init.d/networking restart. But if you don't have physical access to the server, be very careful !
 
The restart over the webinterfaces did not change anything so i moves the interfaces.new to interfaces. It includes now:
Code:
# network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

auto vmbr0
iface vmbr0 inet static
        address  212.227.135.134
        netmask  255.255.255.0
        gateway  0.0.0.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
Still the openvz ves can't get to the internet.
 
You still have a dhcp configuration - please use this instead:

(please use correct gateway address)

Code:
[FONT=monospace]
[/FONT]# network interface settings
auto lo
iface lo inet loopback

auto vmbr0
iface vmbr0 inet static
        address  212.227.135.134
        netmask  255.255.255.0
        gateway  212.227.135.XYZ
        bridge_ports eth0
        bridge_stp off
        bridge_fd 0

see http://pve.proxmox.com/wiki/Network_Model
 
If we are talking about the OpenVZ 'quests with vmbr' then simple dhclient on the command line should fetch IP address from the DHCP server (if your network has one.)
After that I usually log in with SSH and configure vi /etc/network/interfaces
 
Hello,
i talked to my hoster and they told me that i need the routed configuration.
So i did thats what in now on the host:
Code:
 network interface settings
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address  212.227.135.134
        netmask  255.255.255.255
        gateway  10.255.255.1
        post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp


auto vmbr0
iface vmbr0 inet static
        address  212.227.135.150
        netmask  255.255.255.0
        bridge_ports none
        bridge_stp off
        bridge_fd 0
afterwrds my host was not able to get to the internet so i did dhclient and it was solved.
I know the 255.255.255.255 for the netmask is unusual but my hoster is supposed to have a strange network configuration.
I searched the web and on some sites i found people talking over that. Im also not sure if thats what i put in or what dhclient did since i did not checked before or after.
But still my openvz guests can not get to the net. When i run dhclient inside the debian 6 guest i get:
Code:
No broadcast interfaces found - exiting.

 
Hello,
on tcdump i get
Code:
15:38:29.481246 IP host.onlinehome-server.info.ssh > brsg-4dbbbb09.pool.mediaWays.net.52615: P 1284068:1284376(308) ack 781 win 63

7752 packets captured
7753 packets received by filter
0 packets dropped by kernel
 
I think you want to move this part from the host to the OpenVZ VM client...

auto eth0
iface eth0 inet static
address 212.227.135.134
netmask 255.255.255.255
gateway 10.255.255.1
post-up echo 1 > /proc/sys/net/ipv4/conf/eth0/proxy_arp
Make sure that vmbr0 has also a gateway so you wont cut your own feet. Also 'bridge_ports eth0' is a good idea on the host.
 
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!