《2023年西邮计算机网络实验报告内容模板实验二交换机基本配置.docx》由会员分享,可在线阅读,更多相关《2023年西邮计算机网络实验报告内容模板实验二交换机基本配置.docx(11页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、实验目的1 .通过查看MAC地址转发表,理解互换机基于地址表的工作工程,掌握添加静态MAC 地址的方法;2 .通过观测生成树状态,分析生成树协议的工作过程;3 .掌握静态VLAN配置.,理解VLAN工作原理。二 .实验所需设备及材料计算机1台,安装Pa c k etT r a ce r软件。三 .实验环境及内容1 .运用1台互换机(在Packet Tracer里互换机使用2960)若干主机搭建网络拓扑 环境(参见实验指导书pl 25图5.5),参考实验指导书52 3节,完毕互换机MAC地址转发 表的管理;2 .运用2台互换机,若干主机搭建网络拓扑环境(参见实验指导教材P 131图5 . 1 0
2、 ), 参考实验指导书5. 3.3节,观测构成物理回路前后生成树的变化,指出根网桥、指派端口、非 指派端口、根端口,分析生成树协议的工作过程;3 .运用I台互换机,若干主机搭建网络拓扑环境(参见实验指导教材pl70图7. 3),参 考实验指导书7. 1.4节,完毕创建VLAN、为VLAN添加成员端口,测试VLAN划分效果, 改变VLAN的成员端LI。4 .选做内容:运用2台互换机,若干主机搭建网络拓扑环境(参见实验指导教材p17 9图 7.7),参考实验指导书7 . 2 . 2节,完毕VLAN中继的配置。四 .实验过程1 .管理MAC地址转发表2 .连接网络拓扑结构.尝试改变VLAN端口成员将
3、端口 f 0/1改为VLAN 20的成员端口。Switch(config)finterface f0/1Switch(config-if) #swit.chport access vlan 20Swit ch(config-if)#endSYS-S-CONFIG_I: Configured from console by console Switch#show vlan brie fVLANNameStatusPorts1defaultactiveFa0/5z FaO/6, FaO/7, FaO/8FaO/9, FaO/10, FaO/JLl, FaO/12Fa0/13z Fa0/14z Fa
4、O/15, FaO/16FaO/17, FaO/18, FaO/19, Fa0/20FaO/Zl, FaO/22, FaO/23, FaO/24Gigl/210VLAN0010activeFaO/320mySecondVlanactiveFa0/l, Fa0/2z FaO/41002fddi-de faultactive1003t-oken-ring-de faultactive1004fddinet-defaultactive1005t. met-de f ault.active7 .删除VLAN1 )将VLAN 10的成员端口 f 0/ 3分派到其他VLAN.Switch(config)f
5、interface f0/3Switch (conf ig-if) #no swit.chport. access vlanSwitch(config-i f)#end%SYS-S-CONFIG_I: Configured from console by console Switchfshow vlan brie fVLANNameStatusPorts1defaultactiveFa0/3z FaO/Sz FaO/6, FaO/7FaO/8, FaO/9, Fa0/10, Fa0/llFa0/12z FaO/13, Fa0/14z Fa0/15Fa0/16z FaO/17, FaO/18,
6、FaO/19Fa0/20, FaO/21, Fa0/22z FaO/23FaO/24, Gigl/1, Gigl/210VLAN0010active20mySecondVlanactiveFa0/l, Fa0/2z FaO/41002fddi-defaultactive1003token-ring-de f aultactive1004fddinet-defaultactive1005trnet-defaultactive2)删除 VLAN 10Switch (config) #no vlan 10Switch(config)#endSYS-S-CONFIG_I: Configured fro
7、m console by console Switch#show vlan briefStatusStatusVLAN Name1 de fault1 de faultactiveFaO/3, FaO/S, FaO/6, FaO/7FaO/8, FaO/9, Fa0/10, Fa0/llFaO/12, Fa0/16z FaO/ZO, FaO/24,FaO/12, Fa0/16z FaO/ZO, FaO/24,FaO/13, Fa0/17z FaO/21, Cigl/1,Fa0/14z FaO/18, FaO/22, Gigl/2FaO/15FaO/19FaO/2320myS e c ondV1
8、an1002 fddi-default1003 token-ring-de fault1004 fddinet.-default1005 t. met - def suit:20myS e c ondV1an1002 fddi-default1003 token-ring-de fault1004 fddinet.-default1005 t. met - def suit:active activeFa0/l, FaO/2, FaO/4active active active五.总结本次实验让我学会使用pack et trace这个软件。由于一开始对一些思科命令不是很熟 悉,在实验过程中出现
9、了困难,最后在同学和老师的帮助下学会了使用。对于这个模拟软件 第一次接触,感觉可以很直观的锻炼模拟真机操作,很喜欢这款软件。通过这次实验我学会 了MAC地址的转发和互换机的工作原理,尚有生成树协议和VLAN的工作原理。这使得 在课堂上学的知识自己真正验证了解,感觉很有爱好,也调动了自己学习网络知识的积极性。2960-24TT Switch 2PC-PTPCI2 .分别设立两个PC机的IP地址。PCO:LinkIP AddressIPv6 AddressMAC AddressUpGateway: DNS Server: Line Number: Physical Location: Interc
10、ity, Home City, Corporate Office, Main Wiring ClosetPCI:LinkIP AddressIPv6 AddressUpGateway: DNS Server: Line Nuiaber: show mac-address-table Mac Address TableVian Mac Address4 . PCO向PCI互相发送“ ping”命令,然后查看MAC地址。此时的互换机MAC地址转发表。Switchshow mac-address-table Hac Address TableVianMac AddressTypePorts1DYNA
11、MICFa0/l1DYNAMICFaO/25 .向MAC地址中添加静态地址表,把PC2的MAC地址绑定到F a 0/3端口Switch(config)# iaac-address-table static OOeO.a3dc.7482 vlan 1 inter face FaO/3Switch#show mac-address-table Mac Address TableVianMac AddressTypePorts100d0.bc7a. 3850DYNAMICFa0/l1STATICFaO/3再在PC0向PCI发送“ping 命令,超时的因素是目的地址为00e().a3dc. 7482的
12、 帧所有被转发到Fa 0/3端I了。Pinging 192.168.1.102 with 32 byt.es of data:timed timed timed timedout. out. out. out.Request Request Request Request.Ping statistics for 192.168.1.102: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss)6.撤消添加的MAC地址。Switch#show mac-address-table Mac Address TableVianMac Address
13、TypePorts12.生成树DYNAMICFa0/l(画出拓扑图,并在图上标明互换机的桥I D、根网桥、非根网桥上的根端口、指派端口、 被阻塞的端口)Bridge ID:0060.70()l.A9BB根端口: FaO/I44enSwitch#config tEnter configuration conunands, one per line. End with CNTL/Z.Switch(config)#vlan 10Switch(conf ig-vlan) jfexitSwitch(config)#vlan 20Switch (conf ig-vlan) fnaiae xaySecond
14、V 1 anSwitch(conf ig-vlan) #end.查看当前VLAN配置VLAN NaiaeStatusPorts1de faultactiveFa0/lz FaO/2, FaO/3, FaO/4FaO/Sz FaO/6, FaO/7, FaO/8FaO/9, Fa0/10, Fa0/llz FaO/12FaO/13, Fa0/14z Fa0/15z FaO/16FaO/17, FaO/18, Fa0/19z Fa0/20FaO/21, FaO/22, Fa0/23z FaO/24Gigi/工,Gigl/210VLAN0010active20mySecondV1anactive10
15、02fddi-de faultactive1003token-ring-de faultactive1004fddinet-de faultactive1005trnet-de faultactive.为互换机端口设定端口模式,并将其分派到相应的V L AN中。Switch (config) # inter face f 0/2Switch(config-if)fswitchport mode accessSwit.ch(config-if) fswitchport access vlan 20Switch(config-i f)#exitSwitch(config)Winter face f
16、0/1SwitchCconfig-if)#switchport mode accessSwit.ch(config-if) #switchport access vlan 10Suit ch(c on f i g-i f)*exitSwitch(config)Winter face f0/3Switch(conf ig-if) #switchport. mode accessSwitch(config-if)#switchport access vlan 10 Switch(config-if)#exit Switch(config)#interface f0/4 Switch(config-
17、if)#switchport mode access Switch(config-if)#switchport access vlan 20 Switch(config-if)#end5查看VLAN端口的分派情况。Svit-chfshow vlan briefVLANNameStatusPorts1de faultsactiveFa0/5z FaO/6, Fa0/7z FaO/8FaO/9, Fa0/10, FaO/11, FaO/12FaO/13, Fa0/14z FaO/lSz FaO/16FaO/17, FaO/18, FaO/19, Fa0/20FaO/21, Fa0/22r Fa0/
18、23z FaO/24Gigl/1, Gigl/210VLAN0010activeFaO/lz FaO/320mySecondVlanactiveFaO/2, FaO/41002fddi-de faultactive1003token-ring-de faultactive1004fddinet-de faultactive100St. met -de faultactive6.测试划分VLAN,运用ping命令进行主机连通测试,。发现PC1和PC3可以p i ng通,PC2和PC4可以ping通。处在不同VLAN,主机之间不能互相通信。with 32 byteso f data:Reply f
19、rom 192.168.1.3: bytes=32Cime=63msTTL=128Reply from 192.168.1.3: bytes=32TTL=128Reply from 192.168.1.3: bytes=32tiiixe=62msTTL=128Reply from 192.168.1.3: byt-es = 32tiine = 49msTTL=128Ping statistics for192.168.1.3:Packets: Sent =4 f Received =4 r Lost =0(0% loss),Approximate round trip times in milli-seconds:Hinimuia = 49ms zMaximum = 63ms, Average=59mswith 32 bytesof data:Request, timed out.Request tixaed out.Request timed out.Request timed out.Ping statistics for192.168.1.4:Packets: Sent-=4, Received =0, Lost =4(100 loss)zwith 32 byteso f data:Request timed out.