1、背景介绍 下图为某企业网络的拓扑图,接入层采用二层交换机S2126,汇聚和核心层使用了两台三层交换机S3750A和S3750B,网络边缘采用一台路由器R1762用于连接到外部网络。 为了实现链路的冗余备份,S2126与S3750A之间使用两条链路相连。S2126上连接一台PC,PC处于VLAN 100中。S3750B上连接一台FTP服务器和一台打印服务器,两台服务器处于VLAN 200中。S3750A使用具有三层特性的物理端口与R1762相连,在R1762的外部接口上连接一台外部的Web服务器。 拓扑编址: PC:172.16.100.100/24
2、 S3750A VLAN 100接口:172.16.100.1/24 S3750A VLAN 200接口:172.16.200.1/24 S3750A F0/20:10.1.1.2/24 FTP服务器:172.16.200.10/24 打印服务器:172.16.200.20/24 R1762 F1/0:10.1.1.1/24 R1762 F1/1:10.1.2.1/24 Web服务器:10.1.2.2/24/24 网络需求 为了实现网络资源的共享,需要PC机能够访问内部网络中的FTP服务器,
3、以实现文件的上传和下载。并且PC机需要连接到打印服务器以进行远程的打印操作。PC机需要能够通过网络连接到外部的Web服务器,并能够进行Web网页的浏览。 实验题目 1. 在S2126与S3750B上划分VLAN,并把PC机与服务器加入到相应的VLAN中。(5分) 2. 配置S2126与S3750A之间的两条交换机间链路,以及S3750A与S3750B之间的交换机间链路。(10分) 3. 在S2126与S3750A之间的冗余链路中使用STP技术防止桥接环路的产生,并通过手工配置使S3750A成为STP的根。(10分) 4. 为S3750A的VLAN接口和R1762的接口配置IP地址。(
4、5分) 5. 在S3750A上使用具有三层特性的物理端口实现与R1762的互联。(5分) 6. 在S3750A上实现VLAN 100与VLAN 200间的通信。并在S3750A与R1762上使用静态路由,实现全网的互通。(10分) 7. 在一台PC上配置FTP服务器,使VLAN 100中的PC能够进行文件的上传和下载。(15分) 8. 在一台PC上配置网络打印机共享,使VLAN 100中的PC能够进行远程打印。(15分) 9. 在一台PC上配置Web服务器,使VLAN 100中的PC能够进行Web网页的浏览。(15分) 10. 在R1762上进行访问控制,允许VLAN 100中的主
5、机只能访问外部Web服务器的Web服务,不允许访问Web服务器上的其它服务。(10分) 答案及评分标准 1. 在S2126与S3750B上划分VLAN,并把PC机与服务器加入到相应的VLAN中。(5分) 评分项1:在S2126上创建VLAN 100,并将F0/1接口加入到VLAN 100中(2.5分) 配置过程: S2126#configure terminal S2126(config)#vlan 100 S2126(config-vlan)#exit S2126(config)#interface fastEthernet 0/1 S2126(confi
6、g-if)#switchport access vlan 100 Show结果: S2126#show running-config vlan 100 ! interface fastEthernet 0/1 switchport access vlan 100 评分项2:在S3750B上创建VLAN 200,并将F0/1、F0/2接口加入到VLAN 200中(2.5分) 配置过程: S3750B#configure terminal S3750B(config)#vlan S3750B(config)#vlan 200 S3750B(config-vla
7、n)#exit S3750B(config)#interface range fastEthernet 0/1-2 S3750B(config-if-range)#switchport access vlan 200 Show结果: S3750B#show running-config vlan 200 ! interface FastEthernet 0/1 switchport access vlan 200 ! interface FastEthernet 0/2 switchport access vlan 200 2. 配置S2126与
8、S3750A之间的两条交换机间链路,以及S3750A与S3750B之间的交换机间链路。(10分) 评分项1:将S2126的F0/23、F0/24接口设置为Trunk端口(3分) 配置过程: S2126#configure terminal S2126(config)#interface range fastEthernet 0/23-24 S2126(config-if-range)#switchport mode trunk Show结果: S2126#show running-config interface fastEthernet 0/23 switch
9、port mode trunk ! interface fastEthernet 0/24 switchport mode trunk 评分项2:将S3750A的F0/23、F0/24接口设置为Trunk端口(3分) 配置过程: S3750A#configure terminal S3750A (config)#interface range fastEthernet 0/23-24 S3750A (config-if-range)#switchport mode trunk Command rejected: An interface whose trunk enc
10、apsulation is "Auto" can not be configured to "trunk" mode. S3750A (config-if-range)#Switchport trunk encapsulation dot1q S3750A (config-if-range)#switchport mode trunk Show结果: S3750A #show running-config interface fastEthernet 0/23 switchport mode trunk ! interface fastEthernet 0/24 s
11、witchport mode trunk 评分项3:将S3750A的F0/10接口和S3750B的F0/10接口设置为Trunk端口(4分) 配置过程: S3750A#configure S3750A (config)#interface fastEthernet 0/10 S3750A (config-if)#Switchport trunk encapsulation dot1q S3750A (config-if)#switchport mode trunk S3750B#configure S3750B (config)#interface fastEthe
12、rnet 0/10 S3750B (config-if)#Switchport trunk encapsulation dot1q S3750B (config-if)#switchport mode trunk Show结果: S3750A #show running-config interface fastEthernet 0/10 switchport mode trunk S3750B #show running-config interface fastEthernet 0/10 switchport mode trunk 3. 在S212
13、6与S3750A之间的冗余链路中使用STP技术防止桥接环路的产生,并通过手工配置使S3750A成为STP的根。(10分) 评分项1:在S2126启用STP(3分) 配置过程: S2126(config)#spanning-tree mode rapid-pvst S2126(config)#spanning-tree Show结果: S2126#show spanning-tree StpVersion : STP SysStpStatus
14、 : Enabled 评分项2:在S3750A启用STP(3分) 配置过程: S3750A(config)# spanning-tree mode rapid-pvst S3750A (config)#spanning-tree Show结果: S3750A #show spanning-tree StpVersion : STP SysStpStatus : Enabled 评分项3:在S3750A上配置优先级(小于32768,并
15、且是4096的倍数),使其成为根(4分) S3750A(config)# spanning-tree Vlan 100 priority 4096 Show结果: S2126#show spanning-tree StpVersion : STP SysStpStatus : Enabled BaseNumPorts : 24 MaxAge : 20 HelloTime : 2 ForwardDelay : 15 BridgeMaxAge :
16、 20 BridgeHelloTime : 2 BridgeForwardDelay : 15 MaxHops : 20 TxHoldCount : 3 PathCostMethod : Long BPDUGuard : Disabled BPDUFilter : Disabled BridgeAddr : 00d0.f88b.ca34 Priority : 32768 TimeSinceTopologyChange : 0d:0h:45m:54s TopologyChanges : 0 DesignatedRoot : 100000D0F821A542 RootCo
17、st : 200000 RootPort : Fa0/23 S3750A#show spanning-tree StpVersion : STP SysStpStatus : ENABLED MaxAge : 20 HelloTime : 2 ForwardDelay : 15 BridgeMaxAge : 20 BridgeHelloTime : 2 BridgeForwardDelay : 15 MaxHops: 20 TxHoldCount : 3 PathCostMethod : Long BPDUGuard : Disabled BPDUFilte
18、r : Disabled BridgeAddr : 00d0.f821.a542 Priority: 4096 TimeSinceTopologyChange : 0d:0h:47m:4s TopologyChanges : 6 DesignatedRoot : 1000.00d0.f821.a542 RootCost : 0 RootPort : 0 4. 为S3750A的VLAN接口和R1762的接口配置IP地址。(5分) 评分项1:在S3750A的VLAN接口配置IP地址(3分) 配置过程: S3750A#configure S3750A(config
19、)#vlan 100 S3750A(config-vlan)#exit S3750A(config)#vlan 200 S3750A(config-vlan)#exit S3750A(config)#interface vlan 100 S3750A(config-if)#ip address 172.16.100.1 255.255.255.0 S3750A(config)#interface vlan 200 S3750A(config-if)#ip address 172.16.200.1 255.255.255.0 Show结果: S3750A#show ip
20、interface brief Interface IP-Address(Pri) OK? Status VLAN 100 172.16.100.1/24 YES UP VLAN 200 172.16.200.1/24 YES UP 评分项2:在R1762的接口配置IP地址(2分) 配置过程: R1762(config)#interface f0/0
21、 R1762(config-if)#ip address 10.1.1.1 255.255.255.0 R1762(config)#interface f0/1 R1762(config-if)#ip address 10.1.2.1 255.255.255.0 Show结果: R1762#show ip interface brief Interface IP-Address(Pri) OK? Status FastEthernet 1/0
22、10.1.1.1/24 YES UP FastEthernet 1/1 10.1.2.1/24 YES UP 5. 在S3750A上使用具有三层特性的物理端口实现与R1762的互联。(5分) 评分项1:将S3750A的F0/20配置为三层端口(5分) 配置过程: S3750A(config)#interface f0/20 S3750A(config-if)#no switchport S3750A(config-if)#ip address 10.1.1.2 25
23、5.255.255.0 Show结果: S3750A#show ip interface brief Interface IP-Address(Pri) OK? Status FastEthernet 0/20 10.1.1.2/24 YES UP 6. 在S3750A上实现VLAN 100与VLAN 200间的通信。并在S3750A与R1762上使用静态路由,实现全网的互通。(10分) 评分项1:PC能够ping通
24、FTP服务器与打印服务器(1分) 评分项2:在S3750A上配置静态路由(2分) 配置过程: S3750A(config)#ip route 10.1.2.0 255.255.255.0 10.1.1.1 Show结果: S3750A#show ip route Codes: C - connected, S - static, R - RIP B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA ext
25、ernal type 2 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default Gateway of last resort is no set C 10.1.1.0/24 is directly connected, FastEthernet 0/20 C 10.1.1.2/3
26、2 is local host. S 10.1.2.0/24 [1/0] via 10.1.1.1 C 172.16.100.0/24 is directly connected, VLAN 100 C 172.16.100.1/32 is local host. C 172.16.200.0/24 is directly connected, VLAN 200 C 172.16.200.1/32 is local host. 评分项3:在R1762上配置静态路由(4分) 配置过程: R1762(config)#ip route 17
27、2.16.100.0 255.255.255.0 10.1.1.2 R1762(config)#ip route 172.16.200.0 255.255.255.0 10.1.1.2 Show结果: R1762#show ip route Codes: C - connected, S - static, R - RIP B - BGP O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
28、 E1 - OSPF external type 1, E2 - OSPF external type 2 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default Gateway of last resort is no set C 10.1.1.0/24 is directly connected, FastEthernet 1/0 C 10.1.1.1/32 is local host.
29、 S 172.16.100.0/24 [1/0] via 10.1.1.2 S 172.16.200.0/24 [1/0] via 10.1.1.2 评分项4:PC能够ping通Web服务器(3分) 7. 在一台PC上配置FTP服务器,使VLAN 100中的PC能够进行文件的上传和下载。(15分) 评分项1:成功架设FTP服务器(10分) 评分项2:PC能够进行上传和下载操作(5分) 8. 在一台PC上配置网络打印机共享,使VLAN 100中的PC能够进行远程打印。(15分) 评分项1:成功配置网络打印机(10分) 评分项2:P
30、C能够进行远程打印(5分) 9. 在一台PC上配置Web服务器,使VLAN 100中的PC能够进行Web网页的浏览。(15分) 评分项1:成功架设Web服务器(10分) 评分项2:PC能够浏览网页(5分) 10. 在R1762上进行访问控制,允许VLAN 100中的主机只能访问外部Web服务器的Web服务,不允许访问Web服务器上的其它服务。(10分) 评分项1:在R1762上配置ACL规则(5分) 配置过程: R1762(config)#access-list 100 permit tcp 172.16.100.0 0.0.0.255 hos
31、t 10.1.2.2 eq www Show结果: R1762#show access-lists ip access-list extended 100 10 permit tcp 172.16.100.0 0.0.0.255 host 10.1.2.2 eq www 评分项2:将ACL应用到接口(3分) 配置过程: R1762(config)#interface f1/1 R1762(config-if)#ip access-group 100 out Show结果: R1762#show running-config interface FastEthernet 1/1 ip access-group 100 out ip address 10.1.2.1 255.255.255.0 评分项3:此时PC无法ping通Web服务器,但是仍然可以浏览网页(2分)






