Results 1 to 7 of 7

Thread: IP static netplan configuration does not work

  1. #1
    Join Date
    Nov 2019
    Beans
    1

    IP static netplan configuration does not work

    I have been trying to configurate a static IP address with netplan, bit it send this message after sudo netplan apply "Invalid YAML: inconsistent dentation: nameservers:"

    this is my configuration

    network:
    version: 2
    renderer: NetworkManager
    ethernets:
    eno1: expexted mapping
    dhcp4:no
    dhcp6:no
    addresses:[192.168.100.6/24]
    gateway4:192.168.100.1
    nameservers:
    addresses:[8.8.8.8, 8.8.4.4]

    I hope anybody could help me.
    Thanks You!!
    Last edited by orion912; 2 Weeks Ago at 06:33 PM.

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

    Re: IP static netplan configuration does not work

    To show config files that depend on indentation here, you MUST use code tags. How to for code tags: https://ubuntuforums.org/showthread....8#post12776168
    Until that is corrected, we cannot help.

    Yesterday, I posted a yaml file for an 18.04 server with a static IP here. A little searching will find it.

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

    Re: IP static netplan configuration does not work

    Is there some reason why you're not using the standard Network Manager and GUI network configuration for this? In the dialog you can choose a static configuration and fill in the boxes with the IP/netmask/gateway and DNS server entries. I'm on Kubuntu 19.10, but I'm pretty sure the same functionality exists in vanilla Ubuntu.

    I believe netplan has strict requirements for indentation.
    Last edited by SeijiSensei; 2 Weeks Ago at 09:32 PM.
    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
    Aug 2005
    Location
    South Carolina, USA
    Beans
    24,963
    Distro
    Ubuntu 19.10 Eoan Ermine

    Re: IP static netplan configuration does not work

    Is there some reason why you're not using the standard Network Manager and GUI network configuration for this?
    Indeed.

    Your netplan yaml suggests that Network Manager should do all the work. Why not do just that?
    "Oh, Ubuntu, you are my favorite Linux-based operating system" --Dr. Sheldon Cooper, Ph.D., Sc.D.

  5. #5
    Join Date
    May 2007
    Beans
    107
    Distro
    Xubuntu

    Re: IP static netplan configuration does not work

    Or; manually edit the file /etc/network/interfaces
    I always use that for static IP's on threaded network. Quick and stable.

  6. #6
    Join Date
    Mar 2010
    Location
    Squidbilly-Land
    Beans
    Hidden!
    Distro
    Ubuntu Mate 16.04 Xenial Xerus

    Re: IP static netplan configuration does not work

    Quote Originally Posted by webaake View Post
    Or; manually edit the file /etc/network/interfaces
    I always use that for static IP's on threaded network. Quick and stable.
    That file is not used since Ubuntu 17.10 ... unless you swap out the netplan stuff and install the old ifup/down packages. The march forward continues, even if we prefer the older method.

  7. #7
    Join Date
    May 2007
    Beans
    107
    Distro
    Xubuntu

    Re: IP static netplan configuration does not work

    Quote Originally Posted by TheFu View Post
    That file is not used since Ubuntu 17.10 ... unless you swap out the netplan stuff and install the old ifup/down packages. The march forward continues, even if we prefer the older method.
    Aha, okay. I've continually upgraded my Ubuntu installs, so I guess "interfaces" linguers on. I remember one time that the command ifconfig didn't work! But I reinstalled it and use it on 18.04 today, including /etc/network/interfaces as configuration.

    But if netplan isn't working I recommend reverting to the older networking stuff. It WAS better in the ol' times! (a joke)

    EDIT: howto install the previuos networking setup on Ubuntu 18.04 and avoid Netplan: https://askubuntu.com/questions/1031...ork-interfaces

    PS Seems that since I've usedstandard "networking" since 2007 from the package Ifupdown it is still used in my updated 18.04 install. And works perfectly.
    Last edited by webaake; 2 Weeks Ago at 06:06 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
  •