是否可以使用 netplan.io .yaml 來變更 VLAN 的 MAC 位址?
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
dhcp6: true
vlans:
vlan10:
dhcp4: true
dhcp6: true
id: 10
link: eno1
macaddress: XX:XX:XX:XX:XX:XX
不起作用。
編輯:問題已解決。看來這是一個錯誤的 mac 位址。我的錯,對不起。現在效果很好。
對於其他用戶,這裡可以使用完整的 01-eno1.yaml 。
network:
version: 2
renderer: networkd
ethernets:
eno1:
dhcp4: true
dhcp4-overrides:
route-metric: 500
vlans:
vlan10:
dhcp4: true
dhcp4-overrides:
route-metric: 200
id: 10
link: eno1
macaddress: 00:00:00:00:00:10
vlan20:
dhcp4: true
dhcp4-overrides:
route-metric: 400
id: 20
link: eno1
macaddress: 00:00:00:00:00:20
vlan30:
dhcp4: true
dhcp4-overrides:
route-metric: 100
id: 30
link: eno1
macaddress: 00:00:00:00:00:30
vlan100:
dhcp4: true
dhcp4-overrides:
route-metric: 300
id: 100
link: eno1
macaddress: 00:00:00:00:01:00
vlan200:
dhcp4: true
dhcp4-overrides:
route-metric: 600
id: 200
link: eno1
macaddress: 00:00:00:00:02:00