switch#
switch#
configure terminal
switch(config)#
spanning-tree mode pvst
switch(config)#
spanning-tree extend system-
id
switch(config)#
interface vlan 10
switch(config-if)#
ip address
192.168.101.254 255.255.255.0
switch(config-if)#
exit
switch(config)#
interface gigabitEthernet
0/1
switch(config-if)#
switchport trunk
encapsulation dot1q
switch(config-if)#
switchport mode trunk
switch(config-if)#
switchport trunk native
vlan 1
switch(config-if)#
switchport trunk allowed
vlan add 1,10
switch(config-if)#
speed 1000
switch(config-if)#
duplex full
switch(config-if)#
end
switch#
From privileged EXEC mode, enter global
configuration mode.
Configure spanning-tree mode to PVST.
Enable extend system-id.
Enter interface VLAN configuration mode.
Define VLAN 10 IP address and subnet.
Exit interface configuration mode.
Enter interface 0/1 configuration mode.
Configure dot1q encapsulation (IEEE 802.1Q is a
standard protocol for interconnecting multiple
switches and routers and for defining VLAN
topologies).
Configure interface mode to trunking layer 2 VLAN
port.
Define the native VLAN 1 for a trunk interface.
Add VLAN 1 and 10 to the allowed VLAN list.
Configure the speed of a given Ethernet interface to
1Gbps.
Force full-duplex operation.
Return to Privileged EXEC mode.