|
|
|
|
|
|
|
|
|
|
xen-users
[Xen-users] Network issue with vif-route method
Hello folks,
I used to work with bridging for my xen networks, but my very last hosting provider doesn't support multiple mac address on the switch port. So I'm trying to configure some virtual servers on xen 3.2.1 using the network-route and vif-route method instead of bridge.
Everything works well, on the virtual server except the network.
In the VM definition file, I have : vif = [ 'type=ioemu, mac=00:16:3e:4f:62:08, ip=xx.91.221.101' ]
My dom0 server has one NIC with ip : xx.91.95.30
When I start the VM, the dom0 creates two interfaces : tap0 and vif1.0 :
eth0 Link encap:Ethernet HWaddr 00:e0:f4:1c:29:dd inet addr:xx.91.95.30 Bcast:xx.91.95.255 Mask:255.255.255.0
tap0 Link encap:Ethernet HWaddr 00:ff:ca:cb:91:88
inet6 addr: fe80::2ff:caff:fecb:9188/64 Scope:Link
vif1.0 Link encap:Ethernet HWaddr fe:ff:ff:ff:ff:ff inet addr:xx.91.95.30 Bcast:xx.255.255.255 Mask:255.255.255.255
So vif1.0 has the same ip address as eth0 but with a /32 netmask, and the routing table is modified to reach my VM ip through vif1.0 :
Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface xx.91.221.101 0.0.0.0 255.255.255.255 UH 0 0 0 vif1.0 xx.91.95.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
0.0.0.0 xx.91.95.1 0.0.0.0 UG 100 0 0 eth0
The VM network is configured with : iface eth0 inet static address xx.91.221.101 netmask 255.255.255.255 post-up /sbin/ip route add xx.91.95.30/32 dev eth0
post-up /sbin/ip/route add default via xx.91.95.30
The two last lines are used to declare a route to the dom0 ip and set it as the default gw. The network-route script also set value '1' into /proc/sys/net/ipv4/conf/vif1.0/proxy_arp
Now, when I try to ping xx.91.221.101 (dom1) from xx.91.95.30 (dom0), or the other way, I have no answer.
Using tcpdump on dom0, I can see arp and icmp packets sent from the dom1 eth0, on the tap0 interface and not on the vif1.0 interface.
On the other way, packets from dom0 to dom1 go out on the vif1.0 interface and doesn't reach the VM NIC.
So I tried to remove vif1.0 interface and assign dom0 ip address to tap0, and modify routing table to use tap0 as the routing interface like this :
ifconfig vif1.0 down ifconfig tap0 xx.91.95.30 netmask 255.255.255.255 up ip route add xx.91.221.101 dev tap0 echo "1" > /proc/sys/net/ipv4/conf/tap0/proxy_arp
This time I can ping from dom0 to dom1 and dom1 can access to the WAN through dom0 routing.
Could someone explain me why there is two interfaces declared when starting a VM, and what is the best way to permanently resolv this issue?
Many thanks, Jean-Michel.
_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users
|
<Prev in Thread] |
Current Thread |
[Next in Thread> |
- [Xen-users] Network issue with vif-route method,
Jean-Michel Bonnefond <=
|
|
|
|
|