Sunday, April 6, 2008

Copy HP LAN Switch Config

In our environment, we use HP 2524 ProCurve switches for our LAN switching. These switches have been shown to be reliable and easy to configure. To copy the config of these switches for backup purposes there are two methods:
  1. Log into the web interface (if enabled) and go to the tab labeled "Diagnostics", then "Configuration Report". This tab contains a text copy of the running configuration.
  2. Log into the CLI (Command Line Interface) and use commands to copy the configuration to a TFTP (Trivial File Transfer Protocol) server.
I prefer the second method because although, the web interface is easy because you can just copy and paste it to a text file, the web interface uses Java (which can be slow), requires two logins and then you have to navigate to the section.

To copy a switch configuration using the CLI log into the switch with telnet and type the following command:

copy startup-config tftp 192.168.x.x destination


The command breaks down in the following way:
  • copy - command to copy something
  • startup-config - what to copy, it can be running-config if that is the configuration you want
  • tftp - the protocol to use when copying
  • 192.168.x.x - the address of the TFTP server
  • destination - the name of the file when it is placed on the server
Very simple, and can also be scripted to get many configs at one time.

No comments: