Terminal Commands
Use the built-in terminal to configure devices with CLI commands.
Accessing the Terminal
- Click on a device to select it
- The terminal panel opens at the bottom
- Type commands and press Enter
Command Modes
User Mode
Basic commands for viewing information:
Privileged Mode
Enter with enable:
Configuration Mode
Enter with configure terminal:
Interface Configuration
Common Commands
| Command | Description |
|---|---|
help |
Show available commands |
show ip |
Display IP configuration |
show interfaces |
List all interfaces |
show arp |
Display ARP table |
show mac-address-table |
Display MAC table (switches) |
show vlan |
Display VLAN configuration (switches) |
show spanning-tree |
Display STP status (switches) |
ping <ip> |
Test connectivity |
traceroute <ip> |
Trace packet path |
clear |
Clear terminal screen |
clear arp |
Clear ARP cache |
clear mac-address-table |
Clear MAC table (switches) |
VLAN Commands (Switches)
| Command | Description |
|---|---|
vlan <id> |
Create VLAN or enter VLAN config mode |
no vlan <id> |
Delete VLAN |
show vlan |
Display VLAN information |
switchport mode access |
Set port to access mode |
switchport mode trunk |
Set port to trunk mode |
switchport access vlan <id> |
Assign port to VLAN |
switchport trunk allowed vlan <ids> |
Set trunk allowed VLANs |
interface vlan <id> |
Configure SVI for inter-VLAN routing |
Spanning Tree Commands (Switches)
| Command | Description |
|---|---|
spanning-tree enable |
Enable STP |
spanning-tree disable |
Disable STP |
spanning-tree priority <value> |
Set bridge priority (0-61440) |
show spanning-tree |
Display STP status |
show stp interface |
Display per-port STP states |
spanning-tree cost <value> |
Set port cost (in interface mode) |
TCP Connection Commands
| Command | Description |
|---|---|
netstat |
Display all TCP connections |
netstat -l |
Display listening ports only |
netstat -a |
Display all connections (including listening) |
netstat -t |
Display TCP connections (same as default) |
telnet <ip> [port] |
Open TCP connection to remote host |
Example: Starting a TCP Listener
Example: Connecting via Telnet
Example: Viewing Connections
# Show all connections
netstat -a
# Output:
Active Internet connections
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:80 *:* LISTEN
tcp 0 0 192.168.1.10:49152 192.168.1.100:80 ESTABLISHED
Tips
- Use
?after a command for help - Tab completion is supported
- Use
exitto go back one mode level