0

An OpenVZ host (RHEL 6) is running Debian-based containers. The problem is that network traffic, instead of being routed to a relevant container (10.10.104.1) via venet0 interface, gets routed to the host network's default gateway (143.215.76.129). At the same time, traffic to the 192.168.x.x network does not get redirected to the gateway. Relevant output below.

# traceroute 10.10.104.1
traceroute to 10.10.104.1 (10.10.104.1), 30 hops max, 60 byte packets
 1  143.215.76.129 (143.215.76.129)  1.349 ms  1.314 ms  1.280 ms
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  * * *
 7  *^C

# traceroute 192.168.104.32
traceroute to 192.168.104.32 (192.168.104.32), 30 hops max, 60 byte packets
 1  * * *
 2  * * *
 3  * * *
 4  * * *
 5  * * *
 6  *^C

# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.10.104.1     0.0.0.0         255.255.255.255 UH    0      0        0 venet0
143.215.76.128  0.0.0.0         255.255.255.128 U     0      0        0 eth0
143.215.76.128  0.0.0.0         255.255.255.128 U     0      0        0 eth1
143.215.76.128  0.0.0.0         255.255.255.128 U     0      0        0 eth2
169.254.0.0     0.0.0.0         255.255.0.0     U     1002   0        0 eth0
169.254.0.0     0.0.0.0         255.255.0.0     U     1003   0        0 eth1
169.254.0.0     0.0.0.0         255.255.0.0     U     1004   0        0 eth2
0.0.0.0         143.215.76.129  0.0.0.0         UG    0      0        0 eth0
2

The venet0 interface will always be routed through the host network, that is the design of the venet network on OpenVZ.

Since it seems you want to route traffic on the host to one of your containers, then you will need to make a proper virtual ethernet device which OpenVZ refers to as veth. This gives your container's network interface a MAC address and other requirements for proper packet routing.

  • Much appreciate your prompt and helpful advice. However, based on my knowledge, the (overarching) system that we use is designed to utilize a venet-only configuration (not a veth-based one). I will get in touch with relevant people and keep you posted. – Aleksandr Blekh Apr 12 at 23:50

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.