Control Break Cisco

Cisco switches can be used as plug-and-play devices out of the box but they also offer an enormous amount of features. Although the main purpose of the switch is to provide inter-connectivity in Layer 2 for the connected devices of the network, there are myriad features and functionalities that can be configured on Cisco Switches.

In the following Cisco Switch Commands Cheat Sheet, I have tried to include the most important and frequently-used CLI commands that Cisco professionals encounter in real world networks. I know that the list is not exhaustive but I believe that the most useful commands are included. Make sure to download the whole commands cheat sheet in PDF format below so you can print it or save it on your computer for future reference.

NOTE: Other Cisco Command Cheat Sheet Posts:

The following commands will work on most Cisco switch models such as 4500, 3850, 3650, 2960, 3560 etc.

Verification Commands:

In order to simulate this step on a Cisco 6×00 with NI-2, pull out and then plug in the NI-2 card. Press Break on the terminal keyboard within 60 seconds of power up in order to put the router into ROMMON.If the break sequence does not work, refer to Standard Break Key Sequence Combinations During Password Recovery for other key combinations. I am looking for the break key on the surface pro. I use remote desktop with the full screen enabled on my surface pro and without the notification bar on top. I know one way to get out of remote desktop is to press CTRL + ALT + BREAK but I cannot find the break key (or shortcut) on the surface keyboard. As a standard Cisco device behaviour, tracing to a destination will take 30 hops or else it reaches the destination before that. We can break the sequence of Traceroute by holding following keys together – In case the above sequence doesn’t work, we can follow below sequence –. The web client will automatically reconnect after a break in communications to the Cisco UCS Manager. The Cisco UCS Manager has a web session refresh period and a web session timeout period. The web session refresh period kicks off when the client becomes inactive for 600 seconds, which is the default setting. Cisco IOS CLI Regex: sh ip bgp in (2nd May 2012) IOS CLI Tip: More accurate pipe commands (1st May 2012) Cisco Nexus NXOS and Fixing broken “switchto” syntax with alias (18th December 2011) show ip eigrp topology all (22nd May 2011) Cisco IOS CLI Shortcuts (6th February 2011) The poor man's IOS Traffic Generator (19th September 2009).

TestSwitch#show version

[Displays software and hardware information]

TestSwitch#show running-config

[Displays currently running configuration in DRAM]

TestSwitch#show start

[Displays configuration in NVRAM which will be loaded after reboot]

TestSwitch#show flash:

[Displays Flash memory information]

TestSwitch#show boot

[Displays boot path and image]

TestSwitch#show clock

[Displays the system clock]

TestSwitch#show interfaces

[Displays all interfaces configuration and status of line]

TestSwitch#show vlan

Control Break Key Cisco

[Displays vlan number, name, status and ports associated with it]

TestSwitch#show vtp status

[Displays VTP mode, Number of existing vlans and config revision]

TestSwitch#show interface status

[Displays interface status, vlan, Duplex, Speed and type]

TestSwitch#show etherchannel

[Displays etherchannel information]

TestSwitch#show cdp neighbors

[Displays information of connected devices]

TestSwitch#show cdp neighbors detail

[Displays detailed information of connected devices]

TestSwitch#show mac address-table

[Displays current MAC address forwarding table and which MAC is learned on each switch port]

TestSwitch#show spanning-tree

[Displays spanning-tree state information, which interfaces are in active or blocking state etc]

Resetting the Switch

TestSwitch#delete flash:vlan.dat

[Deletes vlan database from flash memory so you can start adding new VLANs from scratch]

TestSwitch#erase startup-config

[Delete start-up file from NVRAM]

TestSwitch#reload

[Reboot the Switch]

Setting Host Names

TestSwitch#config t

[Entering into Global Configuration Mode]

TestSwitch(config)#hostname MySwitch

[Enter the hostname of the switch]

MySwitch(config)#

Setting login credentials:

MySwitch(config)#username admin password csico1234

[create username and password for logging in to the switch]

MySwitch(config)#enable secret test1

[Sets encrypted secret password using MD5 algorithm. This is the enable password that you will be asked to enter when trying to enter into “enable” mode]

MySwitch(config)#service password-encryption

[Encrypt all the passwords using MD5]

Console Access:

MySwitch(config)#line con 0

[Enter into line console mode]

MySwitch(config-line)#password test3

[Set password on console]

MySwitch(config-line)#login

[Enable password checking on console]

SSH/Telnet Access to the switch:

MySwitch(config)#line vty 0 4

[Enters line vty mode for all five virtual ports]

MySwitch(config-line)#transport input ssh

[Enable SSH]

MySwitch(config-line)#transport input telnet

Cisco Control Break

[Enable telnet]

MySwitch(configiline)#password test3

[Set password]

Setting IP Address (To allow remote access to the switch):

MySwitch(config)#interface vlan1

[Enters vlan1, the native vlan]

MySwitch(config-if)#ip address 192.168.1.2 255.255.255.0

[Set IP address for management]

MySwitch(config-if)#exit

MySwitch(config)#ip default-gateway 192.168.1.1

[Exit path for the switch – gateway IP]

