2009/11/26 Jeremy Parr <jeremyp...@gmail.com>:
> Before I reinvent the wheel with an Expect script or SNMP query, does
> anyone have scripts written for automating bandwidth/MAC allocations
> for the VL? It does not support RADIUS, so any automated changes need
> to be pushed via telnet or SNMP.

Since there wasn't anything out there, here is what I hacked up...
just set your snmprw community and go.

#!/bin/bash

# Syntax
# alvmac.sh <add/remove> <ip address or hostname> <mac address with spaces>

# Example
# alvmac.sh add 10.254.9.77 00 16 cf b7 9d f7

# SNMP R/W Community
snmprw=private

intent=$1
alvau=$2
let mac[1]=0x$3
let mac[2]=0x$4
let mac[3]=0x$5
let mac[4]=0x$6
let mac[5]=0x$7
let mac[6]=0x$8

if [ $intent == add ] ; then
        action=4
fi

if [ $intent == remove ] ; then
        action=6
fi

snmpset -c $snmprw -v 1 $alvau
1.3.6.1.4.1.12394.1.1.5.10.6.1.2.${mac[1]}.${mac[2]}.${mac[3]}.${mac[4]}.${mac[5]}.${mac[6]}
i $action


--------------------------------------------------------------------------------
WISPA Wants You! Join today!
http://signup.wispa.org/
--------------------------------------------------------------------------------
 
WISPA Wireless List: wireless@wispa.org

Subscribe/Unsubscribe:
http://lists.wispa.org/mailman/listinfo/wireless

Archives: http://lists.wispa.org/pipermail/wireless/

Reply via email to