Can't set MTU on ethernet interface using example config

Bug #1791362 reported by Evgeniy Sudyr
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Netplan
New
Undecided
Unassigned

Bug Description

From https://github.com/CanonicalLtd/netplan/blob/master/doc/example-config it's not clear how to set mtu for ethernet physical NIC (Intel X710)

I used next config:

network:
  ethernets:
    ens1f0:
      mtu: 9000
      addresses:
        - 192.168.14.2/24
  version: 2

when running *netplan apply* I got no messages and I see that MTU was not changed when I checked with *ip link*

I did reboot and I see that netplan config was not applied (no IP address were set), I removed mtu and run *netplan apply* - it was applied.

I asked in IRC #netplan how to make it working and cyphermox suggested to try match: macaddress to make it working.

I tried and it worked!

Working config:

network:
  ethernets:
    ens1f0:
      match:
        macaddress: ac:1f:6b:8a:xx:xx
      mtu: 9000
      addresses:
        - 192.168.14.2/24
  version: 2

Tags: mtu
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.