IOS Switch Commands Flashcards
User mode.
Switch>
Enter Privilege mode.
Switch>enable
Privileged mode.
Switch#
Enter Configuration mode.
Switch#configure terminal
Global Configuration mode.
Switch(config)#
Enter Interface mode.
Switch(config)#interface fa0/1
Interface mode.
Switch(config-if)#
Return to Global Configuration mode.
Switch(config-if)#exit
Return to User mode.
Switch#disable
Logout.
Switch>exit
Recall previous command.
Up arrow or Ctrl p
Recall next command.
Down arrow or Ctrl n
Beginning of command.
Ctrl a
End of command.
Ctrl e
Delete input.
Ctrl d
Exit Configuration mode.
Switch(config)#exit or Ctrl z
Complete command.
Tab
Configure device system name.
Switch(config)#hostname yourhostname
Sets the encrypted enable password.
Switch(config)#enable secret cisco
Sets the un-encrypted enable password.
Switch(config)#enable password cisco
Enable password encryption on all clear text password within the configuration file.
Switch(config)#service password-encryption
Configure a Message Of The Banner, with an ending character of $.
Switch(config)#banner modt $
Assign IP address to VLAN 1.
Switch(config)#interface vlan 1
Switch(config-if)#ip address 192.168.0.1 255.255.255.0
Assign Default Gateway.
Switch(config)#ip default-gateway 192.168.0.250
Select one interface.
Switch(config)#interface fastEthernet 0/1
Select a range of interfaces.
Switch(config)#interface fastEthernet 0/1 - 24
Set the interface description.
Switch(config-if)#description yourdescription
Add VLAN 10 to switch and name it TEST.
Switch(config)#vlan 10
Switch(config-vlan)#name test
Configure interface FastEthernet 0/1 @ speed 100 Mbps and full duplex.
Switch(config)#interface FastEthernet 0/1
Switch(config-if)#speed 100
Switch(config-if)#duplex full
Assign interface to VLAN.
Switch(config)#switchport access vlan 10
Enable port security.
Switch(config-if)#switchport mode access
Switch(config-if)#switchport port-security
Switch(config-if)#switchport port-security mac-address sticky
Disable interface.
Switch(config-if)#shutdown
Enable interface.
Switch(config-if)#no shutdown
Configures 5 Telnet sessions each with a password of ‘cisco’.
Switch(config)#line vty 0 4
Switch(config-line)#login
Switch(config-line)#password cisco
Enable and define console password of ‘cisco’.
Switch(config)#line con 0
Switch(config-line)#login
Switch(config-line)#password cisco
Synchronize console messages (keep what you have typing on the screen).
Switch(config-line)#logging synchronous
Set the timezone and automatically adjust.
Switch(config)#clock timezone gmt 0
Switch(config)#clock summer-time gmt recurring
Sets the switch priority for the VLAN.
This combined with the switch mac address creates the switch Bridge ID (BID).
Switch(config)#spanning-tree vlan 1 priority 4096
Enables portfast on interface FastEthernet 0/1
Switch(config)#interface FastEthernet 0/1
Switch(config-if)#spanning-tree portfast
Enables Rapid Spanning Tree Protocol (RSTP).
Other options are, Per-VLAN Spanning Tree (PVST) and Multiple Spanning Tree (MST).
Switch(config)#spanning-tree mode rapid-pvst
Unconditionally forces an interface into trunking.
Other options are access and dynamic.
Switch(config-if)#switchport mode trunk
Manually assign a switch to a VLAN Trunking Protocol (VTP) domain.
A switch will automatically become part of a VTP domain if it’s currently in the ‘null’ domain and receives a VTP frame
Switch(config)#vtp domain test
Changes the VTP mode from the default ‘server’ mode to ‘client’ mode.
In client mode no changes can be made.
Switch(config)#vtp mode client
Displays information about the current VTP configuration.
Switch#show vtp status
Displays the device platform, IOS version, and package.
Switch#show version
Displays the current running configuration.
Switch#show running-config
Displays the startup configuration in NVRAM
Switch#show startup-config
Concisely displays the state, speed, and duplex of all ports.
Switch#show interfaces status
Displays which ports Port Security is enabled on.
Switch#show port-security
Displays summary of the VLAN database.
Switch#show vlan brief
Displays the IP routing table.
Switch#show ip route
Displays current DHCP bindings.
Switch#show ip dhcp binding
Displays the contents of access list 100.
Switch#show access-lists 100
Displays information about all active VLAN trunks.
Switch#show interfaces trunk
Displays which VLANs VTP has pruned.
Switch#show interfaces pruning
Displays information about the current (R)STP configuration.
Switch#show spanning-tree
Displays information about active routing protocols on the router.
Switch#show ip protocols
Displays adjacent Enhanced Interior Gateway Routing Protocol (EIGRP) neighbors.
Switch#show ip eigrp neighbors
Displays adjacent Open Shortest Path First (OSPF) neighbor.
Switch#show ip ospf neighbor
Displays hostname and interface information about directly connected Cisco devices.
Switch#show cdp neighbors
Displays the MAC address table
Switch#show mac address-table
Displays logging settings and the contents of the logging buffer.
Switch#show logging
Displays device up-time.
Switch#show version
Reboots the network device
Switch#reload
Removes the specified command from the running configuration.
Switch(config)#no
Manually starts the setup dialog which is automatically invoked when the device starts with no config
Switch#setup
Saves the configuration.
Without this command all changes/configuration will be lost ar device rebbot.
Switch#copy running-config startup-config
Saves the running config to a TFTP server.
Switch#copy running-config tftp
Copies IOS files to a TFTP server.
Switch#copy flash tftp
Copies files from a TFTP server the device flash.
Switch#copy tftp flash
Erase the config held in NVRAM.
If this is followed with the reload command all configuration is lost.
Switch#erase startup-config
Show the current sessions.
The one with a * is your active session
Switch#show sessions
Forcible closes a telnet session.
Switch#disconnect sessionname
Set the device local clock to a specific time.
Note this is not done in config mode.
Switch#clock set 10:00:00 January 1 2019
Displays the file contents of the flash.
Switch#show flash
Displays the clock.
Switch#show clock
Displays the users currently logged on.
Switch#show users
By default displays the last 10 commands .
Switch#show history
Displays the ARP cache.
Switch#show arp
Displays the spanning tree status on VLAN 1.
Switch#show spanning-tree vlan 1
Lists all the configured VLANs.
Switch#show vlan
Displays extended details about directly connected Cisco devices.
Switch#show cdp neighbors details
Display CDP packets as they arrive.
Switch#debug cdp packets
Display ping packets as they arrive.
Switch#debug icmp packets
Erase the VLAN database.
Switch#delete flash:vlan.dat