r4254 Move "gateway" directory out of "wwwroot" and provide a mean to reconfigure
[racktables] / gateways / switchvlans / vlandecoder-sample
diff --git a/gateways/switchvlans/vlandecoder-sample b/gateways/switchvlans/vlandecoder-sample
new file mode 100755 (executable)
index 0000000..e1cdf39
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+[ $# = 1 ] || exit 1
+
+case $1 in
+       6001)
+               NATIVE=100
+               ;;
+       6002)
+               NATIVE=200
+               ;;
+       *)
+               exit 2
+               ;;
+esac
+VOICE=300
+
+echo switchport trunk native vlan $NATIVE
+echo switchport trunk allowed vlan $NATIVE,$VOICE
+echo switchport voice vlan $VOICE
+echo spanning-tree portfast trunk