LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-04-2013, 08:16 AM   #1
jtingkir
LQ Newbie
 
Registered: Aug 2013
Posts: 5

Rep: Reputation: Disabled
My raspbian box have to ping other box first then other host can see my box


I am having a problem with my raspberry pi (running raspbian - Linux raspi 3.6.11+ #506 PREEMPT BST 2013 armv6l GNU/Linux), I cannot ping my pi from any other host in the LAN, unless the pi ping that host first. But my pi doesn't have any problem connecting to the network, and it is still connected to the LAN all the time (I can access pi from the internet, both its ssh and webserver).
So apparently the pi is still connected to the network, only no other hosts could see it (unless other host being pinged first).

**lsusb of the pi:**

Code:
    Bus 001 Device 002: ID 0424:9512 Standard Microsystems Corp.
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 001 Device 003: ID 0424:ec00 Standard Microsystems Corp.
    Bus 001 Device 004: ID 05e3:0612 Genesys Logic, Inc.
    Bus 001 Device 007: ID 148f:2573 Ralink Technology, Corp. RT2501/RT2573 Wireless Adapter
    Bus 001 Device 006: ID 0bc2:5021 Seagate RSS LLC FreeAgent GoFlex USB 2.0

**ifconfig of the pi:**
Code:
    eth0      Link encap:Ethernet  HWaddr b8:27:eb:b7:26:0e
              UP BROADCAST MULTICAST  MTU:1500  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:1000
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    lo        Link encap:Local Loopback
              inet addr:127.0.0.1  Mask:255.0.0.0
              UP LOOPBACK RUNNING  MTU:16436  Metric:1
              RX packets:2027 errors:0 dropped:0 overruns:0 frame:0
              TX packets:2027 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0
              RX bytes:167652 (163.7 KiB)  TX bytes:167652 (163.7 KiB)
    
    wlan0     Link encap:Ethernet  HWaddr 00:0e:e8:d4:5d:39
              inet addr:192.168.0.100  Bcast:192.168.0.255  Mask:255.255.255.0
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:5530026 errors:0 dropped:0 overruns:0 frame:0
              TX packets:7664344 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000
              RX bytes:829572684 (791.1 MiB)  TX bytes:550946250 (525.4 MiB)
Here are the output of dmesg.

Code:
[Sat Aug  3 06:55:13 2013] wlan0: deauthenticated from c8:d7:19:b0:e3:ac (Reason: 7)
[Sat Aug  3 06:55:13 2013] cfg80211: Calling CRDA to update world regulatory domain
[Sat Aug  3 06:55:16 2013] wlan0: authenticate with c8:d7:19:b0:e3:ac
[Sat Aug  3 06:55:16 2013] wlan0: send auth to c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:16 2013] wlan0: authenticated
[Sat Aug  3 06:55:16 2013] rt73usb 1-1.2.1:1.0: wlan0: disabling HT as WMM/QoS is not supported
[Sat Aug  3 06:55:16 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:16 2013] wlan0: RX AssocResp from c8:d7:19:b0:e3:ac (capab=0x411 status=0 aid=1)
[Sat Aug  3 06:55:16 2013] wlan0: associated
[Sat Aug  3 06:55:23 2013] wlan0: deauthenticated from c8:d7:19:b0:e3:ac (Reason: 7)
[Sat Aug  3 06:55:23 2013] cfg80211: Calling CRDA to update world regulatory domain
[Sat Aug  3 06:55:26 2013] wlan0: authenticate with c8:d7:19:b0:e3:ac
[Sat Aug  3 06:55:26 2013] wlan0: send auth to c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:26 2013] wlan0: authenticated
[Sat Aug  3 06:55:26 2013] rt73usb 1-1.2.1:1.0: wlan0: disabling HT as WMM/QoS is not supported
[Sat Aug  3 06:55:26 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:26 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 2/3)
[Sat Aug  3 06:55:26 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 3/3)
[Sat Aug  3 06:55:27 2013] wlan0: association with c8:d7:19:b0:e3:ac timed out
[Sat Aug  3 06:55:28 2013] wlan0: authenticate with c8:d7:19:b0:e3:ac
[Sat Aug  3 06:55:28 2013] wlan0: send auth to c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:28 2013] wlan0: authenticated
[Sat Aug  3 06:55:28 2013] rt73usb 1-1.2.1:1.0: wlan0: disabling HT as WMM/QoS is not supported
[Sat Aug  3 06:55:28 2013] wlan0: associate with c8:d7:19:b0:e3:ac (try 1/3)
[Sat Aug  3 06:55:28 2013] wlan0: RX AssocResp from c8:d7:19:b0:e3:ac (capab=0x411 status=0 aid=1)
[Sat Aug  3 06:55:28 2013] wlan0: associated
[Sun Aug  4 07:33:27 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:33:32 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:33:43 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:34:05 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:34:48 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 07:36:15 2013] Peer 39.112.11.167:29671/39744 unexpectedly shrunk window 4046126933:4046133739 (repaired)
[Sun Aug  4 13:44:23 2013] ip_tables: (C) 2000-2006 Netfilter Core Team
and no iptables rule.

