> iface wlan0 inet dhcp
> 
> iface mit inet dhcp
>       wireless_essid MIT
>       creates wlan0
> 
> iface cc inet static
>       wireless_essid MIT
>       # Some network configuration stuff
>       creates wlan0
>
> Currently, when I boot up my laptop, the first thing I do is open up a 
> terminal, su, and do one of three things:
> 
> ifup wlan0=cc -- When I'm in my dorm
> 
> ifup wlan0=mit -- When I'm on campus but not in my dorm, since the 
> static IP address works only at my dorm
> 
> ifup wlan0 -- When I'm not on campus, to associate with any old AP


You should have this:

    iface anyold inet dhcp

    iface mit inet dhcp
        wireless_essid MIT

    iface cc inet static
        wireless_essid MIT

and do:

    ifup wlan0=cc
    ifup wlan0=mit
    ifup wlan0=anyold


> What I would like to do instead is be able to use netapplet. I would 
> like, when I select the interface cc from the list, for netapplet to 
> look at the creates line, realize cc is a logical interface for wlan0, 
> and go ifup wlan0=cc. A similar thing should happen for logical 
> interface mit.


This really goes against the grain of ifupdown's design.  In that
design, logical interfaces are defined and given arbitrary names.  An
association between physical interface and logical interfaces is created
by specifying the pair

   ifup physiface=logiface

in the ifup command.  It is possible to do

   ifup physiface

but then a mapping process occurs which chooses a logical interface for
the physical interface; the default logical interface is the one named
just like the physical interface.

The "creates" option was introduced only because some logical interfaces
create their physical alter-ego.  Without the "creates" option,
netapplet cannot know that those physical interfaces are candidates for
activation.  (Kudos to the netapplet maintainer for implementing this,
BTW.)

In the case of your wlan0 interface, netapplet already knows that it is
a candidate for activation because that physical interface is created
when the driver recognizes the Wi-Fi hardware; its name is available
in /proc/net/dev.

What is really needed is for netapplet to grok logical interfaces.
Currently when I click on the netapplet icon I get a list of physical
interfaces, labelled "Network Connections".  If I click on one of these
names then netapplet seems to run (via netdaemon) "ifup <physiface>" or
"ifdown <physiface>" on these; then ifup uses its internal mapping
mechanism to assign a logical interface.  SFAICT netapplet has no
awareness of logical interfaces or mapping.  Below "Network Connections"
it displays a list of "Wireless Networks".  If I click on these items
then netapplet sends out iwconfig commands.  SFAICT this ignores the
information provided on "wireless" option lines in logical interface
definitions and reconfigures Wi-Fi cards directly.

Basically, if you use netapplet then you are very limited in how you can
set up /etc/network/interfaces.  You can only define one logical
interface per physical interface and it must be named like the physical
interface (unless you have mapping set up, but in that case netapplet is
no help in telling you what the result of the mapping was -- netapplet
does not look in /etc/network/run/ifstate); and you must not put
"wireless" options in the logical interface definitions because you are
going to control these things from netapplet's "Wireless Networks"
dialog.

I don't know whether or not netapplet is aware that changing wireless
parameters can have consequences for whether or not "Network
Connections" should be up or not.  E.g., if there are no access points
in range then wlan0 should be brought down, but netapplet does not bring
down wlan0 when I try the experiment.  Indeed, I find that netapplet
does not succeed in switching wireless networks at all.  But that is
another bug.

Basically, netapplet is very inadequate at present.

I must say that the state of network configuration in Debian is
deplorable.  The various packages are not integrated with one another
and there is no QA.

-- 
Thomas Hood <[EMAIL PROTECTED]>



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to