Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 482
  • Last Modified:

wlan cards set up but cannot ping other computer

Hallo,

after some effort I managed to get my two wireless cards working:

Card (1) is a DWL 510 with Realtek 8180L chipset (802.11b pci)
Card (2) is a Ralink rt2500 (802.11g pcmcia)

Initially I wanted to get Card (1) up and running in a SuSE 9.2 PC connected to the Internet through standard PPP dialup. Then I wanted to set Card (2) up in a Dell laptop also running SuSE 9.2. The third thing was to set up an internal network using Ad-Hoc and if everything was still ok and not smoking, to route from Card (1) to Card (2) so I can access the Internet from the laptop too.

I managed to get both modules installed so that I can see both cards with iwconfig. Card (1) is configured (not through YAST) as wlan0 and Card (2) is configured as ra0 (also, not through YAST). With the iwconfig wlan0 mode Ad-Hoc command I changed the mode accordingly (likewise for ra0). I set the essid to my.wifi for both cards. Then I entered ifconfig wlan0 192.168.0.5 for wlan0 and ifconfig ra0 192.168.0.6 for ra0. With ifconfig I was able to check if both were working and they were. However, when I tried ping 192.168.0.6 from the PC, I got the standard network is unreachable error. The same happened the other way around (i.e. from the laptop). I booted into windows to check if the hardware was working and after fooling around with the settings, I was able to get a connection). Back in linux, the cards both blink away fine, but neither seems to know that there is another card in the same room (I even put the laptop right next to the pc to make sure that the connection was or should be 100%).

The two things that I would like to find out are
(a). How can I set my cards up so that I don't have to iwconfig wlan0 mode Ad-Hoc etc. every time I reboot

(cool.gif. What is wrong with my network - it must be simple - two wireless cards, no router, no wep - I just want the cards to say hello.

Would appreciate any help on this one.

CF
http://www.softwarecontracts.de
0
ciaranfarrell
Asked:
ciaranfarrell
1 Solution
 
wesly_chenCommented:
Hi,

   I would say setup one card first, say card (1), then disable Card (1) and do card (2) to avoid the loop.
Could you provide those information
ifconfig -a
dmesg | grep -i net

Wesly
0
 
ciaranfarrellAuthor Commented:
Hi. Below is the output from the commands you suggested. First I sent the commands for the PC (Card 1) and underneath are the comments for the laptop (Card 2). Hope it makes some sense. By the way, on the PC I also have another network card set up as eth0 (standard non wireless). I had noticed that ping was using this to send but then I disabled it with ifdown eth0 and it still didn't work with wlan0 - just to clarify. The exact ping error message is:

pc:/home/cfarrell # ping 192.168.0.6
PING 192.168.0.6 (192.168.0.6) 56(84) bytes of data.
From 192.168.0.5: icmp_seq=1 Destination Host Unreachable
From 192.168.0.5 icmp_seq=1 Destination Host Unreachable
From 192.168.0.5 icmp_seq=2 Destination Host Unreachable
From 192.168.0.5 icmp_seq=3 Destination Host Unreachable

--- 192.168.0.6 ping statistics ---
6 packets transmitted, 0 received, +4 errors, 100% packet loss, time 5008ms
, pipe 3


###############################################################
OUT PUT FOR PC FOR COMMAND ifconfig -a
###############################################################
pc:/home/cfarrell # ifconfig -a
eth0      Protokoll:Ethernet  Hardware Adresse 00:0E:2E:30:57:4E
          inet Adresse:192.168.0.1  Bcast:192.168.0.255  Maske:255.255.255.0
          inet6 Adresse: fe80::20e:2eff:fe30:574e/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:41 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:1000
          RX bytes:0 (0.0 b)  TX bytes:5111 (4.9 Kb)
          Interrupt:5

lo        Protokoll:Lokale Schleife
          inet Adresse:127.0.0.1  Maske:255.0.0.0
          inet6 Adresse: ::1/128 Gültigkeitsbereich:Maschine
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:70 errors:0 dropped:0 overruns:0 frame:0
          TX packets:70 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:0
          RX bytes:4580 (4.4 Kb)  TX bytes:4580 (4.4 Kb)

ppp0      Protokoll:Punkt-zu-Punkt Verbindung
          inet Adresse:217.110.136.53  P-z-P:213.61.232.155  Maske:255.255.255.255
          UP PUNKTZUPUNKT RUNNING NOARP MULTICAST  MTU:1500  Metric:1
          RX packets:1066 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1104 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:3
          RX bytes:847489 (827.6 Kb)  TX bytes:95587 (93.3 Kb)

sit0      Protokoll:IPv6-nach-IPv4
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

wlan0     Protokoll:Ethernet  Hardware Adresse 00:40:05:3E:E8:A2
          inet Adresse:192.168.0.5  Bcast:192.168.0.255  Maske:255.255.255.0
          inet6 Adresse: fe80::240:5ff:fe3e:e8a2/64 Gültigkeitsbereich:Verbindung
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 Sendewarteschlangenlänge:1000
          RX bytes:0 (0.0 b)  TX bytes:460 (460.0 b)
          Interrupt:11 Basisadresse:0xc400


###############################################################
OUT PUT FOR PC FOR COMMAND dmesg | grep -i net
###############################################################

pc:/home/cfarrell # dmesg | grep -i net
NET: Registered protocol family 16
TC classifier action (bugs to netdev@oss.sgi.com cc hadi@cyberus.ca)
audit: initializing netlink socket (disabled)
NET: Registered protocol family 2
NET: Registered protocol family 1
NET: Registered protocol family 8
NET: Registered protocol family 20
8139too Fast Ethernet driver 0.9.27
NET: Registered protocol family 10


###############################################################
OUT PUT FOR LAPTOP FOR COMMAND ifconfig -a
###############################################################
lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:12 errors:0 dropped:0 overruns:0 frame:0
          TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:840 (840.0 b)  TX bytes:840 (840.0 b)

ra0       Link encap:Ethernet  HWaddr 00:0B:6B:40:10:20  
          inet addr:192.168.0.6  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::20b:6bff:fe40:1020/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:14 errors:1 dropped:1 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b)  TX bytes:746 (746.0 b)
          Interrupt:11 Base address:0x4000

