Traditionally configure wlan?

NoOp glgxg at sbcglobal.net
Fri Apr 2 18:17:13 UTC 2010


Josef Wolf wrote:
> On Fri, Apr 02, 2010 at 06:58:34PM +0200, Nils Kassube wrote:
...
> 
> AFAICS, Wicd is a GUI tool, right? This does not play well with the
> "configure my systems automatically" part of my original post. Automatic
> configuration is best done by editing config files or running non-interactive
> scripts or something. Interactive configuration (as it gets more and more
> popular in new disros :-( ) is a big showstopper for automatic configurations.
> 
>> > But I don't see how to shut down wlan when eth0 comes up (and vice
>> >  versa).
>> 
>> Well, that's something Wicd probably can't do.
> 
> Hmm, AFAICS, wicd can also handle wired connections, so why would it not be
> able to shut down wlan when wired comes up?

It does.

Wireless w/no eth0 connected:
$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:26:2d:b1:00:32
          inet6 addr: fe80::226:2dff:feb1:32/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:851 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1117 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:128238 (128.2 KB)  TX bytes:985143 (985.1 KB)
          Interrupt:27 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:720 (720.0 B)  TX bytes:720 (720.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:1e:64:81:51:c6
          inet addr:192.168.1.102  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21e:64ff:fe81:51c6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8 errors:0 dropped:0 overruns:0 frame:0
          TX packets:57 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:830 (830.0 B)  TX bytes:8985 (8.9 KB)

wmaster0  Link encap:UNSPEC  HWaddr
00-1E-64-81-51-C6-00-00-00-00-00-00-00-00-00-00
          UP RUNNING  MTU:0  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Now I connect the eth0 cable:
$ ifconfig
eth0      Link encap:Ethernet  HWaddr 00:26:2d:b1:00:32
          inet addr:192.168.4.102  Bcast:192.168.4.255  Mask:255.255.255.0
          inet6 addr: fe80::226:2dff:feb1:32/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1579 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2078 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:192435 (192.4 KB)  TX bytes:1959623 (1.9 MB)
          Interrupt:27 Base address:0x2000

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:720 (720.0 B)  TX bytes:720 (720.0 B)

wlan0     Link encap:Ethernet  HWaddr 00:1e:64:81:51:c6
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:9 errors:0 dropped:0 overruns:0 frame:0
          TX packets:60 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:916 (916.0 B)  TX bytes:9526 (9.5 KB)

wmaster0  Link encap:UNSPEC  HWaddr
00-1E-64-81-51-C6-00-00-00-00-00-00-00-00-00-00
          UP RUNNING  MTU:0  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

If I pull the eth0 plug, wicd automatically switches back to wireless.

In wicd you need to configure: Preferences|check 'Always switch to a
wired connection when available'.

Note: Network Manager in lucid keeps both the wired and wireless active
unless the wireless on/off button is pressed to 'off' on this laptop.

This is all that I have in /etc/network/interfaces. All of my configs
are done by wicd.

$ cat interfaces
auto lo
iface lo inet loopback






More information about the ubuntu-users mailing list