绿色下载

您现在的位置是:首页 > 网络 > 交换路由网络设备

交换路由网络设备

飞速(FS) S3900系列交换机基于IP子网划分VLAN配置指南

2022-06-01 04:49交换路由网络设备
VLAN(虚拟LAN)在数据链路层的计算机网络中划分隔离广播域,将来自不同物理LAN的设备组合成为一个逻辑网络,从而实现简易性,提高安全性,经济性,便于流量管理。VLAN配置共有四种,包括

VLAN(虚拟LAN)在数据链路层的计算机网络中划分隔离广播域,将来自不同物理LAN的设备组合成为一个逻辑网络,从而实现简易性,提高安全性,经济性,便于流量管理。

VLAN配置共有四种,包括基于端口配置划分VLAN,基于MAC地址划分VLAN,基于IP子网划分VLAN,基于协议划分VLAN以及基于策略划分VLAN。在这些配置中,基于子网划分VLAN适用于对移动性和简化管理需求较高,而对安全需求不高的情况。本文将向您介绍飞速(FS)S3900系列L2+交换机基于IP子网划分VLAN这一特征。

飞速(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

IP subnet.png

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.1Pinging 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)

相关资料

飞速(FS) S3900系列交换机基于接口划分VLAN配置指南

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

文章评论