You paste 40 lines of config into a console session at 9600 baud. The first dozen land, then you get half-commands, "% Invalid input", or lines that silently vanish. Nothing is wrong with the cable.
Why it happens
- A console port at 9600 8N1 moves roughly 960 characters per second, and most console sessions run with no flow control.
- Your terminal sends the paste as one block, as fast as it can.
- The device's CLI parses and applies each line before it reads the next one. Some lines (interface changes, crypto, commit-style operations) take a lot longer than the next line takes to arrive. The input buffer fills and characters get dropped.
- plink and other "send the whole file" scripts hit the same wall over a slow console, which is why scripts end up full of sleep/timeout/expect hacks.
Fixes that work in any terminal
- Slow the send down. Most terminals have a per-line or per-character delay: Tera Term's serial transmit delay, SecureCRT's line/character send delays, and minicom's character tx delay. Start around 100 ms per line, and add a few ms per character on very old gear.
- Stop the console from talking over you. On Cisco IOS,
logging synchronouson the console line (orno logging consoleduring the change) keeps syslog from interleaving with your input. - Turn paging off for shows:
terminal length 0(IOS/NX-OS/Arista); on Junos,| no-more. - Let the platform take the block for you. On Junos,
load merge terminal(orload set terminal) accepts a pasted block and you finish with Ctrl-D, thenshow | compareandcommit check. - For anything big, don't paste over serial at all: copy the file over the management network (SCP/TFTP), or send it with XMODEM where the device supports it.
The more reliable fix: wait for the prompt
A delay is a guess. The safest way is to send one line, wait until the device prompt comes back, then send the next. That's what an expect script does, and it's tedious to maintain.
Disclosure: I build JackedIN, a terminal for network gear (SSH, Telnet and serial on Windows, Linux and Raspberry Pi). Its exec command reads the whole list, then sends one line at a time and waits for the prompt before the next. It also answers --More-- pagers:
jackedin exec --serial /dev/ttyUSB0 --baud 9600 --file router1-changes.txt jackedin exec --serial /dev/ttyUSB0 --baud 9600 --line-delay 150 --char-delay 2 --file router1-changes.txt Serial uses a 100 ms line delay by default, !sleep 500 in the file adds an explicit pause, and --wait-for-echo waits for the device to echo each line. In the desktop window, pasting 20 or more lines asks first and then sends them one at a time. Built-in profiles for Junos, Cisco IOS/NX-OS, Arista, Nokia, MikroTik and more.
It's paid ($19 one-time) with a 72-hour full trial, no sign-up: https://getpathprobe.com/jackedin/
Windows note: the Windows build isn't code-signed yet, so SmartScreen may say "unknown publisher". Check SHA256SUMS on the release page first (Get-FileHash in PowerShell, sha256sum -c SHA256SUMS --ignore-missing on Linux/Pi).
The fixes above work in any terminal, though. Line delay plus logging synchronous fixes most dropped pastes.
