




已阅读5页,还剩2页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
三层交换机的VLAN实验【实验目的】理解同一交换机VLAN划分和跨交换机VLAN划分的异同。了解VTP(VLAN Trunking Protocol)VLAN的传输协议【拓朴结构】图2-6 创建跨交换机的VLAN连接图(2)PC1:接C2950-1端口F0/1, IP地址:192.168.1.1/24,网关:192.168.1.254PC2:接C2950-1端口F0/2,IP地址:192.168.1.2/24,网关:192.168.1.254PC3:接C2950-1端口F0/3,IP地址:192.168.1.3/24,网关:192.168.1.254PC4:接C2950-1端口F0/4,IP地址:192.168.1.4/24,网关:192.168.1.254PC5:接C2950-2端口F0/1,IP地址:192.168.1.5/24,网关:192.168.1.254PC6:接C2950-2端口F0/2,IP地址:192.168.1.6/24,网关:192.168.1.254PC7:接C2950-2端口F0/3,IP地址:192.168.1.7/24,网关:192.168.1.254PC8:接C2950-2端口F0/4,IP地址:192.168.1.8/24,网关:192.168.1.254PC9:接C3500-3端口F0/1,IP地址:192.168.1.9/24,网关:192.168.1.254PC10:接C3500-3端口F0/2,IP地址:192.168.1.10/24,网关:192.168.1.254C2950-1的F0/12 端口和C3500-3 F0/12端口连接,C2950-2 F0/11 端口和C3500-3 F0/11端口连接。PC1、PC2、PC5、PC6、PC9、PC10属VLAN 10,PC7、PC8、属VLAN 20。【命令说明】1设置VTP域名 vtp domain 域名2打开级联口trunk switchport mode trunk3显示VTP状态 show vtp status4设置VTP工作模式 VTP serverserver|client|transparent参数说明:server 服务器模式,工作在此模式的交换机上可以创建VLAN、删除VLAN、修改VLAN并负责发送和转发VLAN更新消息。client 客户机模式,工作在此模式的交换机不能创建VLAN、删除VLAN、修改VLAN,它只能接收其他服务器模式交换机传来的VLAN配置信息。transparent 透明模式,对网络中某些交换机需要单独配置VLAN,可以将这些交换机配置成透明模式。工作在此模式的交换机上可以创建VLAN、删除VLAN、修改VLAN参数,这些VLAN配置信息不向外发送,但也能发送和转发VLAN更新消息。【配置清单】1未划分VLAN前在PC1测试与其它主机的连通性,由于是在同一VLAN和同一网段,能互相PING通。C:ping 192.168.1.2 目标主机与PC1接在同一交换机上Pinging 192.168.1.2 with 32 bytes of data:Reply from 192.168.1.2: bytes=32 time=60ms TTL=241Reply from 192.168.1.2: bytes=32 time=60ms TTL=241 Ping statistics for 192.168.1.2:Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC:ping 192.168.1.5 目标主机与PC1接在不同交换机上Pinging 192.168.1.5 with 32 bytes of data:Reply from 192.168.1.5: bytes=32 time=60ms TTL=241Reply from 192.168.1.5: bytes=32 time=60ms TTL=241 Ping statistics for 192.168.1.5:Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55ms2划分VLAN(1)交换机C2950-1设置SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname C2950-1C2950-1(config)#exitC2950-1#vlan databaseC2950-1(vlan)#vlan 10VLAN 10 added:Name:VLAN0010C2950-1(vlan)#vlan 20VLAN 20 added: Name:VLAN0020C2950-1(vlan)#exitAPPLY completed.Exiting.C2950-1#conf tEnter configuration commands, one per line. End with CNTL/Z.C2950-1(config)#interface range f0/1 2 进入组配置状态C2950-1(config-if)#switchport access vlan 10C2950-1(config-if)#exitC2950-1(config)#interface range f0/3 - 4C2950-1(config-if)#switchport access vlan 20C2950-1(config-if)#exitC2950-1(config)#interface range f0/1 - 2C2950-1(config-if)#switchport access vlan 10C2950-1(config-if)#endC2950-1#show vlanVLAN Name Status Ports-1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/1210 VLAN0010 active Fa0/1, Fa0/220 VLAN0020 active Fa0/3, Fa0/4C2950-1#测试: 在PC2上进行下面操作C:ping 192.168.1.3 不同VLAN 不能PING不通Pinging 192.168.1.3 with 32 bytes of data:Request timed out.Request timed out.Ping statistics for 192.168.1.3: Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0msC:ping 192.168.1.1 相同VLAN10可以PING通Pinging 192.168.1.5 with 32 bytes of data:Reply from 192.168.1.5: bytes=32 time=60ms TTL=241Reply from 192.168.1.5: bytes=32 time=60ms TTL=241 Ping statistics for 192.168.1.5:Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55ms(2)交换机C2950-2设置:SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname C2950-2C2950-2(config)#exitC2950-2#vlan databaseC2950-2(vlan)#vlan 10VLAN 10 added: Name:VLAN0010C2950-2(vlan)#vlan 20VLAN 20 added: Name:VLAN0020C2950-2(vlan)#exitAPPLY completed.Exiting.C2950-2#conf tEnter configuration commands, one per line. End with CNTL/Z.C2950-2(config)#interface range f0/1 - 2C2950-2(config-if)#switchport access vlan 10C2950-2(config-if)#exitC2950-2(config)#interface range f0/3 - 4C2950-2(config-if)#switchport access vlan 20C2950-2(config-if)#exitC2950-2(config)#endC2950-2#show vlanVLAN Name Status Ports-1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/1210 VLAN0010 active Fa0/1, Fa0/220 VLAN0020 active Fa0/3, Fa0/4C2950-2#测试:在PC4上进行下面操作C:ping 192.168.1.5 同一交换机 同一网段不同VLAN不能PING通Pinging 192.168.1.5 with 32 bytes of data:Request timed out.Request timed out.Ping statistics for 192.168.1.5: Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0msC:ping 192.168.1.3 同一交换机同一VLAN可PING同Pinging 192.168.1.3 with 32 bytes of data:Reply from 192.168.1.3: bytes=32 time=60ms TTL=241Reply from 192.168.1.3: bytes=32 time=60ms TTL=241Ping statistics for 192.168.1.3: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC:ping 192.168.1.1 同一VLAN不同交换机不能PING通Pinging 192.168.1.1 with 32 bytes of data:Request timed out.Request timed out.Ping statistics for 192.168.1.1: Packets: Sent = 5, Received = 0, Lost = 5 (100% loss),Approximate round trip times in milli-seconds: Minimum = 0ms, Maximum = 0ms, Average = 0ms(3)交换机C3550-3设置SwitchenSwitch#conf tSwitch(config)#hostname C3550-3C3550-3(config)#exitC3550-3#vlan databaseC3550-3(vlan)#vtp domain HL 设置VTP管理域名称HLC3550-3(vlan)#VTP server 设置交换机为服务器(server)模式C3550-3(vlan)#vlan 10VLAN 10 added: Name:VLAN0010C3550-3(vlan)#vlan 20VLAN 20 added: Name:VLAN0020C3550-3(vlan)#exitAPPLY completed.Exiting.C3550-3#conf tEnter configuration commands, one per line. End with CNTL/Z.C3550-3(config)#interface range f0/1 - 2C3550-3(config-if)#switchport access vlan 10C3550-3(config-if)#exitC3550-3(config)#interface range f0/3 - 4C3550-3(config-if)#switchport access vlan 20C3550-3(config-if)#exitC3550-3(config)#endC3550-3#show vlanVLAN Name Status Ports-1 default active Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/1410 VLAN0010 active Fa0/1, Fa0/220 VLAN0020 active Fa0/3, Fa0/4C3550-3#conf tEnter configuration commands, one per line. End with CNTL/Z.C3550-3(config)#interface f0/11C3550-3(config-if)#switchport 指定本端口为二层交换端口C3550-3(config-if)#switchport trunk encapsulation dot1q 配置中继协议为 dot1qC3550-3(config-if)#switchport mode trunk 指定端口的模式为中继(trunk)端口C3550-3(config-if)#exitC3550-3(config)#interface f0/12C3550-3(config-if)#switchportC3550-3(config-if)#switchport trunk encapsulation dot1qC3550-3(config-if)#switchport mode trunkC3550-3(config-if)#end交换机C2950-1设置C2950-1#vlan databaseC2950-1(vlan)#vtp domain HLChanging VTP domain from NULL to hlC2950-1(vlan)#vtp client 设置交换机为客户机(client)模式C2950-1(vlan)#exitC2950-1#conf tEnter configuration commands, one per line. End with CNTL/Z.C2950-1(config)#interface f0/12C2950-1(config-if)#switchport trunk encapsulation dot1qC2950-1(config-if)#switchport mode trunkC2950-1(config-if)#end交换机C2950-2设置C2950-2#vlan databaseChanging VTP domain from NULL to hlC2950-2(vlan)#vtp domain HLC2950-2(vlan)#vtp clientC2950-2(vlan)#exitC2950-1#conf tEnter configuration commands, one per line. End with CNTL/Z.C2950-2(config)#interface f0/11C2950-2(config-if)#switchport trunk encapsulation dot1qC2950-2(config-if)#switchport mode trunkC2950-2(config-if)#end在PC9测试的结果如下:C:ipconfig /ip 192.168.1.9 255.255.255.0C:ipconfig /dg 192.168.1.254C:ping 192.168.1.10 在同一交换机、同一VLAN、同一网段可以PING通Pinging 192.168.1.10 with 32 bytes of data:Reply from 192.168.1.10: bytes=32 time=60ms TTL=241Reply from 192.168.1.10: bytes=32 time=60ms TTL=241Ping statistics for 192.168.1.10: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average = 55msC:ping 192.168.1.1 由于配置了中继协议 dot1和配置了中继端端口,不同交换机、同一VLAN可以PING通。Pinging 192.168.1.1 with 32 bytes of data:Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Reply from 192.168.1.1: bytes=32 time=60ms TTL=241Ping statistics for 192.168.1.1: Packets: Sent = 5, Received = 5, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 50ms, Maximum = 60ms, Average =
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025年三年级竞赛试卷及答案
- 2025年趣味数字比赛题目及答案
- 2025年手术室消毒隔离制度试题手术室消毒隔离制度试题及答案
- 2025年上半年幼儿园教师资格证保教知识与能力真题及答案
- 2025年山东省潍坊市事业单位教师招聘考试《教育理论》真题库及答案
- CN222988813U 一种具有口沿防烫结构的打包餐盒 (广东悦盛日塑科技有限公司)
- CN120262942A 一种单相并网差分降压逆变器、系统及控制方法 (陕西科技大学)
- 巧克力理论试题及答案
- 极限计算题目及答案
- CN120096918B 一种新能源电池自动贴胶机及其使用方法 (上海鸿掣自动化科技有限公司)
- 2025-2026学年广美版(2024)小学美术二年级上册教学计划及进度表
- 2025年手电筒行业研究报告及未来行业发展趋势预测
- 酒店客户服务质量提升培训课件
- GB/T 9258.2-2025涂附磨具用磨料粒度组成的检测和标记第2部分:粗磨粒P12~P220
- 2025山西太原西山生态文旅投资建设有限公司及子公司招聘13人笔试参考题库附带答案详解
- 2025 年小升初吕梁市初一新生分班考试语文试卷(带答案解析)-(部编版)
- 2025秋全体教师大会上,德育副校长讲话:德为根,安为本,心为灯,家为桥-这场开学讲话,句句都是育人的方向
- 2025年政工师考试试题及参考答案
- (2025年标准)个人转款协议书
- 2025兵团连队职工考试试题及答案解析
- 2025-2026学年接力版(2024)小学英语四年级上册(全册)教学设计(附目录)
评论
0/150
提交评论