Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Point-to-point wireless connection
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
akaempf
n00b
n00b


Joined: 01 Nov 2003
Posts: 17
Location: London

PostPosted: Wed May 26, 2004 6:34 pm    Post subject: Point-to-point wireless connection Reply with quote

Hello,

I'm trying to get two PCs to connect using wireless without an access point. The Netgear MA521 cards are showing up fine (thanks to ndiswrapper), and I can run iwconfig to set both cards to ad-hoc mode, with essid 'any' (I've also tried a fixed essid with same results). I have used ifconfig to set the machines' different fixed IP addresses (I'm not using DHCP since I need fixed IP addresses for the server on my wired LAN).

Unless I'm missing something, I should be able to ping one machine's IP address from the other, but I get 'Destination host unreachable' on both machines. Do I need to do route to set a gateway? Any other thoughts? This must be a common requirement, but I haven't had any luck searching the forums or google.

Any help would be appreciated!

Thanks,
Andreas
Back to top
View user's profile Send private message
viperlin
Veteran
Veteran


Joined: 15 Apr 2003
Posts: 1319
Location: UK

PostPosted: Wed May 26, 2004 11:43 pm    Post subject: Reply with quote

ok lets play.

set 2 laptops to an SSID of your choice.
set card to ad-hoc mode
check cards are on same channel (usually channel 11 or 6)

"ifconfig eth0 up" (on both laptops)
"ifconfig eth0 192.168.0.1" (use .2 on the second laptop)

then try pinging :-)
Back to top
View user's profile Send private message
pjp
Administrator
Administrator


Joined: 16 Apr 2002
Posts: 20588

PostPosted: Thu May 27, 2004 3:39 pm    Post subject: Reply with quote

Moved from Documentation, Tips & Tricks.
_________________
Quis separabit? Quo animo?
Back to top
View user's profile Send private message
akaempf
n00b
n00b


Joined: 01 Nov 2003
Posts: 17
Location: London

PostPosted: Thu May 27, 2004 9:16 pm    Post subject: Reply with quote

viperlin wrote:
ok lets play.

set 2 laptops to an SSID of your choice.
set card to ad-hoc mode
check cards are on same channel (usually channel 11 or 6)

"ifconfig eth0 up" (on both laptops)
"ifconfig eth0 192.168.0.1" (use .2 on the second laptop)

then try pinging :-)


Thanks for the reply. I tried this, except I used wlan0 instead of eth0 in the ifconfig commands, since that's the interface that is shown when I run iwconfig (eth0 is shown as well, but it's the hardware ethernet card, and is of course not shown as having wireless extensions).

Typing iwconfig gives the following output on both machines (except the Cell is different, and I believe they are supposed to be the same if the cards recognise each other in Ad-hoc mode):

Code:

lo        no wireless extensions.

eth0      no wireless extensions.

wlan0     IEEE 802.11b  ESSID:"hugh" 
          Mode:Ad-Hoc  Frequency:2.417GHz  Cell: 02:E0:77:8F:E2:44 
          Bit Rate:11Mb/s   Tx-Power:20 dBm   Sensitivity=0/3 
          RTS thr:2432 B   Fragment thr:2432 B   
          Encryption key:off
          Power Management:off
          Link Quality:100/100  Signal level:-95 dBm  Noise level:-256 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0


ifconfig shows the following on both machines (except the IP addresses are one greater for both the eth0 and wlan0 on the other machine, and of course the MAC addresses are different):

Code:

eth0      Link encap:Ethernet  HWaddr 00:40:63:D5:17:D9 
          inet addr:192.168.0.2  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:2341 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1376 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:214925 (209.8 Kb)  TX bytes:194184 (189.6 Kb)
          Interrupt:12 Base address:0xd800

lo    (left out)

wlan0     Link encap:Ethernet  HWaddr 00:09:5B:62:B4:46 
          inet addr:192.168.0.11  Bcast:192.168.0.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:882 (882.0 b)
          Interrupt:12 Memory:de006000-de0060ff


Trying to ping either machine from the other gives a "Destination Host Unreachable" error. I have also tried ping -I wlan0 192.... with the same result. Notice the TX packets but no RX packets on the wlan0 interface.

Any chance that there is a conflict between wlan0 and eth0 in the routing table? I need eth0 on one machine in order to ssh into it (it's a headless machine that will be remotely controlled from my laptop for recording music, thus the desire to do a peer-to-peer connection).

Am I right that the Cell should be the same if the two cards recognize each other?

Any ideas or clarification would be much appreciated!

Thanks again,
Andreas


Last edited by akaempf on Sat May 29, 2004 11:59 am; edited 1 time in total
Back to top
View user's profile Send private message
smart
Guru
Guru


Joined: 19 Nov 2002
Posts: 455

PostPosted: Fri May 28, 2004 5:10 am    Post subject: Reply with quote

First the bad vibrations...

you should not normally copy in just the output of one machine and say the other is the same plus one. You would not be the first who had a problem just because he missed out one little figure... :)

Otherwise, wireless setup seems fine though i'm not 100% sure that without translating the frequency and seeing an actual channel verifies them both to be on the same channel. Should read, seeing the same frequency here on both ends does not convince me that they run on the same channel. The difference might be smaller than thir position behind period. Otherwise, normally they should find each other in ad-hoc without that, but heck, try to define a channel for them if you didn't.

On network side though you have one problem for sure, which is using the same network for your wired and wireless connection. Your routing table will have one of these two connections first, and that's what will be it. Use different networks for the two connections.
Back to top
View user's profile Send private message
akaempf
n00b
n00b


Joined: 01 Nov 2003
Posts: 17
Location: London

PostPosted: Sat May 29, 2004 11:57 am    Post subject: Reply with quote

Thanks, this was very helpful. I disabled the ethernet connections on both machines and it worked fine.

In summary, here are the commands I ran on both machines to enable a peer-to-peer wireless connection without an access point (after driver had been successfully loaded with ndiswrapper):

Code:

/etc/init.d/net.eth0 stop
iwconfig wlan0 mode ad-hoc
iwconfig wlan0 essid "test"
iwconfig wlan0 channel 1
iwconfig (displays settings)

ifconfig wlan0 192.168.0.10 (...11 on other machine)
ifconfig (displays settings)

ping 192.168.0.11


I will read up on routing and try to get both ethernet and wireless working, and post results if successful and interesting.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum