View previous topic :: View next topic |
Author |
Message |
akaempf n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/160208568840b11a3b29b9c.jpg)
Joined: 01 Nov 2003 Posts: 17 Location: London
|
Posted: Wed May 26, 2004 6:34 pm Post subject: Point-to-point wireless connection |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
viperlin Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 15 Apr 2003 Posts: 1319 Location: UK
|
Posted: Wed May 26, 2004 11:43 pm Post subject: |
|
|
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 ![Smile :-)](images/smiles/icon_smile.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
pjp Administrator
![Administrator Administrator](/images/ranks/rank-admin.gif)
![](images/avatars/1154772887439692d88303b.jpg)
Joined: 16 Apr 2002 Posts: 20588
|
Posted: Thu May 27, 2004 3:39 pm Post subject: |
|
|
Moved from Documentation, Tips & Tricks. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
akaempf n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/160208568840b11a3b29b9c.jpg)
Joined: 01 Nov 2003 Posts: 17 Location: London
|
Posted: Thu May 27, 2004 9:16 pm Post subject: |
|
|
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 ![Smile :-)](images/smiles/icon_smile.gif) |
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 |
|
![](templates/gentoo/images/spacer.gif) |
smart Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 19 Nov 2002 Posts: 455
|
Posted: Fri May 28, 2004 5:10 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
akaempf n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
![](images/avatars/160208568840b11a3b29b9c.jpg)
Joined: 01 Nov 2003 Posts: 17 Location: London
|
Posted: Sat May 29, 2004 11:57 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|