Nine Switch Commands Every Cisco Network Engineer Needs to Know
1. hostname
Syntax: hostname hostname
One of the most basic network commands, hostname configures the hostname used for a device. This hostname identifies the device to other locally connected devices for protocols such as the Cisco Discovery Protocol (CDP), which helps in the identification of devices attached directly to the network. Although it is not case-sensitive, the hostname must follow certain rules: It must begin with a letter and end in a letter or digit, and interior characters must be letters, digits, or hyphens (-).
2. ip default-gateway
Syntax: ip default-gateway gateway
The ip default-gateway command configures the default gateway for a switch when IP routing is not enabled (with the ip routing global configuration command), which is typical when lower-level Layer 2 switches are being configured. The easiest way to determine whether IP routing has been enabled is to run the show ip route command. When IP routing has not been enabled, the output will look similar to the following example
When IP routing is enabled, the output looks similar to the output displayed on a router:
3. username
Syntax: username username {password | secret} password
The username command configures a username and associates a password with it. Using the password or secret version of this command is a matter of security:
-
The password version of this command will do one of two things with the configured password:
- Place the password into the configuration in plaintext (if the service password-encryption command is not enabled).
- Put the password through a Cisco-proprietary encryption algorithm before placing it into the configuration. (Note that this encryption is easily reversed.)
- The secret version of this command will create an MD5 hash with the configured password and then place it into the configuration. This reconfigured password is much harder to crack than the encrypted version created with the password version of this command.
This username/password can be used for a number of different features, including Telnet and SSH.
The password version of this command will do one of two things with the configured password:
- Place the password into the configuration in plaintext (if the service password-encryption command is not enabled).
- Put the password through a Cisco-proprietary encryption algorithm before placing it into the configuration. (Note that this encryption is easily reversed.)
Comments
Post a Comment