[Users] tap devices and forwarding

Sterling Windmill sterling at ampx.net
Wed Jan 7 09:24:28 EST 2009


This doesn't have to do with openvz directly, although I do use the product heavily and have noticed the same behavior on my openvz nodes as I do here. When linux boots up and adds eth1 before eth0 in the `ip link` "order", VEs show the eth1 IP address as their first hop when doing a traceroute. Here follows my real question (relating more to KVM than openvz): 

I am using kvm-82 on a 64-bit host and giving my virtual machines routed tap devices and utilizing proxy arp to provide them connectivity. 

My host has two ethernet adapters, one connected to the WAN and the other is a private link to another server with a private IP address. 

Even though I'm assigning device names (on the host) based upon mac address, it seems that depending upon the order in which the linux kernel sees my ethernet adapters they are behaving differently in terms of ip forwarding. 

If I run `ip link` I see eth1 listed before eth0 and a virtual machine running behind a tap device that is using ip forwarding sees eth1's IP as it's first hop in a traceroute. 

If I swap eth0 and eth1 (via their configuration), the first hop in the guest's traceroute is eth0's IP and `ip link` shows eth0 first. Is there a way to control this behavior other than switching physical ethernet adapters? 

I may be paranoid, but I don't want the virtual machines to "see" my private IP address when using standard tools such as traceroute. 

Anyone have any ideas? 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://openvz.org/pipermail/users/attachments/20090107/316cee6f/attachment-0001.html


More information about the Users mailing list