1、实践四:制作双绞线 RJ-45 连接头和网络互联设备的选择【实践目的】通过实践掌握双绞线 RJ-45 连接头的制作,以及网络互联设备的选择。本次实践的主要目的是:1、掌握 UTP 直通线、交叉线的制作。2、验证网络设备配置的正确性,测试网络的连通性。3、按要求进行连线并配置网络设备。4、记录操作过程中相关参数并进行分析。5、学会网络互联设备的选择。【实践内容与步骤】根据上一章的实践项目,按下图制作 UTP 直通线、交叉线。并进行相关网络互联设备的选择与连通。 PC-A PC-B PC-C PC-DSW1 SW2SW3实践环境和步骤:1、根据要求,分组进行实践,每组配给 5 类 UTP 若干米,
2、RJ-45 连接头若干个,双绞线压线钳一把,斜口钳一把,测试仪一套。2、按照双绞线与 RJ-45 连接头的接线标准,即 TIA/EIA568A 和 TIA/EIA568B 的两个标准,分别进行直通线、交叉线的制作。3、使用 FULUK DTX 网络测试仪分别对所制作的直通线和交叉线进行测试。测试方法为:将制作好的直通线的一端 RJ-45 连接头插入网络测试仪的主机,另一端插入网络测试仪的智能远端,进行连通状况测试。4、先制作两条用于测试的双绞线,其中一条是直通线,另一条是交叉线。之后,用其中的一条连接两交换机,这时注意观察连接端口对应的指示灯,如果指示灯亮表示连接正常,否则换另一条双绞线进行测
3、试。5、完成上述拓扑结构连接,选择构建局域网所需的网卡、交换机。并说明其选择的理由。6 查阅相关配置命令,按要求配置交换机,测试网络的连通性。实验拓扑图:CNALab C2950 C2950STP&VTPComment p1: 同时配置 fa0/11及fa0/12端口Comment p2: 设置接口的 Trunk封装模式为 dot1q,实验设备若为C2950或 C9560设备,无法输入此命令,因为 C2950或 C2960不支持 ISL协议Comment p3: 设置接口的模式为TrunkComment p4: 不通过 DTP协商TrunkComment p5: 显示 Trunk接口的运行状态
4、Comment p6: Trunk模式为 on,Comment p7: 封装为 802.1qComment p8: 已经成为 TrunkComment p9: 运行在此 Trunk上传输数据的 vlanComment p10: 交换域里面 活动的vlanComment p11: 此接口不转发任何vlan的数据Comment p12: 显示端口的二层状态Comment p13: 接口管理模式,即配置了的模式Comment p14: 最终运行的模式Comment p15: 运行的 trunk封装协议Comment s16: 与 Boson显示不同Comment p17: Trunk端口不属于任何
5、vlan实验步骤:1. Sw1及 Sw2最后两个端口通过两根交叉线连结,并配置成 TrunkSW1#configure terminal SW1(config)#interface range fastethernet0/11 - 12 SW1(config-if-range)#switchport trunk encap dot1qSW1(config-if-range)#switchport mode trunk Sw1(config-if-range)#switchport nonegotiateSW2#configure terminal SW2(config)#interface r
6、nage fastethernet0/11 - 12 SW2(config-if-range)#switchport trunk encap dot1qSW2(config-if-range)#switchport mode trunkSw1(config-if-range)#switchport nonegotiateSw1#sh int trunkPort Mode Encapsulation Status Native vlanFa0/11 on 802.1q trunking 1Fa0/12 on 802.1q trunking 1Port Vlans allowed on trunk
7、Fa0/11 1-4094Fa0/12 1-4094Port Vlans allowed and active in management domainFa0/11 1Fa0/12 1Port Vlans in spanning tree forwarding state and not prunedFa0/11 1Fa0/12 noneSw1#Sw1#sh int f0/11 switchport Name: Fa0/11Switchport: EnabledAdministrative Mode: trunkOperational Mode: trunkAdministrative Tru
8、nking Encapsulation: dot1qOperational Trunking Encapsulation: dot1qNegotiation of Trunking: OffAccess Mode VLAN: 1 (default)Trunking Native Mode VLAN: 1 (default)Administrative private-vlan host-association: none Administrative private-vlan mapping: none Operational private-vlan: none Trunking VLANs
9、 Enabled: ALLPruning VLANs Enabled: 2-1001Protected: falseVoice VLAN: none (Inactive)Appliance trust: noneSw1#sh vlan b VLAN Name Status Ports- - - -1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4Fa0/5, Fa0/6, Fa0/7, Fa0/8Fa0/9, Fa0/101002 fddi-default active 1003 token-ring-default active 1004 fddinet-
10、default active 1005 trnet-default active Comment p18: 显示 VTP状态Comment p19: VTP版本号Comment p20: VTP配置版本号,每添加,删除,修改一次 vlan信息,此号加 1,越大越优先Comment p21: 此设备支持的最大vlan数量,各种系列及型号都不会一样Comment p22: 目前拥有的 vlan数量Comment p23: VTP模式,默认是ServerComment p24: VTP域名,默认是空的Comment p25: 默认禁用 VTP修剪Comment p26: 设置 vtp域名Commen
11、t p27: 设置 vtp密码Comment p28: VTP模式设定成clientComment p29: 添加两个 vlan,增加 2Comment p30: VTP Client自动学习到同 VTP域的 vlan信息Sw1#sh vtp statusVTP Version : 2Configuration Revision : 0Maximum VLANs supported locally : 64Number of existing VLANs : 5VTP Operating Mode : ServerVTP Domain Name : VTP Pruning Mode : Dis
12、abledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x57 0xCD 0x40 0x65 0x63 0x59 0x47 0xBD Configuration last modified by 0.0.0.0 at 0-0-00 00:00:00Local updater ID is 0.0.0.0 (no valid interface found)Sw1(config)#vtp domain netChanging VTP domain name from NULL to netSw1(config)
13、#vtp password netSetting device VLAN database password to net.Sw1(config)#Sw2(config)#vtp domain netSw2(config)#vtp password netSw2(config)#vtp mode clientDevice mode already VTP CLIENT.Sw1(config)#vlan 10Sw1(config-vlan)#name vlan10Sw1(config-vlan)#vlan 20Sw1(config-vlan)#name vlan20Sw1(config-vlan
14、)#endSw1#sh vtp statusVTP Version : 2Configuration Revision : 2Maximum VLANs supported locally : 64Number of existing VLANs : 7VTP Operating Mode : ServerVTP Domain Name : netVTP Pruning Mode : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x60 0xA6 0xCF 0xD6 0x1C 0xEE 0x
15、CB 0xFB Configuration last modified by 0.0.0.0 at 3-1-93 00:49:10Local updater ID is 0.0.0.0 (no valid interface found)Sw2#sh vtp stVTP Version : 2Configuration Revision : 2Maximum VLANs supported locally : 64Number of existing VLANs : 7VTP Operating Mode : ClientVTP Domain Name : netVTP Pruning Mod
16、e : DisabledVTP V2 Mode : DisabledVTP Traps Generation : DisabledMD5 digest : 0x93 0x39 0xF4 0xD7 0x70 0x20 0xFF 0x52 Configuration last modified by 0.0.0.0 at 3-1-93 00:51:32Sw2#sh vlan brVLAN Name Status Ports- - - -1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4Fa0/5, Fa0/6, Fa0/7, Fa0/8Fa0/9, Fa0/10
17、10 vlan10 active 20 vlan20 active Comment p31: VTP Client模式的交换机不能修改 vlan信息Comment p32: VTP Server模式交换机可以学习到其他 VTP Server模式的 vlan配置信息Comment p33: 本交换机上,vlan40添加成功,boson 中添加不成功Comment p34: Transparent模式交换机做的 vlan信息更改不会传播出来,故此 Sw1学习不到1002 fddi-default active 1003 token-ring-default active 1004 fddinet-
18、default active 1005 trnet-default active Sw2(config)#vlan 30VTP VLAN configuration not allowed when device is in CLIENT mode.Sw2(config)#vtp mode serverSetting device to VTP SERVER modeSw2(config)#vlan 30 Sw2(config-vlan)#name vlan30Sw2(config-vlan)#exitSw2(config)#Sw1#show vlan bVLAN Name Status Po
19、rts- - - -1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4Fa0/5, Fa0/6, Fa0/7, Fa0/8Fa0/9, Fa0/1010 vlan10 active 20 vlan 20 active 30 vlan 30 active 1002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Sw2(config)#vtp mode transparent Setting devi
20、ce to VTP TRANSPARENT mode.Sw2(config)#vlan 40Sw2(config-vlan)#name vlan40Sw2(config-vlan)#endSw2#sh vlan bVLAN Name Status Ports- - - -1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4Fa0/5, Fa0/6, Fa0/7, Fa0/8Fa0/9, Fa0/1010 vlan10 active 20 vlan20 active 30 vlan30 active 40 vlan40 active 1002 fddi-defa
21、ult active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Sw1#sh vlan bVLAN Name Status Ports- - - -1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4Fa0/5, Fa0/6, Fa0/7, Fa0/8Fa0/9, Fa0/1010 vlan10 active 20 vlan20 active 30 vlan30 active 1002 fddi-default active 1003
22、 token-ring-default active 1004 fddinet-default active 1005 trnet-default active Sw2(config)#vtp mode client Comment p35: Sw1无端口属于,却仍然收到 vlan10,20,30 发送的数据包Comment p36: 启用 vtp修剪,只能在 vtp server上配置,任意一台配置既可,BOSON 不能做 vtp修剪Comment p37: 启用修剪后,此trunk端口就不再接收vlan10,20,30 的数据包Comment p38: 现在因为有 vlan10的活动端口,
23、所以交换机不会修剪vlan10数据Setting device to VTP CLIENT mode.Sw1#sh int trunk Port Mode Encapsulation Status Native vlanFa0/11 on 802.1q trunking 1Fa0/12 on 802.1q trunking 1Port Vlans allowed on trunkFa0/11 1-4094Fa0/12 1-4094Port Vlans allowed and active in management domainFa0/11 1,10,20,30Fa0/12 1,10,20,3
24、0Port Vlans in spanning tree forwarding state and not prunedFa0/11 1,10,20,30Fa0/12 noneSw1(config)#vtp pruning Pruning switched onSw1#sh int trunk Port Mode Encapsulation Status Native vlanFa0/11 on 802.1q trunking 1Fa0/12 on 802.1q trunking 1Port Vlans allowed on trunkFa0/11 1-4094Fa0/12 1-4094Por
25、t Vlans allowed and active in management domainFa0/11 1,10,20,30Fa0/12 1,10,20,30Port Vlans in spanning tree forwarding state and not prunedFa0/11 1Fa0/12 none2. PC1 IP:192.168.20.23/24PC2 IP: 192.168.20.24/24PC1连结到 Sw1的 Fa0/1PC2连结到 Sw2的 Fa0/1Sw2#sh int trunkPort Mode Encapsulation Status Native vla
26、nFa0/11 on 802.1q trunking 1Fa0/12 on 802.1q trunking 1Port Vlans allowed on trunkFa0/11 1-4094Fa0/12 1-4094Port Vlans allowed and active in management domainFa0/11 1,10,20,30Fa0/12 1,10,20,30Port Vlans in spanning tree forwarding state and not prunedFa0/11 1,10Fa0/12 1Comment p39: PC1Comment p40: 第
27、一个数据包因为arp学习的原因,导致超时Comment p41: 同一个 vlan10跨越了不同的交换机Comment p42: 显示 spt信息Comment p43: Vlan1根交换机的优先级Comment p44: 根交换机 MAC地址Comment p45: 本地交换机 vlan1根优先级,等于默认 32768vlan 号Comment p46: 本地交换机 MAC地址Comment p47: 此端口处于转发状态Comment p48: 此端口被 blockC:Documents and Settingspineping 192.168.20.24Pinging 192.168.20
28、.24 with 32 bytes of data:Request timed out.Reply from 192.168.20.24: bytes=32 time=1ms TTL=64Reply from 192.168.20.24: bytes=32 time=1ms TTL=64Reply from 192.168.20.24: bytes=32 time=1ms TTL=64Ping statistics for 192.168.20.24:Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round tr
29、ip times in milli-seconds:Minimum = 1ms, Maximum = 1ms, Average = 1msSw1#sh spanning-tree VLAN0001Spanning tree enabled protocol ieeeRoot ID Priority 32769Address 000c.ce7c.5d00Cost 19Port 11 (FastEthernet0/11)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32769 (priority 327
30、68 sys-id-ext 1)Address 000d.2960.8bc0Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 300Interface Port ID Designated Port IDName Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr- - - - - - -Fa0/11 128.11 19 FWD 0 32769 000c.ce7c.5d00 128.11 Fa0/12 128.12 19 BLK 0 32769 000c.ce7c.5d00 128.12
31、 VLAN0010Spanning tree enabled protocol ieeeRoot ID Priority 32778Address 000c.ce7c.5d00Cost 19Port 11 (FastEthernet0/11)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32778 (priority 32768 sys-id-ext 10)Address 000d.2960.8bc0Hello Time 2 sec Max Age 20 sec Forward Delay 15 s
32、ecAging Time 300Interface Port ID Designated Port IDName Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr- - - - - - -Fa0/1 128.1 100 FWD 19 32778 000d.2960.8bc0 128.1 Fa0/11 128.11 19 FWD 0 32778 000c.ce7c.5d00 128.11 Fa0/12 128.12 19 BLK 0 32778 000c.ce7c.5d00 128.12 VLAN0020Spanning tree enabled protoco
33、l ieeeRoot ID Priority 32788Address 000c.ce7c.5d00Cost 19Port 11 (FastEthernet0/11)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32788 (priority 32768 sys-id-ext 20)Address 000d.2960.8bc0Comment p49: 如果 Sw1为所有vlan的根,则配置 Sw2为所有 vlan的根Comment p50: 设置此交换机为vlan1的主根Hello Time 2 s
34、ec Max Age 20 sec Forward Delay 15 secAging Time 300Interface Port ID Designated Port IDName Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr- - - - - - -Fa0/11 128.11 19 FWD 0 32788 000c.ce7c.5d00 128.11 Fa0/12 128.12 19 BLK 0 32788 000c.ce7c.5d00 128.12 VLAN0030Spanning tree enabled protocol ieeeRoot ID
35、Priority 32798Address 000c.ce7c.5d00Cost 19Port 11 (FastEthernet0/11)Hello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 32798 (priority 32768 sys-id-ext 30)Address 000d.2960.8bc0Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 300Interface Port ID Designated Port ID
36、Name Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr- - - - - - -Fa0/11 128.11 19 FWD 0 32798 000c.ce7c.5d00 128.11 Fa0/12 128.12 19 BLK 0 32798 000c.ce7c.5d00 128.12 Sw1#Sw1(config)#spanning-tree vlan 1 root primarySw1(config)#spanning-tree vlan 10 root primarySw1(config)#spanning-tree vlan 20 root prima
37、rySw1(config)#spanning-tree vlan 30 root primarySw1#sh spanning-tree VLAN0001Spanning tree enabled protocol ieeeRoot ID Priority 24577Address 000d.2960.8bc0This bridge is the rootHello Time 2 sec Max Age 20 sec Forward Delay 15 secBridge ID Priority 24577 (priority 24576 sys-id-ext 1)Address 000d.29
38、60.8bc0Hello Time 2 sec Max Age 20 sec Forward Delay 15 secAging Time 300Interface Port ID Designated Port IDName Prio.Nbr Cost Sts Cost Bridge ID Prio.Nbr- - - - - - -Fa0/11 128.11 19 FWD 0 24577 000d.2960.8bc0 128.11 Fa0/12 128.12 19 FWD 0 24577 000d.2960.8bc0 128.12 3. 实验完成【实践效果】通过实践,使学生掌握双绞线 RJ-45连接头的制作和测试,以及如何对有关网络互联设备的选择和使用等。【扩展练习】根据上一章所构建的局域网,现要求接入 Internet网,试选择相应的路由器等网络互联设备。