sit0      Link encap:IPv6-in-IPv4  
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

###############################################################
OUT PUT FOR LAPTOP FOR COMMAND dmesg | grep -i net
###############################################################
NET: Registered protocol family 16
TC classifier action (bugs to netdev@oss.sgi.com cc hadi@cyberus.ca)
audit: initializing netlink socket (disabled)
NET: Registered protocol family 2
NET: Registered protocol family 1
NET: Registered protocol family 8
NET: Registered protocol family 20
NET: Registered protocol family 10





0
 
ciaranfarrellAuthor Commented:
I am still trying to get the two cards to communicate but thing aren't really going too well. I booted quickly into Windows and discovered that I have the same problem there - the two cards work fine but don't communicate at all with each other. I got around to thinking that the problem has to do with the room environment - the PC is in a corner under a desk and the aerial of the card just about peeks around the corner. As well as this there are a whole load of wires coming out of the back of the PC - one is an SVideo in cable coming from the tv decoder. In order to minimise any interference I disconnected the SVideo wire but it didn't seem to make any difference.

I'm racking my brains trying to isolate the problem - any other suggestions?

Ciaran
0
Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

 
wesly_chenCommented:
> the two cards to communicate but thing aren't really going too well
The system has 2 NIC cards within the same subnet (192.168.0.1 & 192.168.0.5) will cause the loop which,
in other words, won't work.
Unless you have network trunk software to combine two NICs as a virtual double bandwidth NIC.

So it is not OS issue, it is network infrastructure issue.
Please try only one NIC on each system which I mentioned on the first post.

Or you set the different subnet to another NIC card (say, 192.168.1.5) with ip forwarding enable, then two NICs can
communicate each other.

Besides, make sure your wireless card get enough signal (tested on Windows) since your PC environment quite ......
0
 
