不同VLAN之间数据通信实验

上传人:ss****gk 文档编号:208875670 上传时间:2021-11-08 格式:DOC 页数:4 大小:143.59KB
返回 下载 相关 举报
不同VLAN之间数据通信实验_第1页
第1页 / 共4页
不同VLAN之间数据通信实验_第2页
第2页 / 共4页
不同VLAN之间数据通信实验_第3页
第3页 / 共4页
不同VLAN之间数据通信实验_第4页
第4页 / 共4页
亲,该文档总共4页,全部预览完了,如果喜欢就下载吧!
资源描述

《不同VLAN之间数据通信实验》由会员分享,可在线阅读,更多相关《不同VLAN之间数据通信实验(4页珍藏版)》请在金锄头文库上搜索。

1、不同VLAN之间数据通信实验班级学号: 姓名: 评分:【背景描述】某高校同一办公楼有两个只能部门教务处和科技处,其中教务处的员工在不同楼层分散办公,他们之间要进 行互相通信,一般情况下为了数据安全起见,教务处和科技处通过VLAN实现业务隔离;有与某项工作需要, 现在教务处和科技处两部门员工又要相互通信,请为网络设备做适当配置实现上述0标。【实验设备】S2126交换机1台、S3550三层交换机1台、R1762路由器1台、PC机2台、直连线、交叉线若干 【实验拓扑】PCOPC1图8. 1二层交换机+路由器拓扑图【实验步骤】一,通过二层交挽机+路由器实现不同VLAN之间的通信1,在交换机上创建vla

2、nlO, vlan20,并分别将端口 faO/1, faO/2划分到vlanlO, vlan20中Swit.ch#conf t.Enter configuration commands, one per line. End with CNTL/Z.Switch(config)#vlan 10 Switch(conf ig-vlan)#name kej ichu Switch(configvlan)#vlan 20 Switch(conf ig-vlan)#name j iaowuchu Switch(conf ig-vlan)#exit Switch (config) # int. f aO/

3、 1Switch (conf ig-if) #switchport. access vlan 10Switch (config-if) #int. faO/2Switch(config-if)#switchport access vlan 20图 8. 2 创建 VLAN10、VLAN202,在交换机faO/24上配置trunkSwitch(config) # int faO/2 4Switch (conf igif)mode trunk:图8. 3设賈端口为trunk3, 配賈路由器子端口Router(config)#int faO/O.1 %LINK-5-CHANGED: Interfac

4、e FastEthernetO/O.lz changed state to upLINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernetO/O.1, changed state to upRouter(config-subif)#encaRouter (conf ig-sutoif) encapsulateion dot 1Router(config-sutoif)encapsulation dotRouter(config-subif)encapsulation dotIQ 10Router(config-sutoif)#ip a

5、ddr 192.168.10.1 255.255.255.0Router(config-subif)#int fa0/0.2%LINK-5-CHANGED: Interface FastEthernetO/O.2, changed state to upLINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernetO/O.2, changed state to upRouter(config-subif)#encRouter(config-sutoif)encapsulation dotRouter(config-subif)encaps

6、ulation dotIQ 20Router(config-sutoif)#ip addr 192.168.20.1 255.255.255.0图8. 4配置路由字端口4, 激活路由选择协议Router#show ip routeCodes: C - connected S - static I - IGRPZ R - RIP, H - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 一 OSPF NSSA external type 1, N2 - OSPF NSSA exte

7、rnal type 2 El - OSPF external type 1, E2 - OSPF external type 2, E - EGP i 一 IS-IS, LI IS-IS 丄evel-1, L2 ISIS level-2, ia ISIS inter area * 一 candidate default, U per-user static route, o ODR P - periodic downloaded static routeGateway of last resort is not setC192.168.10.0/24 is directly connected

