Here is my template for access layer switches in my environment. Some of blue color words will need to replace with your specific information. Red words will be the explanation for next commands. Some commands may only apply to certain devices. Not all commands will work on every device series (router/switch) or on every IOS version. Always test it first before apply them to your production devices.
version 15.0
!Disable PAD service: no service pad no service password-recovery !Configure Service Timestamps for Debug and Log Messages: service timestamps debug datetime msec show-timezone localtime service timestamps log datetime msec show-timezone localtime ! Set and secure passwords: service password-encryption service sequence-numbers service nagle service tcp-keepalives-in service tcp-keepalives-out
!Disable DHCP server:
no service dhcp
ip dhcp bootp ignore
!
hostname SW-HW-DC-1
!
boot-start-marker
boot-end-marker
!
logging console critical
logging monitor informational
!Set Enable and User Password with Secret:
enable secret 0 1qaz2wsx!.
username swadmin1 secret 0 1q2w3e4r! ! localit user only can show running configuration username localit secret Cisco1234 username localit privilege 15 autocommand show running ! localadmin user can do more troubleshooting and run ‘show config’ username localadmin privilege 7 secret Cisco1234 ! privilege exec level 7 show config !
!Configure AAA service:
aaa new-model
!
!Configure AAA Authentication for Login
aaa authentication login default local group radius group tacacs+
aaa authentication login CONAUTH local group tacacs+
aaa authentication login VTYAUTH local group tacacs+
!Configure AAA Authentication for Enable Mode:
aaa authentication enable default enable group radius group tacacs+
aaa authorization console
aaa authorization exec default local group radius group tacacs+
aaa accounting exec default start-stop group tacacs+
aaa accounting commands 1 default stop-only group tacacs+
aaa accounting commands 5 default stop-only group tacacs+
aaa accounting commands 15 default stop-only group tacacs+
aaa accounting system default start-stop group tacacs+
Very helpful. Thanks a lot