Wireless Access

last person joined: 22 hours ago 

Access network design for branch, remote, outdoor, and campus locations with HPE Aruba Networking access points and mobility controllers.
Expand all | Collapse all

script for the Whitelist

This thread has been viewed 3 times
  • 1.  script for the Whitelist

    Posted Oct 31, 2017 08:41 AM

    I have over 200 APs I need to change thier hostname that are on the Whitelist CPSec list. Is there a script I can use to change the names instead of manually changing each entry by hand and then reboot. I was kinda of looking for a find and replace type of application like in Microsoft Excel



  • 2.  RE: script for the Whitelist

    Posted Nov 01, 2017 04:51 AM

    for 200 APs, maybe just easier to roll your own.

     

    Assuming you have a text file that has the mac_addr and the desired new name "comma separated", e.g.

    00:11:22:33:44:55,new_name_123

    00:11:22:66:77:88,new_name_456

     

    then using using a linux box (or install cygwin on windows), assuming the text file is named "the_text_file.txt", then run the following

     

    for i in `cat the_text_file.txt`; do
        mac=`echo $i | cut -d',' -f1`
        new_name=`echo $i | cut -d',' -f2`
        echo "whitelist-db cpsec modify mac-address $mac ap-name $new_name"
    # Uncomment the next line if you want to reboot them
    # echo "apboot wired-mac $mac" done

    now copy paste the resultant output to the aruba CLI, test it with just copy/paste the first few lines to make sure it does what you expect.

     

     

     



  • 3.  RE: script for the Whitelist

    Posted Nov 01, 2017 07:49 AM
    Thanks for your reply. Ended up doing a sh whitelist cpec ap-group XXX.
    Copy to a text file. I edited the text file adding what I need and taking
    things out. Then edit each line adding whitelist cpsec modify mac-address
    in the front. Did a copy and paste on the controller and then rebooted the
    group. All APs in the group rebooted but I had to be on the local though

    --

    *Jon Hutchinson*
    *8B Packer Ave rm 185*


    *Lehigh University(610)758-5099*