Thanks Jeremy. Chuck
On Nov 27, 2009, at 12:14 PM, jp wrote: > We use this for setting up VL radios, including speed. If you want to > automate it, just use $1, > $2 as command line variables instead of reading in answers from questions. > Then you could > include it in a loop that cycles through a database generated list. > > I wish more manufacturers actually knew something about SNMP so we could > program all radios > this way. Saves a lot of human error. > > #!/bin/bash > echo -e > "|----------------------------------------------------------------------|" > echo -e "| pinging radio to check if it is there and is set to factory > defaults |" > echo -e "| hit control-C if pinging fails > |" > echo -e > "|----------------------------------------------------------------------|" > ping -n -c 2 10.0.0.1 > > echo -e > "|----------------------------------------------------------------------|" > echo -e "| what will the radio be named? > |" > read UNITNAME > echo -e "| what IP address will this radio have? > |" > read IP > echo -e "| This radio will have " $IP > echo -e "| what ESSID will this radio have? > |" > read ESSID > echo -e "| Speed choice: Type 1 for gold (2 down 1 up), 2 for platinum > connectme (3 down 1.5 up), 3 platinum (3 down, 2 up)" > read SPEED > echo -e "| Enter the antenna gain" > read ANTENNA > echo -e > "|----------------------------------------------------------------------|" > > CM="changeme" > SP="/usr/bin/snmpset -v1 -r2 -On -c" > SG="/usr/bin/snmpget -v1 -r2 -On -c" > GW=`echo $IP|cut -d. -f1-3`.1 > > echo -e > "|----------------------------------------------------------------------|" > echo -e "| Setting up MIR/CIR > |" > echo -e > "|----------------------------------------------------------------------|" > > case $SPEED in > 1) > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.2.0 i 2000 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.3.0 i 1000 > ;; > 2) > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.2.0 i 3000 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.3.0 i 1500 > ;; > 3) > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.2.0 i 3000 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.3.0 i 2000 > ;; > esac > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.4.0 i 128 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.5.0 i 128 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.6.0 i 1000 > echo -e "Now setup as:" > echo -e "MirAUtoSU "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.2.0` > echo -e "MirSUtoAU "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.3.0` > echo -e "CirAUtoSU "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.4.0` > echo -e "CirSUtoAU "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.5.0` > echo -e "MaxDelay "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.7.6.0` > > echo -e "CIR/MIR all setup" > > echo -e > "|----------------------------------------------------------------------|" > echo -e "| Setting wireless menu items > |" > echo -e > "|----------------------------------------------------------------------|" > > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.6.1.1.0 s "$ESSID" > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.6.11.1.0 i 2 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.6.13.1.0 i 2 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.6.17.0 s "$ANTENNA" > > > echo -e "ESSID "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.6.1.1.0` > echo -e "Best AU "`$SG private 10.0.0.1 > ..1.3.6.1.4.1.12394.1.1.6.11.1.0` > echo -e "ATPC "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.6.13.1.0` > echo -e "AntennaGain "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.6.17.0` > > echo -e "Done setting wireless items" > > echo -e > "|----------------------------------------------------------------------|" > echo -e "| Setting up management items > |" > echo -e > "|----------------------------------------------------------------------|" > > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.2.3.0 s "$UNITNAME" > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.2.8.2.0 s "alsochangeme" > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.2.8.3.0 s "changeme" > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.4.1.0 a $IP > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.4.2.0 a 255.255.255.0 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.4.3.0 a $GW > > echo -e "Name "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.2.3.0` > echo -e "Inst PW "`$SG private 10.0.0.1 > .1.3.6.1.4.1.12394.1.1.2.8.2.0` > echo -e "Admin PW "`$SG private 10.0.0.1 > .1.3.6.1.4.1.12394.1.1.2.8.3.0` > echo -e "IP address "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.4.1.0` > echo -e "Netmask "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.4.2.0` > echo -e "Gateway "`$SG private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.4.3.0` > > echo -e "Done setting up manamgent items" > > echo -e > "|----------------------------------------------------------------------|" > echo -e "| Setting up filter and network management > |" > echo -e > "|----------------------------------------------------------------------|" > > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.8.1.0 i 1 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.3.1.0 i 3 > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.3.2.0 i 1 > echo -e "UserFilteringOption "`$SG private 10.0.0.1 > .1.3.6.1.4.1.12394.1.1.8.1.0` > echo -e "AccessToNwMng "`$SG private 10.0.0.1 > .1.3.6.1.4.1.12394.1.1.3.1.0` > echo -e "NwMngFilter "`$SG private 10.0.0.1 > .1.3.6.1.4.1.12394.1.1.3.2.0` > > echo -e "Network Filtering all setup" > > echo -e > "|----------------------------------------------------------------------|" > echo -e "| rebooting radio to new settings - please wait 60 seconds > |" > echo -e > "|----------------------------------------------------------------------|" > > $SP private 10.0.0.1 .1.3.6.1.4.1.12394.1.1.2.1.0 i 2 > > sleep 60s > > echo -e > "|----------------------------------------------------------------------|" > echo -e "| pinging radio with new IP number > |" > echo -e > "|----------------------------------------------------------------------|" > ping -n -c 4 $IP > > echo -e > "|----------------------------------------------------------------------|" > echo -e "| done. ready for use > |" > echo -e > "|----------------------------------------------------------------------|" > > > > On Thu, Nov 26, 2009 at 02:22:57PM -0500, Jeremy Parr wrote: >> 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. >> >> >> -------------------------------------------------------------------------------- >> 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/ > > -- > /* > Jason Philbrook | Midcoast Internet Solutions - Wireless and DSL > KB1IOJ | Broadband Internet Access, Dialup, and Hosting > http://f64.nu/ | for Midcoast Maine http://www.midcoast.com/ > */ > > > -------------------------------------------------------------------------------- > 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/ -------------- Chuck Bartosch Clarity Connect, Inc. 200 Pleasant Grove Road Ithaca, NY 14850 (607) 257-8268 "When the stars threw down their spears, and water'd heaven with their tears, Did He smile, His work to see? Did He who made the Lamb make thee?" >From William Blake's Tiger!, Tiger! -------------------------------------------------------------------------------- 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/