From eff78a5e092fc2936a13f2c229146f55854f24e4 Mon Sep 17 00:00:00 2001 From: Nicole Rappe Date: Sat, 15 Jun 2024 23:15:05 -0600 Subject: [PATCH] Delete Scripts/Bash/Creating a MACVLAN Sub-Interface.md --- .../Bash/Creating a MACVLAN Sub-Interface.md | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 Scripts/Bash/Creating a MACVLAN Sub-Interface.md diff --git a/Scripts/Bash/Creating a MACVLAN Sub-Interface.md b/Scripts/Bash/Creating a MACVLAN Sub-Interface.md deleted file mode 100644 index bab6f69..0000000 --- a/Scripts/Bash/Creating a MACVLAN Sub-Interface.md +++ /dev/null @@ -1,19 +0,0 @@ -**Purpose**: -You may find that you only have one network adapter on a server / VM and need to have multiple virtual networks associated with it. For example, Home Assistant exists on the `192.168.3.0/24` network but it needs to also access devices on the `192.168.4.0/24` surveillance network. To facilitate this, we will make a MACVLAN Sub-Interface. This will make a virtual interface that is parented to the actual physical interface. - -!!! info "Assumptions" - It is assumed that you are running Rocky Linux (or CentOS / RedHat). - -## Create the Temporary Interface -You will begin with making a new interface, it will have the name `macvlan0`. -``` sh -ip link add macvlan0 link eno1 type macvlan mode bridge -ip addr add 192.168.4.100/24 dev macvlan0 -ip link set macvlan0 up -``` - -## Bind a Docker Network to the Sub-Interface -Now you need to run the following command to allow docker to use this interface for the `surveillance_network` -``` sh -docker network create -d macvlan --subnet=192.168.4.0/24 --gateway=192.168.4.1 -o parent=macvlan0 surveillance_network -``` \ No newline at end of file