Notes from Catalyst 4500 Series Switch Cisco IOS Command Reference

Show IOS version
Switch# show version
Cisco IOS Software, Catalyst 4500 L3 Switch Software...
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2016 by Cisco Systems, Inc.
Compiled Mon 24-Oct-16 10:00 by prod_rel_team
Image text-base: 0x10000000, data-base: 0x12097BA8
ROM: 12.2(31r)SGA4
Show running configuration
Switch# show run
Building configuration...
Current configuration : 4227 bytes
!
version 15.0
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
service compress-config
!
hostname ConfigNotes-Cisco4948
!
boot-start-marker
boot system flash bootflash:cat4500-ipbasek9-mz.150-2.SG11.bin
boot-end-marker
...
--More--
Show the ports status
Switch# show ip interface brief
Interface IP-Address OK? Method Status Protocol
Vlan1 unassigned YES NVRAM down down
FastEthernet1 unassigned YES NVRAM down down
GigabitEthernet1/1 unassigned YES unset up up
GigabitEthernet1/2 unassigned YES unset up up
GigabitEthernet1/3 unassigned YES unset up up
...
GigabitEthernet1/47 unassigned YES unset down down
GigabitEthernet1/48 unassigned YES unset down down
TenGigabitEthernet1/49 unassigned YES unset down down
TenGigabitEthernet1/50 unassigned YES unset up up
Set the Switch name
Switch# configure terminal
Switch(config)# hostname ConfigNotes-Sw
ConfigNotes-Sw(config)# exit
Creating VLAN
Switch# configure terminal
Switch(config)# vlan 2
Switch(config-vlan)# end
Switch# show vlan id 2
Adding interfaces to a VLAN
Switch# configure terminal
Switch# interface GigabitEthernet 1/10
### or for range of ports ###
Switch# interface range GigabitEthernet 1/1-48
Switch(config-if)# switchport access vlan 2
Switch(config-if)# switchport mode access
Switch(config-if)# exit
Switch# sh vlan brief
To Trunk a Port
Switch# configure terminal
Switch(config)# interface range TenGigabitEthernet 1/49-50
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk native vlan 2
Switch(config-if)# exit
Note: If you see “Command rejected: An interface whose trunk encapsulation is “Auto” can not be configured to “trunk” mode.“, you have to:
Switch(config-if)# switchport trunk encapsulation dot1q
Configure Spanning Tree
## To see the Root Bridge information ##
Switch# sh spanning-tree
## Setting the root bridge by setting its priority ##
Switch(config)# spanning-tree vlan 1,10,20 priority 0
## For non-root bridge, set the priority other than 0 ##
## Enable rapid-pvst ##
Switch(config)# spanning-tree mode rapid-pvst
Configure VTP = VLAN Trunking Protocol
Switch#show vtp status
VTP Version capable : 1 to 3
VTP version running : 1
VTP Domain Name :
VTP Pruning Mode : Disabled
VTP Traps Generation : Disabled
---
## Set the VTP Domain ##
Switch(config)# vtp domain ConfigNotes
## Set the VTP version ##
Switch(config)# vtp version 2
## Set the Operating Mode ##
Switch(config)# vtp mode transparent
Save the Running Config
Switch# write memory
Building configuration...
Compressed configuration from 4893 bytes to 1501 bytes[OK]
or wr alias for write memory
To reboot the switch
Switch# reload
If the Switch is unable to BOOT because of this error:
“Could not find a valid file in BOOT environment variable“
***************************************************
* Welcome to Rom Monitor for WS-C4948-10GE System.
* Copyright (c) 2003-2009, by Cisco Systems, Inc.
* All rights reserved.
***************************************************
Rom Monitor Program Version 12.2(31r)SGA4
Supervisor: WS-C4948-10GE Chassis: WS-C4948
Hardware Revisions - Board: 8.5 CPLD Gill: 19
Type control-C to prevent autobooting.
...
******** The system will autoboot now ********
config-register = 0x2102
Autobooting using BOOT variable specified file.....
Could not find a valid file in BOOT environment variable.
BOOT variable can be set from IOS. To find currently set
Rom Monitor variables, please type 'set' command.
For help on choosing a boot method, type 'confreg' command.
rommon 1 >
List the available bootflash “dir bootflash:“, then type:
“boot bootflash: cat4500-xxxxx.bin“
rommon 2 >dir bootflash:
File size Checksum File name
--------------------------------------------------
8095624 bytes (0x1141e08) 0xcada774e cat4500-xxxxx.bin
16497092 bytes (0xfbb9c4) 0xba2fd178 cat4500-......bin
...
rommon 3>boot bootflash: cat4500-xxxxx.bin