《网络系统集成实践》由会员分享,可在线阅读,更多相关《网络系统集成实践(58页珍藏版)》请在金锄头文库上搜索。
1、试验一Switch1:S2328G_01en 14Password:S2328G_01#configure terminalEnter configuration commands, one per line. End with CNTL/Z.S2328G_01(config)#vlan 10S2328G_01(config-vlan)#name salesS2328G_01(config-vlan)#exitS2328G_01(config)#interface fastethernet 0/5S2328G_01(config-if-FastEthernet 0/5)#switchport
2、access vlan 10S2328G_01(config-if-FastEthernet 0/5)#show vlan id 10VLAN Name Status Ports- - - - 10 sales STATIC Fa0/5, Fa0/24S2328G_01(config-if-FastEthernet 0/5)#exitS2328G_01(config)#vlan 20S2328G_01(config-vlan)#name technicalS2328G_01(config-vlan)#exitS2328G_01(config)#interface fastethernet 0/
3、15S2328G_01(config-if-FastEthernet 0/15)#switchport access vlan 20S2328G_01(config-if-FastEthernet 0/15)#show vlan id 20VLAN Name Status Ports- - - - 20 technical STATIC Fa0/15, Fa0/24S2328G_01(config-if-FastEthernet 0/15)#exitS2328G_01(config)#interface fastethernet 0/24S2328G_01(config-if-FastEthe
4、rnet 0/24)#switchport mode trunkS2328G_01(config-if-FastEthernet 0/24)#$ 0/24 switchportInterface Switchport Mode Access Native Protected VLAN lists- - - - - - -FastEthernet 0/24 enabled TRUNK 1 1 Disabled ALLS2328G_01(config-if-FastEthernet 0/24)#Switch2:S2328G_02en 14Password:S2328G_02#configure t
5、erminalEnter configuration commands, one per line. End with CNTL/Z.S2328G_02(config)#vlan 10S2328G_02(config-vlan)#name salesS2328G_02(config-vlan)#exitS2328G_02(config)#interface fastethernet 0/5S2328G_02(config-if-FastEthernet 0/5)#switchport access vlan 10S2328G_02(config-if-FastEthernet 0/5)#sho
6、w vlan id 10VLAN Name Status Ports- - - - 10 sales STATIC Fa0/5, Fa0/24S2328G_02(config-if-FastEthernet 0/5)#exitS2328G_02(config)#interface fastethernet 0/24S2328G_02(config-if-FastEthernet 0/24)#switchport mode trunkS2328G_02(config-if-FastEthernet 0/24)#$ 0/24 switchportInterface Switchport Mode
7、Access Native Protected VLAN lists- - - - - - -FastEthernet 0/24 enabled TRUNK 1 1 Disabled ALLS2328G_02(config-if-FastEthernet 0/24)#测试结果:PC1 ping PC3PC1:Pinging 192.168.10.30 with 32 bytes of data:Reply from 192.168.10.30: bytes=32 time=1ms TTL=128Reply from 192.168.10.30: bytes=32 time1ms TTL=128
8、Reply from 192.168.10.30: bytes=32 time1ms TTL=128Reply from 192.168.10.30: bytes=32 time试验二:试验代码:S3760_02(config)#configure terminal% Unknown command.S3760_02(config)#vlan 10S3760_02(config-vlan)#exitS3760_02(config)#vlan 20S3760_02(config-vlan)#exitS3760_02(config)#interface fastethernet 0/1S3760_
9、02(config-if-FastEthernet 0/1)#switchport access vlan 10S3760_02(config-if-FastEthernet 0/1)#exitS3760_02(config)#interface fastethernet 0/2S3760_02(config-if-FastEthernet 0/2)#switchport access vlan 20S3760_02(config-if-FastEthernet 0/2)#exitS3760_02(config)#interface vlan 10S3760_02(config-if-VLAN
10、 10)#no shutdownS3760_02(config-if-VLAN 10)#exitS3760_02(config)#interface vlan 20S3760_02(config-if-VLAN 20)#ip addS3760_02(config-if-VLAN 20)#no shutdownS3760_02(config-if-VLAN 20)#exitS3760_02(config)#测试结果:Pinging 192.168.20.2 with 32 bytes of data:Reply from 192.168.20.2: bytes=32 time=8ms TTL=1
11、27Reply from 192.168.20.2: bytes=32 time1ms TTL=127Reply from 192.168.20.2: bytes=32 time1ms TTL=127Reply from 192.168.20.2: bytes=32 timeen 14Password:S2328G_01#spanning-treeTranslating spanning-tree.% Unrecognized host or address, or protocol not running.S2328G_01#spanning-tree priority 4096% Unknown command.S2328G_01#spanning-treeTranslating spanning-tree.% Unrecognized host or