Onboarding with SNMP via BASH

With the release of cnMaestro you can now ditch the CNS server *AFTER* you’ve upgraded your radios to 2.5+  The text files ap.txt and cpe.txt are simply one IP per line.  I got these from my network management software (a simple SQL query for all Cambium ePMP AP and Cambium ePMP CPE).  This was done in PC with:

SELECT e.DeviceType,
INET_NTOA(e.IPAddress + a.StartAddress) AS 'IP Address' FROM Equipment e
INNER JOIN Customer c ON c.CustomerID=e.EndUserID
LEFT OUTER JOIN AddressRange a ON e.IPType = a.AddressRangeID
WHERE e.Type LIKE '%Access Point%'
AND e.DeviceType LIKE '%Cambium ePMP AP%'
ORDER BY c.CustomerID;

This simply requires SNMP access and snmputils to work.



#use this to identify your radio versions (it needs 2.5+)
#while read -r radioip; do
# echo “Querying” $radioip
# snmpget -v2c -c$community $radioip .
#done < “ap.txt”

#this is how you enable, set host/cambiumid/onboardkey, apply
while read -r radioip; do
echo “Querying” $radioip
snmpset -v2c -c$community $radioip . i 1
snmpset -v2c -c$community $radioip . s $server
snmpset -v2c -c$community $radioip . s $cambiumid
snmpset -v2c -c$community $radioip . s $onboardkey
snmpset -v2c -c$community $radioip . i 1
done < “ap.txt” >> onboard.log