Purpose
Command or Action
Device#
configure terminal
Configures a system name. When you set the system name,
it is also used as the system prompt.
hostname name
Example:
Step 3
The default setting is Switch.
Device(config)#
hostname
The name must follow the rules for ARPANET hostnames.
They must start with a letter, end with a letter or digit, and
remote-users
have as interior characters only letters, digits, and hyphens.
Names can be up to 63 characters.
Returns to priviliged EXEC mode.
end
Example:
Step 4
remote-users(config)#
end
remote-users#
Verifies your entries.
show running-config
Example:
Step 5
Device#
show running-config
(Optional) Saves your entries in the configuration file.
copy running-config startup-config
Example:
Step 6
Device#
copy running-config startup-config
Setting Up DNS
If you use the device IP address as its hostname, the IP address is used and no DNS query occurs. If you
configure a hostname that contains no periods (.), a period followed by the default domain name is appended
to the hostname before the DNS query is made to map the name to an IP address. The default domain name
is the value set by the
ip domain-name
global configuration command. If there is a period (.) in the hostname,
the Cisco IOS software looks up the IP address without appending any default domain name to the hostname.
Follow these steps to set up your switch to use the DNS:
SUMMARY STEPS
1.
enable
2.
configure terminal
3.
ip domain-name name
4.
ip name-server server-address1
[
server-address2 ... server-address6
]
5.
ip domain-lookup
[
nsap
|
source-interface interface
]
6.
end
7.
show running-config
System Management Configuration Guide, Cisco IOS XE Fuji 16.8.x (Catalyst 9500 Switches)
23
Administering the Device
Setting Up DNS