netplan should support setting MAC addresses in software
Bug #1718607 reported by
Oliver Grawert
This bug affects 7 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Netplan |
Fix Released
|
Undecided
|
Unassigned |
Bug Description
when using ifupdown it is possible to spoof your mac address via /etc/network/
hwaddress ether <mac>
netplan currently has no option like this so one has to run a script or some such on boot to run something like:
ip link set <device> address <addr>
since Ubuntu Core exclusively uses netplan for the network configuration and some users want to be able to modify the MACs on their IoT devices the missing feature is a problem.
for reference:
https:/
description: | updated |
Changed in netplan: | |
status: | Fix Committed → Fix Released |
To post a comment you must log in.
Hi Oliver,
It looks like there's an undocumented macaddress option that is supported by both the network manager and networkd backends but just isn't talked about in the docs.
I don't know when it was added but it is certainly in the latest git version.
Does a file like this work?
network:
version: 2
ethernets:
eth0:
addresses: [1.2.3.4/8]
macaddress: 52:54:00:6b:3c:59
I will send a patch to document this option.