Hi all, I'm trying to troubleshoot some Samba difficulties, and I've run across an absolutely baffling problem: I can't ping my netbook running Ubuntu 13.04 (Raring Ringtail) by either IP address or hostname. I did find an exception to that rule, so read on...
I have a home network with a DSL wireless router. The netbook running Ubuntu connects wirelessly, and there are also a couple Windows machines, one of which is wireless and the other is on ethernet. All the computers can surf the web. The Windows computers can ping each other by NetBIOS name or by IP address. All the computers are in the usual 192.168.0.x IPv4 subnet, and the subnet mask is correct at 255.255.255.0. The router sees all the computers by hostname.
I don't believe the Ubuntu firewall is up: "sudo ufw status" reports "Status: inactive". I'm not quite sure how to interpret the results from "sudo iptables -L"; I'll post the output at the bottom of this post.
I've fiddled around quite a bit, and I discovered something: the Ubuntu computer will respond to pings, but only when the Windows computer pinging it is in its ARP table, which normally isn't the case. (I just found out about ARP yesterday, and I'm not quite sure what it does.) Pinging the Windows computer puts that machine in the Ubuntu computer's ARP table, but only for a short time, not even five minutes. Here's the whole experiment. "teeny" is the Ubuntu machine, "work" is one of the Windows boxes.
Starting on the Windows computer, I'll ping the Ubuntu machine by IP address:
Code:
C:\>ping 192.168.0.105
Pinging 192.168.0.105 with 32 bytes of data:
(always times out)
Next ping the Ubuntu machine by hostname:
Code:
C:\>ping teeny
Pinging teeny.PK5001Z [198.105.251.23] with 32 bytes of data:
(wrong address, times out)
Code:
C:\>arp -a
Interface: 192.168.0.211 --- 0x2
Internet Address Physical Address Type
192.168.0.1 b0-b2-dc-82-47-23 dynamic
192.168.0.105 00-26-82-af-a1-f6 dynamic
(just the gateway and itself -- Ubuntu machine not listed)
Now to the Ubuntu machine.
Code:
rob@teeny:~$ arp -a
PK5001Z.PK5001Z (192.168.0.1) at b0:b2:dc:82:47:23 [ether] on eth1
(just the gateway is listed)
Code:
rob@teeny:~$ ping work
PING work.PK5001Z (192.168.0.211) 56(84) bytes of data.
64 bytes from WORK.PK5001Z (192.168.0.211): icmp_req=1 ttl=128 time=5.07 ms
64 bytes from WORK.PK5001Z (192.168.0.211): icmp_req=2 ttl=128 time=6.30 ms
(correct address, normal ping response)
Code:
rob@teeny:~$ arp -a
WORK.PK5001Z (192.168.0.211) at 00:12:17:64:ed:f1 [ether] on eth1
PK5001Z.PK5001Z (192.168.0.1) at b0:b2:dc:82:47:23 [ether] on eth1
(Now the Ubuntu machine sees the Windows computer)
Now for the surprise -- back to the Windows machine:
Code:
C:\>ping -t teeny
Pinging teeny.PK5001Z [192.168.0.105] with 32 bytes of data:
Reply from 192.168.0.105: bytes=32 time=1024ms TTL=64
Reply from 192.168.0.105: bytes=32 time=1ms TTL=64
Reply from 192.168.0.105: bytes=32 time=330ms TTL=64
(skipping a bit...)
Ping statistics for 192.168.0.105:
Packets: Sent = 10, Received = 9, Lost = 1 (10% loss),
Approximate round trip times in milli-seconds:
Minimum = 1ms, Maximum = 1659ms, Average = 461ms
Now the Windows machine can ping the Ubuntu computer! But only after the Ubuntu computer has pinged the Windows computer, which puts the Windows computer in its ARP table. If I wait just a short time, five minutes or so, then the Ubuntu computer no longer has the Windows computer in its ARP table, and when the Windows computer isn't in the ARP table then pings from the Windows computer to the Ubuntu computer time out. Also, when the Ubuntu computer can be pinged, then its ping response times vary enormously, from 1ms to timing out.
So somehow something in the Ubuntu computer is rejecting ping packets unless the other computer is in the ARP table, which only happens when the Ubuntu computer has contacted the other computer first, and within the previous five minutes or so. I'd be grateful if anyone could help me figure this out! I'm pretty sure this problem explains why Samba doesn't work, and I need Samba to work...
- Rob
P.S. ufw is down, but here's the output of "iptables -L" as promised:
Code:
rob@teeny:~$ sudo iptables -L
[sudo] password for rob:
Chain INPUT (policy ACCEPT)
target prot opt source destination
ufw-before-logging-input all -- anywhere anywhere
ufw-before-input all -- anywhere anywhere
ufw-after-input all -- anywhere anywhere
ufw-after-logging-input all -- anywhere anywhere
ufw-reject-input all -- anywhere anywhere
ufw-track-input all -- anywhere anywhere
Chain FORWARD (policy ACCEPT)
target prot opt source destination
ufw-before-logging-forward all -- anywhere anywhere
ufw-before-forward all -- anywhere anywhere
ufw-after-forward all -- anywhere anywhere
ufw-after-logging-forward all -- anywhere anywhere
ufw-reject-forward all -- anywhere anywhere
Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ufw-before-logging-output all -- anywhere anywhere
ufw-before-output all -- anywhere anywhere
ufw-after-output all -- anywhere anywhere
ufw-after-logging-output all -- anywhere anywhere
ufw-reject-output all -- anywhere anywhere
ufw-track-output all -- anywhere anywhere
Chain ufw-after-forward (1 references)
target prot opt source destination
Chain ufw-after-input (1 references)
target prot opt source destination
Chain ufw-after-logging-forward (1 references)
target prot opt source destination
Chain ufw-after-logging-input (1 references)
target prot opt source destination
Chain ufw-after-logging-output (1 references)
target prot opt source destination
Chain ufw-after-output (1 references)
target prot opt source destination
Chain ufw-before-forward (1 references)
target prot opt source destination
Chain ufw-before-input (1 references)
target prot opt source destination
Chain ufw-before-logging-forward (1 references)
target prot opt source destination
Chain ufw-before-logging-input (1 references)
target prot opt source destination
Chain ufw-before-logging-output (1 references)
target prot opt source destination
Chain ufw-before-output (1 references)
target prot opt source destination
Chain ufw-reject-forward (1 references)
target prot opt source destination
Chain ufw-reject-input (1 references)
target prot opt source destination
Chain ufw-reject-output (1 references)
target prot opt source destination
Chain ufw-track-input (1 references)
target prot opt source destination
Chain ufw-track-output (1 references)
target prot opt source destination
Bookmarks