My raspbian box have to ping other box first then other host can see my box
Linux - NetworkingThis forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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
[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.
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.
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
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?
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.
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.
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
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?
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.