实验指导书-自动化.doc_第1页
实验指导书-自动化.doc_第2页
实验指导书-自动化.doc_第3页
实验指导书-自动化.doc_第4页
实验指导书-自动化.doc_第5页
已阅读5页,还剩4页未读 继续免费阅读

下载本文档

版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领

文档简介

实验1 单交换机VLAN的划分一实验目的:(1)了解VLAN原理(2)熟练掌握二层交换机VLAN的划分方法(3)了解如何验证VLAN的划分二实验设备:(1)DCS-3926交换机一台(2)PC机两台(3)Console线1根(4)直通网线2根三 实验拓扑: 使用一台交换机和两台PC机,还将其中PC1作为控制台终端,使用Console口配置方式;使用两根网线分别将PC1和PC2连接到交换机的RJ-45接口上。四 实验要求 在交换机上划分基于两个端口的VLAN:VLAN100,VLAN200VLAN端口成员1001-82009-16 使得VLAN100的成员能够相互访问,VLAN200的成员能够相互访问;VLAN100和VLAN200成员之间不能相互访问。PC1、PC2接在VLAN100的成员端口1-8上,两台PC互相可以ping通;PC1、PC2接在VLAN200的成员端口9-16上,两台PC互相可以ping通;PC1接在VLAN100的成员端口1-8上,PC2接在VLAN200的成员端口9-16上,则相互ping不通。 若实验结果和理论相符,则本实验完成。五 实验步骤1、交换机恢复出厂设置 Switch#set default Switch#write Switch#reload2、给交换机设置IP地址即管理IP(可选。实验中以实际环境中的IP地址为准,比如实验环境当中的局域网地址为192.168.0.0,则交换机管理IP可设为192.168.0.250) Switch#config Switch(config)#interface vlan 1 Switch(config-if-vlan1)#ip address 192.168.1.11 255.255.255.0 Switch(config-if-vlan1)#no shutdown Switch(config-if-vlan1)exit Switch(config)#3、创建VLAN100和VLAN200 Switch(config)# Switch(config)#vlan 100 Switch(config-vlan100)#exit Switch(config)#vlan 200 Switch(config-vlan200)#exit Switch(config)#exit Switch#show vlan4、给VLAN100和VLAN200添加端口 Switch(config)#vlan 100 Switch(config-vlan100)#switchport interface ethernet 0/0/1-8 Switch(config-vlan100)#exit Switch(config)#vlan 200 Switch(config-vlan200)#switchport interface ethernet 0/0/9-16 Switch(config-vlan200)#exit Switch(config)#exit Switch#show vlan5、验证实验PC1位置PC2位置动作结果1-8端口PC1 ping 192.168.1.11不通9-16端口PC1 ping 192.168.1.11不通17-24端口PC1 ping 192.168.1.11通1-8端口1-8端口PC1 ping PC2通1-8端口9-16端口PC1 ping PC2不通1-8端口17-24端口PC1 ping PC2不通六 注意事项和排错1、默认情况下,交换机所有端口都属于VLAN1,因此我们通常把VLAN1作为交换机的管理VLAN,因此VLAN1接口的IP地址就是交换机的管理地址。2、在DCS-3926S中,一个普通端口只属于一个VLAN。七 思考题1、怎样取消一个vlan2、怎样取消一个vlan中的某些端口实验2 跨交换机相同VLAN间通讯一实验目的:(1)了解IEEE802.1q的实现方法,掌握跨二层交换机相同VLAN间通信的调试方法(2)了解交换机接口的trunk模式和access模式(3)了解交换机的tagged端口和untagged端口的区别二实验设备:(1)DCS-3926S交换机2台(2)PC机2台(3)Console线1根(4)直通网线2根三 实验拓扑:四 实验要求在交换机A上和交换机B上分别划分两个基于端口的vlan:vlan 100 和vlan 200。VLAN端口成员1001-82009-16Trunk口24使得交换机之间的vlan100的成员能够相互访问,vlan200的成员能够相互访问,vlan100和vlan200成员之间不能互相访问。PC1、PC2分别接在不同交换机vlan100的成员端口1-8上,两台PC互相可以ping通;PC1、PC2分别接在不同交换机vlan成员端口9-16上,两台PC可以ping通;PC1和PC2接在不同的vlan成员端口上则互相ping不通。若实验结果和理论相符,则本实验完成。五 实验步骤1、交换机恢复出厂设置 Switch#set default Switch#write Switch#reload2、给交换机设置标示符和管理IP。(可选。实验中以实际环境中的IP地址为准,比如实验环境当中的局域网地址为192.168.0.0,则交换机管理IP可设为192.168.0.250。注意:两台交换机的管理IP不要相同)交换机A:Switch(config)#hostname switchASwitchA(config)#interface vlan 1switchA(config-if-vlan1)#ip address 192.168.1.11 255.255.255.0switchA(config-if-vlan1)#no shutdownswitchA(config-if-vlan1)#exitswitchA(config)#交换机B:Switch(config)#hostname switchBSwitchB(config)#interface vlan 1switchB(config-if-vlan1)#ip address 192.168.1.12 255.255.255.0switchB(config-if-vlan1)#no shutdownswitchB(config-if-vlan1)#exitswitchB(config)#3、在交换机中创建vlan100和vlan200,并添加端口。交换机A:switchA(config)#vlan 100switchA(config-vlan100)#switchA(config-vlan100)#switchport interface ethernet 0/0/1-8switchA(config-vlan100)#exitswitchA(config)#vlan 200switchA(config-vlan200)#switchport interface ethernet 0/0/9-16switchA(config-vlan200)#exitswitchA(config)#exitswitchA#show vlan交换机B的配置与交换机A一样。4、设置交换机trunk端口。交换机A:switchA(config)#interface ethernet 0/0/24switchA(config-ethernet0/0/24)#switchport mode trunkswitchA(config-ethernet0/0/24)#switchport trunk allowed vlan allswitchA(config-ethernet0/0/24)#exitswitchA(config)#exitswitchA#show vlan交换机B配置同交换机A。5、验证实验交换机A ping 交换机BSwitchA#ping 192.168.1.12如果ping通表明交换机之间的trunk链路已经建立成功。按下表验证,PC1插在交换机A上,PC2插在交换机B上。PC1位置PC2位置动作结果1-8端口PC1 ping 交换机B不通9-16端口PC1 ping 交换机B不通17-24端口PC1 ping 交换机B通1-8端口1-8端口PC1 ping PC2通1-8端口9-16端口PC1 ping PC2不通六 注意事项和排错(1)取消一个vlan可以使用“no vlan”。(2)取消vlan的某个端口可以在vlan模式下使用“no switchport Interface ethernet 0/0/x”。(3)当使用“switchport trunk allowed vlan all”命令后,所有以后创建的vlan中都会自动添加trunk口为成员端口。七 思考题Trunk、access、tagged、untagged这几个专业术语的关联和区别是什么?实验3 路由器静态路由配置一实验目的:(1)理解路由表(2)掌握静态路由的配置二实验设备:(1)DCR路由器3台(2)交叉双绞线4根三 实验拓扑:四 实验要求 Router-ARouter-BRouter-Ce0/1192.168.1.1e0/1192.168.1.2f0/0192.168.2.2f0/0192.168.0.1f0/0192.168.2.1e0/1192.168.3.1五 实验步骤1、 设置路由器Router-A以太网接口地址并验证(粗体是输入的命令,!之后是注释)Router-Aenable!进入特权模式Router-A#config!进入全局配置模式Router-A_config#interface f0/0!进入接口模式,配置f0/0端口Router-A_config_f0/0#ip address 192.168.0.1 255.255.255.0!设置IP地址Router-A_config_f0/0#no shutdown!激活端口Router-A_config_f0/0#Z!Ctrl-Z回到特权模式Router-A#show interface f0/0!验证f0/0端口状态FastEthernet0/0 is up, line protocol is up!接口和协议都必须upRouter-A#configRouter-A_config#interface e0/1! 进入接口模式,配置e0/1端口Router-A_config_f1/0#ip address 192.168.1.1 255.255.255.0!设置IP地址Router-A_config_f1/0#no shutdown!激活端口Router-A_config_f1/0#Z!Ctrl-Z回到特权模式Router-A#show interface e0/1!验证f1/0端口状态Ethernet0/1 is up, line protocol is up!接口和协议都必须up2、设置路由器Router-B以太网接口地址并验证。Router-Benable!进入特权模式Router-B#config!进入全局配置模式Router-B_config#interface f0/0!进入接口模式,配置f0/0端口Router-B_config_f0/0#ip address 192.168.2.1 255.255.255.0!设置IP地址Router-B_config_f0/0#no shutdown!激活端口Router-B_config_f0/0#Z!Ctrl-Z回到特权模式Router-B#show interface f0/0!验证f0/0端口状态FastEthernet0/0 is up, line protocol is up!接口和协议都必须upRouter-B#configRouter-B_config#interface e0/1! 进入接口模式,配置e0/1端口Router-B_config_f1/0#ip address 192.168.1.2 255.255.255.0!设置IP地址Router-B_config_f1/0#no shutdown!激活端口Router-B_config_f1/0#Z!Ctrl-Z回到特权模式Router-B#show interface e0/1!验证e0/1端口状态Ethernet0/1 is up, line protocol is up!接口和协议都必须up3、设置路由器Router-C以太网接口地址并验证。Router-Aenable!进入特权模式Router-A#config!进入全局配置模式Router-A_config#interface f0/0!进入接口模式,配置f0/0端口Router-A_config_f0/0#ip address 192.168.2.2 255.255.255.0!设置IP地址Router-A_config_f0/0#no shutdown!激活端口Router-A_config_f0/0#Z!Ctrl-Z回到特权模式Router-A#show interface f0/0!验证f0/0端口状态FastEthernet0/0 is up, line protocol is up!接口和协议都必须upRouter-A#configRouter-A_config#interface e0/1! 进入接口模式,配置f1/0端口Router-A_config_f1/0#ip address 192.168.3.1 255.255.255.0!设置IP地址Router-A_config_f1/0#no shutdown!激活端口Router-A_config_f1/0#Z!Ctrl-Z回到特权模式Router-A#show interface e0/1!验证f1/0端口状态Ethernet0/1 is up, line protocol is up !接口和协议都必须up4、分别查看路由器A、B、C的路由表。Router-A#show ip routeRouter-B#show ip routeRouter-C#show ip route均发现只有直连路由。5、在Router-A上PING路由器C。Router-A ping 192.168.2.2,发现不通。6、在Router-A上配置静态路由,查看路由表。Router-AenableRouter-A#configRouter-A_config#ip route 192.168.2.0 255.255.255.0 192.168.1.2Route-A_config#ip route 192.168.3.0 255.255.255.0 192.168.1.2Route-A_config#ZRouter-A#show ip route7、在Router-B上配置静态路由,查看路由表。Router-BenableRouter-B#configRouter-B_config#ip route 192.168.0.0 255.255.255.0 192.168.1.1Route-B_config#ip route 192.168.3.0 255.255.255.0192.168.2.2Route-B_config#ZRouter-B#show ip route8、在Router-C上配置静态路由,查看路由表。Router-CenableRouter-C#configRouter-C_config#ip route 192.168.0.0 255.255.0.0 192.168.2.1 /采用超网Route-C_config#ZRouter-C#show ip route9、在Router-C上测试连通性。Router-C ping 192.168.0.1PING 192.168.0.1(192.168.0.1): 56 data bytes!- 192.168.0.1 ping statistics -5 packets transmitted, 0 packets received, 0% packet loss/成功round-trip min/avg/max = 30/32/40 ms六

温馨提示

  • 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
  • 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
  • 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
  • 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
  • 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
  • 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
  • 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。

评论

0/150

提交评论