32

I can get to other PCs in my house on the 192 network, but trying to go outside gives me the "network is unreachable" message. p3p1 is up with a good IP Address. Running Fedora 16. What should I do next to troubleshoot?

All other PCs in the house are working (Windows, Mac).

9
  • Does any other PCs in your house have external internet access? (Can other PC ping google?) Restarted your house ADSL/cable/? modem?
    – Darius
    Oct 31, 2013 at 2:19
  • 1
    Can you try pinging 8.8.4.4? Oct 31, 2013 at 4:04
  • Can you ping your gateway? Can you ping the external interface of the gateway? Oct 31, 2013 at 4:48
  • Ping 8.8.4.4 fails @MariusMatutiae - same error, "connect: Network is unreachable." But then I did a "route -n" and realized I had no gateway, added one ("route add -net 0.0.0.0 gw 192.168.1.1 p3p1") and now I can ping 8.8.4.4 but still not 74.125.229.194 (google). Oct 31, 2013 at 8:02
  • Yes @r3mus I can ping 192.168.1.1. On a working machine I go to "whatismyipaddress.com" and get my external address, and can ping that successfully as well from my failing machine. Oct 31, 2013 at 8:16

3 Answers 3

42

You say all other pcs in your house have a connection. Then the problem lies only with your linux machine. There are several possibilities:

  1. You do have a connection, but you cannot reach your DNS; you can diagnose this by

    ping -c1 8.8.4.4
    

    if you can reach Google, then you have a connection, and you only need to update your DNS servers. Edit (as sudo) your /etc/resolv.conf file and add these two lines:

    nameserver 8.8.8.8
    nameserver 8.8.4.4
    

    and now you are good to go.

  2. You cannot ping Google, but you can ping your router, or any other pc in your LAN. In this case case, it is possible that you also have problem 1, so you will have to check for that, but first, you need to check your routing table. Print it with

    ip route show default
    

    and check that there is a reply, like this one:

    default via 192.168.11.1 dev wlan0 proto dhcp metric 600
    

    (this is for my laptop). What is important is that the correct IP address of your router is shown exactly where mine (192.168.11.1) is shown. If an incorrect IP address is shown, or, worse, if the ip route show default command receives no reply, then your routing table has been corrupted. You may simply restore it by means of:

    sudo ip route del default (only if the wrong IP address appears)
    sudo ip route add default via IP.address.OfYour.Router
    

    and now we may go step 1.

  3. If you cannot ping any pc on your LAN, then there is another kind of problem, and more questions will need to be asked. But we'll cross that bridge when we get there.

5
  • 3
    Worked! I suspect you're right that the issue was flakiness in NetworkManager. Oct 31, 2013 at 15:18
  • 1
    I can't for the life of me figure out how to make this persist when I reboot. I've tried a lot of different things in /etc/network/interfaces, but can't get it to work.
    – dessalines
    Mar 30, 2016 at 18:09
  • @thouliha Your question has many different answers, in part depending on your distro. If you ask it as a separate question, including the name of your distro, I will be happy to answer it. Mar 31, 2016 at 15:04
  • I had a corrupt routing table. Thanks so much for you're clear advice Feb 11, 2017 at 10:19
  • My nameserver in resolv.conf is 127.0.0.53. Ping google.de works, ping 8.8.8.8 does not. ping another.de does not either. So I reach google. When I change the nameserver to 8.8.8.8 ping google.de nor ping 8.8.8.8 works. Ethernet works normal, wifi shows the described behaviour. Any hint?
    – Timo
    Apr 25, 2021 at 19:07
0

I had a similar issue in my home network. I had decided to run my Mac Pro headless for a while - it runs my media server, a wiki server and an ownCloud instance. All of those services were available to machines on the LAN, but from an ssh shell on that machine, I wasn't able to ping or otherwise reach any hosts outside of our LAN, so I couldn't (for example) do my "brew update" or other maintenance chores.

I finally gave up network troubleshooting and reattached the monitor, and found that my firewall (in this case, Little Snitch) was prompting me to allow those outgoing connections. Both options of loosening the rules, or disabling the firewall restored that machine's ability to reach the Internet.

0

The simple procedure that works is to modify the c:\users%USERPROFILE%.wslconfig file to be:

[wsl2]
memory=8GB
**swapFile=0**
swap=0

For some reason someone at microsoft changed the name of the swap config parameter. Stragely, when swapfile is defined. network works like a whistle.

Microsoft: Please decouple swalfile from network. And consider supporting both names for the swap.

You must log in to answer this question.

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