8、, FastEthernetO/O.1C192.168.20.0/24 is directly connected, FastEthernetO/O.2图8. 5查看路由信息5, 保存路由器配置Routex:#copy runningconstarRouter#copy runningconf ig startup conf igDestination f i lenaitie startup-config ?Building coni igur at. ion. rOKI图8. 6保存路由配置文件6, 为2台主机分配ip地址,子网掩码和网关地址7, 验证pci和pc2能否互相通信POping

9、 192.168.10.2Pinging 192.168.10.2 with 32 bytes of data:t. ime= 110ms t ime=12 5ms t ime=12 5msTTL=127TTL=127TTL=127Request t imed out.Rep ly from 192.1 68.10.2 : toyt.es = 32 Reply from 192.1 68 . IO . 2 : tiytes = 32 Reply from 192.168.10.2: toytes=32Ping statistics for 192.168.10.2:Packets: Sent

10、= 4, Received = 3, Lost = 1(25% lossApproximate round trip times in mi11i seconds:Minimum =1lOms, Maximum =125ms, Average = 12Oms=121msPC-PTPC2Pinging 192.168.20.2 with 32 bytes:Of idata:Replyfrom192 .168.20.2:toytes = 3 2t ime=12 5msTTL=127Replyfrom192 .168.20.2:toytes=32t. ime:=110msTTL=127Replyfr

11、om192 .163.20.2:toyt.es = 32t ime:=125msTTL=127Rep lyfrom192 .168.20.2:tiyt.es = 32t. ime=12 5msTTL=127Ping st-at. 1st.icsfor 192.168.20.2:POping 192.168.20.2Packets: Sent = 4, Received = 4, Lost = 0 Approximate round trip times in milli-seconds:Minimum = 110ms, Maximum = 125ms, Average(0令 loss),阁8.

12、 7验证PCI和PC2的连通性二,通过三层交换机实现VLAN间路由PC-PTPCI图8. 8三层交换机实现不同VLAN间的通信拓扑图 1,在三层交换机上创建vlanlO, vlein20,并分别将端口 fa0/l,fa0/2划分到vlan 10, vlan 20中Switch(conf ig)#vlan 10Switch(configvlan)#name kej ichuSwitch(conf igvlan)#ex itSwitch(config)#vlan 20Switch(conf ig-vlan)#name j iaowuchuSwitch(conf ig-vlan)#ex itSwit

13、ch (conf ig) #int. f aO/ 1Switch (conf ig-i) #swit-chport. access vlan 10Switch (conf igif) # ints f aO/2Switch (conf ig if) #switschport. access vlan 20图8. 9在三层交换机上创建VLAN10、VLAN20 2,在三层交换机上创建SVI接口,采川SVT方式实现VLAN间互连Snitch(config)#int vlan 10 %LINK-5-CHANGED: Interface VlanlO, changed state to up%LINE

14、PROTO-5-UPDOUN: Line protocol on Interface VlanlO, changed state to up Switch(config-if)#ip addr 192.168.10.1 255.255.255.0 Switch(config-if)#no shutdownSwitch (conf ig-if) #exit.Switch (config) #mt vlan 20 %LINK5CHANGED: Interface Vlan20z changed state to up%LINEPROTO-5-UPDOW: Line protocol on Inte

15、rface Vlan20, changed state to up Switch(config-if)#ip addr 192.168.20.1 255.255.255.0 Switch(config-if)#no shutdownSwitch(config-if)#end图8. 10在三层交换机上创建SVI接口 3,为2台主机分配ip地址,子网掩码和网关地址4,测试pci和pc2能否互通POping 192.168.10.2P inging192.168.102 with 32 bytes of data:Request timed out.Reply from 192.168.10.2: Reply from 192.168.10.2: Reply from 192.168.10.2:toytes=32 = 3 2 toytes=32t ime= 62ms t. ime= 63ms t ime = 4 6msTTL=127TTL=127TTL=127Ping stat

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

当前位置:首页 > 办公文档 > 其它办公文档

电脑版 |金锄头文库版权所有
经营许可证:蜀ICP备13022795号 | 川公网安备 51140202000112号