Lessons · Network switches · the lines that did not take
The lines that did not take
A restore is parsed line by line, and every line the parser refuses is printed as it goes. The byte count says nothing about them.
Hone is a place to practise programming. This is one of its lessons, written out in full and free to read without an account.
What it is for
A 48-port configuration onto a 24-port switch lands the hostname, the uplink and half the ports, and reads like it worked. The refusals are the only signal that it did not.
How to think about it
Read the output of the copy, not just its last line, then compare the running config against the file. One refused `interface` line usually produces several errors, because the mode never moves.
Worked example
enableIn.
configure terminalA line this box can take.
interface gi0/2It has this port.
description ReceptionAccepted.
exitOut of the port.
interface gi0/40It does not have this one. Refused -- and on a restore, so is everything indented under it.
exitOut.
show running-config | include ReceptionWhat landed, landed.
Your turn
Show only the lines of the configuration mentioning Reception.
show running-config | Reception
Console into a switch
The trap
Reading `1502 bytes copied` as success. It is true, and it is about the transfer.