Ubuntu used netplan as new network manager, but it’s different with previous version.
First create a new file /etc/systemd/network/10-override-mac.link
[Match]
MacAddress=52:54:00:12:34:56
[Link]
MACAddress=52:54:00:12:34:58
52:54:00:12:34:56 is old mac, and 52:54:00:12:34:58 is new mac .
Second, modify /etc/netplan/01-netcfg.yaml, create match: and macaddress field , example
network:
version: 2
ethernets:
eth0:
dhcp4: true
match:
macaddress: ’52:54:00:12:34:58′
set-name: eth0
ref.
發佈留言