Why does it kept getting disauthenticated (It happened several time, I just cut the dmesg output). the weird is the pi have ping another host first, if the other host want to ping (let alone connect) to the pi.
Have any one had similiar issues? any suggestion?
Any help would be appreciated, Thank You before.

Last edited by jtingkir; 08-04-2013 at 08:56 AM.
 
Old 08-04-2013, 11:38 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Sounds like a case for running tcpdump oir wireshark on that network.

When you are on the lan but not seen, it's a routing issue usually. Is there a route to your local lan on the raspbian? Something like (presuming your network is 192.169.1.0)
Quote:
route -A inet add 192.168.1.0 dev wlan0
might help. Alternatively, put a line for your local network in /etc/hosts.
 
1 members found this post helpful.
Old 08-05-2013, 02:03 AM   #3
jtingkir
LQ Newbie
 
Registered: Aug 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
here are the route command output. Is it okay? the router is 192.168.0.1, so I guess the first line is true, but idk where did 192.168.0.0 came from, should I delete it? while the last line is the command you just mention earlier, with a slight change on the ip.

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.0.1     0.0.0.0         255.255.255.255 UH    0      0        0 wlan0

idk how to put your network on /etc/host/, so I did it this way.
Code:
192.168.0/24    milleniumfalcon #milleniumfalcon is the name of the essid

Last edited by jtingkir; 08-05-2013 at 02:11 AM.
 
Old 08-05-2013, 08:50 AM   #4
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Here's myrouting table
Code:
bash-4.2$ route -v
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    304    0        0 wlan0
loopback        *               255.0.0.0       U     0      0        0 lo
192.168.0.0     *               255.255.255.0   U     304    0        0 wlan0
192.168.0.1 is my router.102.168.0.0 is the 192.168.0/24 network. The gateway routes to the outside world. To find your local hosts, add lines like these below what's there.

[CODE]/etc/hosts
...
##
hostname_1 IP_1 or URL_1
e.g.
mule 192.168.0.1 #My server
BSOD 192,168.0.4 #Windows box


You can then ping BSOD or mule and get the translation. That holds for http://www type addresses also, or did anyhow back in 1974. Have you fixed IPs or DHCP?
 
1 members found this post helpful.
Old 08-05-2013, 09:28 AM   #5
Pyplate
LQ Newbie
 
Registered: Jun 2013
Location: Worcestershire, UK
Distribution: Ubuntu,lubuntu,raspbian
Posts: 17
Blog Entries: 30

Rep: Reputation: Disabled
I didn't need to adjust the routing table to get my Pi working. I suspect this may be a problem with the wifi adapter. Is it plugged into one of the Pi's USB sockets, or a powered USB hub?

Sometimes people have problems with wifi if the wifi adapter isn't getting enough power. The Pi's USB sockets can't supply enough current, so you need to use a powered USB hub. The other problem I've seen is that some times when you reboot your Pi, you also need to power cycle your hub as well.
 
1 members found this post helpful.
Old 08-05-2013, 09:59 AM   #6
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
I have a pi and you have a 100mA limit on the usb, and often not enough poke in the 5V.

Often the wifi adapter takes over 100mA. Go figure.
 
1 members found this post helpful.
Old 08-05-2013, 11:31 AM   #7
jtingkir
LQ Newbie
 
Registered: Aug 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
Here's myrouting table
Code:
bash-4.2$ route -v
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    304    0        0 wlan0
loopback        *               255.0.0.0       U     0      0        0 lo
192.168.0.0     *               255.255.255.0   U     304    0        0 wlan0
192.168.0.1 is my router.102.168.0.0 is the 192.168.0/24 network. The gateway routes to the outside world. To find your local hosts, add lines like these below what's there.

You can then ping BSOD or mule and get the translation. That holds for http://www type addresses also, or did anyhow back in 1974. Have you fixed IPs or DHCP?
fixed for the pi, and DHCP for the rest of the host (a PC and a couple of laptop), and no, I don't use any entry in the /etc/host (except the loopback and my post earlier). Wouldn't it be a problem using /etc/host on DHCP?

Quote:
I didn't need to adjust the routing table to get my Pi working. I suspect this may be a problem with the wifi adapter. Is it plugged into one of the Pi's USB sockets, or a powered USB hub?

Sometimes people have problems with wifi if the wifi adapter isn't getting enough power. The Pi's USB sockets can't supply enough current, so you need to use a powered USB hub. The other problem I've seen is that some times when you reboot your Pi, you also need to power cycle your hub as well.
CMIIW, but I think if it was the problem with the usb, dmesg will show disconnect message. I am using the pi on a powered USB btw.

I am going to try for wireshark if the problem occur again, then I am going to try dnsmasq and report back afterward, but until then any kind of suggestion is aprreciated. Thank You.
 
Old 08-05-2013, 11:59 AM   #8
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
Quote:
Wouldn't it be a problem using /etc/host on DHCP?
Could be if the IP a box has keeps changing. You shouldn't need /etc/hosts. The pi 5V can go low if the power isn't enough, and this can be causing strangeness as the VCC goes below 4.5V
 
1 members found this post helpful.
Old 08-08-2013, 09:30 PM   #9
jtingkir
LQ Newbie
 
Registered: Aug 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Ok,
1. Dnsmasq didn't help (I thought it would,dang!)....
2. wireshark shows arp request, but no answer from the raspi, but any other arp request to any other hosts worked just fine.
So i tried arping on the first host while tcpdump on the raspberry pi (and another host at the same time - ubuntulaptop), filtering arp request. no arp packet reach the raspi, but the ubuntulaptop receive the packet.

arp request are broadcast message right? so is the problem is on the router (linksys E1200)? The E1200 also have the raspi on static ip (while other on dynamic IP). or is it because I port forward some traffic to raspi?

and one more thing, this problem happen randomly (or is it?), if it is the router, why would it happen randomly?

thank you before
 
Old 08-09-2013, 06:03 AM   #10
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,297

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
You've got me now.

Agreed on the diagnosis of the router. All the other boxes are ok on the dhcp server, but whatever you have done with the raspberry pi is not ok. How does it know there's a dhcp server & network out there at all? Maybe a route to the dhcp network would be good, and here we hope you haven't made this messy with your choice of IPs for the raspi
 
1 members found this post helpful.
Old 08-09-2013, 07:53 AM   #11
jtingkir
LQ Newbie
 
Registered: Aug 2013
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by business_kid View Post
You've got me now.

How does it know there's a dhcp server & network out there at all? Maybe a route to the dhcp network would be good, and here we hope you haven't made this messy with your choice of IPs for the raspi
How do I that? will the routing table suffice?

Code:
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         192.168.0.1     0.0.0.0         UG    0      0        0 wlan0
192.168.0.0     *               255.255.255.0   U     0      0        0 wlan0
192.168.0.1     0.0.0.0         255.255.255.255 UH    0      0        0 wlan0
because the 192.168.0.0 route to the network and the 192.168.0.1 route to the gateway, which is also a dhcp server.

thank you before.
 
  


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 Win XP Box from RH9 Box ganesh raorane Linux - Networking 3 10-15-2010 06:03 PM
Host Unreachable , ICS, Slackware Box=Client, XP Box=host MercuryRising Linux - Networking 5 04-13-2006 01:52 PM
XP Box won't connect to internet thru RH9 Box (firewall/dhcpd), it can only ping fire Rhapsodic Linux - Networking 4 07-10-2004 03:02 PM
Can ping box to box thru router - good sign? toastermaker Linux - Networking 15 12-07-2003 12:00 AM

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

All times are GMT -5. The time now is 10:47 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