Re: [WISPA] Alvarion VL Access Control

2009-11-28 Thread Chuck Bartosch
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 

Re: [WISPA] Alvarion VL Access Control

2009-11-27 Thread Jeremy Parr
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/


Re: [WISPA] Alvarion VL Access Control

2009-11-27 Thread jp
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