-----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Dan Williams Sent: Wednesday, September 10, 2008 3:03 PM To: Robert Smits Cc: networkmanager-list@gnome.org Subject: Re: Static and dynamic wired interface
On Wed, 2008-09-10 at 08:44 -0700, Robert Smits wrote: > On September 10, 2008 06:23:12 am Dan Williams wrote: > > On Wed, 2008-09-10 at 12:01 +0300, Kristian Slavov wrote: > > > Hi, > > > > > > Is NM capable of handling the following scenario? > > > A laptop, when located at office, has a static address. Once outside, > > > DHCP is used to get an address. > > > > NM 0.7 is, but since you're mixing the two there will be some manual > > operation on your side since there's not a good generic way to > > autodetect what network you're on when you plug in the cable. > > > > You'll create two wired connections in the connection editor. One is a > > DHCP connection with 'autoconnect=true', and the second is the static > > connection with 'autoconnect=false'. Manual intervention will be > > required when you want to use the static connection at the office. > > > > What should happen is this: > > > > 1) When you're outside the office, the DHCP connection will > > automatically be used because it's 'autoconnect=true'. If there isn't a > > DHCP server present, NM will fail the connection and wait for you to do > > something, or for a link change event. > > > > 2) At the office, NM would try DHCP first and then fail the connection > > after the DHCP timeout because of course there's no DHCP server. At any > > point here you then choose the static connection from the applet menu, > > and NM will activate the static connection at your command. > > > > People have tossed around ideas like ARPing a known gateway's IP address > > and matching the ARP response to a known MAC address and then activating > > that connection, but that's pretty fragile and trivial to maliciously > > spoof. > This way of doing things seems like a kluge. Why can't network-manager just > work with scpm which already does all of this, including nfs networks? First, because scpm doesn't seem to be widely used. You're actually the first person I've ever heard mention it, and when you did mention it, I had to go off and look it up. Network profile mechanisms aren't new, but not that many people use them any more because for the most part stuff just works. That's not to say that they aren't useful for some situations, like yours. Second, profiles make for a pretty sucky experience, and are only really necessary for connections which you can't autodetect, like wired ones. I'd seriously hate to have to select a profile every time I moved to a new location, but of course most of those locations don't require the use of a wired network. Again, profiles as such limit usability for anyone who doesn't use wired networks. Connections like wireless, mobile broadband, bluetooth, etc can all be autodetected quite well and thus don't need profiles as such. Third, you could certainly create some scpm scripts to flip the 'autoconnect' property of the two connections you'd care about. Thus, in conjunction with your current usage of scpm, NM would certainly give you a click-free (aside from choosing your profile with scpm which you're already doing) method of selecting your location. In short, I think you could make this work with scpm just fine, as long as you can use it to either modify ifcfg files in /etc (for system connections) or after you log in (for user connections). Should be pretty trivial to set up. If the right connection is chosen, NM can already facilitate most of the profile stuff you're probably using, like NFS, proxies, etc, through dispatcher scripts with no additional choice of "profile" required like AIUI scpm would require. So again, there could be no additional effort required on your part besides choosing the right scpm setup. Dan _______________________________________________ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list _______________________________________________ NetworkManager-list mailing list NetworkManager-list@gnome.org http://mail.gnome.org/mailman/listinfo/networkmanager-list