OpenVZ Forum


Home » General » Support » venet and veth on the same container (default route conflict)
venet and veth on the same container (default route conflict) [message #48698] Sat, 03 November 2012 15:30
davider is currently offline  davider
Messages: 1
Registered: November 2012
Location: Italy
Junior Member
Hello,

I'm trying to build a setup where a container has a veth interface (bridged) and a venet interface (on a virtual machine only network).

This is what I want on the container:
eth0 (veth): 192.168.0.2/24, default gateway 192.168.0.1
venet0: 10.0.0.1/24, private only network

I set everything up but I have a problem with the routes. When I start the container they are like this:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.0.2.1       0.0.0.0         255.255.255.255 UH    0      0        0 venet0
192.168.0.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
0.0.0.0         192.0.2.1       0.0.0.0         UG    0      0        0 venet0
0.0.0.0         192.168.0.1     0.0.0.0         UG    0      0        0 eth0

OpenVZ adds a default route via 192.168.2.1. I don't want it. If I remove the route manually at start everything works fine.

A simple solution could be to launch a script at start to remove the default route, but it doesn't look clean to me. I may be missing something.

Host node:
Debian Squeeze (2.6.32-5-openvz-686 #1 SMP Sun Sep 23 11:40:07 UTC 2012)
vzctl version 3.0.24

Container: debian-6.0-x86
IP_ADDRESS="10.0.0.1"
NETIF=" ifname=eth0,bridge=br0,mac=00:18:51:AA:43:18,host_ifname=vet h1000.0,host_mac=00:18:51:07:5A:D6 "

Thank you for any help!
Previous Topic: Recommended Kernel for EC2?
Next Topic: taskset in container
Goto Forum:
  


Current Time: Thu Jul 03 06:38:39 GMT 2025

Total time taken to generate the page: 0.03504 seconds