Compare commits

..

No commits in common. "bcf9563649970dc828e7c4952de27bbf6c6c26b9" and "494620210e9db240f1d108fe176b9bd8d7a207f4" have entirely different histories.

View File

@ -1,22 +0,0 @@
#!/bin/bash
#
if [[ $UID != 0 ]]; then
echo "You need to be root to execute that script"
exit 1
fi
if [[ $# != 2 ]]; then
echo "You need to give at least 2 parameters <network_interface> <vlan_id>."
exit 1
fi
apt install vlan
modprobe 8021q
ip link add link $1 name $1.$2 type vlan id $2
if [[ $2 == 10 ]]; then
ip addr add 192.168.0.217/24 dev $1.$2
else
ip addr add 192.168.$2.217/24 dev $1.$2
fi
ip link set up $1.$2