VRRP具有负载分担功能吗?客户担心监控流量过大交换机性能可能会不够,所以希望可以做IRF,但现在两台核心设备不能做堆叠,做VRRP的话也可以达到效果吗?
(0)
可以的
· Switch A、Switch B和Switch C属于虚拟IP地址为10.1.1.1/24的备份组1;
· 10.1.1.0/24网段内主机的缺省网关为10.1.1.1/24,利用VRRP备份组保证某台网关设备(Switch A、Switch B或Switch C)出现故障时,局域网内的主机仍然可以通过网关访问外部网络;
· 备份组1工作在负载均衡模式,通过一个备份组实现负载分担,充分利用网关资源;
· 在Switch A、Switch B和Switch C上分别配置虚拟转发器通过Track项监视上行接口(VLAN接口3)的状态。当上行接口出现故障时,降低Switch A、Switch B或Switch C上虚拟转发器的权重,以便其它设备接管它的转发任务。
图1-11 VRRP负载均衡模式配置组网图
(1) 配置Switch A
# 配置VLAN 2。
<SwitchA> system-view
[SwitchA] vlan 2
[SwitchA-vlan2] port gigabitethernet 3/0/5
[SwitchA-vlan2] quit
# 配置VRRP工作在负载均衡模式。
[SwitchA] vrrp mode load-balance
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.1。
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] ip address 10.1.1.2 24
[SwitchA-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1
# 配置Switch A在备份组1中的优先级为120,高于Switch B的优先级110和Switch C的优先级100,以保证Switch A成为Master。
[SwitchA-Vlan-interface2] vrrp vrid 1 priority 120
# 配置Switch A工作在抢占方式,以保证Switch A故障恢复后,能再次抢占成为Master,即只要Switch A正常工作,Switch A就会成为Master。为了避免频繁地进行状态切换,配置抢占延迟时间为500厘秒。
[SwitchA-Vlan-interface2] vrrp vrid 1 preempt-mode delay 500
[SwitchA-Vlan-interface2] quit
# 创建和VLAN接口3物理状态关联的Track项1。如果Track项的状态为Negative,则说明Switch A的上行接口出现故障。
[SwitchA] track 1 interface vlan-interface 3
# 配置虚拟转发器监视Track项1。Track项的状态为Negative时,降低Switch A上虚拟转发器的权重,使其低于失效下限10,即权重降低的数额大于245,以便其它设备接替Switch A的转发任务。本例中,配置虚拟转发器权重降低数额为250。
[SwitchA] interface vlan-interface 2
[SwitchA-Vlan-interface2] vrrp vrid 1 track 1 weight reduced 250
(2) 配置Switch B
# 配置VLAN 2。
<SwitchB> system-view
[SwitchB] vlan 2
[SwitchB-vlan2] port gigabitethernet 3/0/5
[SwitchB-vlan2] quit
# 配置VRRP工作在负载均衡模式。
[SwitchB] vrrp mode load-balance
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.1。
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] ip address 10.1.1.3 24
[SwitchB-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1
# 配置Swtich B在备份组1中的优先级为110,高于Switch C的优先级,以保证Switch A出现故障时,Switch B成为Master。
[SwitchB-Vlan-interface2] vrrp vrid 1 priority 110
# 配置Switch B工作在抢占方式,抢占延迟时间为500厘秒。
[SwitchB-Vlan-interface2] vrrp vrid 1 preempt-mode delay 500
[SwitchB-Vlan-interface2] quit
# 创建和VLAN接口3物理状态关联的Track项1。如果Track项的状态为Negative,则说明Switch B的上行接口出现故障。
[SwitchB] track 1 interface vlan-interface 3
# 配置虚拟转发器监视Track项1。Track项的状态为Negative时,降低Switch B上虚拟转发器的权重,使其低于失效下限10,即权重降低的数额大于245,以便其它设备接替Switch B的转发任务。本例中,配置虚拟转发器权重降低数额为250。
[SwitchB] interface vlan-interface 2
[SwitchB-Vlan-interface2] vrrp vrid 1 track 1 weight reduced 250
(3) 配置Switch C
# 配置VLAN 2。
<SwitchC> system-view
[SwitchC] vlan 2
[SwitchC-vlan2] port gigabitethernet 3/0/5
[SwitchC-vlan2] quit
# 配置VRRP工作在负载均衡模式。
[SwitchC] vrrp mode load-balance
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.1。
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] ip address 10.1.1.4 24
[SwitchC-Vlan-interface2] vrrp vrid 1 virtual-ip 10.1.1.1
# 配置Switch C工作在抢占方式,抢占延迟时间为5厘秒。
[SwitchC-Vlan-interface2] vrrp vrid 1 preempt-mode delay 500
[SwitchC-Vlan-interface2] quit
# 创建和VLAN接口3物理状态关联的Track项1。如果Track项的状态为Negative,则说明Switch C的上行接口出现故障。
[SwitchC] track 1 interface vlan-interface 3
# 配置虚拟转发器监视Track项1。Track项的状态为Negative时,降低Switch C上虚拟转发器的权重,使其低于失效下限10,即权重降低的数额大于245,以便其它设备接替Switch C的转发任务。本例中,配置虚拟转发器权重降低数额为250。
[SwitchC] interface vlan-interface 2
[SwitchC-Vlan-interface2] vrrp vrid 1 track 1 weight reduced 250
配置完成后,在Host A上可以ping通外网。通过display vrrp verbose命令查看配置后的结果。
# 显示Switch A上备份组1的详细信息。
[SwitchA-Vlan-interface2] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 500
Auth Type : None
Virtual IP : 10.1.1.1
Member IP List : 10.1.1.2 (Local, Master)
10.1.1.3 (Backup)
10.1.1.4 (Backup)
Forwarder Information: 3 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Active
Virtual MAC : 000f-e2ff-0011 (Owner)
Owner ID : 0000-5e01-1101
Priority : 255
Active : local
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-0012 (Learnt)
Owner ID : 0000-5e01-1103
Priority : 127
Active : 10.1.1.3
Forwarder 03
State : Listening
Virtual MAC : 000f-e2ff-0013 (Learnt)
Owner ID : 0000-5e01-1105
Priority : 127
Active : 10.1.1.4
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 250
# 显示Switch B上备份组1的详细信息。
[SwitchB-Vlan-interface2] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 500
Become Master : 410ms left
Auth Type : None
Virtual IP : 10.1.1.1
Member IP List : 10.1.1.3 (Local, Backup)
10.1.1.2 (Master)
10.1.1.4 (Backup)
Forwarder Information: 3 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Listening
Virtual MAC : 000f-e2ff-0011 (Learnt)
Owner ID : 0000-5e01-1101
Priority : 127
Active : 10.1.1.2
Forwarder 02
State : Active
Virtual MAC : 000f-e2ff-0012 (Owner)
Owner ID : 0000-5e01-1103
Priority : 255
Active : local
Forwarder 03
State : Listening
Virtual MAC : 000f-e2ff-0013 (Learnt)
Owner ID : 0000-5e01-1105
Priority : 127
Active : 10.1.1.4
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 250
# 显示Switch C上备份组1的详细信息。
[SwitchC-Vlan-interface2] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 500
Become Master : 401ms left
Auth Type : None
Virtual IP : 10.1.1.1
Member IP List : 10.1.1.4 (Local, Backup)
10.1.1.2 (Master)
10.1.1.3 (Backup)
Forwarder Information: 3 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Listening
Virtual MAC : 000f-e2ff-0011 (Learnt)
Owner ID : 0000-5e01-1101
Priority : 127
Active : 10.1.1.2
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-0012 (Learnt)
Owner ID : 0000-5e01-1103
Priority : 127
Active : 10.1.1.3
Forwarder 03
State : Active
Virtual MAC : 000f-e2ff-0013 (Owner)
Owner ID : 0000-5e01-1105
Priority : 255
Active : local
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 250
以上显示信息表示在备份组1中Switch A为Master,Switch B和Switch C 为Backup。Switch A、Switch B和Switch C上各自存在一个AVF,并存在作为备份的两个LVF。
# 当Switch A的上行接口(VLAN接口3)出现故障后,通过display vrrp verbose命令查看Switch A上备份组的详细信息。
[SwitchA-Vlan-interface2] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 500
Auth Type : None
Virtual IP : 10.1.1.1
Member IP List : 10.1.1.2 (Local, Master)
10.1.1.3 (Backup)
10.1.1.4 (Backup)
Forwarder Information: 3 Forwarders 0 Active
Config Weight : 255
Running Weight : 5
Forwarder 01
State : Initialize
Virtual MAC : 000f-e2ff-0011 (Owner)
Owner ID : 0000-5e01-1101
Priority : 0
Active : 10.1.1.4
Forwarder 02
State : Initialize
Virtual MAC : 000f-e2ff-0012 (Learnt)
Owner ID : 0000-5e01-1103
Priority : 0
Active : 10.1.1.3
Forwarder 03
State : Initialize
Virtual MAC : 000f-e2ff-0013 (Learnt)
Owner ID : 0000-5e01-1105
Priority : 0
Active : 10.1.1.4
Forwarder Weight Track Information:
Track Object : 1 State : Negative Weight Reduced : 250
# 通过display vrrp verbose命令查看Switch C上备份组的详细信息。
[SwitchC-Vlan-interface2] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 500
Become Master : 401ms left
Auth Type : None
Virtual IP : 10.1.1.1
Member IP List : 10.1.1.4 (Local, Backup)
10.1.1.2 (Master)
10.1.1.3 (Backup)
Forwarder Information: 3 Forwarders 2 Active
Config Weight : 255
Running Weight : 255
Forwarder 01
State : Active
Virtual MAC : 000f-e2ff-0011 (Take Over)
Owner ID : 0000-5e01-1101
Priority : 85
Active : local
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-0012 (Learnt)
Owner ID : 0000-5e01-1103
Priority : 85
Active : 10.1.1.3
Forwarder 03
State : Active
Virtual MAC : 000f-e2ff-0013 (Owner)
Owner ID : 0000-5e01-1105
Priority : 255
Active : local
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 250
以上显示信息表示Switch A的上行接口出现故障后,Switch A上虚拟转发器的权重降低为5,低于失效下限。Switch A上所有虚拟转发器的状态均变为Initialized,不能再用于转发。Switch C成为虚拟MAC地址000f-e2ff-0011对应虚拟转发器的AVF,接管Switch A的转发任务。
# Timeout Timer超时后(约1800秒后),查看Switch C上备份组的详细信息。
[SwitchC-Vlan-interface2] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 500
Become Master : 402ms left
Auth Type : None
Virtual IP : 10.1.1.1
Member IP List : 10.1.1.4 (Local, Backup)
10.1.1.2 (Master)
10.1.1.3 (Backup)
Forwarder Information: 2 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 02
State : Listening
Virtual MAC : 000f-e2ff-0012 (Learnt)
Owner ID : 0000-5e01-1103
Priority : 127
Active : 10.1.1.3
Forwarder 03
State : Active
Virtual MAC : 000f-e2ff-0013 (Owner)
Owner ID : 0000-5e01-1105
Priority : 255
Active : local
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 250
以上显示信息表示,Timeout Timer超时后,删除虚拟MAC地址000f-e2ff-0011对应的虚拟转发器,不再转发目的MAC地址为该MAC的报文。
# Switch A出现故障后,通过display vrrp verbose命令查看Switch B上备份组的详细信息。
[SwitchB-Vlan-interface2] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface Vlan-interface2
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 500
Auth Type : None
Virtual IP : 10.1.1.1
Member IP List : 10.1.1.3 (Local, Master)
10.1.1.4 (Backup)
Forwarder Information: 2 Forwarders 1 Active
Config Weight : 255
Running Weight : 255
Forwarder 02
State : Active
Virtual MAC : 000f-e2ff-0012 (Owner)
Owner ID : 0000-5e01-1103
Priority : 255
Active : local
Forwarder 03
State : Listening
Virtual MAC : 000f-e2ff-0013 (Learnt)
Owner ID : 0000-5e01-1105
Priority : 127
Active : 10.1.1.4
Forwarder Weight Track Information:
Track Object : 1 State : Positive Weight Reduced : 250
以上显示信息表示Switch A出现故障后,Switch B的优先级高于Switch C,将抢占成为Master,同时删除了虚拟MAC地址000f-e2ff-0011对应的虚拟转发器。
(0)
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论