ubuntu 20.04 / netplan / change mac address and static ip
I wasn't able to set together a virtual mac address and a static IP using netplan: either the mac address didn't change, or IP was not set.
I finally got the trick using a fake nic definition that matches the new virtual mac address I've set.
network:
renderer: networkd
ethernets:
ens160:
match:
macaddress: 00:0c:29:5a:69:00
macaddress: 00:50:56:0c:de:a6
ens160_2:
match:
macaddress: 00:50:56:0c:de:a6
addresses: [ 139.99.5.72/32 ]
nameservers:
addresses: [ 8.8.8.8 ]
routes:
- to: 0.0.0.0/0
via: 139.99.5.254
on-link: true
ens192:
addresses: [192.168.103.14/24]
#dhcp4: true
version: 2
Comments