Results 1 to 4 of 4

Thread: I can ping google.com but nothing else?

Hybrid View

  1. #1
    Join Date
    Nov 2020
    Beans
    1

    Question I can ping google.com but nothing else?

    Something got messed up with my network setting after I defined a static IP. it took me a while to make it working again but now there some weird symptoms. One of those is that can't resolve dns anymore. I can ping google.com with no problem but pinging microsoft.com, godaddy.com or even 8.8.8.8 gets me ping: connect: Network is unreachable


    The machine is an I7, 32Gb ram, running Ubuntu server 20.04, mostly headless. using ssh.


    Other devices on my network doesn't have the problem.
    $ ifconfig
    docker0: flags=4099<UP,BROADCAST,MULTICAST> mtu 1500
    inet 172.17.0.1 netmask 255.255.0.0 broadcast 172.17.255.255
    ether 02:42:22:f6:ee:c8 txqueuelen 0 (Ethernet)
    RX packets 0 bytes 0 (0.0 B)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 0 bytes 0 (0.0 B)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    eno1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
    inet 192.168.1.101 netmask 255.255.255.0 broadcast 192.168.1.255
    inet6 2a02:14c:805f:ffc5:1ac0:4dff:fe41:3e93 prefixlen 64 scopeid 0x0<global>
    inet6 fe80::1ac0:4dff:fe41:3e93 prefixlen 64 scopeid 0x20<link>
    ether 18:c0:4d:41:3e:93 txqueuelen 1000 (Ethernet)
    RX packets 331527 bytes 83760648 (83.7 MB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 182973 bytes 52213897 (52.2 MB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
    device interrupt 16 memory 0x53200000-53220000

    lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
    inet 127.0.0.1 netmask 255.0.0.0
    inet6 ::1 prefixlen 128 scopeid 0x10<host>
    loop txqueuelen 1000 (Local Loopback)
    RX packets 209338 bytes 12397801 (12.3 MB)
    RX errors 0 dropped 0 overruns 0 frame 0
    TX packets 209338 bytes 12397801 (12.3 MB)
    TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

    my /etc/resolv.conf keeps getting cleaned up every reboot to this state:
    # This file is managed by man:systemd-resolved(8). Do not edit.
    #
    # This is a dynamic resolv.conf file for connecting local clients to the
    # internal DNS stub resolver of systemd-resolved. This file lists all
    # configured search domains.
    #
    # Run "resolvectl status" to see details about the uplink DNS servers
    # currently in use.
    #
    # Third party programs must not access this file directly, but only through the
    # symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,
    # replace this symlink by a static file or a different symlink.
    #
    # See man:systemd-resolved.service(8) for details about the supported modes of
    # operation for /etc/resolv.conf.

    nameserver 127.0.0.53
    options edns0 trust-ad
    $ netstat -r
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eno1

    /etc/netplan/00-installer-config.yaml
    network:
    version: 2
    renderer: networkd
    ethernets:
    eno1:
    addresses: ['192.168.1.101/24']
    nameservers:
    addresses: [8.8.8.8, 8.8.4.4, 192.168.1.1, 212.143.0.1, 194.90.0.1, '2a02:148::1', '2a02:149::>
    (yaml formatting is correct in source file)

    Any ideas what went wrong and how to fix it?
    Please help...


    Btw, pinging IP6 addresses does work!
    Last edited by dj5000; December 15th, 2020 at 11:53 AM.

  2. #2
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu

    Re: I can ping google.com but nothing else?

    (yaml formatting is correct in source file)
    Prove it. What you've posted above has errors besides wrong indentation. Details matter.

    Use code-tags in the post above. Just edit the post. https://ubuntuforums.org/misc.php?do=bbcode#code
    All text, commands, and command output should be posted wrapped in 'code tags'.

    Please.

    I don't use IPv6.
    I don't use docker.
    I don't use resolvconf or systemd-resolved. If you have a DNS server on your LAN, then you don't want/need these.

    Simplify. I suspect that IPv6 is taking priority.
    Try this:
    $ more /etc/netplan/01-static.yaml
    Code:
    network:
      version: 2
      renderer: networkd
      ethernets:
         eno1:
           addresses:
              - 192.168.1.101/24
           dhcp4: false
           dhcp6: false
           gateway4: 192.168.1.1
           nameservers:
             addresses: [ 8.8.8.8,8.8.4.4 ]
    to get started.
    That's the shortest netplan for a static IP that I know works. Notice the indentation is all spaces (never tabs) and that there aren't any spaces between nameservers.

    Sorry, I didn't post this earlier. I was on a different machine with a terrible keyboard.
    Last edited by TheFu; December 16th, 2020 at 12:12 AM.

  3. #3
    Join Date
    Nov 2008
    Location
    Boston MetroWest
    Beans
    16,326

    Re: I can ping google.com but nothing else?

    Code:
    $ netstat -r
    Kernel IP routing table
    Destination Gateway Genmask Flags MSS Window irtt Iface
    172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
    192.168.1.0 0.0.0.0 255.255.255.0 U 0 0 0 eno1
    You don't have a default route to an upstream router. I'm guessing it's some machine with a 192.168.1.something address. Let's call it 192.168.1.1. Then you need
    Code:
    sudo ip route add default via 192.168.1.1
    or whatever the correct upstream address may be.
    If you ask for help, do not abandon your request. Please have the courtesy to check for responses and thank the people who helped you.

    Blog · Linode System Administration Guides · Android Apps for Ubuntu Users

  4. #4
    Join Date
    Nov 2007
    Location
    London, England
    Beans
    7,702

    Re: I can ping google.com but nothing else?

    Without an IPv4 default route, only IPv6 destinations will be reachable. I presume you have working IPv6.
    Try
    Code:
    ping google.com
    and I expect to see successful pings to an IPv6 destination.
    Also to be sure, post the output of
    Code:
    ip -4 route
    ip -6 route
    Last edited by The Cog; December 15th, 2020 at 11:38 PM.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •