public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] Creating a wireless router
@ 2008-07-18 14:30 Jason Carson
  2008-07-18 19:48 ` Stroller
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Carson @ 2008-07-18 14:30 UTC (permalink / raw
  To: gentoo-user

Greetings,

I want to setup a wireless router for the first time using WPA. Here is
the setup I want...

Internet---Gentoo Wireless Router---My Computer

I have configured my kernel properly from what I can tell and emerged
madwifi. However when I modprobe ath_pci nothing shows up. When I do
ifconfig -a I get...

ath0 Link encap:Ethernet HWaddr 00:19:5B:80:F2:D8
BROADCAST MULTICAST MTU:1500 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

eth0 Link encap:Ethernet HWaddr 00:0E:0C:C4:A8:87
inet addr:66.11.182.5 Bcast:66.11.182.255 Mask:255.255.255.0
inet6 addr: fe80::20e:cff:fec4:a887/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:75109 errors:0 dropped:0 overruns:0 frame:0
TX packets:48454 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:100
RX bytes:95609829 (91.1 Mb) TX bytes:6195064 (5.9 Mb)
Base address:0x9000 Memory:ec020000-ec040000

eth1 Link encap:Ethernet HWaddr 00:0E:0C:C4:43:0F
inet addr:192.168.0.1 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::20e:cff:fec4:430f/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:66264 errors:0 dropped:0 overruns:0 frame:0
TX packets:111528 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:7189540 (6.8 Mb) TX bytes:96020126 (91.5 Mb)
Base address:0x9400 Memory:ec040000-ec060000

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:177 errors:0 dropped:0 overruns:0 frame:0
TX packets:177 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:99775 (97.4 Kb) TX bytes:99775 (97.4 Kb)

ppp0 Link encap:Point-to-Point Protocol
inet addr:66.11.182.5 P-t-P:192.168.200.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1452 Metric:1
RX packets:74713 errors:0 dropped:0 overruns:0 frame:0
TX packets:47995 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:93641841 (89.3 Mb) TX bytes:4912135 (4.6 Mb)

sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 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:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

wifi0 Link encap:UNSPEC HWaddr
00-19-5B-80-F2-D8-38-80-00-00-00-00-00-00-00-00
BROADCAST MULTICAST MTU:1500 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:199
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:11

However my computer doesn't show a wireless network to connect too.

What do I need is to know what to add to...

/etc/conf.d/net

and

/etc/wpa_supplicant/wpa_supplicant.conf

Thanks

Jason



-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] Creating a wireless router
  2008-07-18 14:30 [gentoo-user] Creating a wireless router Jason Carson
@ 2008-07-18 19:48 ` Stroller
       [not found]   ` <8995a9457eb9d227c7fa155b6a96d945.squirrel@jasoncarson.ca>
  0 siblings, 1 reply; 5+ messages in thread
From: Stroller @ 2008-07-18 19:48 UTC (permalink / raw
  To: gentoo-user; +Cc: Jason Carson


On 18 Jul 2008, at 15:30, Jason Carson wrote:
> ...
> I want to setup a wireless router for the first time using WPA.  
> Here is
> the setup I want...
>
> Internet---Gentoo Wireless Router---My Computer
>
> I have configured my kernel properly from what I can tell and emerged
> madwifi. However when I modprobe ath_pci nothing shows up. When I do
> ifconfig -a I get...
> ....

Hi there,

I assume you've read
http://gentoo-wiki.com/HOWTO_Building_a_Wireless_Access_Point ?

When I wrote this I was using a Prism54 card, not an Atheros-based  
one. I have used Atheros since (and would as a matter of choice), but  
it appears I never got around to updating the wiki (and I won't  
update it in the future because, basically, maintaining wikis is a  
lot of work). Further reading reveals inaccuracies in the current  
article.

Madwifi requires an extra step when creating the interface:

   wlanconfig ath0 create wlandev wifi0 wlanmode ap

   http://madwifi.org/wiki/UserDocs/SimpleAccessPoint

IIRC you can do this in your modprobe or udev rules (preferable), or  
as a preup stage in /etc/conf.d/net
IIRC a udev (??) rule is created automagically when you first create  
the interface and it's this you can edit to make it so that it  
automatically comes up as an AP, rather than in client mode.

You state that "However when I modprobe ath_pci nothing shows up",  
but the interface HAS come up - it's shown as wifi0 in the ifconfig  
output you post. I don't use WPA but when using WEP (which I would  
advise you to get working first) you then have to:

   ifconfig wifi0 up
   iwconfig wifi0 mode Master essid foobert channel 11
   iwconfig wifi0 essid foobert channel 11 key aabbccdd

(or, obviously, the equivalent in /etc/conf.d/net - this is well  
documented in /etc/conf.d/net.example)

Anyway, Google "madwifi master mode" should give you plenty of fodder  
to get things up on a one-off basis using manual commands so that you  
can see it's working. You then just have to figure out how to  
integrate what you've learned into the Gentoo bootscripts - hopefully  
Google "gentoo madwifi master mode" will help.

> However my computer doesn't show a wireless network to connect too.

I assume you mean your OTHER, client, computer by this. When posting  
problems it helps to be as explicit as possible - for example when  
posting the ifconfig output it would've been beneficial to post  
EVERYTHING you did in order to get there.

Oh! Also, the great thing about the madwifi drivers is that you can  
great virtual APs - as long as they all have the same channel then  
you can have wifi0, wifi1 and wifi2 on the same card (just  
`wlanconfig ath0 create wlandev wifi1 wlanmode ap && wlanconfig ath0  
create wlandev wifi2 wlanmode ap`). You can run one of these open,  
one as WEP and (presumably) one as WPA, bridging the secure networks  
with your wired LAN (for best integration) and NATting the open  
network using iptables (so you can give clients free or filtered  
internet access without having to worry about them accessing LAN  
services. This is useful if you have a Nintendo DS, which doesn't  
support WPA).

Please post back any problems.

Stroller.


-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] Creating a wireless router -> I got it working!
  2008-07-18 20:55     ` Stroller
