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

Re: [Xen-users] Wired Network Bridging


Thank for hanging in here.  I got ethernet up via a docking station.  So I am posting from the target machine.  It seems an immediate challenge is to get both ethernet and wireless up.  Then to provide for either to come up depending upon what is available.  Additionally, how can I set this up with numerose wifi connects?

# The loopback network interface
auto lo
iface lo inet loopback

allow-hotplug enxMAC
iface enxMAC inet manual

allow-hotplug wlps
iface wlps inet manual
     wireless-power off  #  Turn wireless power management off
    wpa-ssid Verizon-791L-3DF2
    wpa-psk fcfa6c0c7a8b1240ddc3d78d8065e2331c9541f94c0e735b335828ff4355a316
pre-up iwconfig wlps essid Verizon-791L-3DF2   # 1
pre-up iw dev wlps set 4addr on                           # 2  These two may need to be swapped

auto xenbr0
iface xenbr0 inet dhcp
    bridge_ports wlps enxMaC
#    bridge_hw wMAC     # wlp2s0
    bridge_hw wMAC          # enx0050b42

bridge_stp off        # disable spanning tree protocol
bridge_waitport 0    # no delay before a port becomes available
bridge_fd 0        # no forwarding delay6c43d
#bridge_ports none    # if you do not want to bind to any ports
#Bridge_ports regex eth* # use a regular _expression_ to define ports

# To restart the service after update:
# /etc/init.d/procps restart

BTW, when Ethernet came up, rebooted and Xen came up.  Seems Xen won't run if there is not an Internet coonection is not availabale. 

I only see how to bring the bridge up with one MAC.  How can I do this with two different MACs without knowing which is available?

On Mon, Jun 19, 2017 at 5:25 AM, Simon Hobson <linux@xxxxxxxxxxxxxxxx> wrote:
Ray Joseph <ray3960852@xxxxxxxxx> wrote:

> 1)  The POSTROUTING command gets the dom0 wireless interface name wlan0 and the $MAC_OF_BRIDGE which is the same as the MAC of the dom0 wireless MAC?

This changes the source MAC address in each outgoing packet to be that of the host interface (wlan0 in this case). This is to deal with wireless APs that filter packets with a different MAC to the one that initially made the wireless connection. As I said, you might try without these ebtables rules - I've found some APs are not so fussy, and if that's the case then your life will be so much simpler.

> 2)  The PREROUTING commands reference the dom0 wireless interface name and the domU IP address and MAC?

Yes. These two reverse the mangling done by the previous command so that packets get to the guests correctly.

> 3)  In domUs, can the interface be defined as an Ethernet?  As such, be given the MAC address of the dom0 wireless interface?  Is there a good way to keep track of what IP addresses the vms are allocated?

They are seen as ethernet interfaces to the guests - the guest does NOT see that there is wireless involved. As far as each guest is concerned, they have an ethernet interface connected to a switch (the bridge in Dom0) - what's the other side of that switch is largely invisible.

No, the guests MUST have unique MAC addresses. Your network will do "very interesting things" if you have two devices with the same MAC !

As for IP and MAC allocation and tracking - well there are whole subsections of the network management tool industry devoted to that problem ! For small networks, just keep a simple text file or spreadsheet (overkill for a handful of devices) listing the IP & MAC addresses assigned to each device (real & virtual).

> 4)  In the interfaces file, is there a need to assure the ordering of these two lines:
> pre-up iwconfig wlan0 essid [myessid]                    # 1
> pre-up iw dev wlan0 set 4addr on                            # 2

No idea - as I said, I'm not familiar with wireless networking in these sorts of situations (all my Linux systems are either hardwired with ethernet, or VMs with no visibility of what's upstream).
Xen-users mailing list

Xen-users mailing list



Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.