绁炲窞鏁扮爜DCRS-5960_VLAN鍜孧AC鍦板潃鎿嶄綔.word - 鐧惧害鏂囧簱 联系客服

发布时间 : 星期日 文章绁炲窞鏁扮爜DCRS-5960_VLAN鍜孧AC鍦板潃鎿嶄綔.word - 鐧惧害鏂囧簱更新完毕开始阅读773c776101f69e3143329449

VLAN和MAC地址操作 第1章 VLAN配置 no name

3.为VLAN分配交换机端口 命令 VLAN配置模式 switchport interface no switchport interface

4.设置交换机端口类型 命令 端口配置模式 switchport mode {trunk | access | hybrid}

5.设置Trunk端口 命令 端口配置模式 switchport trunk allowed vlan {WORD | all | add WORD | except WORD | remove WORD} no switchport trunk allowed vlan switchport trunk native vlan no switchport trunk native vlan

6.设置Access端口 命令 端口配置模式 switchport access vlan no switchport access vlan

7. 设置Hybrid端口 命令 端口配置模式 解释 解释 将当前端口加入/退出到指定VLAN。 解释 设置/删除Trunk端口允许通过的VLAN。 设置/删除Trunk端口的PVID。 解释 设置当前端口为Trunk,Access端口或Hybrid端口。 解释 为VLAN分配交换机端口。

1-3

VLAN和MAC地址操作 第1章 VLAN配置 switchport hybrid allowed vlan {WORD | all | add WORD | except WORD | remove WORD} 设置/删除Hybrid端口允许以{tag | untag} no switchport hybrid allowed vlan switchport hybrid native vlan no switchport hybrid native vlan

8. 打开或关闭VLAN的入口规则 命令 端口配置模式 vlan ingress enable no vlan ingress enable

9. 配置Private VLAN 命令 VLAN配置模式 private-vlan {primary | isolated | community} no private-vlan

10. 设置Private VLAN的绑定操作 命令 VLAN配置模式 private-vlan association no private-vlan association

11. 指定内部VLAN ID 命令 全局配置模式 vlan <2-4094> internal

解释 指定内部VLAN的ID号。 解释 设置/删除Private VLAN的绑定关系。 解释 将当前VLAN设置为Private VLAN。 解释 打开及关闭VLAN的入口规则。 设置/删除端口的PVID。 tag或untag方式通过的VLAN。 1.1.3 VLAN典型应用

案例:

1-4

VLAN和MAC地址操作 第1章 VLAN配置

VLAN100 VLAN2 PC PC Switch A Trunk Link

Switch B

Workstation Workstation PC VLAN200 PC PC VLAN2 PC Workstation VLAN100 Workstation

图 1-2 VLAN典型应用拓扑图

PC PC VLAN200

由于局域网安全和应用的需要,需要将现有的整个局域网划分为3个VLAN:VLAN2、VLAN100和VLAN200,并且要求这三个VLAN跨越两个地域A和B,现在两处分别放置一台交换机,因此VLAN流量只要可以在交换机间传输,就可以满足跨地域的要求。 配置项目 VLAN2 VLAN100 VLAN200 Trunk port

将两台交换机的Trunk port相连,成为Trunk link,用于承载跨交换机的vlan流量;将各种网络设备连接到交换机的各个VLAN的端口上,就归属到相应的VLAN之中。

在本例中,1号和12号端口空闲,可以做为管理端口或其它用途。

配置步骤如下: A交换机:

Switch (config)#vlan 2

Switch (Config-Vlan2)#switchport interface ethernet 1/0/2-4 Switch (Config-Vlan2)#exit

配置说明 A地、B地交换机2~4端口 A地、B地交换机5~7端口 A地、B地交换机8~10端口 A地、B地交换机的11端口 1-5

VLAN和MAC地址操作 第1章 VLAN配置 Switch (config)#vlan 100

Switch (Config-Vlan100)#switchport interface ethernet 1/0/5-7 Switch (Config-Vlan100)#exit Switch (config)#vlan 200

Switch (Config-Vlan200)#switchport interface ethernet 1/0/8-10 Switch (Config-Vlan200)#exit

Switch (config)#interface ethernet 1/0/11

Switch (Config-If-Ethernet1/0/11)#switchport mode trunk Switch (Config-If-Ethernet1/0/11)#exit Switch (config)# B交换机:

Switch (config)#vlan 2

Switch (Config-Vlan2)#switchport interface ethernet 1/0/2-4 Switch (Config-Vlan2)#exit Switch (config)#vlan 100

Switch (Config-Vlan100)#switchport interface ethernet 1/0/5-7 Switch (Config-Vlan100)#exit Switch (config)#vlan 200

Switch (Config-Vlan200)#switchport interface ethernet 1/0/8-10 Switch (Config-Vlan200)#exit

Switch (config)#interface ethernet 1/0/11

Switch (Config-If-Ethernet1/0/11)#switchport mode trunk Switch (Config-If-Ethernet1/0/11)#exit

1.1.4 Hybrid端口的典型应用

案例:

1-6