中文

飞速(FS) S3900系列交换机如何配置基于协议划分的VLAN?

发布于 2020年06月05日 by
606

在局域网中,VoIP、IPTV、Internet等业务一般通过不同的协议来传输语音、电视和网络等服务。为了方便网络管理,采用相同协议的业务会被划分到同一个VLAN中进行管理。因此,在一个局域网中将会存在着多个基于协议划分的VLAN。基于协议划分的VLAN是根据IP、IPX、AT等协议来进行的VLAN划分,它只能在Hybrid端口进行配置,用来定义Untagged数据帧的过滤标准。飞速(FS)S3900系列交换机是专门为校园网,中小型企业和家庭网服务的交换机,本文将着重讲述如何在S3900系列交换机上配置基于协议划分的VLAN。

 

飞速(FS) S3900系列交换机基于协议划分VLAN的应用

下图展示了S3900-24T4S管理型交换机的基于协议划分VLAN的典型组网应用。在网络中,两个不同的Internet业务分别通过IPv4和IPv6两种协议来传输服务。通过在S3900-24T4S交换机上配置基于协议划分的VLAN,两种不同的Internet业务被划分到不同的VLAN中——即VLAN 10和VLAN 20。 在VLAN 10 中,终端用户通过IPv4 协议和网络服务器通信,而在VLAN 20中,用户则使用IPv6和网络服务器通信。

注意:

1. 当设备接口接收到Untagged帧时, 设备会先识别帧的协议模板,然后确定报文所属的VLAN。

2. 如果接口配置了某些协议VLAN,且报文的协议模板匹配其中某个协议VLAN,则给报文打上该协议VLAN的Tag。

3. 如果接口配置了某些协议VLAN,但报文的协议模板和所有协议VLAN不匹配,则给报文打上接口PVID的Tag。

 

飞速(FS) S3900系列交换机基于协议划分VLAN的配置思路

S3900系列交换机基于协议划分VLAN的配置可以通过命令行界面来实现。配置的方法适用于S3900全系列交换机,下面以S3900-24T4S这款交换机的配置为例进行说明。

配置思路:

1.配置PC的IP地址。

2.创建各网络层协议所需要关联的VLAN。

3.配置交换机端口类型及允许相应协议的VLAN通过。

4.查看配置信息。

 

飞速(FS) S3900系列交换机通过命令行界面划分协议VLAN的配置

1. 为PC1和PC3配置IPv4地址;为PC2和PC4配置IPv6地址

IP: 192.168.10.2
IP:192.168.10.3
IP: 2001::1:2
IP: 2001::1:3

2. 在S3900-24T4S交换机上创建VLAN 10和VLAN 20.

S3900-24T4S(config)#vlan database
S3900-24T4S(config-vlan)#vlan 10
S3900-24T4S(config-vlan)#vlan 20
S3900-24T4S(config-vlan)#exit

3. 配置网络协议并与对应VLAN关联

S3900-24T4S(config)#protocol-vlan protocol-group 1 add frame-type ethernet protocol-type ip
S3900-24T4S(config)#protocol-vlan protocol-group 2 add frame-type ethernet protocol-type ipv6
S3900-24T4S(config)#protocol-vlan protocol-group 3 add frame-type ethernet protocol-type arp
S3900-24T4S(config)#interface ethernet 1/2
S3900-24T4S(config-if)#protocol-vlan protocol-group 1 vlan 10
S3900-24T4S(config-if)#protocol-vlan protocol-group 3 vlan 10
S3900-24T4S(config-if)#exit
S3900-24T4S(config)#interface ethernet 1/3
S3900-24T4S(config-if)#protocol-vlan protocol-group 2 vlan 20
S3900-24T4S(config-if)#exit
S3900-24T4S(config)#interface ethernet 1/4
S3900-24T4S(config-if)#protocol-vlan protocol-group 1 vlan 10
S3900-24T4S(config-if)#exit
S3900-24T4S(config)#interface ethernet 1/5
S3900-24T4S(config-if)#protocol-vlan protocol-group 2 vlan 20
S3900-24T4S(config-if)#exit

