ich versuche ein vlan anzulegen mit einer bestimmten Mac-Adresse, das vlan wird erstellt aber nimmt immer die mac des parent-interfaces.
https://freedesktop.org/software/system ... %20Options
also versuche ich das:The [NetDev] section accepts the following keys:
MACAddress=
Specifies the MAC address to use for the device,
If this option is not set, "vlan" device inherits the MAC address of the master interface.
/etc/systemd/network/11-wan.110.netdev
Code: Alles auswählen
[NetDev]
Name=wan.110
Kind=vlan
MACAddress=02:12:02:03:04:07
[VLAN]
Id=110
Code: Alles auswählen
[NetDev]
Name=wan.140
Kind=vlan
MACAddress=02:12:02:03:04:08
#MTUBytes=1500
[VLAN]
Id=140
Code: Alles auswählen
root@bpi-r3:~# ip a s wan
5: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 08:22:33:44:55:77 brd ff:ff:ff:ff:ff:ff permaddr 5e:1a:65:c1:2c:54
inet 192.168.0.19/24 metric 1024 brd 192.168.0.255 scope global dynamic wan
valid_lft 42559sec preferred_lft 42559sec
inet6 fe80::a22:33ff:fe44:5577/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r3:~# ip a s wan.110
13: wan.110@wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 08:22:33:44:55:77 brd ff:ff:ff:ff:ff:ff
inet6 fe80::a22:33ff:fe44:5577/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r3:~# ip a s wan.140
14: wan.140@wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 08:22:33:44:55:77 brd ff:ff:ff:ff:ff:ff
inet6 fe80::a22:33ff:fe44:5577/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r3:~#
kann ich das irgendwie lösen?
es sieht so aus, als ist ein neustart des systemd-networkd nicht genug...nach einem reboot passt es...ich vermute das kann nur gesetzt werden, wenn das netdev neu angelegt wird, und das passiert offensichtlich beim restart des networkd nicht, wenn das interface schon existiert...nach einem reboot sieht es richtig aus
Code: Alles auswählen
root@bpi-r3:~# ip a s wan.140
14: wan.140@wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 02:12:02:03:04:08 brd ff:ff:ff:ff:ff:ff
inet6 fe80::12:2ff:fe03:408/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r3:~# ip a s wan.110
13: wan.110@wan: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 02:12:02:03:04:07 brd ff:ff:ff:ff:ff:ff
inet6 fe80::12:2ff:fe03:407/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r3:~# ip a s wan
5: wan@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 08:22:33:44:55:77 brd ff:ff:ff:ff:ff:ff permaddr 66:a7:95:a3:e7:14
inet 192.168.0.19/24 metric 1024 brd 192.168.0.255 scope global dynamic wan
valid_lft 43020sec preferred_lft 43020sec
inet6 fe80::a22:33ff:fe44:5577/64 scope link
valid_lft forever preferred_lft forever
root@bpi-r3:~#