View previous topic :: View next topic |
Author |
Message |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Sun Jun 26, 2005 9:48 pm Post subject: wlan0 where to configure? |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
widan Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/142533236243680bda6f27b.jpg)
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Sun Jun 26, 2005 10:53 pm Post subject: |
|
|
Look at the wireless section of the Gentoo Handbook. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Mon Jun 27, 2005 9:01 pm Post subject: |
|
|
Hi
Thx for ur reply.
Shame on me I never saw this great doc.
I'll try.
--Mathias |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Tue Jun 28, 2005 10:48 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
widan Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/142533236243680bda6f27b.jpg)
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Tue Jun 28, 2005 3:42 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Wed Jun 29, 2005 9:12 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
widan Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/142533236243680bda6f27b.jpg)
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Wed Jun 29, 2005 9:47 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Thu Jun 30, 2005 9:52 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Sun Jul 03, 2005 7:58 pm Post subject: |
|
|
Hmm
Any ideas whats wrong?
I have baselayout-1.11.12-r4
--Mathias |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Sun Jul 03, 2005 8:52 pm Post subject: |
|
|
Ensure that net.wlan0 is a symbolic link to net.lo |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Tue Jul 05, 2005 10:52 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Tue Jul 05, 2005 11:01 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Wed Jul 06, 2005 8:54 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Thu Jul 07, 2005 12:06 am Post subject: |
|
|
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 ![Wink ;)](images/smiles/icon_wink.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Thu Jul 07, 2005 5:49 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Sun Jul 10, 2005 6:33 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
widan Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/142533236243680bda6f27b.jpg)
Joined: 07 Jun 2005 Posts: 1512 Location: Paris, France
|
Posted: Sun Jul 10, 2005 8:33 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Mon Jul 11, 2005 6:07 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Thu Jul 14, 2005 2:44 pm Post subject: |
|
|
Hi
No solution? That can't be?
Or what can I do?
Thx in advice!
--Mathias |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
mijenix Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
![](images/avatars/158794853841d411301f973.gif)
Joined: 22 Apr 2003 Posts: 393 Location: Switzerland
|
Posted: Wed Aug 03, 2005 8:12 pm Post subject: |
|
|
Nothing changed, other ideas?
--Mathias |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|