Braindump about MACVLANs
Set eth0 to PROMISC mode
With promiscuous mode, we allow the capture of all packets, which then may or may not get matched by our various virtual macs
sudo ip link set eth0 promisc on
Creating macvlan
1
2
3
|
sudo ip link add macvlan0 link eth0 type macvlan mode bridge
sudo ip addr add 192.168.88.210/29 dev macvlan0
sudo ip link set macvlan0 up
|
Docker network for macvlan0
1
2
3
4
5
|
sudo docker network create -d macvlan \\
--subnet=192.168.88.0/24 --gateway=192.168.88.1 \\
--ip-range 192.168.88.210/29 \\
-o parent=eth0 \\
macvlan0
|
Create systemd service and link it to the proper directory
1
2
|
cd /etc/systemd/system/multi-user.target.wants
sudo ln -s /var/services/homes/shan/projects/docker_compose/startup/macvlan.service
|
Running
Put the above into a bash script and add the the script to the task shceduler to run at boot.