Disappearing routes in HN

From OpenVZ Virtuozzo Containers Wiki
Jump to: navigation, search

Problem statement[edit]

Sometimes people complain about VE-related routes disappering in HN.

These routes usually look like this:

# ip r l
<skip> dev venet0  scope link

and tell the kernel that IP address belongs to venet0 device. Thus packets with destination IP equal to are forwarded to venet0 and then to appropriate VE.


The problem is usually one of these:

  1. DHCP client. If your host system uses DHCP for acquiring IP address, then DHCP is for sure to blame. DHCP client tries to be smart and resets all the routes to those got from the server. Check your logs for DHCP re-lease events or other messages correlating with routes disappearing.
  2. Hotplug events. Modern Linux distros come with hotplug subsytem which tries to handle events like "new device found", "device was unplugged", etc. It also tries to be smart when LINK is DOWN/UP event from network device is received and can remove manually set routes. Check that your dmesg have anything related to this events. (AFAIK SUSE is the worst distro in this regard).


If you still can't find what happens with your network settings try to replace /sbin/ip and /sbin/route with scripts logging the commands and programs which executed them and calling original binaries after that. This will help to find the victim if it's some script. More robust but similar debug can be added to kernel if first approach doesn't help.