Re: Static and dynamic wired interface



On September 10, 2008 12:03:19 pm Dan Williams wrote:
> 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.

SCPM has been around for eons. Unlike network manager it actually does look 
after switching my nfs network settings between home, job, and an internet 
cafe. I wish it did just work. 

> 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.

Sucky? What's sucks is not automatically switching my nfs network when I 
change connections. SCPM is actually VERY easy to use and not sucky at all. 
All I need to do is hit F3 during the boot process and select which profile I 
want. After that it selects all my settings, including the nfs network and it 
all just runs. I'd be perfectly happy to use it with knetwork manager.

> 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

I'm not comfortable writing scripts or modifying config files. I'm gradually 
doing a lot more of that than I want to, and I'm learning, but I'm more 
interested in having it working than learning how to write scripts. I 
appreciate your directions, but my days are already far too long to have any 
time left over to write scripts. That's not your fault, I know, and I don't 
suggest it is, but I do wish scpm and network manager worked together without 
more configuration on my part. 

-- 
Robert Smits CEP525G

Nanaimo, Duncan & District Labour Council
Box 822 Nanaimo, V9R 5N2 Ph 250-753-0201
Fax 250-753-2954 Email labour telus net


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