CCNAX 200-120

CCNAX 200-120

Basic Configuration and Operation of Cisco Catalyst Switch

The following table lists some of the most important basic Cisco Catalyst switch configuration commands.

CommandDescription
interface vlan 1 Global command. Moves the user to interface configuration mode for a VLAN interface.
ip address address subnet-mask Interface configuration mode command that sets the IP address for in-band switch management.
ip default-gatewayaddress Global command that sets the default gateway so that the management interface can be reached from a remote network.
interface fastethernet 0/x Puts the user into interface configuration mode for that interface.
duplex {auto | full | half} Interface configuration mode command that sets the duplex mode for the interface.
speed {10 | 100 | 1000 | auto| nonegotiate} Interface configuration mode command that sets the speed for the interface.
switchport port-security mac-addressmac-address Interface configuration mode command that statically adds a specific MAC address as an allowed MAC address on the interface.
switchport port-security mac-address sticky Interface subcommand that tells the switch to learn MAC addresses on the interface and add them to the configuration for the interface as secure MAC addresses.
switchport port-security maximumvalue Global command that sets the maximum number of static secure MAC addresses that can be assigned to a single interface.
switchport port-security violation {protect | restrict | shutdown} Global configuration command that tells the switch what to do if an inappropriate MAC address tries to access the network through a secure switch port.
hostname name Sets the switch's host name.
line con 0 Global command that places the user in console configuration mode.
line vty 0 15 Global command that places the user in vty configuration mode.
login Console or vty configuration mode command that tells the switch to ask for a password for a console user or Telnet user, respectively.
password password Console or vty configuration mode command that sets the password required.
enable secret password Global command that sets the switch's enable password. The password is stored in a hashed format, meaning that someone reading the configuration file will not see the correct text password.
enable password Global command that sets the switch's enable password. The enable secret password is used if both are configured.