7

My Mac can’t reach other servers on the LAN.

janos@macbook:~$ netstat -r
Routing tables
Internet:
Destination        Gateway            Flags        Refs      Use   Netif Expire
default            192.168.0.1        UGSc           19        0     en1
127                localhost          UCS             0        0     lo0
localhost          localhost          UH              6     6515     lo0
169.254            link#5             UCS             0        0     en1
192.168.0          link#5             UCS             2        0     en1
192.168.0.1        cc:35:40:2a:ed:2d  UHLWIir        20        0     en1    204
192.168.0.11/32    link#5             UCS             0        0     en1
m                  link#5             UHRLWI          0      904     en1      8

What is the link#5 routing table and how can I delete it? I already tried:

sudo route -n flush

But it didn’t helped. m is a server on the LAN. I put it into my hosts file on the Mac.

janos@macbook:~$ ping m
PING m (192.168.0.13): 56 data bytes
Request timeout for icmp_seq 0
ping: sendto: No route to host
Request timeout for icmp_seq 1
ping: sendto: Host is down
Request timeout for icmp_seq 2
ping: sendto: Host is down
Request timeout for icmp_seq 3
^C
--- m ping statistics ---
5 packets transmitted, 0 packets received, 100.0% packet loss
janos@macbook:~$ ssh m
ssh: connect to host m port 22: Host is down

If it’s possible I would like a clean routing table like this:

janos@lenovo:~$ route
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     9      0        0 wlan0
4
  • Have you talked with your network team about this?
    – EEAA
    Commented Sep 24, 2015 at 15:47
  • There's no network team only a LAN, a Ubuntu server and 2 clients (a macbook, a lenovo laptop). The lenovo can ping or connect to the m server. I used to use a proxy on the macbook but I don't use it anymore and it was not connected while I was doing the tests above.
    – Janos
    Commented Sep 24, 2015 at 15:53
  • 1) link#X refers to a specific network device in your machine. 2) What is the IP address of m?
    – EEAA
    Commented Sep 24, 2015 at 15:59
  • How can I find out what is the link#5? How can I remove it? 2) The ip of the server is: 192.168.0.13
    – Janos
    Commented Sep 24, 2015 at 16:35

3 Answers 3

10

I know this question is old, but I just had a similar problem where I couldn't ping or connect in any way from my MacBook to any devices on network despite internet working fine on all devices meaning they are all connected to the same wifi router and all devices had been restarted.

The solution was: restart the wifi router!

4
  • And restart the mac.
    – Janos
    Commented Feb 15, 2018 at 13:38
  • 2
    can't believe I wasted 6 hours for this. Commented Jun 19, 2020 at 13:35
  • 1
    OMG ... I'm glad I found this within 30 mins! @VaibhavJain I FEEL YOUR PAIN! :)
    – Jammer
    Commented Apr 9, 2021 at 11:35
  • In my case just restarting mac helped Commented Mar 31, 2023 at 20:54
5

If I understand well what you said, your Mac (IP 192.168.0.11) can’t ping another server on the same subnet (192.168.0.13).

In this case, the route is unused as the destination IP is in the same subnet. You may have an ARP cache issue. You could try to flush the ARP entry for 192.168.0.13 with sudo arp -d 192.168.0.13 command and try again to ping 192.168.0.13.

8
  • It says 192.168.0.13 (192.168.0.13) deleted and then the ping is Request timeout for icmp_seq...
    – Janos
    Commented Sep 24, 2015 at 16:40
  • You probably have a network problem on your mac. Do you use a DHCP on your network or are the IP address statically configured ? Is your mac able to ping the lenovo PC ? Commented Sep 24, 2015 at 16:44
  • I'm using DHCP on my network. No, the mac can not ping the lenovo PC. And this line 192.168.0 link#5 UCS 3 0 en1 is still in the routing table. Anybody knows how to remove it?
    – Janos
    Commented Sep 24, 2015 at 18:03
  • I have the same line on my Mac, with no problem to ping other machines on the same subnet. I don't think this line poses a problem. I suppose you already tried to reboot the mac ? Commented Sep 24, 2015 at 18:06
  • Yes, I did tried to reboot it. It didn't helped. Do you also have 7 lines in your routing table?
    – Janos
    Commented Sep 24, 2015 at 18:30
0

As I told earlier, your mac is in the same subnet as the destination machine, so a gateway is not used.

You may have a network adapter problem. Do you have a way to test you Mac with another network card ? You have a macbook, maybe you can use a Thunderbolt adapter or Wifi if you were already using a Thunderbolt adapter ?

3
  • 1
    I don't think there is a problem with the network card. I was using wifi and the macbook to write this question. The internet connection is working except the LAN. I turned off the wifi and changed to Ethernet to write this comment. Pinging the router (192.168.0.1) works, macbook (192.168.0.11) works, lenovo (192.168.0.12) works, ubuntu server (192.168.0.13) 100% packet loss.
    – Janos
    Commented Sep 25, 2015 at 11:41
  • Ok, so the situation evolved since yesterday. You said, 18 hours ago, that the mac wasn't able to ping the lenovo PC and now, it can. The problem could come from the server then : firewall rule, incorrect arp cache. Do you have root access on the ubuntu server ? Commented Sep 25, 2015 at 12:25
  • How to force the mac to use the gateway anyway? Commented Dec 10, 2021 at 12:50

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .