(1)各VLAN之间互联互通:单臂路由
(2)每台PC都能自动获取IP地址:DHCP
(3)两台交换机要求VLAN2走上面,VLAN3走下面:STP负载均衡
(4)SW2能从SW1学到VLAN相关信息:Trunk、VTP
(5)能在任何地方都能管理到每台网络设备:telnet 交换机用vlan 1做管理VLAN3
(6)交换机连接PC的端口做实现快速收敛(portfast)
------------------------------------------------------SW1-----------------
SW1(config)#int f0/13
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk //配置trunk
SW1(config-if)#int f0/14
SW1(config-if)#switchport trunk encapsulation dot1q
SW1(config-if)#switchport mode trunk
SW1(config)#int f0/3
SW1(config-if)#switchport mode trunk
*修改了VTP的域为YB,并且创建了vlan2和vlan3.
SW1#show vtp s
VTP Version : 2
Configuration Revision : 2
Maximum VLANs supported locally : 128
Number of existing VLANs : 7
VTP Operating Mode : Server
VTP Domain Name : YB
VTP Pruning Mode : Disabled
VTP V2 Mode : Disabled
VTP Traps Generation : Disabled
MD5 digest : 0x00 0xAB 0x73 0xC7 0x59 0xF6 0x50 0xC8
Configuration last modified by 0.0.0.0 at 3-1-93 00:15:43
Local updater ID is 172.16.14.10 on interface Vl1 (lowest numbered VLAN interface found
SW1(config)#enable password cisco
SW1(config)#line vty 0 15
SW1(config)#int vlan 1
SW1(config-if)#ip address 172.16.14.10 255.255.255.0
SW1(config-line)#password cisco
SW1#show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/3, Fa0/4, Fa0/5, Fa0/6
Fa0/7, Fa0/8, Fa0/9, Fa0/10
Fa0/11, Fa0/12, Fa0/15, Fa0/16
Fa0/17, Fa0/18, Fa0/19, Fa0/20
Fa0/21, Fa0/22, Fa0/23, Fa0/24
2 VLAN0002 active Fa0/1
3 VLAN0003 active Fa0/2
*把F0/1分配给vlan2,把F0/2分配给vlan3.
SW1(config)#int range f0/1 - 2
SW1(config-if-range)#spanning-tree portfast //配置快速收敛的接口。
--------------------------------------------------------------SW2-----------------------------------
SW2(config)#int f0/14
SW2(config-if)#spanning-tree vlan 3 cost 18
SW2#show spanning-tree vlan 2
Fa0/1 Desg FWD 100 128.1 Shr
Fa0/13 Root FWD 19 128.13 P2p
Fa0/14 Altn BLK 19 128.14 P2p
SW2#show spanning-tree vlan 3
Fa0/13 Altn BLK 19 128.13 P2p
Fa0/14 Root FWD 18 128.14 P2p
*实现负载均衡。
SW2(config)#int f0/1
SW2(config-if)#switchport mode access
SW2(config-if)#switchport access vlan 2
SW2#show vtp status
VTP Version : 2