LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 11-10-2006, 01:27 PM   #1
Pieman86
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Rep: Reputation: 0
Unable to ping machines on a wireless ad-hoc network


Hi

I have two laptops with wireless enabled (one's running Debian, the other's running Gentoo, and they both have Intel PRO/Wireless cards). Everything seems to be set up correctly, because I can connect to the Internet just fine using an access point.

I recently tried to get the machines connected in ad-hoc mode. I'm not very experienced with wireless networking, but I think I followed the right steps. The problem is that I cannot use either machine to ping the other one. This is what I did:

MACHINE 1 (wireless interface is eth1)
iwconfig eth1 mode Ad-Hoc essid mynet channel 11 key off
ifconfig eth1 10.10.10.10 netmask 255.255.255.0 up

MACHINE 2 (wireless interface is eth0)
iwconfig eth0 mode Ad-Hoc essid mynet channel 11 key off
ifconfig eth0 10.10.10.11 netmask 255.255.255.0 up

Both of them associated with the "mynet" network and accepted the static IP addresses I assigned them. Here's the relevant output from iwconfig on the two machines afterwards:

Code:
eth1      IEEE 802.11g  ESSID:"mynet"
          Mode:Ad-Hoc  Frequency:2.462 GHz  Cell: 02:12:F0:4F:41:40
          Bit Rate=54 Mb/s   Tx-Power=20 dBm
Code:
eth0      IEEE 802.11g  ESSID:"mynet"
          Mode:Ad-Hoc  Frequency:2.462 GHz  Cell: 02:12:F0:4F:41:40
          Bit Rate=54 Mb/s   Tx-Power=20 dBm   Sensitivity=8/0
So far, everything looks like it's working properly. I can ping the first machine from itself over the wireless interface. But I can't reach the other machine:

sanmao@localghost:~$ ping -I eth1 10.10.10.10
PING 10.10.10.10 (10.10.10.10) from 10.10.10.10 eth1: 56(84) bytes of data.
64 bytes from 10.10.10.10: icmp_seq=1 ttl=64 time=0.075 ms
64 bytes from 10.10.10.10: icmp_seq=2 ttl=64 time=0.064 ms

--- 10.10.10.10 ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 999ms
rtt min/avg/max/mdev = 0.064/0.069/0.075/0.010 ms
sanmao@localghost:~$ ping -I eth1 10.10.10.11
PING 10.10.10.11 (10.10.10.11) from 10.10.10.10 eth1: 56(84) bytes of data.
From 10.10.10.10 icmp_seq=2 Destination Host Unreachable
From 10.10.10.10 icmp_seq=3 Destination Host Unreachable
From 10.10.10.10 icmp_seq=4 Destination Host Unreachable
From 10.10.10.10 icmp_seq=6 Destination Host Unreachable
From 10.10.10.10 icmp_seq=7 Destination Host Unreachable
From 10.10.10.10 icmp_seq=8 Destination Host Unreachable

--- 10.10.10.11 ping statistics ---
8 packets transmitted, 0 received, +6 errors, 100% packet loss, time 7000ms
, pipe 3


I've deactivated the firewalls and other network interfaces on both machines, but it still doesn't work.

I searched the Internet for a bit and found that other people have had similar problems in the past, but I haven't been able to find any answers to this problem. I'm obviously missing something important, and would really appreciate any suggestions on what's going wrong.

Thanks a lot
Simon
 
Old 11-11-2006, 06:24 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
After reading your post, I have two things you can look at. The first is the sub-net mask for a class A network should be 255.0.0.0. ( I don't think this is what is stopping the pins to work, but you may want to change it.

The one machine's card is eth1. Is there an eth0 on that machine? If so, have you a default route set on eth0? What have you got in the routing table for the 10.x.x.x sub-net? You may only need to enter a static route for this sub-net.

Other than those two things, everyting looks good...

Hope this helps.
 
Old 11-12-2006, 05:23 AM   #3
Pieman86
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Hi camorri

Thanks for your post! I changed the subnet mask as you suggested (forgot 10.x.x.x was a private Class A).

Here's the output of "route" on both computers:

eth1 machine:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.0.0.0       U     0      0        0 eth1
eth0 machine:
Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.0.0.0       U     0      0        0 eth0
loopback        *               255.0.0.0       U     0      0        0 lo
Nothing is going out on eth0 of the first machine, as far as I can see. I'm also not really sure how to set up an appropriate route for the first machine (adding a default gateway won't help, will it?). If you have any further suggestions, I'd be really grateful.

Thanks again
Simon
 
Old 11-12-2006, 09:54 AM   #4
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,215

Rep: Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849Reputation: 849
I think your problem is in fact your routing table. You can add a route with the command 'route add' as the route user. Here is a sample i cut and pasted from the route man page.

Quote:
route add -net 192.56.76.0 netmask 255.255.255.0 dev eth0
This would add a sub-net to eth0. All you need to do to test it is do the route add on both machines on the appropriate interface. You can see with the route command if it got added to the routing table. That change is
there until you boot, or remove it with 'route del' command. I'm using WebMin to manage my system. I can use it to add, delete routes, hosts etc. It accesses the correct system file to store static and default routes. I'm sure if I poke around, I can figure out what file you need to edit to make it permanent.

A default route is where a packet will get sent if the kernel doesn't know what to do with it. If there is no default, and the kernel can't decide what to do with a packet, it doesn't get sent anywhere. Not good. In my case, I always set a default, for my system, it is the address of my router.

Let me know how it goes.
 
Old 11-16-2006, 03:29 PM   #5
Pieman86
LQ Newbie
 
Registered: Nov 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Hi camorri.

Thanks for all your help, but I haven't managed to get it working yet. Regarding the output of "route" that I posted earlier, didn't that already show that a route existed for the 10.x.x.x subnet on both machines? I also don't know what to set for my default route, as I thought the whole point of an ad-hoc network was that there is no central router.

Maybe there's just something wrong with the computers. Strangely, I can use arping to reach Machine 1 from Machine 2, but not the other way around. I've gone back to using a wireless access point for now, anyway.

Regards
Simon
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to ping my Linux box from other machines on the network Nylex Linux - Networking 3 07-19-2006 05:13 AM
All I can do on my small home network is ping other machines will103 Linux - Networking 5 02-02-2005 03:13 PM
Unable to ping linux machines on my netowrk molbill Linux - Networking 6 09-13-2004 12:35 AM
Mandrake 9.2 / admtek 8211 - ESSID found but cannot ping on ad-hoc network steventux Linux - Wireless Networking 3 03-11-2004 11:07 AM
setting up a home network/ machines won't ping each other rsheridan6 Linux - Networking 5 04-21-2003 02:12 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 08:13 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration