Table of Contents

CLI

passwords

conf term
enable secret 0 <pass>
! for telnet:
line vty 0 4
login
password <pass>
end
wr
copy run start

STARTUP_CONFIG_IGNORED

%SYS-6-STARTUP_CONFIG_IGNORED: System startup configuration is ignored based on the configuration register setting.
sh version
...
Configuration register is 0x141

https://www.cisco.com/c/en/us/support/docs/routers/10000-series-routers/50421-config-register-use.html

enable
dir
conf term
boot system flash bootflash:cat4500-ipbasek9-mz.122-54.SG1.bin
exit
wr
copy run star

config-register 0x102

reload

Console baud rate

It is possible to switch console baud rate after boot. It will be applied after system will bootup and executes startup-config.

configure terminal
line con 0
speed 9600
! note: now you need to reconfigure your terminal client to different baud rate
end
wr
copy run star

LLDP

enable
config terminal
lldp run
exit
copy run start

show lldp neighbors

PoE

Enable SNMP

enable
configure terminal
snmp-server community public ro
snmp-server contact <itadmin@grinn-global.com>
snmp-server location GRINN - Serwerownia
exit
copy run start

VLAN

enable
show vlan
configure terminal

! delete vlan 7
no vlan 7

! add tagged vlan 28
vlan 28
name admin
end

show vlan

configure terminal
interface range Gi0/1-28
switchport trunk encapsulation dot1q
switchport trunk native vlan 1
switchport trunk allowed vlan add 28,255
no shut
end
configure terminal
interface range Gi0/1-28
! to remove all ports from VLAN:
no switchport access vlan
end

VLAN IP address

enable
configure terminal
interface vlan 1
no ip address DHCP
no ip address
end

int vlan 28
ip address 192.168.28.31 255.255.252.0
no shutdown
exit

ip default-gateway 192.168.28.1
ip name-server 192.168.28.1
ntp server 192.168.28.1
end

show ip redirects
show spanning-tree vlan 28
sh int vlan 28

copy running-config startup-config
wr
copy running-config startup-config

put one port in VLAN

conf term
interface Gi1/48
switchport access vlan 28
end
wr

reload

reload

RSTP

show spanning-tree summary
enable
config
spanning-tree mode ?
spanning-tree mode rapid-pvst

spanning-tree vlan 1 priority 57344
spanning-tree vlan 2 priority 57344
spanning-tree vlan 28 priority 57344
spanning-tree vlan 255 priority 57344
exit

show spanning-tree bridge

wr
copy run star

Disable STP:

enable
config terminal
Switch(config)#no spanning-tree vlan 1
wr
copy run star

Find MAC on ports

sh mac address-table vlan 1
show interface Gi0/40
show controllers

show port counters

show interface counters
 
enable
clear counters

diagnose port

show interface Gi0/17

Using Time Domain Reflectometer

enable
test cable-diagnostics tdr int Gi0/17
show cable-diagnostics tdr int Gi0/17