Cisco IOS commands

List all port status

sh int status

Display arp table and grep for string "d3f5"

sh mac address-table | inc d3f5

Commands that require enable access

List specific configuration for port Gi0/28

do sh run int Gi0/28

Enter configuration mode

conf t

Select interface Gi0/28 in configuration mode

int Gi0/28

Change port configuration

switch01(config-if)#description server1-eth3
switch01(config-if)#switchport access vlan 200
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 10,20
switchport mode trunk

Default interface configuration

default interface Gi0/28

Edit extended access-list 101

ip access-list extended 101
15 permit ip any

Create new vlan 68

vlan 68
name thisisthenameofthevlan

Show stack ports

show switch stack-ports summary

Disable stack port

switch 1 stack port 1 disable

Save configuration

write memory

Set a SPAN port

CiscoSwitch(config)# monitor session 1 source interface gi0/1 both
CiscoSwitch(config)# monitor session 1 destination interface gi0/2

Show running config with passwords (using for VPN pre-shared keys)

more system:running-config
more system:running-config | i pre-shared
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License