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

Re: network/bridging problems



Ross Boylan wrote:
> /etc/network/interfaces has (on the advice of a wiki page on Debian and
> kvm)

Which page is "a wiki page"?  I didn't find a wiki.debian.org one that
had an example like it.

How about this one?  It has good working examples.

  http://wiki.libvirt.org/page/Networking

> auto br0
> iface br0 inet dhcp
>    pre-up ip tuntap add dev tap0 mode tap user root
>    pre-up ip link set tap0 up
>    bridge_ports all tap0
>    bridge_stp off
>    bridge_maxwait 0
>    bridge_fd      0
>    post-down ip link set tap0 down
>    post-down ip tuntap del dev tap0 mode tap

Hmm... To me it doesn't make sense to use dhcp along with a network
bridge.  Normally you would use a bridge with a static IP address.  So
that external processes can connect to the VMs.

But you are using dhcp.  That implies that you are operating with
dynamic addresses.  Not necessarily true.  You could have the dhcp
server configured to give you reserved addresses.  But if not then it
doesn't make sense.

I am using this:

iface eth0 inet manual
auto br0
iface br0 inet static
	address 192.168.1.119
	netmask 255.255.255.0
	gateway 192.168.1.1
	bridge_ports eth0
	bridge_stp off
	bridge_fd 0
	bridge_maxwait 0

But if you want to use dhcp then I recommend dumping the bridge and
using "virt-install ... --network network=default" instead.  Set the
default network to autostart "virsh net-autostart default".  It is a
simpler configuration.  Note that if you have Recommends: disabled (as
I do) then you need to manually ensure that dnsmasq-base (a Recommends:
package) is installed.

> My one connected interface, eth2, was brought up by hotplug with no
> mention in interfaces.

Do you have network-manager or wicd installed?  If so then that daemon
brought up the interface.

> Originally, with the system up, I added the br0 stanza to interfaces and
> did ifup br0.  This temporarily interrupted my network connections,
> which was not good, but they resumed afterwords.

If it was previously controlled by network-manager or wicd then things
would be in an inconsistent state with both it and ifupdown trying to
control it.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: