LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Mandriva (https://www.linuxquestions.org/questions/mandriva-30/)
-   -   wireless Vista <-> Mandriva : Can't see each other. (https://www.linuxquestions.org/questions/mandriva-30/wireless-vista-mandriva-cant-see-each-other-560598/)

Simon Bridge 06-13-2007 05:19 AM

Quote:

Originally Posted by keratos
NO! I don't have a wireless router.

... sorry, had to check because of:
Quote:

Originally Posted by keratos from post #9
My Router is a DHCP server so I set wlan0 to get IP from DHCP.

... see?
Quote:

I have a desktop. Its has two interfaces: eth0 (wired to a wired router gateway to net) and wlan0 (wireless)
I have a laptop with a wireless interface (ra0)

192.168.1.50 = desktop
192.168.1.25 = laptop

I want the laptop to be setup Ad-Hoc to the desktop and the desktop to share its internet connection to the laptop.

I heard Linux was a nightmare to setup wireless networking, never in my wildest dreams did I thin it would be this hard. For a n00b, its really daunting and no wonder people stick with Windows. Gosh, please help.
Well, you were doing well before, then you changed everything around.

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:

hub 3-0:1.0: Cannot enable port 2. Maybe the USB cable is bad?
... make sure this cable is OK (try to access anther network through it). It would be a real bummer to have a broken cable this early in the game.

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
  echo 1 > /proc/sys/net/ipv4/ip_forward
  iptables --table nat --append POSTROUTING --out-interface eth0 -j MASQUERADE
  iptables --append FORWARD --in-interface wlan0 -j ACCEPT

for Box 2

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.

Simon Bridge 06-13-2007 05:41 AM

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

keratos 06-13-2007 11:05 AM

Quote:

Originally Posted by Simon Bridge
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

Simon,

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.

keratos 06-13-2007 12:28 PM

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.

Simon Bridge 06-15-2007 04:48 AM

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:

I keep trying to articulate my n00b status!
what is the /24 mean in 192.168.1.1/24 ?
"subnet" ???? What?
When you receive this sort of reply, it means that you have shown yourself to be brighter than the average noob. If you do not understand the reply, you possess the tools to gain understanding.

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.

keratos 06-15-2007 08:21 AM

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.