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

Re: Network management, both ethernet and wireless



On Tue, Nov 13, 2007 at 03:08:01AM -0800, ispmarin wrote:
> Hello all.
> 
> I´ve just installed debian lenny (amd64) on my macbook, and since this
> is my first time as a notebook user, I would like to hear your ways to
> control connectivity. I have two different ethernet connections, home
> and work, each with different IPs. I also have a wireless connection
> at work, and would like also to connect to different wireless
> connections (airports, etc). At work, if the ethernet connection is
> plugged, wireless should be disabled; if it´s not, wireless should be
> used. At home, the same. If ethernet is not connected, and I am not at
> home or work, I should be able to search for other (encrypted or not)
> wireless connections.

the wireless part is (remarkably) fairly easy to work out. I use a
'mapping' interface stanza in my /etc/network/interfaces that hooks to
a simple script. This script greps through an 'iwlist <interface>
scan' call looking for particular strings. the script then sets the
iwconfig parameters based on those results, changes some symlinks for
/etc/hosts and /etc/apt/sources.list and then echoes out an
appropriate string to return to the 'mapping' so that the right
address gets assigned.

If you want to disable wireless on wired connection, I'm not
sure. Look at ifplugd perhaps and find a way to determine what its
doing with the wired interface and then up or down the wireless
appropriately. And for good battery life, kill the wireless altogther
when you're not using it.

A

Attachment: signature.asc
Description: Digital signature


Reply to: