Jump to content

HP Switches (2650s) Copy Config from One to Another?


Recommended Posts

Posted

Hi all - well, I've seen a few links but they were all a little bit beyond me. :(

 

Does anyone have/can anyone knock up a simple step-by-step guide on how to do that?

 

Thanks muchly for any help!

Posted

On HP Open putty, set logging and on the switch do a Show Run.

 

You will need to change any management IP's and hostnames. You may need to re-create any SSH keys.

 

Should be about it, you may have to do something different on Cisco if you are running VTP for instance.

  • Thanks 1
Posted

Thanks for that, though I must admit it's a little bit beyond me sorry.

 

Changing IPs and hostnames I've considered but don't know how to do on HP switching. Recreating SSH keys I've done once or twice on Ubuntu server but again, no idea on HP switching. VTP I've never heard of.

 

Can use tftp if that's any easier, but I'm not sure I'm wise enough yet to follow the above! Grateful for the help though, I'll Google a bit off the back of that. :)

Posted

If you are copying config to another switch to enable quick deployment then you will need to update the host name.

 

To be honest once you have a copy of config you can modify the hostname and management IP in that file and just paste it over to the switch. If you have other IP's for instance vlan IP's and deploying the config to an additional switch you may need to make further changes.

 

Just be careful and be on the side on caution before putting the switch into production environment. or making changes in a production environment.

 

VTP is a Cisco thing, basically you have a master switch which holds vLANs and then configures switches connected with those vlans but overwrites the info so you'd need to be careful and follow cisco guidelines if adding switches.

 

For changing IP address you'd simply go into the vlan used for switch management:i.e.

 

vlan 200

name "Sw-MGMT"

ip address 192.168.200.1 255.255.255.0

exit

 

To remove an IP you'd need to enter no ip address

 

Do all these changes with Console cable so if you lose network connectivity you can access the switch and sort it out.

  • Thanks 1
Posted

Thanks for that! It's still beyond me a little bit but I've got as far as:

# copy startup-config tftp 10.108.10.182 config.txt (where that's the IP of a lil ubuntu tftp server.)

 

Which gives me:

 

Invalid input: tftp

 

Now Googling's not been much help, most stuff tails off vaguely about that you *can* do it, not *how* to do it. Anyone else seen this?

 

Thanks so much for sticking with me!

Posted
Thanks for that! It's still beyond me a little bit but I've got as far as:

 

 

Which gives me:

 

 

 

Now Googling's not been much help, most stuff tails off vaguely about that you *can* do it, not *how* to do it. Anyone else seen this?

 

Thanks so much for sticking with me!

 

HP's are pretty intuitive . Try typing copy startup-config then press the tab button on your keyboard to see the choices appear. It is saying that it doesn't like something in the command.

  • Thanks 1
Posted

OH OH oh wait! You can scp the configs off them! They keep them in /cfg/running-config (for example) and sshpass can pass the password to them. Used something like:

/usr/bin/sshpass -p 'yourpasswordhere' /usr/bin/scp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null [email protected]:/cfg/running-config ./switchrunningconfig.conf

 

And I *guess* I'll swap source/dest over to spit a config onto a replacement (with the original off ofc.)

 

Cheers Davit2005 again. :)

Posted

Another option is to log in via serial and you can copy the config to a USB stick (assuming your particular switch has a USB socket). I believe that the command is

 

copy startup-config usb MySwitchConfig.txt

 

On the second switch you then just log in and run

 

copy usb startup-config MySwitchConfig.txt

 

To edit the IPs and wotnot on the second switch, there's a handy command you can issue (useful for basic changes if your knowledge of the CLI isn't the best)

 

menu

 

If the second switch is new (or even if it's not), it can be worth performing an erase before you do anything as strange things have happened in the past on some models if you don't. This is easy by issuing

 

enable

erase all zerosize

  • Thanks 1
Posted

Thanks Ric_, some top tips! I couldn't get that to work so binned the config with:

 

erase startup-config

 

That sound right?

 

Bless you both!

Posted

The HP switch will prob ask to confirm a reboot after that command but on reboot the config will be clear.

 

HP's are most same as Cisco. Most changes are instant but to save it for after next reboot of switch you need to wr m ( short for Write Memory).

 

If you forget to save for instance IP's and Port assignments and reboot the switch the changes will be lost.

  • Thanks 1
Posted

Well, done it now.

 

First off, thanks all for the help. Got the config off as per my post above, turned off the old switch, but reversing the commands didn't get the config onto the new switch despite (I'm certain) setting up ssh correctly as per the old one etc.

 

What I did in the end was get the tftp server into play that I'd set up when tinkering earlier, put that config into the tftp folder, and copied the config to the new switch from a telnet sessions thus:

 

copy tftp startup-config 10.108.10.182 switch.conf

 

It carped itself though after reboot, then got a console on it, to find all was fine. Been happily shuffling packets around all morning.

 

Done (I hope!)

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now



×
×
  • Create New...