Cisco Networking
3 min readArticle
Cisco dominates enterprise networking — routers, switches, firewalls (ASA), wireless controllers (WLC), and everything in between. IOS (Internetwork Operating System) is the CLI you'll live in. Knowing Cisco basics is essential for network security work, assessments, and blue team roles.
IOS CLI Basics
shell
! -- Comment in configs
> -- User EXEC mode (limited)
# -- Privileged EXEC mode (do everything)
(config)# -- Global configuration mode
(config-if)# -- Interface configuration mode
bash
# Enter privileged mode
enable
# (enter enable password)
# Enter global config
configure terminal # or conf t
# Exit config mode
exit # or Ctrl+Z
# Show running config
show running-config
show run
# Show specific interface
show interface GigabitEthernet0/0
show ip interface brief
# Save config to NVRAM
write memory # or copy running-config startup-config
Basic Router Config
shell
! Set hostname
Router(config)# hostname Core-Router
! Set enable secret (encrypted)
Core-Router(config)# enable secret MyStrongPassword
! Configure interface
Core-Router(config)# interface GigabitEthernet0/0
Core-Router(config-if)# ip address 192.168.1.1 255.255.255.0
Core-Router(config-if)# description "LAN Interface"
Core-Router(config-if)# no shutdown
! Configure default route
Core-Router(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.254
VLANs (Switches)
shell
! Create VLAN
Switch(config)# vlan 10
Switch(config-vlan)# name Management
! Assign port to VLAN (access port)
Switch(config)# interface FastEthernet0/1
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 10
! Trunk port (carries multiple VLANs)
Switch(config)# interface GigabitEthernet0/1
Switch(config-if)# switchport mode trunk
Switch(config-if)# switchport trunk allowed vlan 10,20,30
! Show VLANs
Switch# show vlan brief
Switch# show interfaces trunk
ACLs (Access Control Lists)
shell
! Standard ACL (source IP only)
Router(config)# access-list 10 permit 192.168.1.0 0.0.0.255
Router(config)# access-list 10 deny any
! Extended ACL (source, dest, protocol, port)
Router(config)# access-list 100 permit tcp 192.168.1.0 0.0.0.255 any eq 80
Router(config)# access-list 100 deny ip any any log
! Apply to interface
Router(config-if)# ip access-group 100 in
! Named ACL
Router(config)# ip access-list extended BLOCK-SSH
Router(config-ext-nacl)# deny tcp any any eq 22
Router(config-ext-nacl)# permit ip any any
Useful Show Commands
bash
show version # IOS version, uptime, hardware
show ip route # Routing table
show arp # ARP table
show cdp neighbors # Cisco Discovery Protocol (reveals network topology!)
show interface status # Quick interface overview
show mac address-table # MAC table on switch
show spanning-tree # STP info
show ip ospf neighbor # OSPF peers
show crypto isakmp sa # VPN tunnels
CDP Security Note
CDP (Cisco Discovery Protocol) is enabled by default and leaks device model, IOS version, IP addresses, and native VLAN to adjacent devices. In security assessments, CDP is a goldmine:
shell
# Disable CDP globally (security best practice)
Router(config)# no cdp run
# Or per-interface
Router(config-if)# no cdp enable
Password Recovery / Security Issues
- Default credentials for many Cisco devices:
cisco/cisco,admin/admin - Telnet (clear text) vs SSH — always use SSH
- Enable SSH on Cisco:
shell
Router(config)# ip domain-name company.local
Router(config)# crypto key generate rsa modulus 2048
Router(config)# ip ssh version 2
Router(config)# line vty 0 4
Router(config-line)# transport input ssh
See Also
- fortigate-firewall-guide - Fortinet competitor
- networking/index - Networking overview
techzonesite.comUnlock Your IT Potential