1、设计计算机PC0,如图所示
2、设计PC1,如图所示
3、设计PC2,如图所示
4、设计PC3,如图所示.
5、设计交换机Switch0Switch>en进入特权模式(en) Switch#conf t 进入全局配置模式(conf t) Sw足毂忍珩itch(config)#vlan 2设计VLAN2 Switch(config-vlan)#exit返回上一层 Switch(config)#vlan 3设计VLAN3 Switch(config-vlan)#exit Switch(config)#inter fa 0/1选择某个端口Switch(config)# interface type mod/port Switch(config-if)#switch access vlan 2说明该端口工作在access模式(可直接接入用户终端),允许VLAN3通过。 Switch(config-if)#exit Switch(config)#inter fa 0/2 Switch(config-if)#switch access vlan 3 Switch(config-if)#exit Switch(config)#inter fa 0/24 Switch(config-if)#switch mode trunk,switchport trunk是配置允许通过的vlan; switchport mode trunk是将端口配置成trunk模式; Switch(config-if)#end Switch#show vlan
6、设计交换机Switch1Switch>en Switch#conf t Switch(config)#vlan 2 Switch(c泠贾高框onfig-vlan)#exit Switch(config)#vlan 3 Switch(config-vlan)#exit Switch(config)#int fa 0/1 Switch(config-if)#switch access vlan 2 Switch(config-if)#exit Switch(config)#int fa 0/2 Switch(config-if)#switch access vlan 3 Switch(config-if)#exit Switch(config)#int fa 0/24 Switch(config-if)#switch mode trunk Switch(config-if)#end Switch#show vlan