Results 1 to 2 of 2

Thread: Ubuntu 18.04 KVM failing to set default route on bootup

  1. #1
    Join Date
    Sep 2019
    Beans
    1

    Ubuntu 18.04 KVM failing to set default route on bootup

    Recently my VPS hosted at OVH abrutly lost connectivity. Upon further inspection, `systemd-networkd` was failing to set default route: `ens3: Could not set route: Network is unreachable`. It isn't clear to me why this is happening suddenly as configuration below worked fine in the past, no changes to the VPS since it's last maintenance were made that I'm aware of:

    Code:
    **/etc/netplan/50-cloud-init.yaml**
    ```
    # This file is generated from information provided by
    # the datasource.  Changes to it will not persist across an instance.
    # To disable cloud-init's network configuration capabilities, write a file
    # /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
    # network: {config: disabled}
    network:
        version: 2
        ethernets:
            ens3:
                dhcp4: false
                addresses:
                    - 167.114.129.127/32
                    - 2607:5300:201:3100:0:0:0:1225/64
                gateway4: 167.114.129.1
                gateway6: 2607:5300:0201:3100:0000:0000:0000:0001
                match:
                    macaddress: fa:16:3e:65:ef:95
                set-name: ens3
    ```
    Code:
    **/run/systemd/network/10-netplan-ens3.link**
    ```
    [Match]
    MACAddress=fa:16:3e:65:ef:95
    
    [Link]
    Name=ens3
    WakeOnLan=off
    ```
    Code:
    **/run/systemd/network/10-netplan-ens3.network**
    ```
    [Match]
    MACAddress=fa:16:3e:65:ef:95
    Name=ens3
    
    [Network]
    LinkLocalAddressing=ipv6
    Address=167.114.129.127/32
    Address=2607:5300:201:3100:0:0:0:1225/64
    Gateway=167.114.129.1
    Gateway=2607:5300:0201:3100:0000:0000:0000:0001
    ```
    Code:
    ```
    ip -4 a
    1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
        inet 127.0.0.1/8 scope host lo
           valid_lft forever preferred_lft forever
    2: ens3: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
        inet 167.114.129.127/32 scope global ens3
           valid_lft forever preferred_lft forever
    ```
    Manually adding the route, `ip route add default 167.114.129.1 dev ens3`, fails with `nexthop has invalid gateway`. I manually maneuvered around this with `onlink`. Someone with a bit more experience than I could help out by shedding some light on what's going here, would be grateful?

  2. #2
    Join Date
    Nov 2008
    Location
    Metro Boston
    Beans
    14,426
    Distro
    Kubuntu Development Release

    Re: Ubuntu 18.04 KVM failing to set default route on bootup

    The default gateway 167.114.129.1 is not pingable from outside. Running a traceroute to the address ends at be7.bhs-s5-6k.qc.ca [178.32.135.50]. You probably need to talk to your provider.
    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

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
  •