CISCO / BushNET CLI Command Reference¶
Complete CLI command reference for CISCO / BushNET running Cisco IOS XE.
Table of Contents¶
- Command Modes
- System Commands
- Interface Commands
- VLAN Commands
- Spanning Tree Commands
- Routing Commands
- Security Commands
- Monitoring Commands
- Configuration Management
Command Modes¶
User EXEC Mode¶
Limited monitoring commands. Enter enable to access Privileged EXEC mode.
Privileged EXEC Mode¶
Full monitoring and configuration access. Enter configure terminal for configuration mode.
Global Configuration Mode¶
System-wide configuration commands.
Interface Configuration Mode¶
Interface-specific configuration.
VLAN Configuration Mode¶
VLAN-specific configuration.
Line Configuration Mode¶
Console and VTY line configuration.
System Commands¶
Show Commands¶
show version¶
Display system hardware and software status.
Output includes:
- IOS XE version
- Uptime
- Hardware model
- Memory and flash size
- MAC address
- License information
show running-config¶
Display current running configuration.
Switch# show running-config
Switch# show running-config | include <pattern>
Switch# show running-config | section <section>
Switch# show running-config interface <interface>
show startup-config¶
Display saved startup configuration.
show inventory¶
Display hardware inventory (modules, SFPs).
show environment¶
Display environmental status (temperature, power).
show processes cpu¶
Display CPU utilization.
show memory¶
Display memory utilization.
show logging¶
Display system log messages.
show clock¶
Display system time.
show users¶
Display connected users.
Configuration Commands¶
hostname¶
Set system hostname.
enable secret¶
Set encrypted enable password.
banner¶
Configure login banners.
Switch(config)# banner motd # Authorized access only #
Switch(config)# banner login # Login Banner #
clock set¶
Set system time.
ntp server¶
Configure NTP server.
logging¶
Configure logging.
Switch(config)# logging buffered 16384
Switch(config)# logging host <ip-address>
Switch(config)# logging trap informational
Interface Commands¶
Show Commands¶
show interfaces¶
Display interface statistics.
Switch# show interfaces
Switch# show interfaces GigabitEthernet1/1
Switch# show interfaces status
Switch# show interfaces description
Switch# show interfaces trunk
Switch# show interfaces counters
show ip interface brief¶
Display IP interface summary.
show interfaces switchport¶
Display switchport configuration.
Configuration Commands¶
interface¶
Enter interface configuration mode.
Switch(config)# interface GigabitEthernet1/1
Switch(config)# interface range GigabitEthernet1/1-8
Switch(config)# interface Vlan10
description¶
Set interface description.
shutdown / no shutdown¶
Disable/enable interface.
speed¶
Set interface speed.
duplex¶
Set interface duplex mode.
switchport mode¶
Set switchport mode.
Switch(config-if)# switchport mode access
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport mode dynamic auto
Switch(config-if)# switchport mode dynamic desirable
switchport access vlan¶
Assign access VLAN.
switchport trunk¶
Configure trunk settings.
Switch(config-if)# switchport trunk encapsulation dot1q
Switch(config-if)# switchport trunk native vlan 99
Switch(config-if)# switchport trunk allowed vlan 10,20,30
Switch(config-if)# switchport trunk allowed vlan add 40
Switch(config-if)# switchport trunk allowed vlan remove 30
switchport voice vlan¶
Configure voice VLAN.
ip address¶
Configure IP address (SVI or routed port).
no switchport¶
Convert to routed port.
VLAN Commands¶
Show Commands¶
show vlan¶
Display VLAN information.
Configuration Commands¶
vlan¶
Create and configure VLANs.
vlan (range)¶
Create multiple VLANs.
no vlan¶
Delete VLAN.
Spanning Tree Commands¶
Show Commands¶
show spanning-tree¶
Display spanning tree information.
Switch# show spanning-tree
Switch# show spanning-tree vlan 10
Switch# show spanning-tree summary
Switch# show spanning-tree interface GigabitEthernet1/1
Switch# show spanning-tree root
Switch# show spanning-tree bridge
Configuration Commands¶
spanning-tree mode¶
Set spanning tree mode.
Switch(config)# spanning-tree mode rapid-pvst
Switch(config)# spanning-tree mode mst
Switch(config)# spanning-tree mode pvst
spanning-tree vlan priority¶
Set bridge priority.
Switch(config)# spanning-tree vlan 10 priority 4096
Switch(config)# spanning-tree vlan 10 root primary
Switch(config)# spanning-tree vlan 10 root secondary
spanning-tree portfast¶
Enable PortFast on access ports.
spanning-tree bpduguard¶
Enable BPDU Guard.
Switch(config-if)# spanning-tree bpduguard enable
Switch(config)# spanning-tree portfast bpduguard default
Routing Commands¶
Show Commands¶
show ip route¶
Display routing table.
Switch# show ip route
Switch# show ip route static
Switch# show ip route connected
Switch# show ip route ospf
Switch# show ip route <ip-address>
show ip protocols¶
Display routing protocol information.
show ip ospf¶
Display OSPF information.
Switch# show ip ospf
Switch# show ip ospf neighbor
Switch# show ip ospf interface
Switch# show ip ospf database
Configuration Commands¶
ip routing¶
Enable IP routing.
ip route¶
Configure static route.
Switch(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.254
Switch(config)# ip route 10.0.0.0 255.0.0.0 192.168.1.2
ip default-gateway¶
Set default gateway (for non-routing mode).
router ospf¶
Configure OSPF.
Switch(config)# router ospf 1
Switch(config-router)# router-id 1.1.1.1
Switch(config-router)# network 192.168.1.0 0.0.0.255 area 0
Switch(config-router)# passive-interface default
Switch(config-router)# no passive-interface GigabitEthernet1/1
Security Commands¶
Show Commands¶
show mac address-table¶
Display MAC address table.
Switch# show mac address-table
Switch# show mac address-table vlan 10
Switch# show mac address-table interface GigabitEthernet1/1
Switch# show mac address-table address <mac-address>
Switch# show mac address-table count
show port-security¶
Display port security status.
Switch# show port-security
Switch# show port-security interface GigabitEthernet1/1
Switch# show port-security address
show access-lists¶
Display access control lists.
show aaa¶
Display AAA configuration.
Configuration Commands¶
username¶
Create local user account.
Switch(config)# username admin privilege 15 secret <password>
Switch(config)# username operator privilege 7 secret <password>
line console¶
Configure console line.
Switch(config)# line console 0
Switch(config-line)# password <password>
Switch(config-line)# login
Switch(config-line)# exec-timeout 10 0
Switch(config-line)# logging synchronous
line vty¶
Configure VTY lines (SSH/Telnet).
Switch(config)# line vty 0 15
Switch(config-line)# transport input ssh
Switch(config-line)# login local
Switch(config-line)# exec-timeout 15 0
ip ssh¶
Configure SSH.
Switch(config)# ip domain-name example.com
Switch(config)# crypto key generate rsa modulus 2048
Switch(config)# ip ssh version 2
Switch(config)# ip ssh time-out 60
Switch(config)# ip ssh authentication-retries 3
switchport port-security¶
Configure port security.
Switch(config-if)# switchport port-security
Switch(config-if)# switchport port-security maximum 2
Switch(config-if)# switchport port-security violation restrict
Switch(config-if)# switchport port-security mac-address sticky
access-list¶
Configure access control lists.
! Standard ACL
Switch(config)# access-list 10 permit 192.168.1.0 0.0.0.255
Switch(config)# access-list 10 deny any
! Extended ACL
Switch(config)# ip access-list extended BLOCK_TELNET
Switch(config-ext-nacl)# deny tcp any any eq 23
Switch(config-ext-nacl)# permit ip any any
ip access-group¶
Apply ACL to interface.
aaa¶
Configure AAA authentication.
Switch(config)# aaa new-model
Switch(config)# aaa authentication login default local
Switch(config)# aaa authorization exec default local
Monitoring Commands¶
show cdp¶
Display CDP information.
Switch# show cdp
Switch# show cdp neighbors
Switch# show cdp neighbors detail
Switch# show cdp entry *
Switch# show cdp interface
show lldp¶
Display LLDP information.
show power inline¶
Display PoE status (if equipped).
debug¶
Enable debugging (use with caution).
show tech-support¶
Generate technical support output.
Configuration Management¶
copy¶
Copy configuration files.
Switch# copy running-config startup-config
Switch# copy startup-config tftp://10.0.0.100/backup.cfg
Switch# copy tftp://10.0.0.100/config.cfg running-config
Switch# copy flash:config.bak running-config
write memory¶
Save running configuration.
erase startup-config¶
Erase startup configuration.
reload¶
Reload the switch.
terminal length¶
Set terminal page length.
show flash¶
Display flash contents.
archive¶
Configuration archive and rollback.
Switch(config)# archive
Switch(config-archive)# path flash:archive
Switch(config-archive)# maximum 10
Switch(config-archive)# write-memory
Switch# configure replace flash:archive-1 force
CISCO / BushNET Specific Commands¶
Industrial Protocol Commands¶
show cip¶
Display CIP (Common Industrial Protocol) status.
show modbus¶
Display Modbus TCP status.
Alarm Relay Commands¶
alarm facility¶
Configure alarm relay.
Switch(config)# alarm facility power-supply relay major
Switch(config)# alarm facility temperature relay minor
REP (Resilient Ethernet Protocol)¶
Switch(config-if)# rep segment 1 edge primary
Switch(config-if)# rep segment 1 edge
Switch# show rep topology
PRP/HSR (Parallel Redundancy Protocol)¶
Switch(config)# prp-channel 1
Switch(config-prp-channel)# interface GigabitEthernet1/1-2
Switch# show prp channel
Command Shortcuts¶
| Full Command | Shortcut |
|---|---|
configure terminal |
conf t |
show running-config |
sh run |
show interfaces |
sh int |
show ip interface brief |
sh ip int br |
show vlan brief |
sh vlan br |
write memory |
wr |
copy running-config startup-config |
copy run start |
no shutdown |
no sh |