EX交换机配置手册v1.2 - 图文

set vlans camera-vlan description ―Camera VLAN\ set vlans camera-vlan vlan-id 40

(jiangyu:Access和trunk配置区别很小,access、trunk,vlan members 1个和多个) set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/2unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/3 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/1 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/3 unit 0 family ethernet-switching port-mode trunk

set protocols rstp bridge-priority 16k #\设置rstp的优优先值\ set protocols rstp interface ge-0/0/1.0 cost 1000 #\设置rstp端口权值\set protocols rstp interface ge-0/0/1.0 mode point-to-point #\设置rstp端口模式\set protocols rstp interface ge-0/0/2.0 cost 1000

set protocols rstp interface ge-0/0/2.0 mode point-to-point set protocols rstp interface ge-0/0/3.0 cost 1000 set protocols rstp interface ge-0/0/3.0 mode point-to-point

2. S2交换机上创建VLAN并且配置交换机端口VLAN和Trunk和RSTP协议:

set vlans voice-vlan description ―Voice VLAN\ set vlans voice-vlan vlan-id 10

set vlans employee-vlan description ―Employee VLAN\ set vlans employee-vlan vlan-id 20

set vlans guest-vlan description ―Guest VLAN\ set vlans guest-vlan vlan-id 30

set vlans camera-vlan description ―Camera VLAN\ set vlans camera-vlan vlan-id 40

set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/2unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/1 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk

set protocols rstp bridge-priority 32k

set protocols rstp interface ge-0/0/1.0 cost 1000

set protocols rstp interface ge-0/0/1.0 mode point-to-point set protocols rstp interface ge-0/0/2.0 cost 1000

set protocols rstp interface ge-0/0/2.0 mode point-to-point

第41页 共110页

3. S3交换机上创建VLAN并且配置交换机端口VLAN和Trunk和RSTP协议

set vlans voice-vlan description ―Voice VLAN\ set vlans voice-vlan vlan-id 10

set vlans employee-vlan description ―Employee VLAN\ set vlans employee-vlan vlan-id 20

set vlans guest-vlan description ―Guest VLAN\ set vlans guest-vlan vlan-id 30

set vlans camera-vlan description ―Camera VLAN\ set vlans camera-vlan vlan-id 40

set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/2unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/3 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/1 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/3 unit 0 family ethernet-switching port-mode trunk set protocols rstp bridge-priority 8k

set protocols rstp interface ge-0/0/1.0 cost 1000

set protocols rstp interface ge-0/0/1.0 mode point-to-point set protocols rstp interface ge-0/0/2.0 cost 1000

set protocols rstp interface ge-0/0/2.0 mode point-to-point set protocols rstp interface ge-0/0/3.0 cost 1000 set protocols rstp interface ge-0/0/3.0 mode point-to-point

4. S4交换机上创建VLAN并且配置交换机端口VLAN和Trunk和RSTP协议

set vlans voice-vlan description ―Voice VLAN\set vlans voice-vlan vlan-id 10

set vlans employee-vlan description ―Employee VLAN\ set vlans employee-vlan vlan-id 20

set vlans guest-vlan description ―Guest VLAN\ set vlans guest-vlan vlan-id 30

set vlans camera-vlan description ―Camera VLAN\set vlans camera-vlan vlan-id 40

set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/2unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/1 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk set protocols rstp bridge-priority 16k

第42页 共110页

set protocols rstp interface ge-0/0/1.0 cost 1000

set protocols rstp interface ge-0/0/1.0 mode point-to-point set protocols rstp interface ge-0/0/2.0 cost 1000

set protocols rstp interface ge-0/0/2.0 mode point-to-point 5. 利用show spanning-tree interface命令查看4台交换机STP状态。

2.9.3 MSTP配置 实例

1. S1交换机上创建VLAN并且配置交换机端口VLAN和Trunk和MSTP协议

set vlans voice-vlan description ―Voice VLAN\ set vlans voice-vlan vlan—id 10

set vlans employee-vlan description ―Employee VLAN\ set vlans employee-vlan vlan-id 20

set vlans guest-vlan description ―Guest VLAN\ set vlans guest-vlan vlan-id 30

set vlans camera-vlan description ―Camera VLAN\ set vlans camera-vlan vlan-id 40

set interfaces ge-0/0/1 unit 0 family ethernet-switching vlan members [10 20 30 40]

第43页 共110页

set interfaces ge–0/0/2 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/3 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge–0/0/1 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/3 unit 0 family ethernet-switching port-mode trunk

set protocols mstp configuration-name region1 set protocols mstp bridge-priority 16k

set protocols mstp interface ge-0/0/1.0 cost 1000

set protocols mstp interface ge-0/0/1.0 mode point-to-point set protocols mstp interface ge-0/0/2.0 cost 1000

set protocols mstp interface ge-0/0/2.0 mode point-to-point set protocols mstp interface ge-0/0/3.0 cost 1000

set protocols mstp interface ge-0/0/3.0 mode point-to-point set protocols mstp msti 1 bridge-priority 16k set protocols mstp msti 1 vlan [10 20]

set protocols mstp msti 1 interface ge-0/0/3.0 cost 4000 set protocols mstp msti 2 bridge-priority 8k set protocols mstp msti 2 vlan [30 40]

2. 在S2交换机上创建VLAN并且配置交换机端口VLAN和Trunk和MSTP协议

set vlans voice-vlan description ―Voice VLAN\ set vlans voice-vlan vlan—id 10

set vlans employee-vlan description ―Employee VLAN\ set vlans employee-vlan vlan-id 20

set vlans guest-vlan description ―Guest VLAN\ set vlans guest-vlan vlan-id 30

set vlans camera-vlan description ―Camera VLAN\ set vlans camera-vlan vlan-id 40

set interfaces ge–0/0/1 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge-0/0/2 unit 0 family ethernet-switching vlan members [10 20 30 40] set interfaces ge-0/0/1 unit 0 family ethernet-switching port-mode trunk set interfaces ge-0/0/2 unit 0 family ethernet-switching port-mode trunk

set protocols mstp configuration-name region1 set protocols mstp bridge-priority 32k

第44页 共110页

联系客服:779662525#qq.com(#替换为@)