Cloud Managed Networks

 View Only
last person joined: yesterday 

Forum to discuss all things related to HPE Aruba Networking Central and UXI Network Management, including deployment of managed networks, configuration, best practices, APIs, Cloud Guest, AIOps, Presence Analytics, and other included Applications
Expand all | Collapse all

Aruba 2930M switch Variable

This thread has been viewed 21 times
  • 1.  Aruba 2930M switch Variable

    Posted Jun 27, 2024 02:03 PM

    Hi All,

    I am new to Aruba technology. We are working a project to migrate our Cisco to Aruba switch 2930M managed via Aruba Central. As we will have different number of devices on each floor, so a fix template will not work, instead might need to create variable based. Anyone can share me something to learn about variable which i can use in a template to check and apply config based on single switch or stack switch using same template.



  • 2.  RE: Aruba 2930M switch Variable

    EMPLOYEE
    Posted Jun 27, 2024 08:09 PM

    see if this port helps
    Aruba Central Guide to using Templates with Stacked AOS-Switches



    ------------------------------
    If my post was useful accept solution and/or give kudos.
    Any opinions expressed here are solely my own and not necessarily that of HPE or Aruba.
    ------------------------------



  • 3.  RE: Aruba 2930M switch Variable

    Posted Jul 01, 2024 02:16 AM

    Hi. In this cases I normally use two variables per VLAN (tagged ports and untagged ports) in template and put in the respective ports in variable list. Here is a example on how to handle the VLAN setup.

    Template: 
    vlan 10
       name "ADM"
    %if vlan_10_untag_port%
    untagged %vlan_10_untag_port%
    %else%    
       untagged %_sys_vlan_10_untag_command%
    %endif%   
    %if _sys_use_dhcp=1%
       ip address dhcp-bootp
    %endif%
    %if _sys_use_dhcp=0%
       ip address %_sys_ip_address% %_sys_netmask%
    %endif%
       exit
       
    vlan 99
       name "Gjestenett"
       no ip address  
    %if vlan_99_untag_port%
       untagged %vlan_99_untag_port%
    %endif%
     
    %if vlan_99_tag_port%
    tagged  %vlan_99_tag_port%
    %else%
    tagged  %_sys_vlan_10_untag_command%
    %endif%    
     
     exit
    --------------------------------------------------------------------------------------
    Variables:
    {
      "CN83Hxxxxx": {
        "_sys_lan_mac": "d0:67:26:xxxx",
        "_sys_serial": "CN83xxxxxx"
      },
      "SG88JQNZBL": {
        "_member.1.ports": "48",
        "_member.2.ports": "48",
        "_member.3.ports": "",
        "_member.4.ports": "",
        "_member.5.ports": "",
    .
    .
    .
    .
    .
    .
    .
    .
    .
      "_sys_use_dhcp": "1"
        "_sys_vlan_10_tag_command": "",
        "_sys_vlan_10_untag_command": "1/1-1/3,1/5-1/45,1/A1-1/A4,2/1-2/48",
      "_sys_vlan_99_tag_command": "",
        "_sys_vlan_99_untag_command": "1/1-1/3,1/5-1/45,1/A1-1/A4,2/1-2/48"
        "_trunk.1": "1/A1,2/A2",
        "_trunk.2": "",
       
      },
      "SG88JQNZBM": {
    .
    .
    .
    .
    .
    .
    .
    .    "_sys_use_dhcp": "1",
        "_sys_vlan_10_tag_command": "",
        "_sys_vlan_10_untag_command": "1/1-1/3,1/5-1/45,1/A1-1/A4,2/1-2/48",
      "_sys_vlan_99_tag_command": "",
        "_sys_vlan_99_untag_command": "1/1-1/3,1/5-1/45,1/A1-1/A4,2/1-2/48"
      
      }
    }



  • 4.  RE: Aruba 2930M switch Variable

    Posted Jul 01, 2024 03:39 AM

    Hi Tom,

    Thank you for suggestion. I only having concern how does it know if the devices are in stack or standalone. As far i know for standalone port will be 1 while in stack it is 1/1. I am yet to perform testing of my template. 




  • 5.  RE: Aruba 2930M switch Variable

    Posted Jul 01, 2024 09:44 AM

    You have to set up a test for that in the template. like this:

    hostname "%hostname%"
    %if vsf_stack_number<=2%
    vsf
       enable domain %vsf_domain_id%
       member 1
          type "JL261A"
          priority 255
          link 1 1/25,1/27
          exit
        member 2
          type "JL261A"
          priority 128
          link 1 2/25,2/27
          exit
       port-speed 1g
       exit
    %endif%
    %if vsf_stack_number=3%
    vsf
       enable domain %vsf_domain_id%
       member 1
          type "JL261A"
          priority 255
          link 1 1/25
          link 2 1/27
          exit
        member 2
          type "JL261A"
          priority 128
          link 1 2/25
          link 2 2/27
          exit
        member 3
          type "JL261A"
          priority 64
          link 1 3/25
          link 2 3/27
          exit
       port-speed 1g
       exit
    %endif%
    %if vsf_stack_number=4%
    vsf
       enable domain %vsf_domain_id%
       member 1
          type "JL261A"
          priority 255
          link 1 1/25
          link 2 1/27
          exit
        member 2
          type "JL261A"
          priority 128
          link 1 2/25
          link 2 2/27
          exit
        member 3
          type "JL261A"
          priority 64
          link 1 3/25
          link 2 3/27
          exit
        member 4
          type "JL261A"
          priority 32
          link 1 4/25
          link 2 4/27
          exit
       port-speed 1g
       exit
    %endif%
    %if vsf_stack_number=5%
    vsf
       enable domain %vsf_domain_id%
       member 1
          type "JL261A"
          priority 255
          link 1 1/25
          link 2 1/27
          exit
        member 2
          type "JL261A"
          priority 128
          link 1 2/25
          link 2 2/27
          exit
        member 3
          type "JL261A"
          priority 64
          link 1 3/25
          link 2 3/27
          exit
        member 4
          type "JL261A"
          priority 32
          link 1 4/25
          link 2 4/27
          exit
        member 5
          type "JL261A"
          priority 16
          link 1 5/25
          link 2 5/27
          exit
       port-speed 1g
       exit
    %endif%

    For the variables file you use the variable as you would do in command line. 1/1-24,2/1-24  and so one. 

    One thing: 

    In the past we had to set up a config for every stack member's S/N in the variable file. I think this is still valid. This config is the same for all stack members except S/N and MAC-address. It includes all variable for all stack members and not only for this specific stack member. This is probably because if an other stack member takes over the stack it will get the config from the variable file with it's own S/N and therefor it has to have the variables for all stack members.

    Tom C.