@ 2008-07-18 20:43       ` Jason Carson
  2008-07-18 20:57         ` Jason Carson
  0 siblings, 1 reply; 5+ messages in thread
From: Jason Carson @ 2008-07-18 20:43 UTC (permalink / raw
  To: gentoo-user

ok, I got it working without encryption. Here is what I did I configured
my kernel according to these webpages...

http://madwifi.org/wiki/Requirements
and
http://madwifi.org/wiki/UserDocs/KernelConfig

...then I configured my system as follows...

1)Add madwifi to USE flags
2)emerge wpa_supplicant
3)emerge madwifi-ng and madwifi-ng-tools
4)cp net.eth0 net.ath0
5)rc-update add net.ath0 default
6)nano /etc/modprobe.d/ath_pci and add the following...
     options ath_pci autocreate=ap
7)add the following to /etc/conf.d/local.start
ifconfig ath0 down
wlanconfig ath0 destroy
wlanconfig ath0 create wlandev wifi0 wlanmode ap

8)nano /etc/conf.d/net and add
mode_ath0="Master"
essid_ath0="CarsonNet"
config_ath0=( "192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255" )
wpa_supplicant_ath0="-Dmadwifi"

Then I configured dhcpd and bind which I won't get into and it all worked.
I now have a wireless access point with Gentoo!

