Port-xen archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: default route on other subnet



Quoting Jean-Yves Migeon 28/06/2011 11:16,
The issue is clearly dom0 related; I am not familiar with Linux's network stack, so do not know if you can set the MAC address for backend interfaces by force.

I get a 'SIOCSIFHWADDR: Operation not supported' when I try that, so I guess it's not possible. I can force mac addresses for dummy interfaces and bridges tho (and possibly physical interfaces, I didn't try that).

What is DOM0_IP? The IP associated to a vif? tap? a physical NIC? ... bridge interface?

Here, the DOM0_IP is the IP associated with the physical NIC. The scripts I used for the previous behaviors were network-route and vif-route. In a bridged configuration, it would mean the IP associated with the bridge (on linux dom0 it's the bridge that needs to get the IP, I don't remember how it goes on netbsd), but there's none in that case. In a routing configuration, DOM_IP is also the one which is supposed to be used as a default gateway within the guest. But it needs to get a dedicated route when it's outside the subnet, hence the present discussion.

There was a possible workaround I liked to pursue: use routing through a bridge -- disabling the proxy_arp stuff and only net ipv4 forwarding enabled, creating a dummy bridge and let the backend interface in it (script=vif-bridge,bridge=dummybr0). But even then the backend interfaces gets the fe:ff:ff:ff:ff:ff mac address, so I end up with the same issue. So let's continue with the more usual routing scripts.

Under BSD, routing and arp tables share a lot in common. What's their content before and after you are trying to set your static route (arp -a/netstat -r)?

# arp -a
? (DOM0_IP) at 78:65:6e:6e:65:74:30:00:00:00:fa:ce on xennet0 permanent

# netstat -r -f inet
Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Interface
DOM0_IP     78:65:6e:6e:65:74  UHLS        0        1      -  xennet0
GUEST_IP/32  link#1             UC          0        0      -  xennet0
127/8              localhost          UGRS        0        0  33648  lo0
localhost          localhost          UH          1       68  33648  lo0

And when I use -link xennet0:DOM0_MAC_ADDRESS (c8:0a:a9:03:36:15 here), I get,

# arp -a
? (DOM0_IP) at c8:0a:a9:03:36 on xennet0 permanent

# netstat -r -f inet
Routing tables

Internet:
Destination Gateway Flags Refs Use Mtu Interface
DOM0_IP     c8:0a:a9:03:36:00  UHLS        0        1      -  xennet0
GUEST_IP/32  link#1             UC          0        0      -  xennet0
localhost          localhost          UH          0      140  33648  lo0

In the first case 78:65:6e:6e:65:74 doesn't correspond to anything. In the second case I can see the first part of the DOM0_MAC_ADDRESS, c8:0a:a9:03:36, but :00 doesn't match the :15 I asked for.

Pierre-Philipp


Home | Main Index | Thread Index | Old Index