CLI Command Reference
Complete reference for all available terminal commands.
General Commands
help
Display available commands.
clear
Clear the terminal screen.
exit
Exit current configuration mode or close terminal.
Show Commands
show ip
Display IP address configuration.
show interfaces
Display interface details.
show running-config
Display current configuration.
show arp
Display ARP table.
show mac-address-table
Display MAC address table (switches only).
show ip route
Display routing table (routers only).
Configuration Commands
hostname
Set device hostname.
interface
Enter interface configuration mode.
ip address
Configure IP address on interface.
no shutdown
Enable an interface.
shutdown
Disable an interface.
Routing Commands
ip route
Add static route (routers only).
ip default-gateway
Set default gateway (end devices).
Diagnostic Commands
ping
Test connectivity to an IP address.
traceroute
Trace route to destination.
arp
Manage ARP cache.
clear arp
Clear the ARP cache on the current device.
clear mac-address-table
Clear the MAC address table (switches only).
VLAN Commands
vlan
Create a VLAN (switches only).
no vlan
Delete a VLAN.
show vlan
Display VLAN information.
switchport mode
Set interface switchport mode.
switchport access vlan
Assign access port to a VLAN.
switchport trunk native vlan
Set the native VLAN for a trunk port.
switchport trunk allowed vlan
Set allowed VLANs on a trunk port.
show interfaces trunk
Display trunk port information.
SVI Commands (Layer 3 Switches)
interface vlan
Create and configure an SVI.
no interface vlan
Remove an SVI.
show ip interface brief
Show all interfaces including SVIs.
Spanning Tree Protocol (STP) Commands
spanning-tree enable
Enable STP on a switch.
spanning-tree disable
Disable STP on a switch (all ports become forwarding).
spanning-tree priority
Set the bridge priority (0-61440, must be multiple of 4096). Lower priority = more likely to be root.
spanning-tree cost
Set the path cost on a port (in interface configuration mode).
spanning-tree port-priority
Set the port priority (0-255). Lower priority = more likely to be root port.
spanning-tree reconverge
Force STP to recalculate the topology.
show spanning-tree
Display STP status including root bridge, bridge ID, timers, and whether this switch is root.
show stp interface
Display per-port STP states, roles, costs, and priorities.
show stp detail
Display detailed STP information for each port.
TCP Connection Commands
netstat
Display network connections and statistics. Shows TCP connection states.
netstat # Show active connections
netstat -a # Show all connections (including LISTEN)
netstat -l # Show only listening ports
netstat -r # Show routing table
netstat -i # Show interface statistics
Example 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
tcp 0 0 192.168.1.10:49153 192.168.1.200:443 TIME_WAIT
TCP States: | State | Description | |-------|-------------| | LISTEN | Waiting for incoming connections | | SYN_SENT | Connection request sent | | SYN_RECV | Connection request received | | ESTABLISHED | Active connection | | FIN_WAIT_1 | Close initiated | | FIN_WAIT_2 | Close acknowledged | | TIME_WAIT | Waiting for timeout | | CLOSE_WAIT | Remote side closed | | LAST_ACK | Waiting for final ACK | | CLOSED | Connection closed |
telnet
Open a TCP connection to a remote host.
Arguments:
- host - Target IP address
- port - Target port (default: 23)
Examples:
Output:
listen (GUI)
Start listening on a TCP port. Available through the Properties Panel:
- Select a device (PC, Server, Router)
- Expand "TCP Connections" section
- Click "Listen on Port"
- Enter port number (1-65535)
- Click "Start Listening"