跨交换机相同VLAN间通讯

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

跨交换机相同VLAN间通讯

一、实验目的

1.了解ieee80

2.1的实现方法,掌握跨二层交换机相同vlan间通信的调试方法;

2.了解交换机接口的trunk模式和access模式;

3.了解交换机的tagged端口和untagged端口的区别;

二、应用环境

教学楼两层,分别是一年级,二年级,每个楼层都有一台交换机满足老师上网需求;每个年级都有语文教研组和数学教研组;两个年级的语文教研组的计算机可以互相访问;两个年级的数学教研组的计算机可以互相访问;语文教研组和数学教研组之间不可以自由访问;

通过划分vlan使得语文教研组和数学教研组之间不可以自由访问;使用802.1.Q进行跨交换机的vlan。

三、实验设备

1.Dcs-3926s交换机2台

2.Pc机2台

3.Console线1根

4.直通网线2根

四、实验拓扑

五、实验要求

在交换机A和交换机B上分别划分两个基于端口的VLAN:VLAN100,VLAN200。

VLAN 端口成员

1001~8

2009~16

Trunk口24

使得交换机之间vlan100的成员能够互相访问,vlan200的成员能够互相访问;vlan100和vlan200之间的成员不能互相访问。

Pc1和pc2的网络设置为:

设备IP地址Mask

交换机A 192.168.1.11 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的成员端口1~8上,两台PC互相可以ping通;PC1、PC2分别接在不同交换机VLAN的成员端口9~16上,两台PC互相可以ping通;PC1和PC2接在不同VLAN的成员端口上则互相ping不通。

若实验结果和理论相符,则本实验完成。

六、实验步骤

1.交换机恢复出厂设置

switch#set 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)#hostname 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-Vlan100)#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 Ethernet0/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 Ethernet0/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-Ethernet0/0/24)#switchport trunk allowed vlan all

相关文档
最新文档