Setting the Router Name
The examples in this book use
“Router” as the router’s name. That’s fine
for examples, but a bad idea in real life. Eventually, a router
should be given a name. To set the router name to
“Sphinx”, use the
hostname
command:
Router(config)#hostname Sphinx
Sphinx(config)#The router instantly responds by updating the prompt to reflect the new router name. The name can be up to 254 characters long, but don’t use a name so long that you can’t type it comfortably.
It’s a good practice to follow a naming convention for your routers. With a logical, consistent naming scheme, it’s easy to remember a router’s name, or guess the name if you’ve forgotten it. For example, let’s say that your router names all start with “rtr”, followed by the city initials, followed by a number. Then, late one night when you’re staring at a blank terminal screen trying to remember the name of the backbone router in New York, you can type rtr-ny-01 and be reasonably confident that you’ve guessed correctly.
Warning
Don’t use underscores ( _ ) in router names. They are hard to type, often lead to confusion, and aren’t legal in Domain Name System (DNS) names. Use a hyphen (-) instead. Similarly, avoid mixing upper- and lowercase. Instead of “routerOneNewYork”, use “router-one-newyork”. The router won’t care, but your users will!
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access