Results 1 to 8 of 8

Thread: Updated netplan settings fail to connect to internet

  1. #1
    Join Date
    Jan 2020
    Beans
    3

    Updated netplan settings fail to connect to internet

    I am running Ubuntu Server 18.04. The server is connected to a router running in bridge mode by ethernet cable. The file I'm using under /etc/netplan uses these settings.
    Code:
    network:
       version: 2
       renderer: networkd
       ethernets:
          enps20:
              dhcp4: no
              addresses: 
                 - 192.168.1.137/24
              gateway4: 192.168.1.1
              nameservers: 
                        addresses: [8.8.8.8, 8.8.4.4]
    The error message when I login is
    Code:
    Failed to connect to https://changelogs.ubuntu.com/note-release-lts. Check your internet or proxy settings
    I did do sudo netplan try beforehand and it didn't encounter an issue.
    What am I missing? Is there a problem with my settings?
    Last edited by biznizb1zn1z; January 27th, 2020 at 06:04 PM. Reason: Code isn't correct

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

    Re: Updated netplan settings fail to connect to internet

    Code:
    - 192.168.137/24
    looks incorrect. Missing an octal?

    I don't know if it matters or not, but dhcp4 isn't capitalized here.

  3. #3
    Join Date
    Jan 2020
    Beans
    3

    Re: Updated netplan settings fail to connect to internet

    Good eye, unfortunately those both were errors made in my copying. Thanks for the new term though. I'll edit it so it's correct.

  4. #4
    Join Date
    Nov 2012
    Location
    Halloween Town
    Beans
    Hidden!
    Distro
    Xubuntu Development Release

    Re: Updated netplan settings fail to connect to internet

    Thread moved to Server Platforms for a better fit

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

    Re: Updated netplan settings fail to connect to internet

    Quote Originally Posted by biznizb1zn1z View Post
    Good eye, unfortunately those both were errors made in my copying. Thanks for the new term though. I'll edit it so it's correct.

    it isn't clear. Did this fix the issue or not?

    Here's a working, simple, setup (I used copy/paste, so no chance of mistake):
    Code:
    $ more /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
        renderer: networkd
        ethernets:
            ens3:
                addresses:
                - 172.22.22.90/24
                dhcp4: false
                dhcp6: false
                gateway4: 172.22.22.1
                nameservers:
                    addresses: [ "1.1.1.1", "1.0.0.1" ]
                    search: []
    After changing anything, be certain to tell netplan to reload the config.

    YAML is very picky about indentation and being consistent with it. Note the exact indentation in mine.
    Last edited by TheFu; January 27th, 2020 at 08:50 PM.

  6. #6
    Join Date
    Oct 2019
    Beans
    5

    Re: Updated netplan settings fail to connect to internet

    Try this

    Code:
    network:
       version: 2
       renderer: networkd
       ethernets:
          enps20:
                   addresses: 
                   - 192.168.1.137/24
                   gateway4: 192.168.1.1
                   nameservers: 
                          addresses: 
                          - 8.8.8.8
                          - 8.8.4.4
    And obviously renew netplan configuration:

    Code:
    $ sudo netplan apply
    Yaml indentation and how to indent is a nightmare.

    B-)

  7. #7
    Join Date
    Jan 2020
    Beans
    3

    Re: Updated netplan settings fail to connect to internet

    Update: without changing any settings after starting the server after having it shut off for awhile (we had attempted restarting before but it wasn't for an extended amount of time) the internet began to work again.
    Solved, I guess. Thanks for your help to everyone that replied.

  8. #8
    Join Date
    Sep 2011
    Location
    Behind you!
    Beans
    1,690
    Distro
    Ubuntu 20.04 Focal Fossa

    Re: Updated netplan settings fail to connect to internet

    If you made no changes, the problem might be external to that server. Make sure that IP address is not being used elsewhere on your LAN or you will run into more issues.

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
  •