I ran across the run-script command for the Nexus the other day. It’s very helpful for putting the base config on the switch. This is especially nice for configuring vPC’s, peer link config, port channels, anything that is ‘easy’ to mess up. First create a cut sheet in notepad with the appropriate commands. Next copy the file to a storage device on the Nexus. If you don’t have TFTP/FTP/SCP access or want to work smarter, check out this link for creating files in IOS. http://blog.ioshints.info/2008/03/phase-2-upload-text-files-through.html
Finally issue the run-script command with the parameter of the location of the file you created above.
int vlan 5
ip address 192.168.255.1/24
(save the file as base.config)
NEXUS-7K-1# run-script bootflash:base.config
Enter configuration commands, one per line. End with CNTL/Z.
‘int vlan 5’
‘ip address 192.168.255.1/24’
*There’s a sleep command you can also put in your configuration file-
That will cause IOS to wait 10 seconds before continuing to issue commands. Helpful in things like configuring SSH via the script. The maximum wait time is 2,147,483,647 seconds…that’s 68 years! I can think of a fun prank to play on a junior engineer…