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

Re: Setting up Network for Xen


On Tue, 3 Nov 2015 04:21:59 -0800 (PST)
ray <ray@aarden.us> wrote:

> On Monday, November 2, 2015 at 10:30:04 PM UTC-6, Reco wrote:
> > 
> > Your /etc/network/interfaces does not try to bring usb0 up, so not
> > working xenbr0 is to be expected. You need something like this instead:
> > 
> > auto lo
> > iface lo inet loopback
> > allow-hotplug usb0
> > iface usb0 inet manual
> > auto xenbr0
> > iface xenbr0 inet dhcp
> > bridge_ports usb0
> > 
> > Oh, and remove network-manager while you're at it. It can only
> > complicate things, not simplify them.
> Reco,
> Thank you.  I will do that.  

You're welcome.

> I have not been able to determine the difference between auto and manual for:
> iface usb0 inet manual
> I understand that 'auto' provides for bringing up the interface at boot, and manual must mean that does not happen.  Does that mean that I should 'ifup' to do it?  What are the concerns for the choices?

You've got it all wrong. There are two stanzas actually that may look
similar, but have drastically different meanings.

First one is:

"auto usb0" or "allow-hotplug usb0".
The difference between these two is that "auto" forces the interface
into the UP state if "ifup -a" is invoked (or "networking" service is
"allow-hotplug" means that the *hardware* which corresponds to the NIC
can be hotplugged (pardon the pun) long after "networking" was started,
to udev should take care of interface configuration.
There's also a "manual" setting called "noauto" which means "configure
the interface only if ifup <name> was invoked".
An absence of "auto" or "allow-hotplug" or "noauto" is treated as

There are other keywords too, see interfaces(5) for the gory details.

And the second stanza is:

iface usb0 inet manual

And that means "what should be done to actually configure/deconfigure
an interface".
For example "inet" means IPv4 (there are also "inet6", "ipx" et al).
"manual" in this particular context means - bring network interface up,
do not bother doing anything else.
"manual" can be replaced with "dhcp" (your own interfaces shows an
example), or "static", or "loopback".

For Xen the usual way of configuring the network is:

a) Take care of loopback aka lo:

auto lo
iface lo inet loopback

b) Make a bridge so domUs/guests can see and can be seen from the
network outside of dom0/host:

auto xenbr0
iface xenbr0 inet dhcp
bridge_ports usb0

The bridge itself gets IPv4 address from DHCP (somewhat
unconventional, but if it works for you …), and uses a real usb0
interface for this.

c) And the last, crucial part is - force the real NIC into the UP
state, else the bridge (and anything that's connected to it from the
Xen side) won't be able to communicate to the outside world:

allow-hotplug usb0
iface usb0 inet manual


Reply to: