这个实验也是有关vlan的,有2台交换机,这样的网络拓扑我的理解在一定程度上可以起到双机热备的作用.
因模拟软件无法实现VTP的功能,只能每台配置vlan
实验目的:
pc1--pc4互通
pc2--pc3互通
交换机trunk的配置_休闲
 
sw1:
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
sw1#conf t
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#
 
sw2:
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
VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
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   
20   vlan20                           active   
1002 fddi-default                     active
1003 token-ring-default               active
1004 fddinet-default                  active
1005 trnet-default                    active
VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
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
sw2#conf t
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)#
 
配置完成!