This article describes how to configure a Cisco router, and provides detailed configuration commands and operation steps. This article also displays the configuration results in show run, I believe you will understand the configuration through this article.
Cisco 3750G-24ts-s
Switch-A Configuration
Hostname switch-
Enable password ^ % $ & ^ &&*(*&(
Ip subnet-zero
Ip routing
Spanning-tree mode pvst
No spanning-tree optimize bpdu transmission
Spanning-tree extend system-id
Spanning-tree vlan 500 priority 24576
Interface GigabitEthernet1/0/1
Switchport access vlan 101
Switchport mode access
No ip address
No mdix auto
Interface GigabitEthernet1/0/2
Switchport access vlan 101
Switchport mode access
No ip address
No mdix auto
Interface GigabitEthernet1/0/3
Switchport access vlan 101
Switchport mode access
No ip address
No mdix auto
Interface GigabitEthernet1/0/4
Switchport access vlan 101
Switchport mode access
No ip address
No mdix auto
Interface GigabitEthernet1/0/5
Switchport access vlan 102
Switchport mode access
No ip address
No mdix auto
Interface GigabitEthernet1/0/6
Switchport access vlan 102
Switchport mode access
No ip address
No mdix auto
Interface GigabitEthernet1/0/7
Switchport access vlan 101
Switchport mode access
No ip address
No mdix auto
Interface GigabitEthernet1/0/8
Switchport access vlan 101
Switchport mode access
No ip address
No mdix auto
Interface GigabitEthernet1/0/9
Switchport access vlan 101
Switchport mode access
No ip address
No mdix auto
Interface GigabitEthernet1/0/10
Switchport access vlan 101
Switchport mode access
No ip address
No mdix auto