GNOME Bugzilla – Bug 546197
support bridges
Last modified: 2013-02-04 21:47:16 UTC
Please describe the problem: Ubuntu 8.04, i386. NM-applet 0.6.6. I run VirtualBox and I need bridge configuration to support several virtual interfaces in my virtual machines. eth0 (real NIC) is configured as a part of br0 in /etc/network/interfaces, DHCP is configured for br0. When gnome starts, network doesn't work, I see two default interfaces, one for eth0 and second one for br0. I have to manually delete one of them to fix my network (route del default). I think he source of this issue is Gnome Network Manager that supports only eth0 but I cannot configure br0 there. Steps to reproduce: 1. /etc/network/interfaces: auto lo iface lo inet loopback auto eth0 #iface eth0 inet dhcp #iface eth0 inet manual auto br0 iface br0 inet dhcp bridge_ports eth0 2. Login to Gnome, check with "iproute"; In my case, I see two interfaces with default route. Default route should be assigned to br0 only from my point of view. 3. Actual results: Two default routes defined for eth0 and br0. $ route Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 192.168.222.0 * 255.255.255.0 U 0 0 0 br0 link-local * 255.255.0.0 U 1000 0 0 br0 default ipcop.home 0.0.0.0 UG 100 0 0 br0 default ipcop.home 0.0.0.0 UG 100 0 0 eth0 Expected results: NM should not touch eth0 interface... Does this happen every time? 100% Other information: I cannot configure eth0 as part of a bridge in NM, it can be only in roaming mode or can be configured for DHCP or manual (with fix IP address). I miss support for bridge interface in NM.
*** Bug 549393 has been marked as a duplicate of this bug. ***
*** Bug 543232 has been marked as a duplicate of this bug. ***
I also experience this bug, for the same version of Ubuntu as the submitter. It doesn't look like 0.7.1 adds this enhancement, but it'd certainly be nice to be able to configure bridging through NM in some future version.
It seems that NetworkManager should: 1. Set up any system-wide bridge devices using "brctl addbr ...". For example, /etc/sysconfig/network-scripts/ifcfg-virbr0 on Fedora: DEVICE=virbr0 TYPE=Bridge ONBOOT=yes USERCTL=no BOOTPROTO=dhcp 2. Set up associated physical devices "brctl addif ...". For example, /etc/sysconfig/network-scripts/ifcfg-eth0 on Fedora: DEVICE=eth0 TYPE=Ethernet ONBOOT=yes USERCTL=no BOOTPROTO=none BRIDGE=virbr0 3. Initialize the BOOTPROTO of the bridge device once its physical devices are setup. 4. Allow a user to create such configurations using nm-configuration-editor. This is important for many use cases, including several virtualization options.
Virtualisation per se is being talked in this Fedora feature: http://fedoraproject.org/wiki/Features/Shared_Network_Interface This page mentions bug which already is marked as duplicate of this one.
It seems the Fedora Feature mentioned in Comment 5 has not been followed through. Can someone give an update on the status of this bug?
Should this bug have the version upgraded It seems there's zaro progress in 0.9 in this area.
This definitively is still a major showstopper. I don't mind configuring a dummy or virtual interface manually for network-manager, but currently this doesn't seem to work either.
I'm having similar problems using a bridged connection for KVM on Fedora 16 beta. To make matters worse, it seems impossible to keep the NetworkManager service disabled (seems to start as a dependency, arguably because systemd is either awesome or mean-spirited, I can't decide which...), so things like Empathy and Pidgin think I'm always disconnected now. I think that some of the code for bridge management from virt-manager might be useful to implement this in NetworkManager. I believe it's all written in Python, and I don't know what language NM is in. Even if we can't get true bridge support for configuration, could we at least get NM to recognize the you-are-connected-to-a-network state even if you're connected via an unmanaged connection? Is that even possible? I mean, it could just check and see that one of my adapters has an IP address and that I seem to have a default route present...
Just to add another vote in favor of this enhancement; I would be thrilled to be able to setup and manage bridged networking esp. via nm-applet instead of manually configuring these things temporarily (at this time on Ubuntu Oneiric). Perhaps there's something I can do to help. Will look into it further (not presently a contributor).
It would be good to support bridge on demand also - i.e. i want to use usb0 for my phone as bridge to any available inet interface, so when usb0 is apper (phone connectes) bridge it to available inet connection (eth or wlan or ppp etc)
+1 from me. Is anyone working on adding support for network bridges to NM? Thanks guys.
I'd like to use PXE boot from KVM. Please add bridge support into NM. Thank you.
+1 for me also. It's important since "boxes" project is coming to the desktop. You will want users to be able to use kvm with bridge support so every machine will se others in the local network. But you will want users to use fantastic NM VPN support and Wireless config. This is also my case. Want to use kvm instead of virtualbox. But maintain VPN support because it's easier to configure VPNs from NM. It's a great tool. Currently I cannot drop VirtualBox because I need bridging support in kvm machines and I have lots of VPN networks configured in my NM interface. And they just work well!! I don't want to switch to command-line configuration again. Also don't want to switch my bridge on/off all the time. Tnx in advance
Is that bridging the only way how to see (ping) guest interface from the host?
this is being worked on and will probably be in the next major NM release (August/Septemberish)
Bridging is *not* available in NetworkManager 0.9.6. There is a branch called 'bridge' with the bridging implementation from Thomas Graf that has not yet been merged. It is reported to be mostly working but the bridged interfaces won't start automatically with NetworkManager. We should be targeting 0.9.8.
I'm taking this. I've ported NetworkManager bridging patches written by Thomas Graf to my 'pavlix/platform' branch. The result of this porting effort can be viewed in 'pavlix/bridge' branch. Current status: A very basic bridge configuration with a static address and one ethernet interface works for me. I'm testing it with the following configuration files: /etc/NetworkManager/system-connections/Bridge: [connection] id=Bridge uuid=b8eca181-73e2-455d-b5be-bffcde75c153 type=bridge [bridge] interface-name=br0 [ipv4] method=manual addresses1=192.168.2.200;24;192.168.2.1 [ipv6] method=link-local /etc/NetworkManager/system-connections/Ethernet: [connection] id=Ethernet uuid=788f8873-7d55-420f-8e91-6e3ab028ebf6 type=802-3-ethernet master=br0 [ipv4] method=disabled [ipv6] method=link-local [802-3-ethernet] mac-address=52:54:00:8e:93:da
Patches can now be found in 'pavlix/next' together with a bunch of other stuff. They have been improved to support the following configuration: Master: [connection] id=Master uuid=b8eca181-73e2-455d-b5be-bffcde75c153 type=bridge [bridge] interface-name=master [ipv4] method=manual addresses1=192.168.2.200;24;192.168.2.1 [ipv6] method=link-local Slave: [connection] id=Slave uuid=788f8873-7d55-420f-8e91-6e3ab028ebf6 type=802-3-ethernet master=master [802-3-ethernet] mac-address=52:54:00:8e:93:da The main improvement is that Slave doesn't require bogus IP setting sections. IPv4 method of Master must be manual so it doesn't depend on the Slave's status. IPv6 could most probably be 'manual' too but I don't know the correct format for IPv6 addresses in keyfile. At exit, NetworkManager releases the Slave from the Master, remove its IP configuration, sets it down but doesn't remove it. This behaviour should be fine for most basic IPv4-only use cases.
(In reply to comment #19) <snip> > The main improvement is that Slave doesn't require bogus IP setting > sections. IPv4 method of Master must be manual so it doesn't depend > on the Slave's status. For virtualized environments, it would be beneficial to be able to define IP settings in Slave stanza configuring the physical interface, so that NM tries to get DHCP info on bridged interface only if the physical interface is up.
Branch 'pavlix/next' has been modified and now also supports automatic IPv4/IPv6 configuration of bridges and bonds.
> > IPv4 method of Master must be manual so it doesn't depend > > on the Slave's status. > > For virtualized environments, it would be beneficial to be able to define IP > settings in Slave stanza configuring the physical interface, so that NM tries > to get DHCP info on bridged interface only if the physical interface is up. My remark about manual IPv4/IPv6 is no longer valid in 'pavlix/next' as the slaves depend on master's 'connecting' state, not 'connected' state. That means the master device is already prepared (created) but the IP configuration is not finished. There is still a lot of space for improvement and I will need to carefully observe the logs to check that it's actually doing what I believe it is doing. But for now the DHCP at least starts close to the time the master is created and the slaves join it. I don't think slaves should have more settings than those needed to enslave them :).
This has been working in master for a while... there are still issues, but we're at the point where they should be separate bugs
Merge branch review for updates and further fixes was https://bugzilla.gnome.org/show_bug.cgi?id=692317
Let's have a big party in Brno!