Configuring C9300 switch ports / interfaces
! Author: George Ravenscroft - Our Learning Cloud
! Date: 19/06/2025
! Description: GAT VLAN example configs for Cisco C9300 switches.
!
! The exclamation mark is how you write a comment line in Cisco.
! Any text after an ! is inert and has no effect when posted into a C9300 CLI.
! CLI = Command Line Interface (the black screen with white text).
!
! Remember to write memory before you begin making changes and after you have
!! finished testing said changes.
!
! conf t
! int gi1/0/1
! put your config here
! exit ! takes you back one step
! or
! end ! takes you out of configuration terminal (conf t)
!
!
! how to see a ports config:
! sh run int Gi1/0/1
! if in configuration terminal (conf t) then: do sh run int Gi1/0/1
!
!
! VLAN configurations:
!
! non POE switch VLAN 4.
description curriculum
switchport access vlan 4
switchport mode access
spanning-tree portfast
spanning-tree bpduguard enable
end
!
!
! POE switch VLAN 4.
description PC+Phone
switchport access vlan 4
switchport mode access
switchport voice vlan 7
auto qos trust
spanning-tree portfast
spanning-tree bpduguard enable
service-policy input AutoQos-4.0-Trust-Cos-Input-Policy
service-policy output AutoQos-4.0-Output-Policy
end
!
!
! POE Wi-FI AP (Wi-Fi APs will not work on non-POE switches).
description WiFi-AP
switchport trunk native vlan 6
switchport trunk allowed vlan 4,6,30
switchport mode trunk
end
!
! Be careful with Wi-Fi APs. All require POE. MR57s require 40W which only the
!! new connect the classroom switches will provide.
!
!
! VLAN 8
description CCTV
switchport access vlan 8
switchport mode access
end
!
!
! VLAN 9
description Printer
switchport access vlan 9
switchport mode access
spanning-tree bpduguard enable
end
!
!
! VLAN 14
description BMS ! Change as appropriate to the device (Paxton door controllers are normally here
switchport access vlan 14
switchport mode access
spanning-tree bpduguard enable
end
!
!
! VLAN 15
description 3rdPartyRouted ! Inventry, Vericool Tills etc. etc.
switchport access vlan 15
switchport mode access
end
!
!
NAC_Security#sh run int gi1/0/48
Building configuration...
Current configuration : 169 bytes
!
interface GigabitEthernet1/0/48
description Curriculum
switchport access vlan 4
switchport mode access
spanning-tree portfast
spanning-tree bpduguard enable
end
!
!
!
! 'no' commands:
! Put no before a command to remove it.
!
NAC_Security#conf t
Enter configuration commands, one per line. End with CNTL/Z.
NAC_Security(config)#int gi1/0/48
NAC_Security(config-if)#no description Curriculum
NAC_Security(config-if)#no switchport access vlan 4
NAC_Security(config-if)#no switchport mode access
NAC_Security(config-if)#no spanning-tree portfast
NAC_Security(config-if)#no spanning-tree bpduguard enable
NAC_Security(config-if)#end
NAC_Security#
NAC_Security#sh run int gi1/0/48
Building configuration...
Current configuration : 39 bytes
!
interface GigabitEthernet1/0/48
end
!
! int Gi1/0/48 has no config. I have removed all config lines from the interface.