LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Manage wired and wireless (WPA) internet connections (http://www.linuxquestions.org/questions/debian-26/manage-wired-and-wireless-wpa-internet-connections-547538/)

rangalo 04-20-2007 05:25 AM

Manage wired and wireless (WPA) internet connections
 
Hi,

I have recently got my Internet connection which is through DSL. I have also purchased a router which can also be used as wireless access point.

Now, I want to know

1. How can I configure debian testing (for kernel and all, see my signature) to access the internet through wireless conneciont (WPA not WPA2) ?

2. I also have wired connection (hispeed) so when I use wired connection how can I avoid that the dhclient tries needlessly to get ip from wireless access point during booting ?

I have searched LQ and also google for that. On LQ, I found one how-to, using wpasupplicant which is outdated.

Any help ?

[EDIT] I already have a woking wireless connection. I can access unsecured connections without any problem.



regards,
Hardik

nx5000 04-20-2007 05:53 AM

Quote:

1. How can I configure debian testing (for kernel and all, see my signature) to access the internet through wireless conneciont (WPA not WPA2) ?
Use wpa_supplicant.

For pre-shared key WPA (psk):

Quote:

Originally Posted by /etc/nework/interfaces
iface eth1 inet dhcp
wpa-ssid myssid
wpa-key-mgmt WPA-PSK
wpa-psk 089425242100b53bdf5262294cc5c93391704c3c800079389a0068e454737e4d

The line wpa-psk can be encoded with the help of

Code:

wpa_passphrase myssid myhollys3cr3tkey
If you have a stock kernel, you have the options (crypto mainly)
You need wpa_supplicant packages
aptitude install wpasupplicant

Quote:

2. I also have wired connection (hispeed) so when I use wired connection how can I avoid that the dhclient tries needlessly to get ip from wireless access point during booting ?
In /etc/network/interfaces, do not put
auto eth0
nor
auto eth1

This way, it will never bring up the interfaces unless you ask.

For bringing up ethX:
ifup ethX
Down:
ifdown ethX

You cannot have both on otherwise you will have a default gateway conflict.

Now all this can be automatically detected with ifplugd. This is the next step ;)

rangalo 04-20-2007 07:01 AM

Hi nx5000,

Thanks for the answer. I will give it a try when I am back home. And after I have configured everything, I will ask more abut ifplugd.

thanks and regards,
Hardik

nx5000 04-20-2007 07:12 AM

You are welcome

ifplugd

rangalo 04-20-2007 04:20 PM

Hi,

I tried what you suggested, all without success
First I installed wpasupplicant
here is my
/etc/network/interfaces:
Code:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback
iface eth0 inet dhcp
iface eth2 inet dhcp
wpa-ssid "RangaloNet"
wpa-key-mgmt WPA-PSK
wpa-key d3d09f14d596b029e213537ae53ee8694175f8821c6d387a89600b64e46d32ca

The wired network works well it is eth0.

But the wireless network doesn't work.

when I say
Code:

ifup eth2
it just tries to get the ip, but cannot.

What could be wrong ?

regards,
Hardik

rangalo 04-21-2007 03:14 AM

Sorry, guys..

It was my mistake.

I used wpa-key instead of wpa-psk for the secret key and that's why it failed.

Changing to wpa-psk it worked fine.

Now, coming to the tutorial for ifplugd. As I told, I came across it , it is the old one. They have changed the way of staring wpa_supplicant in the new version. I don't know though what is different and what do I need to change in to this tut.


Can anybody point me to the latest info regarding this. What I want now is just to configure wireless if I don't have the network cable plugged in.

regards,
Hardik

nx5000 04-23-2007 08:08 AM

Currently I use ifplugd + whereami + resolvconf.
In /etc/default/ifplugd, I have put eth0 eth1 as INTERFACES.

Check.
You might have problems with DNS so first try to only ping your router (or google or whatever)

But I haven't fully tested. I'm oldschool, I bring up dhcp on wireless manually :)


But I'll be happy to hear how it works for you, maybe I'll put this automatic network setting on my laptop.


All times are GMT -5. The time now is 11:53 AM.