Cisco IOS Dev¶
This guide covers essential CLI and GUI operations for Cisco switches and OpenWrt routers, including VLANs, port status, wireless setup, and more.
๐ก Cisco Switch CLI Commands¶
๐ Show Port Status¶
Displays summary of all switch ports including status, VLAN, duplex, speed, and type.๐ Detailed Interface Info¶
Replace[interface-id] with the port (e.g., GigabitEthernet1/0/1) for detailed stats.
๐งช Check Interface Errors¶
โ๏ธ Show Port Configuration¶
๐งญ Show VLAN Status¶
Lists all VLANs, their status, and assigned ports. Provides detailed VLAN info. Shows VLAN membership for a specific port. Displays trunk ports and allowed VLANs.๐งพ Show Switch Model¶
Includes model number, IOS version, uptime, and serial number. Lists hardware components and part numbers.๐ง VLAN IP Address¶
Shows IP addresses assigned to VLAN interfaces (SVIs).If you see:
It means: - No IP assigned - Interface is shut downTo fix:
configure terminal
interface vlan 1
ip address 192.168.1.2 255.255.255.0
no shutdown
end
write memory
๐ Reboot the Switch¶
Reboots the switch. Confirm when prompted.To schedule:
โ Shutdown the Switch¶
Cisco switches cannot be shut down via CLI. You must physically disconnect power.
๐งฑ Cisco WS-C2960S-48FPS-L Capabilities¶
- Layer 2 switch
- Limited Layer 3 (static routing only)
- โ No DHCP relay (IP helper-address)
- โ No site-to-site VPN support
Use a Layer 3 switch or router for full routing and VPN features.
๐ OpenWrt Wireless Setup¶
๐ ๏ธ CLI Configuration¶
Edit /etc/config/wireless:
config wifi-iface
option device 'radio0'
option network 'lan'
option mode 'ap'
option ssid 'MyOpenWrtWiFi'
option encryption 'psk2'
option key 'mypassword'
For client mode:
config wifi-iface
option device 'radio0'
option network 'wwan'
option mode 'sta'
option ssid 'YourSSID'
option encryption 'psk2'
option key 'YourPassword'
Edit /etc/config/network:
Apply changes:
๐ฅ๏ธ GUI Configuration (LuCI)¶
Set Up Access Point¶
- Go to
NetworkโWireless - Click Edit next to radio
- Set:
- Mode:
Access Point - SSID:
MyOpenWrtWiFi - Network:
lan - Encryption:
WPA2-PSK - Key:
mypassword - Save & Apply
Connect to Another Network (Client Mode)¶
- Go to
NetworkโWireless - Click Scan
- Click Join Network
- Enter password
- Assign to new network (e.g.,
wwan) - Set firewall zone to
wan - Save & Apply
Verify under Status โ Overview or use Network โ Diagnostics.