Skip to content
FALCON CORETECHNOLOGIES

// Template

Cisco access switch baseline configuration

A commented starting configuration for a Catalyst access switch — secure management, VLANs, trunk uplink, edge-port protection and DHCP snooping. Replace every value in angle brackets.
1 min read#ccna#switch#template#baseline
Cisco IOS / IOS XE · Cisco access switch baseline configuration
! ===== Identity and management =====
hostname <SW-NAME>
no ip domain-lookup
ip domain-name <example.local>
service password-encryption
enable secret <ENABLE-SECRET>
username <admin-user> privilege 15 secret <ADMIN-SECRET>
banner motd # Authorised access only. Activity is logged. #
!
! ===== VLANs =====
vlan 10
 name STAFF
vlan 20
 name VOICE
vlan 99
 name MGMT
vlan 999
 name NATIVE-UNUSED
vlan 998
 name PARKING
!
! ===== Management SVI =====
interface Vlan99
 ip address <192.168.99.11> <255.255.255.0>
 no shutdown
ip default-gateway <192.168.99.1>
!
! ===== Uplink trunk =====
interface <GigabitEthernet1/0/48>
 description Uplink to <DISTRIBUTION-SWITCH>
 switchport mode trunk
 switchport trunk native vlan 999
 switchport trunk allowed vlan 10,20,99
 switchport nonegotiate
 ip dhcp snooping trust
 ip arp inspection trust
!
! ===== User access ports =====
interface range <GigabitEthernet1/0/1 - 46>
 description User access
 switchport mode access
 switchport access vlan 10
 switchport voice vlan 20
 switchport nonegotiate
 switchport port-security
 switchport port-security maximum 3
 switchport port-security mac-address sticky
 switchport port-security violation restrict
 spanning-tree portfast
 spanning-tree bpduguard enable
 ip dhcp snooping limit rate 15
!
! ===== Unused port =====
interface <GigabitEthernet1/0/47>
 description UNUSED
 switchport mode access
 switchport access vlan 998
 shutdown
!
! ===== Layer 2 security =====
ip dhcp snooping
ip dhcp snooping vlan 10,20
no ip dhcp snooping information option
ip arp inspection vlan 10
errdisable recovery cause bpduguard
errdisable recovery cause psecure-violation
errdisable recovery interval 300
!
! ===== Spanning tree =====
spanning-tree mode rapid-pvst
!
! ===== Services =====
no ip http server
no ip http secure-server
ntp server <NTP-SERVER-IP>
logging host <SYSLOG-SERVER-IP>
service timestamps log datetime msec localtime
lldp run
!
! ===== Remote access =====
! Run once in exec mode: crypto key generate rsa modulus 2048
ip ssh version 2
ip access-list standard MGMT-ONLY
 permit <192.168.99.0> <0.0.0.255>
line con 0
 login local
 exec-timeout 10 0
 logging synchronous
line vty 0 15
 login local
 transport input ssh
 access-class MGMT-ONLY in
 exec-timeout 10 0
!
end

Use this as a checklist, not a copy-paste: adapt the interface names, VLANs and addresses, and generate the RSA key on the device.