跨交换机相同VLAN间通讯 .pdf

上传人:zh****71 文档编号:137764297 上传时间:2020-07-11 格式:PDF 页数:10 大小:230.65KB
返回 下载 相关 举报
跨交换机相同VLAN间通讯 .pdf_第1页
第1页 / 共10页
跨交换机相同VLAN间通讯 .pdf_第2页
第2页 / 共10页
亲,该文档总共10页,到这儿已超出免费预览范围,如果喜欢就下载吧!
资源描述

《跨交换机相同VLAN间通讯 .pdf》由会员分享,可在线阅读,更多相关《跨交换机相同VLAN间通讯 .pdf(10页珍藏版)》请在金锄头文库上搜索。

1、跨交换机相同VLAN间通讯 一、实验目的 1.了解 ieee802.1 的实现方法,掌握跨二层交换机相同vlan 间通信的调试方法; 2.了解交换机接口的trunk 模式和 access模式; 3.了解交换机的tagged 端口和 untagged 端口的区别; 二、应用环境 教学楼两层,分别是一年级,二年级,每个楼层都有一台交换机满足老师上网需求;每 个年级都有语文教研组和数学教研组;两个年级的语文教研组的计算机可以互相访问;两个 年级的数学教研组的计算机可以互相访问;语文教研组和数学教研组之间不可以自由访问; 通过划分 vlan 使得语文教研组和数学教研组之间不可以自由访问;使用 802.

2、1.Q 进行跨 交换机的vlan。 三、实验设备 1.Dcs-3926s 交换机 2 台 2.Pc 机 2 台 3.Console 线 1 根 4.直通网线2根 四、实验拓扑 五、实验要求 在交换机 A 和交换机 B 上分别划分两个基于端口的VLAN :VLAN100 ,VLAN200 。 VLAN 端口成员 10018 200916 Trunk 口24 使得交换机之间vlan100 的成员能够互相访问,vlan200 的成员能够互相访问;vlan100 和 vlan200 之间的成员不能互相访问。 Pc1 和 pc2 的网络设置为: 设备IP 地址Mask 交换机 A 192.168.1.1

3、1 255.255.255.0 交换机 B192.168.1.12255.255.255.0 PC1 192.168.1.101 255.255.255.0 PC2 192.168.1.102 255.255.255.0 PC1、 PC2分别接在不同交换机VLAN100 的成员端口 18上,两台 PC 互相可以ping 通; PC1、PC2分别接在不同交换机VLAN 的成员端口 916上,两台 PC 互相可以ping 通; PC1 和 PC2接在不同 VLAN 的成员端口上则互相ping 不通。 若实验结果和理论相符,则本实验完成。 六、实验步骤 1.交换机恢复出厂设置 switch#set

4、default switch#write switch#reload 2.给交换机设置标识符和管理ip 交换机 A: switch(Config)#hostname switchA switchA(Config)#interface vlan 1 switchA(Config-If-Vlan1)#ip address 192.168.1.11 255.255.255.0 switchA(Config-If-Vlan1)#no shutdown switchA(Config-If-Vlan1)#exit switchA(Config)# 交换机 B: switch(Config)#hostnam

5、e switchB switchB(Config)#interface vlan 1 switchB(Config-If-Vlan1)#ip address 192.168.1.12 255.255.255.0 switchB(Config-If-Vlan1)#no shutdown switchB(Config-If-Vlan1)#exit switchB(Config)# 3.在交换机中创建vlan100 和 vlan200,并添加端口。 交换机 A: switchA(Config)#vlan 100 switchA(Config-Vlan100)# switchA(Config-Vlan

6、100)#switchport interface ethernet 0/0/1-8 switchA(Config-Vlan100)#exit switchA(Config)#vlan 200 switchA(Config-Vlan200)#switchport interface ethernet 0/0/9-16 switchA(Config-Vlan200)#exit switchA(Config)# switchA#show vlan VLAN Name Type Media Ports - - - - - 1 default Static ENET Ethernet0/0/17 Et

7、hernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethernet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24 100 VLAN0100 Static ENET Ethernet0/0/1 Ethernet0/0/2 Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7 Ethernet0/0/8 200 VLAN0200 Static ENET Ethernet0/0/9 Ethernet0/0/10 Ethern

8、et0/0/11 Ethernet0/0/12 Ethernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16 switchA# 交换机 B: 配置与交换机A一样。 4.设置交换机trunk 端口 交换机 A: switchA(Config)#interface ethernet 0/0/24 switchA(Config-Ethernet0/0/24)#switchport mode trunk Set the port Ethernet0/0/24 mode TRUNK successfully switchA(Config-Ethe

9、rnet0/0/24)#switchport trunk allowed vlan all set the port Ethernet0/0/24 allowed vlan successfully switchA(Config-Ethernet0/0/24)#exit switchA(Config)# 验证配置: switchA#show vlan VLAN Name Type Media Ports - - - - - 1 default Static ENET Ethernet0/0/17 Ethernet0/0/18 Ethernet0/0/19 Ethernet0/0/20 Ethe

10、rnet0/0/21 Ethernet0/0/22 Ethernet0/0/23 Ethernet0/0/24(T) 100 VLAN0100 Static ENET Ethernet0/0/1 Ethernet0/0/2 Ethernet0/0/3 Ethernet0/0/4 Ethernet0/0/5 Ethernet0/0/6 Ethernet0/0/7 Ethernet0/0/8 Ethernet0/0/24(T) 200 VLAN0200 Static ENET Ethernet0/0/9 Ethernet0/0/10 Ethernet0/0/11 Ethernet0/0/12 Et

11、hernet0/0/13 Ethernet0/0/14 Ethernet0/0/15 Ethernet0/0/16 Ethernet0/0/24(T) switchA# 24口已经出现在vlan1 、vlan100 和 vlan200 中,并且 24口不是一个普通端口,是 tagged 端口。 交换机 B: 配置同交换机A 5. 验证实验。 交换机 Aping 交换机 B: switchA#ping 192.168.1.12 Type c to abort. Sending 5 56-byte ICMP Echos to 192.168.1.12, timeout is 2 seconds.

12、! Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms switchA# 表明交换机之前的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 可以

13、使用“ no vlan ”。 2、取消 vlan 的某个端口可以在vlan 模式下使用“ no switchport interface ethernet 0/0/x ”。 3、 当使用“ switchport trunk allowed vlan all”命令后,所有以后创建的vlan , 中都会自动添加trunk口为成员端口; 八、 配置序列 switchA#show run Current configuration: ! hostname switchA ! Vlan 1 vlan 1 ! Vlan 100 vlan 100 ! Vlan 200 vlan 200 ! ! Interface Ethernet0/0/1 switchport access vlan 100 ! Interface Ethernet0/0/2 switchport access vlan 100 ! Interface Ethernet0/0/3 switchport access vlan 100 ! Interface Ethernet0/0/4 switchport access vlan 100 ! Interface Ethernet0/0/5 switchport access vlan 100 ! Interface Ethernet0/0/6

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

当前位置:首页 > 中学教育 > 其它中学文档

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