PDA

View Full Version : Wirelesslan setup.



VeeDubb
04-02-2003, 01:39 PM
I don't expect anybody to walk me through it, but could somebody point me in the direction of where to look for info on setting up a wireless lan through linux? What I'm trying to do is set up an Ad-Hoc 802.11b network between a Linux box (primary) a Windows laptop and a windowsCE PDA.

Keep in mind I'm new to linux and network were never my thing under windows anyway.

garyng
04-02-2003, 02:29 PM
I use this command

iwconfig eth0 essid "your essid" enc "your WEP key, if there is any"

VeeDubb
04-02-2003, 08:24 PM
I use this command

iwconfig eth0 essid "your essid" enc "your WEP key, if there is any"


Error for wireless request "Set Encode" (8B2A) :
too few arguments



I have a standard PCI wired network adpter and a my WiFi is also PCI. I tried eth0 and eth1, sme response. My ssid is fordprefect and I am not useing wep

aay
04-02-2003, 10:55 PM
Run wlcardconfig. It will walk you through the setup. You may need to run netcardconfig afterwards (at least I do) to set up dhcp.

VeeDubb
04-02-2003, 11:44 PM
Well, that sort of worked, maybe. But I can't find it with any other systems. I have a WinCE handheld and an XP laptop on the same chanel with the sameessid and wep and they can't see the desk.

Here is the complete output from the file you had me run:


+ '[' NO = NO ']'
+ rm /etc/pcmcia/wireless.opts
+ echo '# Wireless LAN adapter configuration file /etc/pcmcia/wireless.opts'
+ echo '# written by wlcardconfig (C) Eckhard Rüggeberg'
+ echo '# Sorry for the clumsy syntax, but I have to have everything in one'
+ echo '# line for every card. This is a MaGiC nUmBeR.'
+ echo '# For the original file see in /KNOPPIX/etc/pcmcia/'
+ echo ''
+ echo 'case "$ADDRESS" in'
+ writeline
+ OURLINE=
+ '[' -n '' ']'
+ '[' -n Ad-Hoc ']'
+ iwconfig eth0 mode Ad-Hoc
+ OURLINE= MODE="Ad-Hoc";
+ '[' -n 11 ']'
+ iwconfig eth0 channel 11
+ OURLINE= MODE="Ad-Hoc"; CHANNEL="11";
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n '' ']'
+ '[' -n fordprefect ']'
+ iwconfig eth0 essid fordprefect
+ OURLINE=ESSID="fordprefect"; MODE="Ad-Hoc"; CHANNEL="11";
+ OURLINE=*,*,*,00:10:7A:4A:05:B9) ESSID="fordprefect"; MODE="Ad-Hoc"; CHANNEL="11"; ;;
+ echo '*,*,*,00:10:7A:4A:05:B9)' 'ESSID="fordprefect";' 'MODE="Ad-Hoc";' 'CHANNEL="11";' ';;'
+ echo esac

VeeDubb
04-02-2003, 11:47 PM
Is there something else I need to do to connect?

garyng
04-03-2003, 02:25 AM
if you don't use WEP, just say

iwconfig essid "your essid"

VeeDubb
04-03-2003, 03:02 AM
Turns out one of my neighbors has a Wlan, so I decided to go ahead and use a WEP pasword. However, after running again, my other systems still can't see my linux box.

garyng
04-03-2003, 03:09 AM
do you have a WLAN router ? I am confused with your network setup ? You only have 2 machine each has a WLAN card ?

VeeDubb
04-03-2003, 03:16 AM
I have three machines, running three completely different opperating systems, each with it's own WiFi card. I'm trying to set up an Ad-Hoc network, NOT an infrastructure network.

VeeDubb
04-03-2003, 03:23 AM
I surender!

I'm going back to fry's to exchange the WiFi card I got for my desktop for a wireless router. I'll be back later.

probono
04-03-2003, 05:41 AM
I am using two different WLANs. The problem is: When I have used the one and want to use the other (other building), I have to reboot. (Different ESSID, different IP, different nameserver etc.) What's the "right" way of doing this (i. e. without reboot)? Anyone actually *done* that? (I know how it should work in theory...)

