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

Re: Laptop used in multiple network contexts?



> It would be *great* if there was a facility for switching between
> profiles like those above, on the fly, for Linux laptops.  Is there a
> mechanism already in place for this, or is this a yet another GPL'ed
> project waiting to be born?

you can do pretty much all of this with pcmcia schemes.  check out the
pcmcia howto and the info is all there.  it's not in the clearist format (it
confused me for a little while) but it's actually very simple.  if you get
stuck email me and i'll help.

there are a couple problems with it though which are annoying (not specific
to schemes just pcmcia support in general under linux).

 * if i suspend/hibernate/save to disk my laptop my network connection
   doesn't work when i restore.  ifconfig shows the interface as up and
   configured but it's unreachable.

 * you can't change scheme's or restart your pcmcia drivers (to solve the
   above problem) when you have any network connections active because the
   core pcmcia modules complain about "being in use".  there is no way to
   force this.

 * you can't start pcmcia services with a particular scheme, you have to
   start them and then switch.

to work around this isn't hard (i've been meaning to write a script but
haven't gotten to it yet).  here's what i do:

# ifconfig eth0 down 
  (just showdown your ppp connection if that's how you're connected)

# cardctl scheme home

# ifconfig eth0 down 

# /etc/init.d/pcmcia restart

this works great but it's annoying that it takes four steps when it should
only take one.

with pcmcia schemes you can contol anything that is in your
/etc/pcmcia/network.opts file (eg.dhcp, ipmasq, resolv.conf, transciever
type, static ip,network,netmask,gateway mappings, mounts and custom
scripts).

adam.


Reply to: