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"
}
}
Original Message:
Sent: Jun 27, 2024 12:23 PM
From: vicky.pandey4752@gmail.com
Subject: Aruba 2930M switch Variable
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.