Created
June 4, 2019 16:09
-
-
Save mdbraber/e63d15d6702e8146a72836d1435ddaf1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# remove networks | |
docker network rm traefik | |
docker network rm trusted mgmt vpnout | |
docker network rm trusted_macvlan mgmt_macvlan vpnout_macvlan | |
# remove shims | |
ip link del mgmtshim | |
ip link del trustedshim | |
ip link del vpnoutshim | |
# create traefik_public | |
docker network create traefik | |
# create mgmt networks | |
docker network create -d macvlan --attachable=true -o parent=ens18 -o com.docker.network.bridge.name=mgmt_macvlan --subnet=172.16.0.0/20 --ip-range=172.16.1.1/24 --gateway=172.16.0.1 --aux-address="zero-ip=172.16.1.0" --aux-address="bridge=172.16.1.254" mgmt_macvlan | |
docker network create --attachable=true -o com.docker.network.bridge.name=mgmt --subnet=172.16.2.0/24 --ip-range=172.16.2.1/24 --gateway=172.16.2.1 --aux-address="bridge=172.16.2.254" mgmt | |
ip link add mgmtshim link ens18 type macvlan mode bridge | |
ip addr add 172.16.1.254/24 dev mgmtshim | |
ifconfig mgmtshim up | |
# create trusted networks | |
docker network create -d macvlan --attachable=true -o parent=ens18.16 -o com.docker.network.bridge.name=trusted_macvlan --subnet=172.16.16.0/20 --ip-range=172.16.17.1/24 --gateway=172.16.16.1 --aux-address="zero-ip=172.16.17.0" --aux-address="bridge=172.16.17.254" trusted_macvlan | |
docker network create --attachable=true -o com.docker.network.bridge.name=tusted --subnet=172.16.18.0/24 --ip-range=172.16.18.1/24 --gateway=172.16.18.1 --aux-address="bridge=172.16.18.254" trusted | |
ip link add trustedshim link ens18.16 type macvlan mode bridge | |
ip addr add 172.16.17.254/24 dev trustedshim | |
ifconfig trustedshim up | |
# create vpnout networks | |
docker network create -d macvlan --attachable=true -o parent=ens18.32 -o com.docker.network.bridge.name=vpnout_macvlan --subnet=172.16.32.0/20 --ip-range=172.16.33.1/24 --gateway=172.16.32.1 --aux-address="zero-ip=172.16.33.0" --aux-address="bridge=172.16.33.254" vpnout_macvlan | |
docker network create --attachable=true -o com.docker.network.bridge.name=vpnout --subnet=172.16.34.0/24 --ip-range=172.16.34.1/24 --gateway=172.16.34.1 --aux-address="bridge=172.16.34.254" vpnout | |
ip link add vpnoutshim link ens18.32 type macvlan mode bridge | |
ip addr add 172.16.33.254/24 dev vpnoutshim | |
ifconfig vpnoutshim up |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment