Handing off one IP address from wireless to LAN and back

Nils Kassube kassube at gmx.net
Thu Dec 8 10:24:07 UTC 2011

stencil wrote:
> Running Kubuntu Natty on an older (T42) IBM Thinkpad.  Both
> the wired and the wireless interfaces are set to the same
> manual IP address.

I don't know if this is the reason for your trouble, but I'd like to 
mention that an IP address is meant to identify an interface, not a 
machine. Using the same IP address for different interfaces is not 
necessarily a good idea.

> Most of the time the wireless mode is used
> but occasionally  the cable connection is needed.  Until
> recently everything went well, with the wireless (eth1)
> connecting automatically at startup and providing service via
> the wireless router to the Internet and to the two or three
> other machines on the local LAN.  Then I changed the password
> on the wireless router and things fell apart.  Now:
>   --  at bootup it is necessary to provide the WEP password
> via a dialogue box labeled "Secret" that pops up as soon as
> the desktop stabilizes;  and

[OT] Why do people still use WEP? WPA is around for ages and to use WEP
is similar to using no encryption at all [1].

More seriously: I would move to WPA (or even better WPA2) unless you
have very old hardware on your WLAN which doesn't support it. Then make
sure that you don't have to enter the password after bootup to avoid the
pop-up asking for the secret. Not sure how to do that ...

>   --  the router passes data through to and from the Internet
> (DSL/PPOE)  but refuses to permit connection to the LAN until
> I send <ifdown> to eth0.

See my first remark above. I suppose that you have two entries in the
routing table and the system tries the use the non-working eth0 first.
And your ifdown eth0 clears that routing table entry.

> The password demand is made despite the "Connect
> Automatically" box being checked in SystemSettings /
> NetworkConnections.  The WEP-PSK key window is always blank
> -- it's not being saved, after I fill it in each time.

I just played with the Kubuntu 11.04 livecd. SystemSettings /
NetworkConnections seems to be a bit unreliable here. When I inserted
the WLAN USB stick some time after startup, it didn't find any wireless
network. Only after I used "sudo iwlist scan" on the commandline, it
worked. Therefore I would suggest to remove the wireless entry and add a
new entry for your network. Maybe the wireless password is then saved at
the right location and you don't have to enter it every time you start
the machine.

> Although <ifconfig> displays data on both eth0 and eth1,
> /etc/network/interfaces shows entries only for the loopback
> and for eth0, the LAN interface -- nothing about the
> wireless.

/etc/network/interfaces is used for manually managed interfaces only. If
you make an entry here, that interface should be ignored by network-

> Googling leads me only to advice regarding
> /etc/network/interfaces, but various edits to the "auto ethX"
> and "iface ethX" stanzas have not been effective.  Sigh.

If you want to use /etc/network/interfaces instead of network-manager,
the entry would be something like this:

auto wlan0
iface wlan0 inet static
# Configuration for WPA2
    wpa-driver wext
    wpa-ssid SSID
    wpa-ap-scan 2
    wpa-proto WPA2
    wpa-pairwise CCMP
    wpa-key-mgmt WPA-PSK
    wpa-psk 28964ba6ea8b8f3a0db1c4414b327da253d0af5d4f4adccec0f8abf5b05b10f8
# wpa-psk from "wpa_passphrase SSID passphrase"

I don't know the syntax for WEP, but it should be similar (google should
know the details).

Another option would be to use WICD instead of network-manager - and if
you try it, don't forget to purge network-manager. Otherwise both
network-manager and WICD fight to control the wireless interface and
nothing works.


[1] <http://h-online.com/-732607>

More information about the kubuntu-users mailing list