The first configuration command on any device should be to give it a unique hostname. By default, all devices are assigned a factory default name. For example, a Cisco IOS switch is "Switch.”
Following are the commands to set a hostname at a switch
Switch>en
Switch#config te
Switch#config terminal
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hostname Sw-Floor-1
Sw-Floor-1(config)#
Sw-Floor-1#
Same commands are used to set hostname at a router.
Following are the guideline for naming devices:
- Start with a letter
- Contain no spaces
- End with a letter or digit
- Use only letters, digits, and dashes
- Be less than 64 characters in length