Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save c0psrul3/7c385e24a270736251eaf3f655b3ee2e to your computer and use it in GitHub Desktop.
Save c0psrul3/7c385e24a270736251eaf3f655b3ee2e to your computer and use it in GitHub Desktop.
Cisco configuration example for VLAN and Switchport Access Mode
CAT1#
09:59:20: %SYS-5-CONFIG_I: Configured from console by console
CAT1# conf t
Enter configuration commands, one per line. End with CNTL/Z.
CAT1(config)#
CAT1(config)# vlan 5
CAT1(config-vlan)# name marketing
CAT1(config-vlan)# exit
CAT1(config)# vlan 10
CAT1(config-vlan)# name humanresources
CAT1(config-vlan)# exit
CAT1(config)# interface fast
CAT1(config)# interface fastEthernet 0/2
CAT1(config-if)# switchport mode access
CAT1(config-if)# switchport access vlan5
CAT1(config-if)# exit
CAT1(config)# interface fastEthernet 0/3
CAT1(config-if)# switchport mode access
CAT1(config-if)# switchport access vlan 5
CAT1(config-if)# exit
CAT1(config)# interface fastEthernet 0/4
CAT1(config-if)# switchport mode access
CAT1(config-if)# switchport access vlan 10
CAT1(config-if)# exit
CAT1(config)# interface fastEthernet 0/5
CAT1(config-if)# switchport mode access
CAT1(config-if)# switchport access vlan 10
CAT1(config-if)# exit
CAT1(config)# exit
CAT1# exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment