华为设备配置MSTP+VRRP组合组网

华为设备配置MSTP+VRRP组合组网_第1张图片

  1. 配置MSTP基本功能
    (1)配置MST域及创建实例
    [LSW1]vlan batch 2 3
    [LSW1]stp region-configuration
    [LSW1-mst-region]region-name a1
    [LSW1-mst-region]instance 1 vlan 2
    [LSW1-mst-region]instance 2 vlan 3
    [LSW1-mst-region]active region-configuration
    [LSW2]vlan batch 2 3
    [LSW2]stp region-configuration
    [LSW2-mst-region]region-name a1
    [LSW2-mst-region]instance 1 vlan 2
    [LSW2-mst-region]instance 2 vlan 3
    [LSW2-mst-region]active region-configuration
    [LSW3]vlan batch 2 3
    [LSW3]stp region-configuration
    [LSW3-mst-region]region-name a1
    [LSW3-mst-region]instance 1 vlan 2
    [LSW3-mst-region]instance 2 vlan 3
    [LSW3-mst-region]active region-configuration
    (2)配置实例的根桥和备份根桥
    [LSW1]stp instance 1 root primary
    [LSW1]stp instance 2 root secondary
    [LSW2]stp instance 1 root secondary
    [LSW2]stp instance 2 root primary
    (3)配置实例中被阻塞端口的路径开销值大于缺省值(华为计算方法)
    [LSW1]stp pathcost-standard legacy
    [LSW2]stp pathcost-standard legacy
    [LSW3]stp pathcost-standard legacy
    [LSW3-GigabitEthernet0/0/1]stp instance 2 cost 20000
    [LSW3-GigabitEthernet0/0/2]stp instance 1 cost 20000
    (4)使能MSTP,实现破除环路
    [LSW1]stp enable
    [LSW2]stp enable
    [LSW3]stp enable
    (5)将于PC和AR相连的端口设为边缘端口
    [LSW3-GigabitEthernet0/0/3]stp edged-port enable
    [LSW3-GigabitEthernet0/0/4]stp edged-port enable
    [LSW3]stp bpdu-protection
    [LSW1-GigabitEthernet0/0/1]stp edged-port enable
    [LSW1]stp bpdu-protection
    [LSW2-GigabitEthernet0/0/2]stp edged-port enable
    [LSW2]stp bpdu-protection
  2. 配置根保护功能
    [LSW1-GigabitEthernet0/0/3]stp root-protection
    [LSW2-GigabitEthernet0/0/3]stp root-protection
  3. 配置二层转发功能
    [LSW1-GigabitEthernet0/0/2]port link-type trunk
    [LSW1-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 to 3
    [LSW1-GigabitEthernet0/0/3]port link-type trunk
    [LSW1-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 to 3
    [LSW2-GigabitEthernet0/0/1]port link-type trunk
    [LSW2-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 to 3
    [LSW2-GigabitEthernet0/0/3]port link-type trunk
    [LSW2-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 to 3
    [LSW3-GigabitEthernet0/0/1]port link-type trunk
    [LSW3-GigabitEthernet0/0/1]port trunk allow-pass vlan 2 to 3
    [LSW3-GigabitEthernet0/0/2]port link-type trunk
    [LSW3-GigabitEthernet0/0/2]port trunk allow-pass vlan 2 to 3
    [LSW3-GigabitEthernet0/0/3]port link-type access
    [LSW3-GigabitEthernet0/0/3]port default vlan 2
    [LSW3-GigabitEthernet0/0/4]port link-type access
    [LSW3-GigabitEthernet0/0/4]port default vlan 3
    4.验证MSTP配置
    华为设备配置MSTP+VRRP组合组网_第2张图片
    华为设备配置MSTP+VRRP组合组网_第3张图片
    华为设备配置MSTP+VRRP组合组网_第4张图片

5.配置网络互联
(1)配置IP地址
[LSW1]vlan 4
[LSW1-GigabitEthernet0/0/1]port link-type trunk
[LSW1-GigabitEthernet0/0/1]port trunk allow-pass vlan 4
[LSW1]int Vlanif 2
[LSW1-Vlanif2]ip add 10.1.1.101 24
[LSW1-Vlanif2]int Vlanif 3
[LSW1-Vlanif3]ip add 10.1.2.101 24
[LSW1-Vlanif3]int Vlanif 4
[LSW1-Vlanif4]ip add 10.1.3.101 24
[LSW2]int Vlanif 2
[LSW2-Vlanif4]ip add 10.1.1.102 24
[LSW2-Vlanif2]int Vlanif 3
[LSW2-Vlanif3]ip add 10.1.3.102 24
[LSW2-Vlanif3]int Vlanif 4
[LSW2-Vlanif4]ip add 10.1.4.102 24
(2)配置路由协议
[LSW1]ospf 1
[LSW1-ospf-1]area 0
[LSW1-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[LSW1-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[LSW1-ospf-1-area-0.0.0.0]network 10.1.3.0 0.0.0.255
[LSW2]ospf 1
[LSW2-ospf-1]area 0
[LSW2-ospf-1-area-0.0.0.0]network 10.1.1.0 0.0.0.255
[LSW2-ospf-1-area-0.0.0.0]network 10.1.2.0 0.0.0.255
[LSW2-ospf-1-area-0.0.0.0]network 10.1.4.0 0.0.0.255
6.配置VRRP备份组
[LSW1]int Vlanif 2
[LSW1-Vlanif2]vrrp vrid 1 virtual-ip 10.1.1.100
[LSW1-Vlanif2]vrrp vrid 1 priority 120
[LSW1-Vlanif2]vrrp vrid 1 preempt-mode timer delay 20
[LSW1-Vlanif3]vrrp vrid 2 virtual-ip 10.1.2.100
[LSW2]int Vlanif 2
[LSW2-Vlanif2]vrrp vrid 1 virtual-ip 10.1.1.100
[LSW2]int Vlanif 3
[LSW2-Vlanif3]vrrp vrid 2 virtual-ip 10.1.2.100
[LSW2-Vlanif3]vrrp vrid 2 priority 120
[LSW2-Vlanif3]vrrp vrid 2 preempt-mode timer delay 20
7.配置PC
华为设备配置MSTP+VRRP组合组网_第5张图片
华为设备配置MSTP+VRRP组合组网_第6张图片

8.验证配置

华为设备配置MSTP+VRRP组合组网_第7张图片

华为设备配置MSTP+VRRP组合组网_第8张图片

你可能感兴趣的:(网络设计与配置,华为,网络)