Last active
July 24, 2017 22:50
-
-
Save NonaSuomy/260059a998181b9fb975fe373eb34ef2 to your computer and use it in GitHub Desktop.
Network interface configuration setup for http://nonasuomy.github.io/Infrastructure-Part-1/
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
#!/bin/sh | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=eno1 | |
[Network] | |
VLAN=eno1.100 | |
VLAN=eno1.200 | |
VLAN=eno1.300 | |
VLAN=eno1.400 | |
VLAN=eno1.450 | |
VLAN=eno1.500 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/10-eno1.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=eno1.100 | |
Kind=vlan | |
[VLAN] | |
Id=100 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.100.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=eno1.100 | |
[Network] | |
Bridge=brv100 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.100.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=brv100 | |
Kind=bridge | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv100.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=brv100 | |
[Network] | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv100.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=eno1.200 | |
Kind=vlan | |
[VLAN] | |
Id=200 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.200.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=eno1.200 | |
[Network] | |
Bridge=brv200 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.200.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=brv200 | |
Kind=bridge | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv200.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=brv200 | |
[Network] | |
DHCP=yes | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv200.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=eno1.300 | |
Kind=vlan | |
[VLAN] | |
Id=300 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.300.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=eno1.300 | |
[Network] | |
Bridge=brv300 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.300.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=brv300 | |
Kind=bridge | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv300.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=brv300 | |
[Network] | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv300.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=eno1.400 | |
Kind=vlan | |
[VLAN] | |
Id=400 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.400.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=eno1.400 | |
[Network] | |
Bridge=brv400 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.400.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=brv400 | |
Kind=bridge | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv400.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=brv400 | |
[Network] | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv400.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=eno1.450 | |
Kind=vlan | |
[VLAN] | |
Id=450 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.450.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=eno1.450 | |
[Network] | |
Bridge=brv450 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.450.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=brv450 | |
Kind=bridge | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv450.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=brv450 | |
[Network] | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv450.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=eno1.500 | |
Kind=vlan | |
[VLAN] | |
Id=500 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.500.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=eno1.500 | |
[Network] | |
Bridge=brv500 | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/eno1.500.network | |
read -d '' vlannetwork <<- EOF | |
[NetDev] | |
Name=brv500 | |
Kind=bridge | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv500.netdev | |
read -d '' vlannetwork <<- EOF | |
[Match] | |
Name=brv500 | |
[Network] | |
EOF | |
echo "$vlannetwork" > /etc/systemd/network/brv500.network |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment