Cisco console Copy/Paste issue

Cisco console Copy/Paste issue

cielito

As Cisco does not implement flow control in the console serial connector. “PASTE” is not advisable for large configurations, this procedure could cause (buffer overun), reception buffer filling and generate failures in the configuration.
I wrote this small script (typer) that send  character by character with a delay between them, allowing the switch/router to process the data and avoid the buffer overflow.

#!/bin/bash
#
if [ “$1” == “”  ] || [ “$1” == “–h” ] || [ “$1” == “–help” ];then
echo “# “
echo “# USAGE :   ~/typer  CONFIG_FILE.BCK  >/dev/ttyUSB0”
echo “# You must use your device changing de X /dev/ttyUSBX”
echo “# usefull to up load cisco configurations in  “TYPED” mode “
echo “# before run the command in the tty(like Putty)”
echo “# you must give the command config term (to start config mode)”
echo “#”
exit 1
fi
awk  ‘{ for(i=1; i<=length; i++) {
          for(j=1; j <= 500000; j++ ) {
          }
          printf substr($0,i,1)
        }
}’ $1

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s