Interface description

MySwitch(config)#interface g0/1

MySwitch(config-if)#description TO SERVER

Duplex and Speed Settings

MySwitch(config)#interface g0/1

MySwitch(config-if)#speed 10

[Force 10Mbps Speed]

MySwitch(config-if)#speed 100

[Force 100Mbps Speed]

MySwitch(config-if)#speed auto

[Enable auto speed configuration]

MySwitch(config-if)#duplex auto

[Enable auto duplex configuration on switch port]

MySwitch(config-if)#duplex full

[Enable full duplex configuration on switch port]

MySwitch(config-if)#duplex half

[Enable half duplex configuration on switch port]

Setting Web-based interface for configuration (GUI):

MySwitch(config)#ip http server

[Enable HTTP server]

MySwitch(config)#ip http port 80

[Set port number for HTTP]

Port-Security

MySwitch(config)#interface g0/1

[Enter the interface to set port-security]

MySwitch(config-if)#switchport port-security

[Enable port security on the interface]

MySwitch(config-if)#switchport port-security mac-address sticky

[Interface converts all MAC addresses to sticky secure addresses]

MySwitch(config-if)#switchport port-security maximum 1

[Only one MAC address will be allowed for this port]

Control Break Cisco Webex

Control Break Cisco

MySwitch(config-if)#switchport port-security violation shutdown

[Port will shut down if violation occurs]

MySwitch(config-if)#exit

MySwitch(config)#exit

MySwitch#show port-security

[Verifying Port security]

Save current configuration

MySwitch(config)#copy running-config startup-config

PortFast

“Portfast” bypasses the Spanning Tree states and brings the port up as quickly as possible. Use it only if you connect a regular host (e.g Computer) on the port. Do not use this command when the port is trunk or if you connect other switches on the specific port.

MySwitch(config)#interface FastEthernet 0/1

MySwitch(config-if)#spanning-tree portfast

Configuring VLANs

MySwitch(config)#vlan 20

[Create a Layer2 VLAN with id 20]

MySwitch(config-vlan)# name testvlan

[Enter a name for the vlan]

MySwitch(config-vlan)#exit

MySwitch(config)#exit

MySwitch#show vlan brief

[Verify the vlan database]

Assigning access ports to a vlan

MySwitch(config)#interface g0/1

MySwitch(config-if)#switchport mode access

[Set the interface in switch access mode]

MySwitch(config-if)#switchport access vlan 20

[Assign the port to vlan 20]

MySwitch(config-if)#exit

The following commands will select a range of interfaces (from 1 to 24) and add all of them to vlan20

MySwitch(config)#interface range gigabitEthernet 0/1-24

MySwitch(config-if)#switchport mode access

MySwitch(config-if)#switchport access vlan 20

MySwitch(config-if)#exit

Configuring trunk port

MySwitch(config)#interface g0/2

MySwitch(config-if)#switchport trunk encapsulation dot1q

[Configure the port to support 802.1Q Encapsulation (default is negotiate)]

MySwitch(config-if)#switchport mode trunk

[Set the interface in permanent trunking mode]

MySwitch(config-if)#switchport trunk native vlan 20

[Specify native vlan for 802.1q trunks – OPTIONAL]

MySwitch(config-if)#switchport trunk allowed vlan 2-5

[vlans 2 to 5 are allowed to pass through the trunk]

MySwitch(config-if)#switchport trunk allowed vlan add 7

[add also vlan 7 in the allowed vlans]

MySwitch(config-if)#switchport trunk allowed vlan remove 3

[remove vlan 3 from the allowed vlans in the trunk]

MySwitch#show interface g0/2 trunk

[Verify the trunk ports and associated vlans on the specific interface]

DOWNLOAD THE CHEAT SHEET AS PDF FILE

Related Posts

To reset your router configurations back to the original factory settings, follow the steps below. This will delete any configuration you have on your router.

Control Break No Break Key

The steps below assume you have connected your router to a console and have accessed your router’s command line interface.

Cisco Ios Control Break

  1. Turn off your router.
  2. Turn on your router and within the first 20 seconds of startup send a break character to the terminal.
    • Windows – If you are using PuTTY, on your keyboard press Ctrl + Break at the same time; or you right click on the bar at the top of the PuTTY window and select Special Command > Break.
    • Mac – If you are using terminal, on your keyboard press Control + A, then Control + B.
    • You may also refer to the Cisco page on Standard Break Key Sequence Combinations During Password Recovery.
  3. You will immediately be taken to the prompt.
  4. At the prompt, type the following command to tell the router to skip the existing configuration on startup: confreg 0x2142.
  5. At the prompt, type the following command to restart the router: reset.
  6. The router will restart.
  7. If you are prompted for initial configuration dialogue, type no.
  8. After the loading has stopped, press Return to be taken to the main prompt.
  9. At the prompt:
    • Type en to enter privileged mode
    • Type write erase to issue the erase comment
    • Type y to confirm erase command
    • Type configure t
    • Type config-register 0x2102 this tells the router to process existing config on startup
    • Type end
  10. Turn off your router and then turn it back on. Your router has now been restored to the original factory settings.