信息工程学院《高级路由交换技术》实习报告
图3.19 设置主根
(5)划分S3的VLAN。如图3.20所示。
图3.20 划分S3上的VLAN
(6)配置S3端口为trunk端口。如图3.21所示。
图3.21 配置S3上的trunk端口
(7)配置MSTP域的域名为H3C,将VLAN 11、21、31、41分别映射到MSTP 1、2、3、4上,并配置级别为2。
如图3.22所示。
18
信息工程学院《高级路由交换技术》实习报告
图3.22 MSTP映射及修订级别配置
(8)激活配置域。如图3.23所示。
图3.23 激活配置域
(9)将S3设为从根。如图3.24所示。
图3.24 将S3设置为从根
配置完成!
验证配置:使用show stp brief查询到获取到的 MSTP 表项。如图3.25所示。
图3.25 查询MSTP配置表项
19
信息工程学院《高级路由交换技术》实习报告
3.6.2 配置VRRP
在 S2 和 S3 上配置 VRRP,实现主机的网关冗余。所配置的参数要求如表 3.6。
表 3.6 S2 和 S3 的 VRRP 参数表VLANVLAN11VLAN21VLAN31VLAN41VLAN组ID10203040VRRP 虚拟 IP192.1.11.254192.1.21.254192.1.31.254192.1.41.254S2 作为所有主机的实际网关, S3 作为所有主机的备份网关;其中各 VRRP 组中高优先级设置为 150,低优先级设置为 120;配置 VRRP 主设备监控上行物理接口,当上行接口发生故障时, VRRP 优先级下降 60。在 S4 和 S5 上配置 VRRP,实现主机的网关冗余。
所配置的参数要求如表 3.7。
表 3.7 S4 和 S5 的 VRRP 参数表VLANVLAN11VLAN21VLAN31VLAN41VLAN101VLAN组ID1020304050VRRP 虚拟 IP172.1.11.254172.1.21.254172.1.31.254172.1.41.254172.1.101.254S4 作为所有主机的实际网关, S5 作为所有主机的备份网关;其中各 VRRP 组中高优先级设置为 150,低优先级设置为 120;配置 VRRP 主设备监控上行物理接口,当上行接口路发生故障时, VRRP 优先级下降 60。
(1)S2上配置各个VRRP组。[S2]track 1 int g1/0/4[S2]int vlan 11
[S2-Vlan-interface21]vrrp vrid 10 virtual-ip 192.1.11.254[S2-Vlan-interface21]vrrp vrid 10 priority 150[S2-Vlan-interface11]vrrp vrid 10 preempt-mode delay 0[S2-Vlan-interface11]vrrp vrid 10 track 1 weight reduced 60[S2-Vlan-interface11]int vlan 21
[S2-Vlan-interface21]vrrp vrid 20 virtual-ip 192.1.21.254
20
信息工程学院《高级路由交换技术》实习报告
[S2-Vlan-interface21]vrrp vrid 20 priority 150[S2-Vlan-interface21]vrrp vrid 20 preempt-mode delay 0[S2-Vlan-interface21]vrrp vrid 20 track 1 weight reduced 60[S2-Vlan-interface21]int vlan 31
[S2-Vlan-interface31]vrrp vrid 30 virtual-ip 192.1.31.254[S2-Vlan-interface31]vrrp vrid 30 priority 150[S2-Vlan-interface31]vrrp vrid 30 preempt-mode delay 0[S2-Vlan-interface31]vrrp vrid 30 track 1 weight reduced 60[S2-Vlan-interface31]int vlan 41
[S2-Vlan-interface41]vrrp vrid 40 virtual-ip 192.1.41.254[S2-Vlan-interface41]vrrp vrid 40 priority 150[S2-Vlan-interface41]vrrp vrid 40 preempt-mode delay 0[S2-Vlan-interface41]vrrp vrid 40 track 1 weight reduced 60(2)S3上配置各个VRRP组。[S3]track 1 int g1/0/4[S3]int vlan 11
[S3-Vlan-interface21]vrrp vrid 10 virtual-ip 192.1.11.254[S3-Vlan-interface21]vrrp vrid 10 priority 120[S3-Vlan-interface11]vrrp vrid 10 preempt-mode delay 0[S3-Vlan-interface11]int vlan 21
[S3-Vlan-interface21]vrrp vrid 20 virtual-ip 192.1.21.254[S3-Vlan-interface21]vrrp vrid 20 priority 120[S3-Vlan-interface21]vrrp vrid 20 preempt-mode delay 0[S3-Vlan-interface21]int vlan 31
[S3-Vlan-interface31]vrrp vrid 30 virtual-ip 192.1.31.254[S3-Vlan-interface31]vrrp vrid 30 priority 120[S3-Vlan-interface31]vrrp
vrid
30
preempt-mode
delay
[S3-Vlan-interface31]int vlan 41
[S3-Vlan-interface41]vrrp vrid 40 virtual-ip 192.1.41.254[S3-Vlan-interface41]vrrp vrid 40 priority 120[S3-Vlan-interface41]vrrp vrid 40 preempt-mode delay 0
21
0
信息工程学院《高级路由交换技术》实习报告
(3)S4上配置各个VRRP组。[S4]track 1 int g1/0/1[S4]int vlan 11
[S4-Vlan-interface21]vrrp vrid 10 virtual-ip 172.1.11.254[S4-Vlan-interface21]vrrp vrid 10 priority 150[S4-Vlan-interface11]vrrp vrid 10 preempt-mode delay 0[S4-Vlan-interface11]vrrp vrid 10 track 1 weight reduced 60[S4-Vlan-interface11]int vlan 21
[S4-Vlan-interface21]vrrp vrid 20 virtual-ip 172.1.21.254[S4-Vlan-interface21]vrrp vrid 20 priority 150[S4-Vlan-interface21]vrrp vrid 20 preempt-mode delay 0[S4-Vlan-interface21]vrrp vrid 20 track 1 weight reduced 60[S4-Vlan-interface21]int vlan 31
[S4-Vlan-interface31]vrrp vrid 30 virtual-ip 172.1.31.254[S4-Vlan-interface31]vrrp vrid 30 priority 150[S4-Vlan-interface31]vrrp vrid 30 preempt-mode delay 0[S4-Vlan-interface31]vrrp vrid 30 track 1 weight reduced 60[S4-Vlan-interface31]int vlan 41
[S4-Vlan-interface41]vrrp vrid 40 virtual-ip 172.1.41.254[S4-Vlan-interface41]vrrp vrid 40 priority 150[S4-Vlan-interface41]vrrp vrid 40 preempt-mode delay 0[S4-Vlan-interface41]vrrp vrid 40 track 1 weight reduced 60[S4-Vlan-interface41]int vlan 101
[S4-Vlan-interface101]vrrp vrid 50 virtual-ip 172.1.41.254[S4-Vlan-interface101]vrrp vrid 50 priority 150[S4-Vlan-interface101]vrrp vrid 50 preempt-mode delay 0[S4-Vlan-interface101]vrrp vrid 50 track 1 weight reduced 60(4)S5上配置各个VRRP组。[S5]track 1 int g1/0/1[S5]int vlan 11
[S5-Vlan-interface21]vrrp vrid 10 virtual-ip 172.1.11.254[S5-Vlan-interface21]vrrp vrid 10 priority 120[S5-Vlan-interface11]vrrp vrid 10 preempt-mode delay 0
22