Quote:
Quote:
Quote:
OK, setup: internet ---- (eth0)|box1|(wlan0)....(sr1)|box2| You want box1 to be an internet gateway and wireless access point. (You are happy with ad-hoc mode for this.) Check: Quote:
Configure the nics: iwconfig wlan0 mode Ad-Hoc (Master for an access point) iwconfig wlan0 essid homenet iwconfig wlan0 channel 0 iwconfig wlan0 key open iwconfig wlan0 commit iwconfig (copy results) ifup wlan0 Edit your firewall script to include the following lines at the appropriate point: Code:
# Set up IP FORWARDing and Masquerading iwconfig sr0 mode Ad-Hoc iwconfig sr0 essid homenet iwconfig sr0 key open iwconfig sr0 commit ifup sr0 ... for a permanent setup, you want to use an encryption key. |
Wait up... what is the router IP? 192.168.1.1/24 perhaps? In which case, it is probably a good idea to put the wireless side in a different subnet:
192.168.2.50 192.168.2.25 However... it could be that one of the drivers siwply dosn't support ad-hoc mode. See discussion: http://justlinux.com/forum/archive/i.../t-147208.html |
Quote:
I dont understand. I keep trying to articulate my n00b status! what is the /24 mean in 192.168.1.1/24 ? "subnet" ???? What? I've bought a Netgear 54g wireless WAP/router model (WGT624 v3) and installed just now. The laptop is now working. Connected to the WAP and secured. Internet available. I can ping the internet (www.google.co.uk) successfully. The desktop is also connected to the router although this is through Cat5 cable into a LAN port on the back of the router. Internet also available. Again, I can ping the internet (www.google.co.uk) successfully. The router (192.168.1.1) web interface has a menu option "Devices Connected". This shows devices connected: 192.168.1.2 (the desktop. IP changed because im on DHCP now) 192.168.1.4 (the laptop. IP changed because im on DHCP now) So the router Great...all seems well, However... I cannot ping each other (desktop <-> laptop). I've tried DHCP and static addresses to my two machines. No joy either way. I've turned off shorewall. Nothing in dmesg since the interfaces went up...just clear, no errors!! So the wireless router knows about the connected devices and is correctly routing internet traffic to/from my network. But neither machine can be pinged from the other. What gives Simon matey?? thanks for all your help BTW. |
EDIT:
Working now. Had to reboot the laptop ??? Anyway, all is fine now. I need to ask an unrelated question so will goto the forum. Thanks Simon! ;) for all your kind support. |
OK. Good... to recap: you got a new wireless device that used a different driver, reboot, and everything is fine. i.e. Your trouble was that the driver did not support what you wanted to do.
Since most people use infrastructure mode with an access point, this turned out to be tricky to spot. Quote:
The /24 is called a "subnet mask" and is shorthand for "255.255.255.000" (Google "subnet".) 192.168.0.0/24 is the class C private network. (Simplistic explanation follows) If your router was 192.168.1.1 (common) then that would assign an IP to your eth0 interface on subnet 1 of network 192.168 see? Host 1 is the router and host 2 is probably the desktop. 192.168.1.1 = router on net 1 192.168.1.2 = desktop on net 1 But the desktop has two interfaces. The wireless interface isn't on the same physical network as the router and eth0. But you had assigned it an IP as if it was. I was speculating that since hosts 25 and 50 are not known to be on subnet 1, then any packets claiming to be from them may register as "martian". Assigning them to a different subnet, say number 2, may have solved this issue. Thus: 192.168.2.50 = desktop wireless 192.168.2.25 = laptop I thought of this because it occurred to me that I had never set up internal and external interfaces on the same subnet. |
Ah,
/24 = CIDR I'm getting it now. BTW Simopn, I think the driver for the USB dongle was foobar. There is no cable as the dongle plugs direct into the USB interface. Moreover, sometimes kernel messages would reject an address and other times would establish a config using an address. Pot luck. Like i said, I've installed a Netgear wireless router as a WAP with the two machines on the same physical segment LAN side of the router (192.168.1.1), i.e 192.168.x/24. All is fine now. My lack of understanding at the outset and an erratic driver seems to have hindered progress.However, thanks to you Simon all is clear now. My network is fine and dandy now. Having had a think about this, I actually prefer the setup this way, because ad-hoc would have required my desktop to be powered on 24/7 for the laptop to access the internet. Not good. Cheers buddy. |
All times are GMT -5. The time now is 01:38 PM. |