[ previous ] [ next ] [ threads ]
 
 From:  Jim Thompson <jim at netgate dot com>
 To:  Kenman Wong <kenman dot wong at iaspec dot com>
 Cc:  m0n0wall at lists dot m0n0 dot ch
 Subject:  Re: [m0n0wall] WAN = Wireless Client
 Date:  Thu, 26 Jan 2006 22:45:17 -1000
Kenman Wong wrote:

> Hi,
>
> I've tried this before. I have two m0n0wall boxes. One has the WiFi as 
> WAN interface and the other has WiFi on the LAN.
> For the mode I set them both to BSS (infrastructure). (btw you got 
> IBSS, BSS/adhoc, infrastructure mixed up in your email)
> Set up both side with the same SSID, WEP key, and Mode. I leave the 
> station name field blank.
>
> For the box with WiFi on the WAN interface, choose type to be DHCP and 
> disable the "Block private networks" option
> at the bottom. I am assuming you are picking up an IP from the DHCP 
> server in the private network segment.
>
> For the box with WiFi on the LAN interface, enable your DHCP server on 
> the LAN side.
>
> Hope that helps.
>
> cheers,
> Kenman
>
> Anthony Mattke wrote:
>
>> Is there a way to setup my wifi card to be a wireless client / for the
>> WAN interface?
>>
>> How can I get it to associate with the AP? Which mode do I use (in the
>> mono config)?
>>
>> I'm using 1.21 and under Interfaces -> WAN I set DHCP, the ssid, and
>> the mode to IBSS since I know the other two are not what I want. (just
>> in case, it shows hostap (which i assume is an AP mode), BSS (which is
>> says is ad-hoc), and IBSS (which is says in infrastructure mode, and I
>> have no clue what that is, but I know its not the other two) )
>>
>> Anyway, thats what I changed so far, I currently just want it to pass
>> traffic.. but I cant get it to pull an IP from the AP. (at least,
>> according to System-> Interfaces)
>
I think you've both confused things some.  Here is a key:

Mode:  hostap
Meaning:  Act as an AP for other stations.   A wireless card in 'hostap' 
mode will *ONLY* communicate
    with a station (or set of stations) which have associated to it.   A 
wireless card in "hostap" mode *MUST" have an ESSID set, and *MUST* have 
a channel (frequency) set, or it won't function.

Mode: bss
Meaning: Act as a client to an AP (the AP can be monowall powered or 
otherwise)
A 'bss' client will *ONLY* 'communicate' with the AP to which it is 
associated.   No BSS <--> BSS communication
will take place.    Unlikes hostap mode you don't have to set the 
channel (frequency) or ESSID.  If you don't, then the driver and/or 
firmware on the card will work to select the "best" AP with which to 
associate.

Mode: ibss 
Meaning: this is also known as "ad-hoc".   Two ibss (or adhoc) stations 
*can* communicate IF (and only if) they have the same ESSID.   The 
behavior of adhoc mode is not as well-defined as the other two modes.  
Its possible, of course, that you can just take two random cards in 
adhoc mode with random settings, and they'll eventually 'find' each 
other and create a network, but you are better off if you actually go 
ahead and set the essid and channel here on both cards.

You can bridge an interface in 'hostap' mode to an Ethernet (or other 
'hostap' mode wireless interface).

You can *NOT* bridge a bss mode or ibss mode interface to anything 
else.   For these, you would need to route the packets.   (Technically, 
if the freebsd driver had WDS support, you could, but it doesn't, so..)

So, assuming you want to associate with a distant AP, and provide 
service to a number of clients on an Ethernet segment:

assign wi0 to WAN
assign sis0 (or whatever) to LAN

WAN
    set ESSID
    set channel
    set mode to BSS
    enable DHCP client (or set an IP address)
    If assigned address is in rfc1918 space, uncheck the "block private 
address space" option

LAN
    set IP address (probably in 1918 space) and netmask
    enable DHCP, check the enabled "range" of IP addresses
   
reboot
   
Jim