Koozali.org: home of the SME Server

Wireless network card as external interface

Rob Bracken

Wireless network card as external interface
« on: September 20, 2002, 03:07:30 PM »
The story so far...

I don't have access to ADSL or cable here, but someone is setting up a broadband service on a wireless network. They supply & install the card & aerial, but they know nothing about Linux, so I'm setting it up myself.

The orignal card they supplied was faulty (a duff PCMCIA/PCI adapter), and I wasted a _lot_ of time on it (if you're interested, see "ZoomAir 4105 wireless network card"). I now have a replacement, which appears to be working OK. My next problem is to set up e-smith with a wired NIC as the internal interface and a wireless NIC as the external interface.

Duncan has pointed me in the right direction (many thanks, Duncan!), but I'm sure I'll need more info to finish the job.

Duncan's observations & my replies:

    > I had a similar problem when i was playing with this. I would create some new templates pointing your gateway at the wlan0 interface so internet traffic will route out that interface.

    > If you look at /etc/rc.d/init.d/masq you will find the firewall and NAT configuration. Have a look towards the top and you will see OUTERIF and OUTERNET you can probably set these to the wlan0. I am thinking off the top of my head here, i am sure that more will be needed.

Thanks, that looks interesting.

    > Bare in mind that if the system doesnt see the second nic it will make things difficult with respect to the whole server gateway setup.

I notice that the masq script is getting the External IP from the db. How does the External IP get into the db? I suspect also that I'll have to change the order of things so that PCMCIA starts earlier in the sequence.

    > I will be interested to see your end result.

It'll be a couple of days until I can look at it, as I'm up to my eyes in paid work at the moment. I'll post the details when it's working.

Bill Talcott

Re: Wireless network card as external interface
« Reply #1 on: September 20, 2002, 06:17:17 PM »
I'm a Linux newbie, and have only a little experience customizing SME, so I may be way off here. Could you create an alias or symlink or something to point eth1 at wlan1? Rather than trying to change where everything points, just have what it points to (eth1) point to what you want (wlan1)... I thought I saw something about that somewhere...

If nothing else, maybe this will spark some other idea.  Good luck!

Rob Bracken

Re: Wireless network card as external interface
« Reply #2 on: September 20, 2002, 07:51:09 PM »
> Could you create an alias or symlink or something to point eth1 at wlan1?

Thanks, Bill. I've tried using the orinoco_cs driver, which installs the card as eth1, but it didn't show up in the list of NICs.

Charlie Brady

Re: Wireless network card as external interface
« Reply #3 on: September 20, 2002, 08:32:20 PM »
Rob Bracken wrote:
 
>     > Could you create an alias or symlink or something to
> point eth1 at wlan1?
>
> Thanks, Bill. I've tried using the orinoco_cs driver, which
> installs the card as eth1, but it didn't show up in the list
> of NICs.

The list only covers PCI ethernet cards. Try:

/sbin/e-smith/db configuration set EthernetDriver1 orinoco_cs

then run through the configuration console again.

Charlie

Rob Bracken

Re: Wireless network card as external interface
« Reply #4 on: September 22, 2002, 01:25:19 AM »
Charlie Brady wrote:

> The list only covers PCI ethernet cards. Try:
> /sbin/e-smith/db configuration set EthernetDriver1 orinoco_cs
> then run through the configuration console again.

Thanks, Charlie. I did that, but it set the _internal_ nic to be the wireless card, rather than the _external_. Setting EthernetDriver2 to orinoco_cs looks right, though. Now, when I go through the config and change from dialup to dedicated, it asks if I want to keep the orinoco_cs driver.

I think my next step is to get back to the service provider and establish a connection to their network.

Rob Bracken

Re: Wireless network card as external interface
« Reply #5 on: September 30, 2002, 09:40:15 PM »
Hooray! I now have a broadband wireless connection to the outside world.

A man visited today to install an aerial on the roof. We plugged it in and the card connected & got an address via DHCP. I used Charlie's suggestion (using EthernetDriver2 rather than EthernetDriver1), ran through the config screens and NAT worked too! Amazing!

To recap, the steps I used are:

1. Login as "root".
2. Install pcmcia_cs (if not already installed).
3. Go to "/etc/pcmcia". Check the "config" file to see which driver your card will use (mine's a ZoomAir 4105 and uses the orinoco_cs driver - you may need to get a later pcmcia_cs for this).
4. Edit the "wireless.opts" file to set up the ESSID, Mode, etc.
5. Enter the following command:
"/sbin/e-smith/db/configuration set EthernetDriver2 orinoco_cs" (You may need to put something else in place of "orinoco_cs", if your card's using a different driver)
6. Logout as "root" & log back in as "admin".
7. Go into "Configure this server". At the relevant place, switch from "dialup" to "dedicated". The next screen should ask you if you want to keep the existing "orinoco_cs" driver. Accept this. The next screen is about how to connect to the service - my service uses the MAC address for authentication, so I set it to "DHCP - use Ethernet address".
8. Finish the configuration screens. NAT should now work OK.

(Sorry if the above is not _exactly_ like the text on the screens, but I hope you can work out the right options from it)

You can check that the card is working by monitoring "/var/log/messages".

A tip - you can stop & start pcmcia as follows:

"/etc/rc.d/init.d/pcmcia stop"
"/etc/rc.d/init.d/pcmcia start"

Duncan

Re: Wireless network card as external interface
« Reply #6 on: October 01, 2002, 04:57:22 AM »
Cool.

I seem to recall something about setting a link from wlan to eth. Is this something you still need to do or will the above do it all. (if so how did you set the link).

Regards Duncan

Rob Bracken

Re: Wireless network card as external interface
« Reply #7 on: October 01, 2002, 02:12:01 PM »
Duncan wrote:

 > Cool.

 > I seem to recall something about setting a link from wlan to eth. Is this something you still need to do or will the above do it all. (if so how did you set the link).

The orinoco_cs driver loads as eth1, so you don't have to worry about wlan (that's why I'm using it!). e-smith picks it up and configures everything - the only manual bit is setting the value in the db.

Even cooler?

Duncan

Re: Wireless network card as external interface
« Reply #8 on: October 01, 2002, 02:50:45 PM »
Rob Bracken wrote:

> Even cooler?

Definitely. Will have to try this out.

Spent hour’s dicking around with the wlan and the eth part to find that you don’t need it. The joys Linux eh. Interesting that both the orinoco and the prism2 drivers work.

Out of curiosity, what type of distance are you getting? (With what type of antenna)

Regards Duncan

Dean Thomas

Re: Wireless network card as external interface
« Reply #9 on: November 22, 2002, 01:45:32 AM »
Rob would you mind telling me what version pcmcia_cs driver you are using?

Rob Bracken

Re: Wireless network card as external interface
« Reply #10 on: November 22, 2002, 12:25:18 PM »
Dean Thomas wrote:

    > Rob would you mind telling me what version pcmcia_cs driver you are using?

It's version 3.1.24.