1

I have to define a big amount of VLANs in a rather big amount of switches using Cisco packet tracer software. I was wondering whether there is a way to copy-paste all those commands from one switch to the others, or if it exists any kind of scripting available for that.

  • 2
    Cannot you use VTP? – JFL May 23 '16 at 15:19
  • I can, but anyway, is there a way to copy some commands and execute them in block in another device? – vandermies May 23 '16 at 15:23
  • 2
    Can't you just highlight with the mouse, copy (<CTRL>-C), and paste (<CRTL>-V)? – Ron Maupin May 23 '16 at 15:33
  • 1
    I routinely take entire config files, edit them to change some names and IP addresses, and then apply them to new switches. That's one of the great benefits of a CLI and the way IOS configuration files work. – Todd Wilcox May 23 '16 at 16:06
  • 1
    copy tftp running-config -- that's doesn't replace the running config. – Ricky Beam May 23 '16 at 19:13
1

When I have to copy-paste big configurations I use a text editor. I put there all the reusable rows in this manner:

enable
!
configure terminal
!
vlan 10
!
name VLAN10
!
vlan 20
!
name VLAN20
!
exit
!
exit

Please notice the exclamation mark ( "!" ) that I put below each row, it makes the text reusable! And I don't put the "Switch>" part, just copy the text and paste it in the CLI. It doesn't look very automated, but... it's just Packet Tracer. :)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.