Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
wlan0 where to configure?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Sun Jun 26, 2005 9:48 pm    Post subject: wlan0 where to configure? Reply with quote

Hi

I have two network interfaces eth0 and a wlan0. I configured the eth0 device in /etc/conf.d/net.

In the time I implemented my wlan card. The baselayout was not able to handle wlan devices for easy configuartion.
So I configured the wlan0 device also in the /etc/conf.d/net.
And the wlan specific configuration I use wpa_supplication.
Then I made a script for starting the wlan configuration:

Quote:

ifconfig eth0 down

wpa_supplicant -B -iwlan0 -Dndiswrapper -c/etc/wpa_supplicant.conf


That's a little bit annoying manually start the script under root. And another problem with that outflow,
I always set the default gw manually though I set it on the /etc/conf.d/net for both interfaces.

Then the "new" baselyout comes out. ;-)

So where I can put the configuration in the new baselyout?

--Mathias
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Sun Jun 26, 2005 10:53 pm    Post subject: Reply with quote

Look at the wireless section of the Gentoo Handbook.
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Mon Jun 27, 2005 9:01 pm    Post subject: Reply with quote

Hi

Thx for ur reply.

Shame on me I never saw this great doc.

I'll try.

--Mathias
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Tue Jun 28, 2005 10:48 am    Post subject: Reply with quote

Ok,

now I know where to configure wpa_Supplicant but where I can set the TCP/IP settings for the wlan0 device?

Thx!

--Mathias
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Tue Jun 28, 2005 3:42 pm    Post subject: Reply with quote

You don't set them for wlan0, you set them per ESSID, look at the last section of the guide (I assume that by "TCP/IP settings" you mean IP address, routes, DNS...)
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Wed Jun 29, 2005 9:12 pm    Post subject: Reply with quote

Hi

So I typed at the end of /etc/conf.d/net these lines:

Quote:

modules=("wpa_supplicant")

wpa_supplicant_wlan0="-Dndiswrapper"

config_ESSID1=("IP/24 brd IP")
routes_ESSID1=("default via IP")


It does not work and now I get the following message on boot:

Quote:

* Please make sure that /etc/conf.d/net has $ifconfig_wlan0 set
(or $iface_wlan0 for old-style configuration)


What's wrong?

Thx for help.

--Mathias
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Wed Jun 29, 2005 9:47 pm    Post subject: Reply with quote

Maybe your baselayout is too old. Wireless was added quite recently, you need at least baselayout-1.11 or more recent. Look at that post.
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Thu Jun 30, 2005 9:52 am    Post subject: Reply with quote

Hi

Yes but the 1.11.12-r4 baselyout should be in the stable tree.
At least depending of the online package database.
But I'll check that but I'm 99.9% sure it's the 1.11.12-r4 one.
At that I have the wireless.example file, so it should be the "new" baselyout.

Thx!

--Mathias
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Sun Jul 03, 2005 7:58 pm    Post subject: Reply with quote

Hmm

Any ideas whats wrong?

I have baselayout-1.11.12-r4

--Mathias
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sun Jul 03, 2005 8:52 pm    Post subject: Reply with quote

Ensure that net.wlan0 is a symbolic link to net.lo
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Tue Jul 05, 2005 10:52 am    Post subject: Reply with quote

UberLord wrote:
Ensure that net.wlan0 is a symbolic link to net.lo


There Is a net.wlan0 but it is not a link. Can I delete it and do a link to net.lo?

Thx!

--Mathias
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Jul 05, 2005 11:01 am    Post subject: Reply with quote

Yes you can
Code:

cd /etc/init.d
rm net.wlan0
ln -s net.lo net.wlan0


If net.lo is less than 100 lines, then you'll need to re-emerge baselayout and ensure that net.lo gets updated with etc-update
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Wed Jul 06, 2005 8:54 pm    Post subject: Reply with quote

UberLord wrote:
Yes you can
Code:

cd /etc/init.d
rm net.wlan0
ln -s net.lo net.wlan0


If net.lo is less than 100 lines, then you'll need to re-emerge baselayout and ensure that net.lo gets updated with etc-update


Thx wlan works, but I need to configured the ip-settings manuell befor the connection to the internet works.

In addition this message appears at bootime:

Quote:

* Cannot default to dhcp as there is no dhcp module loaded
* No configuration for wlan0


But I want a static ip no dhcp! What's wrong?

--Mathias
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Jul 07, 2005 12:06 am    Post subject: Reply with quote

mijenix wrote:

Quote:

* Cannot default to dhcp as there is no dhcp module loaded
* No configuration for wlan0


But I want a static ip no dhcp! What's wrong?


Easy one - heh

config_wlan0=( "192.168.0.2/24" )

is not defined (both are the same)
replace the IP/netmask with your real one.

The old style config should still work - but it's been so long I forget what it looks like ;)
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Thu Jul 07, 2005 5:49 pm    Post subject: Reply with quote

Hi

UberLord u are the best! Now IP settings are set and works.
But I have another problem.
I need to set the default gw for wlan0. But when I set the routes_wlan0("192.168.0.254")
Then the kernel crash at boottime in wpa_supplicant. But when I mask the line Linux boot up.

Thx!

--Mathias
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Sun Jul 10, 2005 6:33 pm    Post subject: Reply with quote

Hmmm I go crazy. Is it possible to use one default gateway for two interfaces? And why the default gw will set for eth0 and not for wlan0?
I don't set any routes_eth0 but routes_wlan0 but the defualt gw will set for the eth0 interface.

So what I don't understand? I really don't want to set the settings always manual. I think Linux/Gentoo can that better?!

--Mathias
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Sun Jul 10, 2005 8:33 pm    Post subject: Reply with quote

mijenix wrote:
Hmmm I go crazy. Is it possible to use one default gateway for two interfaces?

You can have only one default gateway at one time. But you might want to use different ones (at different times) depending if you're connected to wired network, or wireless, or depending on the wireless network you're using. If you want to use the same for wired and wireless, you can put:
Code:
routes_eth0=("default via 192.168.0.254")
routes_wlan0=("default via 192.168.0.254")

mijenix wrote:
And why the default gw will set for eth0 and not for wlan0?
I don't set any routes_eth0 but routes_wlan0 but the defualt gw will set for the eth0 interface.

There is only one default gateway in use. When you set routes_wlan0, you tell the system that when you're connected through wireless (ie wlan0 is up), you want to use that default route. Or maybe I didn't undersand what you meant ?
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Mon Jul 11, 2005 6:07 pm    Post subject: Reply with quote

Hi

Ok maybe it's better to post my config /etc/conf.d/net:

Quote:

config_eth0=("192.168.0.21/24 brd 192.168.0.255")
config_wlan0=("192.168.0.30/24 brd 192.168.0.255")

#routes_eth0=("default via 192.168.0.99")
routes_wlan0=("default via 192.168.0.99")

modules=("wpa_supplicant")

wpa_supplicant_wlan0="-Dndiswrapper"


When I use this config with routes_eth0 commented out then I get the following output for route:

Code:

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
loopback        Saturn.localhos 255.0.0.0       UG    0      0        0 lo
default         192.168.0.99    0.0.0.0         UG    0      0        0 eth0


Why does Linux give the default gw for interface eth0?. It isn't set I commented it out! I every time need to ipconfig eth0 down and route add defualt gw 192.168.0.99 and the it's for the wlan0 device and then the connection works.

And when I use routes_wlan0 and routes_eth0, then I get a kernel panic at boot when Linux is something doing with wpa_supplicant!

So what is the problem? Should I post a bug report or is my config wrong?

Thx for any help!

PS: It's a NetGear WG511 "Made in China" PCMCIA Card with ndiswrapper and the windows drivers.

--Mathias
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Thu Jul 14, 2005 2:44 pm    Post subject: Reply with quote

Hi

No solution? That can't be?
Or what can I do?

Thx in advice!

--Mathias
Back to top
View user's profile Send private message
mijenix
Guru
Guru


Joined: 22 Apr 2003
Posts: 393
Location: Switzerland

PostPosted: Wed Aug 03, 2005 8:12 pm    Post subject: Reply with quote

Nothing changed, other ideas?

--Mathias
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum