LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   My raspbian box have to ping other box first then other host can see my box (https://www.linuxquestions.org/questions/linux-networking-3/my-raspbian-box-have-to-ping-other-box-first-then-other-host-can-see-my-box-4175472053/)

jtingkir 08-04-2013 08:16 AM

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.

business_kid 08-04-2013 11:38 AM

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.

jtingkir 08-05-2013 02:03 AM

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

business_kid 08-05-2013 08:50 AM

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?

Pyplate 08-05-2013 09:28 AM

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.

business_kid 08-05-2013 09:59 AM

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.

jtingkir 08-05-2013 11:31 AM

Quote:

Originally Posted by business_kid (Post 5003241)
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.

business_kid 08-05-2013 11:59 AM

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

jtingkir 08-08-2013 09:30 PM

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

business_kid 08-09-2013 06:03 AM

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

jtingkir 08-09-2013 07:53 AM

Quote:

Originally Posted by business_kid (Post 5006177)
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.


All times are GMT -5. The time now is 11:34 AM.