Lessons · Network switches · the mode stack
Three rooms, and the door between them
User mode can look at a little, privileged mode can look at everything, and configuration mode is the only place anything can be changed.
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
Nearly every beginner mistake is typing a real command in the wrong room and reading the error as though the command were wrong. It is not; you are one door away.
How to think about it
Read the prompt before you type. > means look only. # means look at anything. (config)# means you are changing the box. To go in: enable, then configure terminal. To come back out: end.
Worked example
enableFrom Switch> to Switch#. Nothing has changed on the box; you can just see more of it.
configure terminalFrom Switch# to Switch(config)#. Now what you type changes the running configuration.
hostname CAMPUS-SWA change, accepted, because you are in the room where changes are allowed. The prompt itself becomes CAMPUS-SW(config)#.
endStraight back to CORE1#, however deep you were. exit goes up one level; end goes all the way out.
Your turn
From the # prompt, get into the room where the configuration can be changed.
terminal
Console into a switch
The trap
Typing a configuration command at the # prompt and reading '% Invalid input' as 'that command does not exist'. It exists; you are one `configure terminal` away from it.