So my question now is, how do I enable WPA encryption?

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] Creating a wireless router
       [not found]   ` <8995a9457eb9d227c7fa155b6a96d945.squirrel@jasoncarson.ca>
@ 2008-07-18 20:55     ` Stroller
  2008-07-18 20:43       ` [gentoo-user] Creating a wireless router -> I got it working! Jason Carson
  0 siblings, 1 reply; 5+ messages in thread
From: Stroller @ 2008-07-18 20:55 UTC (permalink / raw
  To: gentoo-user


On 18 Jul 2008, at 17:10, Jason Carson wrote:

> Yeah, I read the the HOWTO WAP but I am confused. It said to go to  
> another
> article when using MADWIFI which told be to use the command...
>
> ifconfig ath0 down
> wlanconfig ath0 destroy
> wlanconfig ath0 create wlandev wifi0 wlanmode ap

Right. I didn't see that when reading the HOWTO today, but it is the  
same command as I gave in my message.

> Which I did, but now when I try to startup net.ath0 I get the  
> following...
>
> penguin init.d # /etc/init.d/net.ath0 start
> * Starting ath0
> * Starting wpa_supplicant on ath0 ...
> ioctl[SIOCSIWMODE]: Invalid argument
> Could not configure driver to use managed mode [ ok ]
> * Starting wpa_cli on ath0 ... [ ok ]
> * Backgrounding ...
>
> This..
>
> ioctl[SIOCSIWMODE]: Invalid argument
> Could not configure driver to use managed mode [ ok ]
>
> ...was not there before, what do I do?

Give fuller information.

What does `dmesg` say?
What does /var/log/messages (or whatever) say?
What do wpa-supplicant logs say?

I believe it's possible to compile wpa-supplicant with / without  
madwifi support, so you should check that. I'd also imagine it might  
be possible to compile madwifi with or without mastermode support, so  
you may need show that relevant kernel options have been compiled.

I believe that "ioctl" errors are generally associated with trying to  
tell hardware to do stuff it can't do. So drivers may be the cause  
here and I would certainly expect `dmesg` to be more verbose.

I would STRONGLY advise you to get the access-point working in master  
mode UNENCRYPTED before continuing to WEP or WPA configuration.  
Making *incremental* changes help isolate the problem.

Finally, unlike some, I have no objection to top-posting. What pisses  
me off immensely is *changing* the quoting-method of the thread. If  
you are the first person to reply to a post then by all means top- 
post; subsequent replies top-posted may be logical and readable. But  
if someone has replied by bottom-posting then top-posting breaks the  
continuity of the message. I have to read one level of quoting at the  
top of the message and another level at the bottom. Leaving aside any  
other debates about top- versus bottom-posting this does not make any  
sense AT ALL. Please do not do it!

Stroller.

-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [gentoo-user] Creating a wireless router -> I got it working!
  2008-07-18 20:43       ` [gentoo-user] Creating a wireless router -> I got it working! Jason Carson
@ 2008-07-18 20:57         ` Jason Carson
  0 siblings, 0 replies; 5+ messages in thread
From: Jason Carson @ 2008-07-18 20:57 UTC (permalink / raw
  To: gentoo-user

> ok, I got it working without encryption. Here is what I did I configured
> my kernel according to these webpages...
>
> http://madwifi.org/wiki/Requirements
> and
> http://madwifi.org/wiki/UserDocs/KernelConfig
>
> ...then I configured my system as follows...
>
> 1)Add madwifi to USE flags
> 2)emerge wpa_supplicant
> 3)emerge madwifi-ng and madwifi-ng-tools
> 4)cp net.eth0 net.ath0
> 5)rc-update add net.ath0 default
> 6)nano /etc/modprobe.d/ath_pci and add the following...
>      options ath_pci autocreate=ap
> 7)add the following to /etc/conf.d/local.start

OOPS: I added it to local.stop

> ifconfig ath0 down
> wlanconfig ath0 destroy
> wlanconfig ath0 create wlandev wifi0 wlanmode ap
>
> 8)nano /etc/conf.d/net and add
> mode_ath0="Master"
> essid_ath0="CarsonNet"
> config_ath0=( "192.168.1.1 netmask 255.255.255.0 broadcast 192.168.1.255"
> )
> wpa_supplicant_ath0="-Dmadwifi"
>
> Then I configured dhcpd and bind which I won't get into and it all worked.
> I now have a wireless access point with Gentoo!
>
> So my question now is, how do I enable WPA encryption?
>
> --
> gentoo-user@lists.gentoo.org mailing list
>
>


-- 
gentoo-user@lists.gentoo.org mailing list



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2008-07-19  0:58 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-18 14:30 [gentoo-user] Creating a wireless router Jason Carson
2008-07-18 19:48 ` Stroller
     [not found]   ` <8995a9457eb9d227c7fa155b6a96d945.squirrel@jasoncarson.ca>
2008-07-18 20:55     ` Stroller
2008-07-18 20:43       ` [gentoo-user] Creating a wireless router -> I got it working! Jason Carson
2008-07-18 20:57         ` Jason Carson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox