Ep 02: Switch Hostname & Running Config
Don't Forget To Use Our Link
Switch Hostname & Running Config
In this episode, we focus on entering Privileged EXEC mode, entering Global Configuration mode, setting the hostname, returning to Privileged EXEC mode, and verifying the running configuration according to the official CCNA 200-301 certification blueprint.
Learning Objectives
- Enter global configuration mode
- Set the hostname
- Return to Privileged EXEC mode
- Verify the configuration
Enter global configuration mode
When you first connect to a Cisco switch, you will start in User EXEC mode. You can identify User EXEC mode by the
>at the end of the prompt.
The switch will initially display something similar to:
Switch>
To make configuration changes to the switch, we first need to enter Privileged EXEC mode. To do this, type
enableorenfor short into the CLI.
Switch> enable
Switch#
After you type that command you will notice that the CLI changes from a
>to a#. The#means you are in Privileged EXEC mode.
From Privileged EXEC mode, type
configure terminalorconf tfor short to enter Global Configuration mode.
Switch# configure terminal
Switch(config)#
You may notice that the CLI now shows
(config)which allows you to easily see that you are in Global Configuration mode.
Key Concept To Remember For The CCNA
You must be in Privileged EXEC mode before you can enter Global Configuration mode. The > prompt represents User EXEC mode, while the # prompt represents Privileged EXEC mode.
Set the hostname
The company standard requires every network device to have a descriptive hostname. In this scenario, the new switch is being prepared for the branch office rack, so we will give the switch the hostname
Branch-SW1.
In Global Configuration mode, type
hostname Branch-SW1.
Switch(config)# hostname Branch-SW1
Branch-SW1(config)#
After you type the command, you will immediately notice that the CLI prompt changes to
Branch-SW1(config)#. This confirms that the hostname has been changed.
Do not Forget!
Using descriptive hostnames makes network devices easier to identify and manage. The hostname is also displayed in the CLI prompt, making it easier to determine which device you are currently configuring.
Return to Privileged EXEC Mode
After setting the hostname, we can return to Privileged EXEC mode. The
endcommand takes us directly out of Global Configuration mode and back to Privileged EXEC mode.
Branch-SW1(config)# end
Branch-SW1#
You can also type
exitto leave Global Configuration mode.
Branch-SW1(config)# exit
Branch-SW1#
Notice that the
(config)portion of the prompt is gone. The#means that we are back in Privileged EXEC mode.
Verify the configuration
After making a configuration change, it is important to verify that the change was applied correctly. The
show running-configcommand displays the active configuration currently being used by the switch.
Branch-SW1# show running-config
When reviewing the output, look for the
hostnamecommand near the beginning of the configuration.
!
hostname Branch-SW1
!
Seeing
hostname Branch-SW1in the running configuration confirms that the hostname has been successfully applied to the active configuration.
Key Concept To Remember For The CCNA
The running configuration is stored in RAM and contains the configuration currently being used by the device. Changes made to the running configuration are active immediately, but they will be lost if the switch is reloaded unless the configuration is saved to the startup configuration.
Always verify that configuration changes are committed to NVRAM using one of the following options:
1: copy running-config startup-config
2: do wr
3. wr