飛速(FS) S3900系列交換機基於IP子網劃分VLAN配置指南
VLAN(虛擬LAN)在數據鏈路層的計算機網絡中劃分隔離廣播域,將來自不同物理LAN的設備組合成為一個邏輯網絡,從而實現簡易性,提高安全性,經濟性,便於流量管理。
VLAN配置共有四種,包括基於端口配置劃分VLAN,基於MAC地址劃分VLAN,基於IP子網劃分VLAN,基於協議劃分VLAN以及基於策略劃分VLAN。在這些配置中,基於子網劃分VLAN適用於對移動性和簡化管理需求較高,而對安全需求不高的情況。本文將向您介紹飛速(FS)S3900系列L2+交換機基於IP子網劃分VLAN這一特徵。
S3900系列交換機更多配置操作說明請參閱:飛速(FS) S3900系列交換機堆疊配置指南
飛速(FS) S3900系列交換機基於子網劃分VLAN應用
一個數據中心有多種業務,會用到不同的IP子網。不同的服務需要分配到不同的VLAN,並基於不同的VLAN ID分配到不同的遠程網絡中。以下圖中飛速(FS)S3900-24T4S交換機為例,其中配置了三個端口分別處理三個VLAN的數據流量。通過子網劃分VLAN,三個不同的IP地址分別劃分給VLAN 10,VLAN 20和VLAN 30,這樣交換機的1/5,1/6,1/7端口便能將從路由器中接受到的不同VLAN ID的流量數據並傳輸給不同的設備。
在這一例中,基於IP子網劃分VLAN減少了通信量,從而加快了網絡速度。而且一般而言每個子網對應一個VLAN,即使端口改變了,開啟子網劃分VLAN的端口會根據每個數據的原地址分配數據給相應的VLAN,這也體現了基於IP子網劃分VLAN的靈活性。
基於IP子網劃分VLAN的硬件連接指導
在如下案例中,飛速(FS) S3900-24T4S交換機配置了基於IP子網劃分VLAN。PC-1,PC-2,PC-3分別屬於不同的IP子網。交換機上的端口1/1到1/3被指定為hybrid端口,VLAN 10,VLAN 20,VLAN 30的untagged報文通過這些端口完成發送與接收。
注意:
1. 基於IP子網劃分VLAN只在hybrid端口上配置有效。
2. 基於IP子網劃分VLAN配置只能用來處理untagged報文。
基於IP子網劃分VLAN配置步驟
在飛速(FS) S3900交換機上配置基於IP子網劃分VLAN必須遵循以下步驟:
1. 在飛速(FS) S3900交換機上開啟基於IP子網劃分VLAN指令,然後驗證配置。
2. 在交換機上開啟VLAN並配置IP地址。
3. 配置hybrid端口並允許對應VLAN不帶tag標籤通過。
4. 分別在PC上執行ping網關測試驗證。
5. 查看交換機的VLAN轉發端口,驗證PC是否能ping通對應網關IP地址。
通過命令行界面在飛速(FS) S3900交換機上配置基於IP子網劃分VLAN
1. 在S3900-24T4S交換機上創建子網劃分VLAN。
S3900-24T4S#configure terminal
S3900-24T4S(config)#subnet-vlan subnet 10.1.1.0 255.255.255.0 vlan 10
S3900-24T4S(config)#subnet-vlan subnet 10.1.2.0 255.255.255.0 vlan 20
S3900-24T4S(config)#subnet-vlan subnet 10.1.3.0 255.255.255.0 vlan 30
S3900-24T4S(config)#exit
2. 驗證基於子網配置。
S3900-24T4S#show subnet-vlan
3. 在交換機上創建VLAN 10,VLAN 20,VLAN 30。
S3900-24T4S#configure terminal
S3900-24T4S(config)#vlan database
S3900-24T4S(config-vlan)#vlan 10
S3900-24T4S(config-vlan)#vlan 20
S3900-24T4S(config-vlan)#vlan 30
S3900-24T4S(config-if)#exit
4. 在交換機上配置IP地址。
S3900-24T4S(config)#interface vlan 10
S3900-24T4S(config-if)#ip add 10.1.1.1/24
S3900-24T4S(config-if)#exit
S3900-24T4S(config)#int vlan 20
S3900-24T4S(config-if)#ip add 10.1.2.1/24
S3900-24T4S(config-if)#exit
S3900-24T4S(config)#interface vlan 30
S3900-24T4S(config-if)#ip add 10.1.3.1/24
S3900-24T4S(config-if)#exit
5.在交換機端口Eth1/1-1/3上配置為hybrid,並允許對應VLAN不帶tag標籤通過。
S3900-48T4S(config)#interface ethernet 1/1
S3900-48T4S(config-if)#switchport mode hybrid
S3900-48T4S(config-if)#switchport hybrid allowed vlan add 10 untagged
S3900-48T4S(config-if)#switchport hybrid allowed vlan add 20 untagged
S3900-48T4S(config-if)#switchport hybrid allowed vlan add 30 untagged
S3900-24T4S(config-if)#exit
S3900-48T4S(config)#int ethernet 1/2
S3900-48T4S(config-if)#switchport mode hybrid
S3900-48T4S(config-if)#switchport hybrid allowed vlan add 30 untagged
S3900-48T4S(config-if)#switchport hybrid allowed vlan add 20 untagged
S3900-48T4S(config-if)#switchport hybrid allowed vlan add 10 untagged
S3900-24T4S(config-if)#exit
S3900-48T4S(config)#int ethernet 1/3
S3900-48T4S(config-if)#switchport mode hybrid
S3900-48T4S(config-if)#switchport hybrid allowed vlan add 10 untagged
S3900-48T4S(config-if)#switchport hybrid allowed vlan add 20 untagged
S3900-48T4S(config-if)#switchport hybrid allowed vlan add 30 untagged
S3900-24T4S(config-if)#exit
6. 分別在PC-1,PC-2,PC-3上執行ping網關測試驗證。
C:UsersDell>ping 10.1.1.1
Pinging 10.1.1.1 with 32 bytes of data:
Reply from 10.1.1.1: bytes=32 timeReply from 10.1.1.1: bytes=32 timeReply from 10.1.1.1: bytes=32 timeReply from 10.1.1.1: bytes=32 timePing statistics for 10.1.1.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:UsersDell>ping 10.1.2.1 Pinging 10.1.2.1 with 32 bytes of data:
Reply from 10.1.2.1: bytes=32 timeReply from 10.1.2.1: bytes=32 timeReply from 10.1.2.1: bytes=32 timeReply from 10.1.2.1: bytes=32 timePing statistics for 10.1.2.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
C:UsersDell>ping 10.1.3.1
Pinging 10.1.3.1 with 32 bytes of data:
Reply from 10.1.3.1: bytes=32 timeReply from 10.1.3.1: bytes=32 timeReply from 10.1.3.1: bytes=32 timeReply from 10.1.3.1: bytes=32 timePing statistics for 10.1.3.1:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 0ms, Maximum = 0ms, Average = 0ms
7. 查看交換機的VLAN轉發端口。
S3900-24T4S#show vlan all
VLAN ID : 1
Name : DefaultVlan
Type : Static
Members : Eth1/ 1(S) Eth1/ 2(S)Eth1/ 3(S) Eth1/ 4(S) Eth1/ 5(S)
Eth1/ 6(S) Eth1/ 7(S) Eth1/ 8(S) Eth1/ 9(S) Eth1/10(S)
Eth1/11(S)Eth1/12(S)Eth1/13(S) Eth1/14(S) Eth1/15(S)
Eth1/16(S) Eth1/17(S) Eth1/18(S) Eth1/19(S) Eth1/20(S)
Eth1/21(S) Eth1/22(S) Eth1/23(S) Eth1/24(S) Eth1/25(S)
Eth1/26(S) Eth1/27(S) Eth1/28(S) Eth1/29(S) Eth1/30(S)
Eth1/31(S) Eth1/32(S) Eth1/33(S) Eth1/34(S) Eth1/35(S)
Eth1/36(S) Eth1/37(S) Eth1/38(S) Eth1/39(S) Eth1/40(S)
Eth1/41(S) Eth1/42(S) Eth1/43(S) Eth1/44(S) Eth1/45(S)
Eth1/46(S) Eth1/47(S) Eth1/48(S) Eth1/49(S) Eth1/50(S)
Eth1/51(S) Eth1/52(S)
VLAN ID : 10
Name :
Type : Static
Members : Eth1/ 1(S) Eth1/ 2(S) Eth1/ 3(S)
VLAN ID : 20
Name :
Type : Static
Members : Eth1/ 1(S) Eth1/ 2(S) Eth1/ 3(S)
VLAN ID : 30
Name :
Type : Static
Members : Eth1/ 1(S) Eth1/ 2(S) Eth1/ 3(S)
相關資料
相關文章推薦
郵箱地址
-
Cat5e、Cat6、Cat6a和Cat7網線有什麼區別?哪個更好?
2020年08月21日
-
一文帶你了解SFP、SFP+、SFP28、QSFP+和QSFP28之間的區別
2024年04月13日
-
OM1、OM2、OM3、OM4和OM5多模光纖有什麼區別?
2021年11月24日
-
SFP端口是什麼?有什麼作用?可以接RJ45嗎?
2020年09月15日
-
PCIe卡知識掃盲:你想了解的都在這裡
2020年03月24日