Tuesday, January 14, 2014

Hostname

The hostname is the name of you device, it is used in all command line prompts and default configuration filenames. If you do not configure the hostname, the device will use the factory-assigned default hostname "Router" or "Switch". This might be fine if you have a very small networkt which is just one router and one switch but if you exceed this network size you might want to know on what device you are currently working. 


As stated in the RFC 1035 (Domain Names—Implementation and Specification) hostnames must start with a letter, end with a letter or digit, and have interior characters consisting letters, digits, and hyphens. Names must be 63 characters or fewer. 

There are two common approaches of choosing hostnames for a network, the first one is to pick a popluar theme and just go riot with it. For example i have seen networks based on movies like "Star Wars" with routers and switches named "Skywalker" "Vader" or "DeathStar". This might work for small networks or in your home lab but if you move into some professional large scale enviroments you will stick to some sort of  "code" which helps to identify the exact device / location of the device. 

Hello my name is: DISCOROUTER-SWITCH1-FLOOR2

As seen in the picture above the switch was named DSCR-SW1-F2 which tranlates to "Discorouter-Switch1-Floor2" and helps to locate the device in the building and gives you an exect idea on what box you are working.

Configuring the hostname on a device is rather easy. You just need to go to global config mode and type in the hostname command followed by the desired hostname.

No comments:

Post a Comment