Skip to content

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

show interfaces status
Displays summary of all switch ports including status, VLAN, duplex, speed, and type.

๐Ÿ” Detailed Interface Info

show interfaces [interface-id]
Replace [interface-id] with the port (e.g., GigabitEthernet1/0/1) for detailed stats.

๐Ÿงช Check Interface Errors

show interfaces counters errors

โš™๏ธ Show Port Configuration

show running-config interface [interface-id]

๐Ÿงญ Show VLAN Status

show vlan brief
Lists all VLANs, their status, and assigned ports.

show vlan
Provides detailed VLAN info.

show interfaces [interface-id] switchport
Shows VLAN membership for a specific port.

show interfaces trunk
Displays trunk ports and allowed VLANs.


๐Ÿงพ Show Switch Model

show version
Includes model number, IOS version, uptime, and serial number.

show inventory
Lists hardware components and part numbers.


๐Ÿง  VLAN IP Address

show ip interface brief
Shows IP addresses assigned to VLAN interfaces (SVIs).

If you see:

Vlan1                  unassigned      YES NVRAM  administratively down down
It means: - No IP assigned - Interface is shut down

To fix:

configure terminal
interface vlan 1
ip address 192.168.1.2 255.255.255.0
no shutdown
end
write memory


๐Ÿ” Reboot the Switch

reload
Reboots the switch. Confirm when prompted.

To schedule:

reload in 5


โŒ 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:

config interface 'wwan'
    option proto 'dhcp'

Apply changes:

wifi reload


๐Ÿ–ฅ๏ธ GUI Configuration (LuCI)

Set Up Access Point

  1. Go to Network โ†’ Wireless
  2. Click Edit next to radio
  3. Set:
  4. Mode: Access Point
  5. SSID: MyOpenWrtWiFi
  6. Network: lan
  7. Encryption: WPA2-PSK
  8. Key: mypassword
  9. Save & Apply

Connect to Another Network (Client Mode)

  1. Go to Network โ†’ Wireless
  2. Click Scan
  3. Click Join Network
  4. Enter password
  5. Assign to new network (e.g., wwan)
  6. Set firewall zone to wan
  7. Save & Apply

Verify under Status โ†’ Overview or use Network โ†’ Diagnostics.