Basic Switch Commands

Topics: IP address, MAC address, Ethernet Pages: 2 (419 words) Published: September 16, 2013
Basic Switch Commands
Command(s)| Result|
Switch#show mac-address-table| Used to display the MAC address table on the switch.| Switch>enable
Switch#config term
Switch(config)#hostname NY-SW1
NY-SW1(config)#| Used to change the hostname on the switch.| NY-SW1>enable
NY-SW1#config term
NY-SW1(config)#interface vlan1
NY-SW1(config-if)#ip address
NY-SW1(config-if)#no shutdown
NY-SW1(config)#ip default-gateway| Configures the switch for an IP address so that you can remotely connect to the switch and manage it. Also notice that the default gateway is set. If you do not set the default gateway, you will be unable to manage the switch from a different network.| Switch>enable

Switch#config term
Switch(config)#interface f0/5
Switch(config-if)#speed 100
Switch(config-if)#duplex full
Switch(config-if)#description Web Server
Switch(config-if)#no shutdown| These commands are used to manually configure a port for 100 Mbps, full duplex, and assigns a description to the port. The port is then enabled with the no shutdown command.| Switch(config-if)#shutdown| Disables the port.|

SW1#config term
SW1(config)#interface f0/6
SW1(config-if)#switchport mode access
SW1(config-if)#switchport port-security
SW1(config-if)#switchport port-security mac-address sticky
SW1(config-if)#switchport port-security maximum 1
SW1(config-if)#switchport port-security violation shutdown| This group of commands configures port security on port #6. Port security is a way to limit which systems can connect to a switch. This code example uses a "sticky" MAC address that tells the switch to configure the port for whatever MAC uses the port first. It then sets the maximum number of MACs for the port to 1 and shuts down the port if there is a violation.| show port-security address| Show the MAC addresses that have been configured for each port.| show port-security interface f0/6| Show...
Continue Reading

Please join StudyMode to read the full document

You May Also Find These Documents Helpful

  • Essay on Switch Statement and Command
  • Basic Linux Command Essay
  • Basic Commands in Ubuntu Terminal Essay
  • Essay about Basic
  • Unix Commands Essay
  • Configuring a Switch and Router Essay
  • How to Configure a Switch and Router Essay
  • Dos Commands Essay

Become a StudyMode Member

Sign Up - It's Free