Hone

Lessons · Network switches · naming the switch

Name the box

hostname sets the name in the prompt, and the prompt is what tells you which switch you are logged into.

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

Two console windows both saying Switch# is how a change lands on the wrong device. The name is not decoration; it is the only thing on screen that identifies where you are.

How to think about it

Name it after where it is and what it does, and do it first, before any other change. IDF3-ACCESS tells the next person something; SW1 tells them nothing.

Worked example

enable
The # prompt.
configure terminal
Into configuration mode.
hostname IDF3-ACCESS
Takes effect immediately: the prompt is now IDF3-ACCESS(config)#, before you have saved anything.
end
IDF3-ACCESS#. Every line from here on says which switch this is.

Your turn

Name this switch CORE1.

 CORE1

The trap

Spaces. `hostname main switch` takes the first word and silently drops the rest, so the box is called main and nobody notices until it matters.

Practise naming the switch on HoneA question on it now, a coding challenge where there is one, and it is remembered for review. Free, no email needed.