ciaranfarrellAuthor Commented:
Thanks again for the help. There are evidently some basic points about wireless networking that I still don't get. In the ouput that I posted I included eth0 in the PC ifconfig output, but only to show exactly what is running on the system. I normally disable eth0 with ifdown eth0 before I go tackling the wireless problem. As I am, at the moment, only trying to get the wireles cards to ping each other, I have not even thought about including routing or security (etc.) - that can all be done afterwards.

With regard to the "loop" you mentioned - I was of the opinion that the wireless cards each have to have an IP of, say 192.168.0.5 and 192.168.0.6 and also have the same subnet mask of 255.255.255.0 (as is the case here). They also have the same ESSID of babelworx.wifi. How does this cause a loop - I really don't get it. If I set up one card (Card 1 on the PC) first (making sure that eth0 is definitely off with ifdown eth0) then I use:
iwconfig wlan0 mode Ad-Hoc
iwconfig wlan0 essid babelworx.wifi
ifconfig wlan0 192.168.0.5

Then I test this with ping 192.168.0.5 and it looks as if everything is ok - I get feedback.

Then I should disable this again with ifdown wlan0?

Then repeat the above steps for the laptop card and then disable that with ifdown ra0?

What would happen if I gave the PC card an IP of 192.168.1.1 and the laptop card and address of 192.168.0.1 - would there be any way they could communicate then without a loop?

I've also brought the PC and laptop close enough together that the signal must get through.

Ciaran
0
 
SanktwoCommented:
Ciaran, When you say "Then I test this with ping 192.168.0.5 and it looks as if everything is ok - I get feedback." do you mean that you can ping between the PC and the Laptop and vice-versa using the wifi connection and get good, high speed responses in both directions? i.e. do you think that you have fixed the "radio" part of the problem?

If you are still having trouble with the wireless part, then, in a console su to root do iwconfig wlan0 and iwconfig ra0 on the relevant machines. That will give an output something like:
#iwconfig wlan0
wlan0     IEEE 802.11-b  ESSID:"myid"  Nickname:"myid"
          Mode:Managed  Frequency:2.417 GHz  Access Point: 00:80:C8:AA:E5:5A
          Bit Rate:11 Mb/s   Tx-Power:-142520320 dBm
          Retry min limit:8   RTS thr:off   Fragment thr:off
          Encryption key:9646-6BEF-EEC2-E277-5948-6939-81   Security mode:restricted
          Link Quality=58/92  Signal level=-57 dBm  Noise level=-98 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

(though I guess different for ad-hoc network). Post the result (minus any crypto key of course to see if anyone can figure out what the problem is with the wireless connection if you are still not communicating.


From your linformation thus:
         RX bytes:0 (0.0 b)  TX bytes:746 (746.0 b)
and
          RX bytes:0 (0.0 b)  TX bytes:5111 (4.9 Kb)

it looks, in this case, that the radio part was not communicating (certainly in my case, I always see a few bytes even before trying ping or anything - I guess just administrative exchanges).

(I am also struggling with wlan0 not routing correctly after booting and have to put in a default route manually. My config is different, I am using an access point (as you can see above) with an ethernet interface to the ADSL modem.).
0
 
ciaranfarrellAuthor Commented:
OK - I went and bought a big antenne because I wanted to be sure that the little antenne tucked away in the corner behind the PC wasn't the problem. Now I have a big one. But the problem didn't go away. It is, in fact, the exact same as before - only with a bigger aerial on a long wire. I even went and installed the copies of Windows XP that came with the PC and laptop to make sure that this isn't just a linux problem. It doesn't work on XP either (unless I also made a complete mess of it there too). The cards blink like hell and keep waying that they are scanning for a network, but none has been found. I was just thinking, could it have something to do with the fact that both cards have interrupt 11?. Or could there be some other IRQ conflict?

Ciaran
0
 
wesly_chenCommented:
Hi,

  Did you setup the wireless card (1), DWL 510, as wireless access point (AP)?
For wireless connection, you need to setup card (1) as AP to allow other wireless card to communcate with it.
Here is the instruction for building a Linux AP
http://www.sorgonet.com/network/wirelessnoap/

Regards,

Wesly
0
 
Cyclops3590Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:
Accept: wesly_chen

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

Cyclops3590
EE Cleanup Volunteer
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now