Comment 15 for bug 1807273

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Verification-done on bionic with netplan.io 0.96-0ubuntu0.18.04.2:

I set up a new AWS instance (t2.micro in this case); and applied a similar setup (attempting to just set mtu: 1500, that doesn't work, then using the new dhcp4-overrides feature). Forcing UseMTU=false makes the MTU apply to the interface.

ubuntu@ip-172-30-0-14:~$ dpkg -l netplan.io | grep ii
ii netplan.io 0.96-0ubuntu0.18.04.2 amd64 YAML network configuration abstraction for various backends
ubuntu@ip-172-30-0-14:~$ sudo netplan --debug apply
** (generate:2138): DEBUG: 16:30:02.609: Processing input file /etc/netplan/50-cloud-init.yaml..
** (generate:2138): DEBUG: 16:30:02.609: starting new processing pass
** (generate:2138): DEBUG: 16:30:02.609: Generating output files..
** (generate:2138): DEBUG: 16:30:02.609: NetworkManager: definition eth0 is not for us (backend 1)
DEBUG:netplan generated networkd configuration changed, restarting networkd
DEBUG:no netplan generated NM configuration exists
DEBUG:eth0 not found in {}
DEBUG:Merged config:
network:
  bonds: {}
  bridges: {}
  ethernets:
    eth0:
      dhcp4: true
      dhcp4-overrides:
        use-mtu: false
      match:
        macaddress: 06:84:40:e0:fd:7c
      mtu: 1500
      set-name: eth0
  vlans: {}
  wifis: {}

DEBUG:Skipping non-physical interface: lo
DEBUG:device eth0 operstate is up, not changing
DEBUG:{}
DEBUG:netplan triggering .link rules for lo
DEBUG:netplan triggering .link rules for eth0
ubuntu@ip-172-30-0-14:~$ ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000
    link/ether 06:84:40:e0:fd:7c brd ff:ff:ff:ff:ff:ff