Ubuntu 18.04 instructions

Post Reply
User avatar
Edge100x
Founder
Founder
Posts: 11899
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Ubuntu 18.04 instructions

Post by Edge100x » Mon Apr 30, 2018 11:37 pm

  1. Open /etc/netplan/01-netcfg.yaml in your favorite text editor. For instance,

    Code: Select all

    nano /etc/netplan/01-netcfg.yaml
  2. Find the indented line that starts with "addresses:". It should look something like this:

    Code: Select all

          addresses: [ 1.2.3.1/24, 1.2.3.4/24, 1.2.3.5/24 ]
    Delete what is currently between the brackets. Then, for each of the IP addresses listed on the "IP list" page,
    1. Type the IP address, followed by a slash.
    2. Look at the "netmask" column. If it reads "255.255.255.0", type a "24" after the slash. If it reads "255.255.254.0", type a "23" after the slash.
    3. If another IP address is listed that needs to be handled next, type a comma.
  3. Find the indented line that starts with "gateway4:". It should look something like this:

    Code: Select all

          gateway4: 1.2.3.254
    Replace the IP address with the first gateway listed on the IP list page. Only one gateway address needs to be entered.
  4. Save the file and exit the text editor. For instance, in nano, press Control-S, followed by Control-X.
  5. Type this command to reload the network:

    Code: Select all

    netplan apply

User avatar
Edge100x
Founder
Founder
Posts: 11899
Joined: Thu Apr 18, 2002 11:04 pm
Location: Seattle
Contact:

Re: Ubuntu 18.04 instructions

Post by Edge100x » Mon Apr 30, 2018 11:41 pm

For reference, here is an example default 01-netcfg.yaml file.

Code: Select all

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:
    eth0:
      addresses: [ 1.2.3.4/24 ]
      gateway4: 1.2.3.254
      nameservers:
          addresses:
              - "8.8.8.8"

Post Reply