Can't set MTU on ethernet interface using example config
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Triaged
|
High
|
Unassigned |
Bug Description
From https:/
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
I suggest:
1) Adjust examples and make bold note in documentation for setting MTU (e.g. say - set macaddress or it will not work);
2) Check why netplan apply was silently ignored config and not applied config when my first config above was in use after reboot. Maybe add error checking if mtu is set without match: macaddress.
Thanks to @cyphermox
Changed in netplan: | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in netplan: | |
assignee: | Daniel Axtens (daxtens) → nobody |
Hi,
I'm sorry to hear that you too have hit this bug. It has got a lot of discussion on LP: #1724895. Normally I'd want to mark one as the duplicate of the other, but that bug has covered a lot of ground including cloud-init, so it's not super clear.
Perhaps we can use this to track the netplan-specific documentation issue and the parser error checking, and just focus on the weirdness with cloud-init in the other bug.
I will work on a docs fix - I think that's an important first step. I think parser error checking will be complicated because NetworkManager will set MTUs without a macaddress match (LP: #1769550), but I'll explore it as I have time.
Regards,
Daniel