4. 将S3900-24T4S交换机的eth1/2-5端口配置为Hybrid端口,并剥离对应VLAN tag标签。

S3900-24T4S(config)#int ethernet 1/2
S3900-24T4S(config-if)#switchport mode hybrid
S3900-24T4S(config-if)#switchport hybrid allowed vlan add 10 untagged
S3900-24T4S(config)#int ethernet 1/3
S3900-24T4S(config-if)#switchport mode hybrid
S3900-24T4S(config-if)#switchport hybrid allowed vlan add 20 untagged
S3900-24T4S(config)#int ethernet 1/4
S3900-24T4S(config-if)#switchport mode hybrid
S3900-24T4S(config-if)#switchport hybrid allowed vlan add 10 untagged
S3900-24T4S(config)#int ethernet 1/5
S3900-24T4S(config-if)#switchport mode hybrid
S3900-24T4S(config-if)#switchport hybrid allowed vlan add 20 untagged

5. 将S3900-24T4S交换机的eth1/1端口配置为Trunk端口,并允许所有VLAN通过。

S3900-24T4S(config)#int ethernet 1/1
S3900-24T4S(config-if)#switchport mode trunk
S3900-24T4S(config-if)#switchport trunk allowed vlan all

6. 在S5800-8TF12S交换机上创建VALN 10和VLAN 20,然后将S5800-8TF12S交换机的eth1/1端口配置为Trunk端口,并允许所有VLAN通过。

S5800-8TF12S(config)#vlan database
S5800-8TF12S(config-vlan)#vlan 10
S5800-8TF12S(config-vlan)#vlan 20
S5800-8TF12S(config-vlan)#exit
S5800-8TF12S(config)#int ethernet 1/1
S5800-8TF12S(config-if)#switchport mode trunk
S5800-8TF12S(config-if)#switchport trunk allowed vlan all

7. 将S5800-8TF12S交换机的eth1/2-3端口配置为Trunk端口,并允许对应VLAN通过。

S5800-8TF12S(config)#int ethernet 1/2
S5800-8TF12S(config-if)#switchport mode trunk
S5800-8TF12S(config-if)#switchport trunk allowed vlan add 10
S5800-8TF12S(config)#int ethernet 1/3
S5800-8TF12S(config-if)#switchport mode trunk
S5800-8TF12S(config-if)#switchport trunk allowed vlan add 20

8. 查看配置信息。 .

S3900-24T4S# show protocol-vlan protocol-group
Protocal-based vlan 1.png

S3900-24T4S# show int protocol-vlan protocol-group
Protocal-based vlan 2.png

相关推荐

飞速(FS) S3900系列交换机如何配置基于接口划分的VLAN?

飞速(FS) S3900系列交换机如何配置基于子网划分的VLAN?

飞速(FS) S3900系列交换机如何配置Voice VLAN?

相关文章推荐

技术博文
See profile for Jesse.
Jesse
光分路器光衰多少,如何计算和测量?
2022年01月25日
14.9k
技术博文
技术博文
See profile for Audrey.
Audrey
FTTH网络应如何设计分层与分光比?
2022年01月25日
3.8k
技术博文
技术博文
技术博文
See profile for Audrey.
Audrey
揭秘光分路器类型及选择
2022年01月24日
3.4k
技术博文
See profile for Audrey.
Audrey
一文教您认识光分路器
2022年01月24日
4.9k
技术博文
See profile for Jesse.
Jesse
家庭网络怎么布线?家用网线布线指南
2021年12月31日
1.9k
技术博文
公司新闻
See profile for George.
George
关于飞速(FS)800G光模块的技术问答
2024年05月16日
43
技术博文
See profile for Audrey.
Audrey
数据中心预端接主干铜缆解决方案
2021年12月31日
1.8k