1 网络中部署VRRP负载分担时,多台设备同时承担业务,每个虚拟设备都包括一个Master设备和若干个Backup设备。如果为了接入备份需要同时部署冗余链路,则需要部署MSTP消除网络中的环路,保证流量的负载分担。
2实验拓补
3基本配置
#sw1
<Huawei>sys
[Huawei]sysname sw1
[sw1]int Eth-Trunk 1
[sw1-Eth-Trunk1]port link-type trunk
[sw1-Eth-Trunk1]trunkport GigabitEthernet 0/0/1 to 0/0/2
[sw1-Eth-Trunk1]dis eth-trunk 1
Eth-Trunk1's state information is:
WorkingMode: NORMAL Hash arithmetic: According to SIP-XOR-DIP
Least Active-linknumber: 1 Max Bandwidth-affected-linknumber: 8
Operate status: up Number Of Up Port In Trunk: 2
--------------------------------------------------------------------------------
PortName Status Weight
GigabitEthernet0/0/1 Up 1
GigabitEthernet0/0/2 Up 1
[sw1-Eth-Trunk1]port trunk allow-pass vlan 6 7 8 9
[sw1-Eth-Trunk1]qu
[sw1]vlan batch 6 7 8 9 10
[sw1]int GigabitEthernet 0/0/3
[sw1-GigabitEthernet0/0/3]port link-type trunk
[sw1-GigabitEthernet0/0/3]qu
[sw1]int GigabitEthernet 0/0/4
[sw1-GigabitEthernet0/0/4]port link-type trunk
[sw1-GigabitEthernet0/0/4]qu
[sw1]int GigabitEthernet 0/0/5
[sw1-GigabitEthernet0/0/5]port link-type access
[sw1-GigabitEthernet0/0/5]port default vlan 10
[sw1-GigabitEthernet0/0/5]qu
#配置vrrp
[sw1]int Vlanif 6
[sw1-Vlanif6]ip address 192.168.6.1 24
[sw1-Vlanif6]vrrp vrid 6 virtual-ip 192.168.6.254
[sw1-Vlanif6]vrrp vrid 6 priority 120
[sw1-Vlanif6]vrrp vrid 6 preempt-mode timer delay 9
[sw1-Vlanif6]vrrp vrid 6 timer advertise 9
[sw1-Vlanif6]vrrp vrid 6 track interface GigabitEthernet 0/0/5 reduced 80
[sw1-Vlanif6]qu
[sw1]int vlan 7
[sw1-Vlanif7]ip address 192.168.7.1 24
[sw1-Vlanif7]vrrp vrid 7 virtual-ip 192.168.7.254
[sw1-Vlanif7]vrrp vrid 7 timer advertise 9
[sw1-Vlanif7]vrrp vrid 7 preempt-mode timer delay 9
[sw1-Vlanif7]qu
[sw1]int Vlanif 8
[sw1-Vlanif8]vrrp vrid 8 virtual-ip 192.168.8.254
[sw1-Vlanif8]vrrp vrid 8 timer advertise 9
[sw1-Vlanif8]vrrp vrid 8 preempt-mode timer delay 9
[sw1-Vlanif8]ip add 192.168.8.1 24
[sw1-Vlanif8]qu
[sw1]int GigabitEthernet 0/0/3
[sw1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[sw1-GigabitEthernet0/0/3]qu
[sw1]int GigabitEthernet 0/0/4
[sw1-GigabitEthernet0/0/4]port trunk allow-pass vlan all
[sw1-GigabitEthernet0/0/4]qu
#sw2
<Huawei>sys
[Huawei]sysname sw2
[sw2]int Eth-Trunk 1
[sw2-Eth-Trunk1]port link-type trunk
[sw2-Eth-Trunk1]por