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.
Then set the hostname by typing this command.
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.