2016-09-11 23:20:28 +02:00
|
|
|
#!/bin/sh
|
2024-08-02 11:37:09 +02:00
|
|
|
mac="${1:?Provide mac address as first argument}"
|
|
|
|
name="${2:-macvlan9000}"
|
2017-08-01 15:38:42 +02:00
|
|
|
enp="$(basename /sys/class/net/enp*)"
|
2017-06-23 13:25:14 +02:00
|
|
|
|
2024-08-02 11:37:09 +02:00
|
|
|
sudo ip link add link "$enp" address "$mac" name "$name" type macvlan
|
|
|
|
/bin/sh
|
|
|
|
sudo ip link del "$name"
|
2018-09-13 09:43:58 +02:00
|
|
|
|