Tag Archives: 18.04

Ubuntu 18.04 Network Configuration ipv4 ipv6 Dual Stack

Hi

no /etc/network/interfaces ?

Let’s go for it 🙂

vim /etc/netplan/01-netcfg.yaml

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: no
      dhcp6: no
      addresses: [192.168.1.2/24, "XXXX:XXXX:XXXX:XXXX::2/64"]
      gateway4: 192.168.1.1
      gateway6: XXXX:XXXX:XXXX:XXXX::1
      nameservers:
        addresses: [1.1.1.1, 1.0.0.1]

here a bridged example

network:
  version: 2
  renderer: networkd
  ethernets:
    eno1:
      dhcp4: no
      dhcp6: no
  bridges:
    br0:
      interfaces: [eno1]
      dhcp4: no
      dhcp6: no
      addresses: [192.168.1.2/24, "XXXX:XXXX:XXXX:XXXX::2/64"]
      gateway4: 192.168.1.1
      gateway6: XXXX:XXXX:XXXX:XXXX::1
      nameservers:
        addresses: [1.1.1.1, 1.0.0.1]

here a bridged example with vlans

network:
  version: 2
  renderer: networkd
  ethernets:
    enp5s0f0:
      dhcp4: no
      dhcp6: no
  vlans:
    vlan302:
      id: 302
      link: enp5s0f0
      dhcp4: no
      dhcp6: no
    vlan412:
      id: 412
      link: enp5s0f0
      dhcp4: no
      dhcp6: no
  bridges:
    br0:
      interfaces: [vlan302]
      dhcp4: no
      dhcp6: no
      addresses: [1.1.1.2/24]
      gateway4: 1.1.1.1
      nameservers:
        addresses: [1.1.1.1, 1.0.0.1]
    br1:
      interfaces: [vlan412]
      dhcp4: no
      dhcp6: no

the spaces are mandatory!

Have fun

make Ubuntu server powerloss proof

Hi

Sometimes, after powerloss Ubuntu hangs on boot or asking to fix filesystem errors.
To avoid this problems simply edit following files:

Edit the file:

 /etc/default/grub
GRUB_RECORDFAIL_TIMEOUT=2

After that you have to rebuild grub configuration:

update-grub

Edit the file:

/etc/default/rcS
FSCKFIX=yes

EDIT 16.05.2018:
Ubuntu 18.04 /etc/default/rcS missing due to systemd
You have to pass a kernel parameter
https://www.freedesktop.org/software/systemd/man/systemd-fsck@.service.html

/etc/default/grub

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash fsck.repair=yes"

Dont forget to run update-grub

Have fun!