繁體中文

飛速(FS) S3900系列交換機如何配置基於協議劃分的VLAN?

發佈於 2020年06月05日 by
704

在局域網中,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日
17.6k
技術博文
技術博文
See profile for Audrey.
Audrey
FTTH網絡應如何設計分層與分光比?
2022年01月25日
4.8k
技術博文
技術博文
技術博文
See profile for Audrey.
Audrey
揭秘光分路器類型及選擇
2022年01月24日
4.4k
技術博文
See profile for Audrey.
Audrey
一文教您認識光分路器
2022年01月24日
7.0k
技術博文
See profile for Jesse.
Jesse
家庭網絡怎麼布線?家用網線布線指南
2021年12月31日
2.7k
技術博文
技術博文
See profile for Howard.
Howard
BPG的定義和工作原理是什麼?
2024年09月19日
28
技術博文
See profile for Audrey.
Audrey
數據中心預端接主幹銅纜解決方案
2021年12月31日
2.3k