Not logged in
Log in now
Create an account
Subscribe to LWN
LWN.net Weekly Edition for December 5, 2013
Deadline scheduling: coming soon?
LWN.net Weekly Edition for November 27, 2013
ACPI for ARM?
LWN.net Weekly Edition for November 21, 2013
Announcing the release of Fedora 18 Alpha
Posted Sep 18, 2012 19:28 UTC (Tue) by drag (subscriber, #31333)
Right now the best approach is to throw your scripts to do the admin-y type odd network configurations using the NetworkManager dispatcher. This in itself is not a terrible thing and is actually very useful... but...
What I've noticed is that while examining virtualization management solutions (ovirt or openstack type things) is that nobody actually knows anything about networkmanager or how to use it properly. If the something like that mentions network manager at all they say something along the lines of: 'turn it off as it is known to cause issues for some users'.
So what you end up with is each solution you run into has their own half-baked way to set up bridges and other things. I think that adding bridging support will go along way towards helping people kick 'must make custom scripts' syndrom when setting up rather mundane configurations.
Especially for Fedora.. the quicker they can get away from using ifup/ifcfg scripts and moving to using nmcli/keyfiles the better off it'll be.
Posted Sep 18, 2012 20:20 UTC (Tue) by zlynx (subscriber, #2285)
Posted Sep 18, 2012 21:30 UTC (Tue) by blitzkrieg3 (subscriber, #57873)
Posted Sep 18, 2012 21:54 UTC (Tue) by zlynx (subscriber, #2285)
You could do an ARP probe to see if the DHCP server or gateway of one of the other connected devices was available. Or even ARP for the other interface IP.
You could just look at the DHCP server to see if the same one is available on both interfaces.
If the interface turns out to be on the same network go ahead and add it to the bond.
The ARP or DHCP probing would also be a good way to add locations to NetworkManager.
Or better yet, some kind of LocationManager that could use connected network information, WiFi scan results, BlueTooth, GPS, compass and/or inertial sensor data to track location.
Posted Sep 19, 2012 3:58 UTC (Wed) by ebiederm (subscriber, #35028)
There are other valid cases where two interfaces on the same network are ok but 802.3ad let boths sides no you are bonded, and is specified to allow for auto-configuration of bonds.
There are other games you can play but you should start with 802.3ad.
Posted Sep 19, 2012 4:12 UTC (Wed) by zlynx (subscriber, #2285)
Posted Sep 18, 2012 22:59 UTC (Tue) by josh (subscriber, #17465)
Posted Sep 19, 2012 4:23 UTC (Wed) by zlynx (subscriber, #2285)
And where I work, which is a corporation although small, we have a similar setup. In fact, I think we are using some ordinary Linksys consumer thing for the office.
With the bond in fail-over mode, when the bond detects that the primary link (in this case Ethernet) goes down it sends ARPs out on the second link (WiFi) to update the ARP tables of all the bridges, switches and interfaces sending it traffic.
So it may lose a packet or two but TCP/IP quickly recovers.
Posted Sep 18, 2012 20:26 UTC (Tue) by bfields (subscriber, #19510)
Right now the best approach is to throw your scripts to do the admin-y type odd network configurations using the NetworkManager dispatcher.
Looking around... so you're talking about scripts in /etc/NetworkManager/dispatcher.d, as documented in NetworkManager(8)?
Do you have any examples?
At testing events a few times a year I just turn off NetworkManager and configure stuff manually, but then it's always a pain going back and forth between the test network and the hotel where I want NetworkManager to do its usual thing without thinking about it....
Posted Sep 18, 2012 21:03 UTC (Tue) by drag (subscriber, #31333)
Yeah. That is how a administrator manually add functionality to NetworkManager. It's very similar in concept to 'init' scripts. Network Manager dispatcher will execute those scripts with a arguments to indicate the state of the interface and which interface it is.
I haven't figured out a good way to manage bridges that way yet. It's on my list of things to do. Right now I just tell Network Manager to leave certain interfaces alone by editing /etc/NetworkManager/NetworkManager.conf. And then using ifcfg or rc scripts.
If I figure out a good way this evening then I'll post it.
I've typically used dispatcher in the past to connect to VPNs that don't have a compatibile plugin for network manager.
> At testing events a few times a year I just turn off NetworkManager and configure stuff manually, but then it's always a pain going back and forth between the test network and the hotel where I want NetworkManager to do its usual thing without thinking about it....
The trick I've found to configuring things "manually" with NetworkManager is to disable the 'native' ifcfg-rhat support for configurations and use keyfile configuration back end. This can be done by editing the NetworkManager.conf file.
The ifcfg support that NM has is subtly different, and I think limited, compared with the the ifcfg support that exists when using the old Redhat-style scripts with NetworkManager turned off. So I hate it. It's difficult to follow documentation and edit ifcfg scripts in a compatible way.
However /etc/NetworkManager/system-connections/ keyfiles provide a ini style configuration method that is fairly easy to wrap your head around if you have examples to go off of. NetworkManager monitors that directory for changes and will automatically implement changes when you exit out of your editor. Copying a config to it will turn on that config, moving it away with disable it. I think that Arch Linux and Gentoo provides decent documentation. If you disable ifcfg and use keyfiles then NM will generate configs that you can later go on and edit.
The settings that are available can be found at:
Which is a pain in the ass to find.
The nmcli provides the most useful command line tool for it that I know of. It's especially useful if you want to connect to wifi with just the command line.
That brings me to wishing for better documentation. Most of this stuff exists in various forms, but it's difficult to piece together.
Posted Sep 19, 2012 17:03 UTC (Wed) by krakensden (subscriber, #72039)
You should blog this or something.
Posted Sep 20, 2012 3:19 UTC (Thu) by sciurus (subscriber, #58832)
Agreed. I gave up on NetworkManger in part because of this. I was a happy user when NetworkManager worked, but I was completely befuddled about what to do when it didn't.
Posted Sep 18, 2012 20:52 UTC (Tue) by Frej (subscriber, #4165)
Can't say if it actually is.
Posted Sep 19, 2012 17:29 UTC (Wed) by drag (subscriber, #31333)
But I don't think it has bridges.
So far the best way I can find to use NM along with bridges is have NM ignore the interface you want to bridge and use ifcfg scripts to manage it since they support bridging.
If you put "no-auto-default=*" in the 'main' section of NetworkManager.conf that will prevent NetworkManager from making those pesky 'Wired Connections 1' type things.
The only thing bad about this is that NM will periodically overwrite /etc/resolv.conf with it's own settings, which if you do not have any then it will make it effectively blank. This is irritating.
I am a bit disappointed, to be honest.
Copyright © 2013, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds