云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > Cisco 4006交换机(IOS版)简明配置维护手册

Cisco 4006交换机(IOS版)简明配置维护手册

  • 62 次阅读
  • 3 次下载
  • 2025/5/4 7:55:49

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# interface fastetherne2/4

Switch(config-if)# switchport mode trunk

Switch(config-if)# switchport trunk encapsulation dot1q

Switch(config-if)# end

定义trunk允许的VLAN

缺省情况下trunk允许所有的VLAN通过。可以使用 switchport trunk allowed vlan remove vlan-list 来去掉某一VLAN Command Purpose Step 1 configure terminal Step 2 interface interface-id Step 3 switchport mode trunk Step 4 switchport trunk allowed vlan {add | all | except | remove} vlan-list 进入配置状态 进入端口配置 配置二层口为trunk (可选) 配置trunk允许的VLAN. 使用add, all, except, remove关健字 Step 5 end Step 6 show interfaces interface-id switchport Step 7 copy running-config startup-config

退出 验证VLAN配置情况. 保存配置 回到允许所有VLAN通过时, 可用no switchport trunk allowed vlan 端口配置命令. 举例如下:

Switch(config)# interface fastethernet2/1

Switch(config-if)# switchport trunk allowed vlan remove 2

Switch(config-if)# end

配置Native VLAN(802.1q)

封装802.1q的trunk端口可以接受带有标签和不带标签的数据流,交换机向native vlan传送不带标签的数据流,缺省情况下native VLAN是1。 命令 目的 Step 1 configure terminal Step 2 interface interface-id 进入配置状态 进入配置成802.1qtrunk的端口 配置native VLAN号 Step 3 switchport trunk native vlan vlan-id Step 4 end Step 5 show interfaces interface-id switchport Step 6 copy running-config startup-config 退出 验证native VLAN配置 保存配置 使用no switchport trunk native vlan 端口配置命令回到缺省的状态

使用STP实现负载均衡

负载均衡可以使用流量分流到其它平行的trunks上去. 交换机为了避免环路, STP通常是阻断所有端口交换机之间只留一条链路 。使用负载均衡后, 可以把不同VLAN的流量分配到不同的trunk上。

可以通过配置STP端口权值STP路径值来实现负载均衡. 如果使用STP端口权值来配置那么二条负载均衡的trunk必须联同一交换机上。使用路径值则即可以联相同的交换机与可以联不同的交换机。 使用STP端口权值的负载均衡

当同一台交换机的二个口形成环路时, STP端口权值用来决定那个口是enable的,那个口是阻断的。 可以通过配置端口权值来决定二对trunk各走那些VLAN, 有较高权值的端口(数字较小的)vlan, 将处于转发状态,同一个VLAN在另一个trunk有较低的权值(数字较大)则将处在阻断状态。 即同一VLAN只在一个trunk上发送接受。

基于端口权值的负载均衡示意图

trunk1将发送和接收VLAN8-10的数据,trunk2将发送和接收VLAN3-6的数据

配置如下: Step 1 Step 2 Step 3 Command Purpose configure terminal vtp domain domain-name vtp mode server 进入Switch 1配置状态 配置VTP域 将Switch 1配置成VTP server. 退出 验证VTP的配置 验证VLAN 进入配置状态 Step 4 Step 5 Step 6 Step 7 end show vtp status show vlan configure terminal Step 8 Step 9 interface fastethernet 0/1 switchport trunk encapsulation {isl | dot1q | negotiate} 进入F0/1端口 配置trunk封装 Step 10 switchport mode trunk Step 11 end Step 12 show interfaces fastethernet0/1 switchport Step 13 配置成trunk 退出 验证VLAN配置 在switch1上的F0/2上重复7到11步骤 在Switch 2的F0/1,F0/2上重复7到11步骤。 当trunk已经起来,在switch2上验证已经学到相关的vlan配置 在Switch 1上进入配置状态 进入要配置的端口 将端口权值10赋与VLAN 8. Step 14 Step 15 show vlan Step 16 configure terminal Step 17 interface fastethernet0/1 Step 18 spanning-tree vlan 8 port-priority 10 Step 19 spanning-tree vlan 9 port-priority 10 Step 20 spanning-tree vlan 10 port-priority 10 Step 21 exit Step 22 interface fastethernet0/2 Step 23 spanning-tree vlan 3 port-priority 10 将端口权值10赋与VLAN 9. 将端口权值10赋与VLAN 10. 退回. 进入F0/2 将端口权值10赋与VLAN 3.

  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

Enter configuration commands, one per line. End with CNTL/Z. Switch(config)# interface fastetherne2/4 Switch(config-if)# switchport mode trunk Switch(config-if)# switchport trunk encapsulation dot1q Switch(config-if)# end 定义trunk允许的VLAN 缺省情况下trunk允许所有的VLAN通过。可以使用 switchport trunk allowed vlan remove vlan-list 来去掉某一VLAN Command Purpose Step 1 conf

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com