实验4利用三层交换机实现VLAN间路由(5页).doc

上传人:1595****071 文档编号:68292796 上传时间:2022-12-27 格式:DOC 页数:5 大小:210.50KB
返回 下载 相关 举报
实验4利用三层交换机实现VLAN间路由(5页).doc_第1页
第1页 / 共5页
实验4利用三层交换机实现VLAN间路由(5页).doc_第2页
第2页 / 共5页
点击查看更多>>
资源描述

《实验4利用三层交换机实现VLAN间路由(5页).doc》由会员分享,可在线阅读,更多相关《实验4利用三层交换机实现VLAN间路由(5页).doc(5页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。

1、-实验4利用三层交换机实现VLAN间路由-第 5 页一、实验目标 掌握交换机Tag VLAN 的配置; 掌握三层交换机基本配置方法; 掌握三层交换机VLAN路由的配置方法; 通过三层交换机实现VLAN间相互通信;二、实验背景某企业有两个主要部门,技术部和销售部,分处于不同的办公室,为了安全和便于管理,对两个部门的主机进行了VLAN的划分,技术部和销售部分处于不同的VLAN。现由于业务的需求,需要销售部和技术部的主机能够相互访问,获得相应的资源,两个部门的交换机通过一台三层交换机进行了连接。三、技术原理三层交换机具备网络层的功能,实现VLAN间相互访问的原理是:利用三层交换机的路由功能,通过识别

2、数据包的IP地址,查找路由表进行选路转发。三层交换机利用直连路由可以实现不同VLAN之间的互相访问。三层交换机给接口配置IP地址,采用SVI(交换虚拟接口)的方式实现VLAN间互连。SVI是指为交换机中的VLAN创建虚拟接口,并且配置IP地址。四、实验步骤实验拓扑1、在二层交换机上配置VLAN 2、VLAN 3,分别将端口2、端口3划到VLAN 2、VLAN 3;2、将二层交换机与三层交换机相连的端口Fa0/1定义为Tag VLAN模式;SwitchenSwitch#conf tEnter configuration commands, one per line. End with CNTL/

3、Z.Switch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#vlan 3Switch(config-vlan)#exitSwitch(config)#interface fa0/2Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#interface fa0/3Switch(config-if)#switchport access vlan 3Switch(config-if)#exitSwitch(config)#inter

4、face fa0/1Switch(config-if)#switchport mode trunk%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to upSwitch(config-if)#3、在三层交换机上配置VLAN 2、VLAN 3,分别将端口2、端口3划到VLAN 2、VLAN 3;SwitchenSwit

5、ch#conf tEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 2Switch(config-vlan)#exitSwitch(config)#vlan 3Switch(config-vlan)#exitSwitch(config)#interface fa0/2Switch(config-if)#switchport access vlan 2Switch(config-if)#exitSwitch(config)#interface fa0/3Switch(config-if)

6、#switchport access vlan 3Switch(config-if)#exitSwitch(config)#4、设置三层交换机VLAN间通信,创建VLAN 2、VLAN 3的虚拟接口,并配置虚拟接口VLAN 2、VLAN 3的IP地址;Switch(config)#interface vlan 2 /创建 VLAN 2 的虚拟接口Switch(config-if)#%LINK-5-CHANGED: Interface Vlan2, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2,

7、changed state to upSwitch(config-if)#ip address 192.168.1.1 255.255.255.0 /配置虚拟接口 VLAN 2 的IP地址Switch(config-if)#no shutdown Switch(config-if)#exitSwitch(config)#interface vlan 3 /创建 VLAN 2 的虚拟接口Switch(config-if)#%LINK-5-CHANGED: Interface Vlan3, changed state to up%LINEPROTO-5-UPDOWN: Line protocol

8、on Interface Vlan3, changed state to upSwitch(config-if)#ip address 192.168.2.1 255.255.255.0 /配置虚拟接口 VLAN 2 的IP地址Switch(config-if)#no shutdown Switch(config-if)#endSwitch#5、查看三层交换机路由表Switch#show ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP

9、external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area * - candidate default, U - per-user static route, o - ODR P -

10、 periodic downloaded static routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, Vlan2C 192.168.2.0/24 is directly connected, Vlan3Switch#6、将VLAN 2、VLAN 3下的主机默认网关分别设置为相应虚拟接口的IP地址;五、验证打开PC1 Command PromptPacket Tracer PC Command Line 1.0PCipconfigIP Address.: 192.168.1.2Subne

11、t Mask.: 255.255.255.0Default Gateway.: 192.168.1.1PCping 192.168.1.3Pinging 192.168.1.3 with 32 bytes of data:Reply from 192.168.1.3: bytes=32 time=187ms TTL=128Reply from 192.168.1.3: bytes=32 time=93ms TTL=128Reply from 192.168.1.3: bytes=32 time=110ms TTL=128Reply from 192.168.1.3: bytes=32 time

12、=93ms TTL=128Ping statistics for 192.168.1.3: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),Approximate round trip times in milli-seconds: Minimum = 93ms, Maximum = 187ms, Average = 120msPCping 192.168.2.2Pinging 192.168.2.2 with 32 bytes of data:Request timed out.Reply from 192.168.2.2: bytes

13、=32 time=188ms TTL=127Reply from 192.168.2.2: bytes=32 time=112ms TTL=127Reply from 192.168.2.2: bytes=32 time=125ms TTL=127Ping statistics for 192.168.2.2: Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),Approximate round trip times in milli-seconds: Minimum = 112ms, Maximum = 188ms, Average =

14、 141msPCping 192.168.2.3Pinging 192.168.2.3 with 32 bytes of data:Request timed out.Reply from 192.168.2.3: bytes=32 time=125ms TTL=127Reply from 192.168.2.3: bytes=32 time=78ms TTL=127Reply from 192.168.2.3: bytes=32 time=64ms TTL=127Ping statistics for 192.168.2.3: Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),Approximate round trip times in milli-seconds: Minimum = 64ms, Maximum = 125ms, Average = 89ms实验步骤,(5)最后加一句Switch(config)#ip routing !开启三层交换机路由功能就更完美了!(下面方法未验证)pc1和PC2不会通啊,求指导!三层交换机f0/1没有设置trunk,导致 pc1 与pc2不通

展开阅读全文
相关资源
相关搜索

当前位置:首页 > 应用文书 > 合同协议

本站为文档C TO C交易模式,本站只提供存储空间、用户上传的文档直接被用户下载,本站只是中间服务平台,本站所有文档下载所得的收益归上传人(含作者)所有。本站仅对用户上传内容的表现方式做保护处理,对上载内容本身不做任何修改或编辑。若文档所含内容侵犯了您的版权或隐私,请立即通知得利文库网,我们立即给予删除!客服QQ:136780468 微信:18945177775 电话:18904686070

工信部备案号:黑ICP备15003705号-8 |  经营许可证:黑B2-20190332号 |   黑公网安备:91230400333293403D

© 2020-2023 www.deliwenku.com 得利文库. All Rights Reserved 黑龙江转换宝科技有限公司 

黑龙江省互联网违法和不良信息举报
举报电话:0468-3380021 邮箱:hgswwxb@163.com