To set a new hostname on a Cisco router, switch to privileged exec mode by typing enable
at the prompt.
Enter configuration mode by entering this command.
eng_floor_2#configure terminal |
Then set the hostname by typing this command.
eng_floor_2(config)#hostname eng_floor_2 |
Now the proper hostname has been set on the switch.
eng_floor_2#show running-config Building configuration... Current configuration : 982 bytes ! version 12.1 no service timestamps log datetime msec no service timestamps debug datetime msec no service password-encryption ! hostname eng_floor_2 |
This is the best way to label each switch. This way, you will know exactly which one you are managing with the command line whether this is with a console cable or a telnet/ssh connection.