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.

5
  • 2
    Cannot you use VTP?
    – JFL
    Commented May 23, 2016 at 15:19
  • I can, but anyway, is there a way to copy some commands and execute them in block in another device?
    – vandermies
    Commented May 23, 2016 at 15:23
  • 2
    Can't you just highlight with the mouse, copy (<CTRL>-C), and paste (<CRTL>-V)?
    – Ron Maupin
    Commented May 23, 2016 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. Commented May 23, 2016 at 16:06
  • 1
    copy tftp running-config -- that's doesn't replace the running config.
    – Ricky
    Commented May 23, 2016 at 19:13

1 Answer 1

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. :)

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