Switch>en
Switch#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Switch(config)#host sw1
sw1(config)#end
sw1#vlan data
sw1(vlan)#vlan 10 name vlan10
VLAN 10 added:
Name:vlan10
sw1(vlan)#vlan 20 name vlan20
VLAN 20 added:
Name:vlan20
sw1(vlan)#end
Enter configuration commands, .e per line. End with CNTL/Z.
sw1(config)#int f0/1
sw1(config-if)#switchport access vlan 20
sw1(config-if)#int f0/2
sw1(config-if)#switchport access vlan 10
sw1(config)#int f0/12
sw1(config-if)#switchport mode trunk
sw1(config-if)#switchport trunk encapsulation dot1q
sw1(config-if)#end
sw1#
Switch>en
Switch#conf t
Enter configuration commands, .e per line. End with CNTL/Z.
Switch(config)#host sw2
sw2(config)#end
sw2#vlan data
sw2(vlan)#vlan 10 name vlan10
sw2(vlan)#vlan 20 name vlan20
VLAN 20 added:
Name:vlan20
sw2(vlan)#end
sw2#sh vlan
---- -------------------------------- --------- -------------------------------
1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4
Fa0/5, Fa0/6, Fa0/7, Fa0/8
Fa0/9, Fa0/10, Fa0/11, Fa0/12
Fa0/13, Fa0/14
10 vlan10 active
1002 fddi-default active
1003 token-ring-default active
1004 fddinet-default active
1005 trnet-default active
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1 enet 100001 1500 - - - - - 0 0
10 enet 100010 1500 - - - - - 0 0
20 enet 100020 1500 - - - - - 0 0
1002 fddi 101002 1500 - - - - - 0 0
1003 tr 101003 1500 - - - - - 0 0
1004 fdnet 101004 1500 - - - ieee - 0 0
Enter configuration commands, .e per line. End with CNTL/Z.
sw2(config)#int f0/1
sw2(config-if)#switchport access vlan 10
sw2(config-if)#int f0/2
sw2(config-if)#switchport access vlan 20
sw2(config-if)#int f0/12
sw2(config-if)#switchport mode trunk
sw2(config-if)#switchport trunk encapsulation dot1q
sw2(config-if)#