garyng
04-03-2003, 06:45 AM
can't you just re-issue the 'iwconfig' command with the new setting ?

VeeDubb
04-03-2003, 07:43 AM
Okay, I'm back with the Wlan router, I'll let you know how it goes.

VeeDubb
04-03-2003, 08:39 AM
Okay, I installed the Wlan router with a regular Cat5 cable and now I can see it with my other devices and the cards int he other systems can connect to the router, but I realydon't know where to go from here. As I said before, I now litle about wired lans and less about wireless lans.

What I want to do is share the internet connection that I use on my linux desktop (it's a PPP connection at tty0) with my Windows XP laptop. As I said, I can now see the router with the other systems and the cards can connect to the router, but I've no idea where to go from here. Anyhelp appreciated.

garyng
04-03-2003, 09:36 AM
do an 'ifconfig' to get the ip address first. I am assuming you can have each workstation seeing each other through the wireless connection, including the KNOPPIX box.

VeeDubb
04-03-2003, 09:57 AM
Here are the results of ifconfig


lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:50 errors:0 dropped:0 overruns:0 frame:0
TX packets:50 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3260 (3.1 KiB) TX bytes:3260 (3.1 KiB)

ppp0 Link encap:Point-to-Point Protocol
inet addr:67.227.206.106 P-t-P:67.227.128.59 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1524 Metric:1
RX packets:7784 errors:0 dropped:0 overruns:0 frame:0
TX packets:8637 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:7130949 (6.8 MiB) TX bytes:1034385 (1010.1 KiB)

How do I use that info to set up the internet connection shareing on the laptop? I'm also going to be using a WiFi card in my PocketPC, but I'll worry about that connections share later.

garyng
04-03-2003, 10:00 AM
um, where is the information for the wireless card on this KONPPIX ? I can't see it.

VeeDubb
04-03-2003, 10:09 AM
As I said, I gave up on going with wireless cards all around, and exchanged my card on the knoppix box for a wlan router. The router is connected to a standard network card by a standard network cable.

garyng
04-03-2003, 10:20 AM
I am confused. You have a WLAN router(which is a stand alone device), how can you connect it to the KNOPPIX ? If you mean through wire(RJ45), it means you have a normal network card on the KNOPPIX, then 'ifconfig' should show it.

How is the PPP connection connects to the outside world(ADSL modem or Cable modem or normal modem) ?

VeeDubb
04-03-2003, 10:31 AM
Okay, I have knoppix installed to the hard drive of my desktop.

At this point, that desktop has a regular old standard universal generic network card that uses cat5 cables(that's the kind with the RJ45 plug)

At present, the only thing connected to that network card by wires, is an 802.11b wireless router.

My only means of connecting to the internet is an external 56k modem on tty0 that connects to MSN internet service with a PPP connection.

My other two system are:

1- My girlfriends WindowsXP laptop with a WiFi pc card.

2- A PocketPC (if you're not familiar with them, that is a windowsCE PDA) that has a WiFi CF card.

My goal is to allow the laptop and the pocketPC to share the internet service and and the USB printer on my desktop. File transfer would be nice, but it is not critical. I don't care about the PocketPC and laptop seeing eachother one way or the other.

At present, the PocketPC and the laptop can "see" the access point (router) and apear to conect to it, but I don't know what to do from here. Also, the laptop "sees" the router and connects to it, but says there is no signal.

garyng
04-03-2003, 10:46 AM
If that is the case, you are supposed to see an 'eth0' on the KNOPPIX box but your last ifconfig didn't show that.

What you would need to do would be the following :

1. configure your wireless device to use some internal IP address like in the range of 10.0.1.x an example of setup :

KNOPPIX 10.0.1.1
ROUTER 10.0.1.2(for the wired interface)
10.0.2.1(for the wireless interface)
XP 10.0.2.2(for the wirless card)
Pocket PC 10.0.2.3

For your wireless devices, their default gateway would be set to 10.0.2.1(the router) DNS(would be those assigned by your ISP)

For the router, its default gateway woud be 10.0.1.1(your KNOPPIX box)

You also need to activate the NAT support on the KNOPPIX(don't ask me how as I don't have experience but I am sure it can be done).

It is quite complicated. I hope other would chip in about how to setup NAT etc.

VeeDubb
04-03-2003, 11:10 AM
Well, you heard it folks, if there's anybody that can help me out here I'd appreciate it. If not, even a good book sugestion for a beginner would be good.

VeeDubb
04-03-2003, 11:15 AM
if it helps, I jsut ran "ifconfig eth0" and these were the results.

eth0 Link encap:Ethernet HWaddr 00:50:BA:5E:90:BF
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:100
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Interrupt:9 Base address:0x2f00

garyng
04-03-2003, 11:32 AM
What you are asking to do is way beyond a simple book can offer. I would suggest you try to google 'linux NAT ppp' and see what it comes up. A simpler(but more expensive) solution would be to buy the Orinoco RG-1000 kits(don't know if it is still available) which is a wireless router that also has a modem/ethernet connection to do exactly what you want.

Another alternative is use the XP box as the router to outside world. Unfortunately, I don't have the time to play with linux for this usage or I can give you a field report.

The following is something I found on google

http://www-jerry.oit.duke.edu/linux/HOWTO/AAAfirewall_configure_with_ppp_v62.txt

VeeDubb
04-03-2003, 06:30 PM
You 've got to be kidding. The router takes care of itself, and I was under the impression that unix is what the majority of large networks and the internet were built on. Why in the name of God isn't there a simple straight foreward way to do this?!?! I mean it takes less than 3 minutes to set up internet connections sharing in Windows. That just doesn't make any sense.

Also, using the xp box as the gateway isn't realy an option because it's a laptop.

garyng
04-03-2003, 07:07 PM
You are absolutely right. A lot of those routers are just a PC running specially tuned linux. But setting them up is not an easy task(I mean making linux function the way like a router), comparing with Windows.

VeeDubb
04-04-2003, 04:17 AM
Oh well, I guess I'll just keep dual booting for now, though i means finding another valid copy of windows..... Maybe I'll search te sourceforge, somebody MUST be working on this......

VeeDubb
04-04-2003, 10:53 AM
An intersting attempt at changing around. My only real concern is internet share. printing would be nice and file shareing is not realy a concern, but I'd take it if it came along. Anyway, I was having rouble configuring this in windows, so instead of leaving the WAN socket open, and plugging my deskto into lan1, I plugged the desktop into the WAN socket (the one reserved for your broadband modem) so now the router thinks my desktop is the internet connection. I was able to connect my PocketPC via WiFi in 2 seconds this way.

I don't know if this makes any real difference, but Ithought it might give somebody an idea. Maybe configurein my desktop as a local proxy server or something along those lines. Anyway, let me know what you think.

garyng
04-04-2003, 11:00 AM
It solve half of your problem, but you still need to enable NAT on KNOPPIX so all your other devices linking through Wi-Fi can see the outside world. Proxy is an option but proxy would limit to WEB browsing only.

VeeDubb
04-04-2003, 06:45 PM
Solviong part of the problem is always better than making a new one. I'll look into NAT. Question, if I just wanted browsing, how would I set up proxy? Braowsing is my main concern, everything else is secondary.

garyng
04-05-2003, 01:55 AM
just install the proxy server on KNOPPIX(may be it is there already, waiting to be enabled) and point all your clients(XP, Pocket PC etc.) to that machine in the browser.

RockMumbles
04-05-2003, 04:31 AM
Essentially what a router does is remember who made a network request and to whom and as it recieves a packet it sends it back to the requesting machine. This is done in linux with ip-masquerading using either ip-chains or ip-tables.

You may want to look into these two packages:

shorewall - Shoreline Firewall (Shorewall)
shorewall-doc - Shoreline Firewall (Shorewall) Documentation

they are available as debs, so you could apt-get them, I haven't used shorewall but I've read that it is easy to get working.

I use a 486 w/16mb of ram and a floppy drive running freesco as my router, with a dialup connection.

rock