In this guide, we will demonstrate how to create a simple LAN environment to back up and restore an Aruba 6000 switch configuration using PowerShell. Instead of using complex TFTP servers, we will utilize the copy-and-paste method via SSH.
To begin, ensure the Aruba switch and your laptop are connected to the same network (LAN). In this example, a FortiGate firewall acts as the DHCP server, providing IP addresses to both the laptop and the switch.
Open PowerShell on your laptop. You do not need third-party tools like PuTTY because PowerShell has a built-in SSH client. Run the ARP command to discover devices on your network:
arp -a
Look for an IP address that matches your subnet (e.g., if your laptop is 192.168.1.110, the switch might be 192.168.1.11).
Connect to the switch using the default admin account. If the switch is factory reset, the password will be blank (press Enter).
ssh admin@192.168.1.11
Upon the first login, you will be prompted to set and confirm a new password for the admin user.
Once logged in, we will grab the running configuration. To make copying easier, we must first disable the pagination that forces you to press "Space" or "Enter" to see more text.
Run the page command to increase the display limit to 1000 lines.
page 1000
Display the current configuration:
show running-config
Highlight the text starting from "Current configuration" down to the command prompt. Press Ctrl + C to copy it. Open Notepad and paste the configuration. You can save this text file as your backup.
If the switch configuration becomes corrupted or modified incorrectly (e.g., adding an unwanted VLAN), you can restore the backup easily using the text file you created.
In the PowerShell SSH session, enter the configuration terminal:
configure terminal
Copy the contents of your backup text file. In the PowerShell window, simply right-click to paste. The terminal will execute the configuration line by line, effectively restoring the settings.
Note that restoring a backup this way adds the "good" configuration back, but it might not delete new, unwanted items created since the backup (like a rogue VLAN). You may need to manually remove those (e.g., no vlan 666). Finally, save your work:
write memory