Hone

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

enable
In.
configure terminal
A line this box can take.
interface gi0/2
It has this port.
description Reception
Accepted.
exit
Out of the port.
interface gi0/40
It does not have this one. Refused -- and on a restore, so is everything indented under it.
exit
Out.
show running-config | include Reception
What landed, landed.

Your turn

Show only the lines of the configuration mentioning Reception.

show running-config |  Reception

The trap

Reading `1502 bytes copied` as success. It is true, and it is about the transfer.

Practise the lines that did not take on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.