您好,参考
·
·
Device A工作在抢占模式,以保证Device A故障恢复后,能再次抢占成为Master,即只要Device A正常工作,就由Device A负责转发流量。为了避免频繁地进行状态切换,配置抢占延迟时间为5000厘秒。
图1-11 IPv4 VRRP单备份组配置组网图
(1)
# 配置接口IP地址。
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] ip address 10.1.1.1 255.255.255.0
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.111。
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 10.1.1.111
# 配置Device A在备份组1中的优先级为110,高于Device B的优先级100,以保证Device A成为Master负责转发流量。
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 priority 110
# 配置Device A工作在抢占方式,以保证Device A故障恢复后,能再次抢占成为Master,即只要Device A正常工作,就由Device A负责转发流量。为了避免频繁地进行状态切换,配置抢占延迟时间为5000厘秒。
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 preempt-mode delay 5000
(2)
# 配置接口IP地址。
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ip address 10.1.1.2 255.255.255.0
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.111。
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 10.1.1.111
# 配置Device B在备份组1中的优先级为100。
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 priority 100
# 配置Device B工作在抢占方式,抢占延迟时间为5000厘秒。
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 preempt-mode delay 5000
配置完成后,在Host A上可以ping通Host B。通过display vrrp verbose命令查看配置后的结果。
# 显示Device A上备份组1的详细信息。
[DeviceA-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 5000
Auth Type : None
Virtual IP : 10.1.1.111
Virtual MAC : 0000-5e00-0101
Master IP : 10.1.1.1
# 显示Device B上备份组1的详细信息。
[DeviceB-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 5000
Become Master : 412ms left
Auth Type : None
Virtual IP : 10.1.1.111
Master IP : 10.1.1.1
以上显示信息表示在备份组1中Device A为Master路由器,Device B为Backup路由器,Host A发送给Host B的报文通过Device A转发。
Device A出现故障后,在Host A上仍然可以ping通Host B。通过display vrrp verbose命令查看Device B上备份组的详细信息。
# Device A出现故障后,显示Device B上备份组1的详细信息。
[DeviceB-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 5000
Auth Type : None
Virtual IP : 10.1.1.111
Virtual MAC : 0000-5e00-0101
Master IP : 10.1.1.2
以上显示信息表示Device A出现故障后,Device B成为Master路由器,Host A发送给Host B的报文通过Device B转发。
# Device A故障恢复后,显示Device A上备份组1的详细信息。
[DeviceA-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 5000
Auth Type : None
Virtual IP : 10.1.1.111
Virtual MAC : 0000-5e00-0101
Master IP : 10.1.1.1
以上显示信息表示Device A故障恢复后,Device A会抢占成为Master,Host A发送给Host B的报文仍然通过Device A转发。
为了实现VRRP备份组的负载分担功能,需要在10.1.1.0/24网段内的主机上手动配置默认网关为10.1.1.111或10.1.1.112。
·
·
图1-12 VRRP多备份组配置组网图
(1)
# 配置接口IP地址。
<DeviceA> system-view
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] ip address 10.1.1.1 255.255.255.0
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.111。
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 10.1.1.111
# 设置Device A在备份组1中的优先级为110,高于Device B的优先级100,以保证在备份组1中Device A成为Master负责转发流量。
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 priority 110
# 创建备份组2,并配置备份组2的虚拟IP地址为10.1.1.112。
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 2 virtual-ip 10.1.1.112
(2)
# 配置接口IP地址。
<DeviceB> system-view
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ip address 10.1.1.2 255.255.255.0
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.111。
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 10.1.1.111
# 创建备份组2,并配置备份组2的虚拟IP地址为10.1.1.112。
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 2 virtual-ip 10.1.1.112
# 设置Device B在备份组2中的优先级为110,高于Device A的优先级100,以保证在备份组2中Device B成为Master负责转发流量。
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 2 priority 110
可以通过display vrrp verbose命令查看配置后的结果。
# 显示Device A上备份组的详细信息。
[DeviceA-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.1.1.111
Virtual MAC : 0000-5e00-0101
Master IP : 10.1.1.1
Interface GigabitEthernet1/0/1
VRID : 2 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Become Master : 201ms left
Auth Type : None
Virtual IP : 10.1.1.112
Master IP : 10.1.1.2
# 显示Device B上备份组的详细信息。
[DeviceB-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Standard
Total number of virtual routers : 2
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 0
Become Master : 185ms left
Auth Type : None
Virtual IP : 10.1.1.111
Master IP : 10.1.1.1
Interface GigabitEthernet1/0/1
VRID : 2 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 0
Auth Type : None
Virtual IP : 10.1.1.112
Virtual MAC : 0000-5e00-0102
Master IP : 10.1.1.2
以上显示信息表示在备份组1中Device A为Master路由器,Device B为Backup路由器,缺省网关为10.1.1.111/24的主机通过Device A访问Internet;备份组2中Device A为Backup路由器,Device B为Master路由器,缺省网关为10.1.1.112/24的主机通过Device B访问Internet。
·
·
·
·
图1-13 VRRP负载均衡模式配置组网图
(1)
# 配置VRRP工作在负载均衡模式。
<DeviceA> system-view
[DeviceA] vrrp mode load-balance
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.1。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] ip address 10.1.1.2 24
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 10.1.1.1
# 配置Device A在备份组1中的优先级为120,高于Device B的优先级110和Device C的优先级100,以保证Device A成为Master。
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 priority 120
# 配置Device A工作在抢占方式,以保证Device A故障恢复后,能再次抢占成为Master,即只要Device A正常工作,Device A就会成为Master。为了避免频繁地进行状态切换,配置抢占延迟时间为5000厘秒。
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 preempt-mode delay 5000
[DeviceA-GigabitEthernet1/0/1] quit
# 创建和上行接口GigabitEthernet1/0/2物理状态关联的Track项1。如果Track项的状态为Negative,则说明Device A的上行接口出现故障。
[DeviceA] track 1 interface gigabitethernet 1/0/2
# 配置虚拟转发器监视Track项1。Track项的状态为Negative时,降低Device A上虚拟转发器的权重,使其低于失效下限10,即权重降低的数额大于245,以便其它设备接管Device A的转发任务。本例中,配置虚拟转发器权重降低数额为250。
[DeviceA] interface gigabitethernet 1/0/1
[DeviceA-GigabitEthernet1/0/1] vrrp vrid 1 track 1 weight reduced 250
(2)
# 配置VRRP工作在负载均衡模式。
<DeviceB> system-view
[DeviceB] vrrp mode load-balance
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.1。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] ip address 10.1.1.3 24
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 10.1.1.1
# 配置Device B在备份组1中的优先级为110,高于Device C的优先级100,以保证Device A出现故障时,Device B成为Master。
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 priority 110
# 配置Device B工作在抢占方式,抢占延迟时间为5000厘秒。
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 preempt-mode delay 5000
[DeviceB-GigabitEthernet1/0/1] quit
# 创建和上行接口GigabitEthernet1/0/2物理状态关联的Track项1。如果Track项的状态为Negative,则说明Device B的上行接口出现故障。
[DeviceB] track 1 interface gigabitethernet 1/0/2
# 配置虚拟转发器监视Track项1。Track项的状态为Negative时,降低Device B上虚拟转发器的权重,使其低于失效下限10,即权重降低的数额大于245,以便其它设备接管Device B的转发任务。本例中,配置虚拟转发器权重降低数额为250。
[DeviceB] interface gigabitethernet 1/0/1
[DeviceB-GigabitEthernet1/0/1] vrrp vrid 1 track 1 weight reduced 250
(3)
# 配置VRRP工作在负载均衡模式。
<DeviceC> system-view
[DeviceC] vrrp mode load-balance
# 创建备份组1,并配置备份组1的虚拟IP地址为10.1.1.1。
[DeviceC] interface gigabitethernet 1/0/1
[DeviceC-GigabitEthernet1/0/1] ip address 10.1.1.4 24
[DeviceC-GigabitEthernet1/0/1] vrrp vrid 1 virtual-ip 10.1.1.1
# 配置Device C工作在抢占方式,抢占延迟时间为5000秒。
[DeviceC-GigabitEthernet1/0/1] vrrp vrid 1 preempt-mode delay 5000
[DeviceC-GigabitEthernet1/0/1] quit
# 创建和上行接口GigabitEthernet1/0/2物理状态关联的Track项1。如果Track项的状态为Negative,则说明Device C的上行接口出现故障。
[DeviceC] track 1 interface gigabitethernet 1/0/2
# 配置虚拟转发器监视Track项1。Track项的状态为Negative时,降低Device C上虚拟转发器的权重,使其低于失效下限10,即权重降低的数额大于245,以便其它设备接管Device C的转发任务。本例中,配置虚拟转发器权重降低数额为250。
[DeviceC] interface gigabitethernet 1/0/1
[DeviceC-GigabitEthernet1/0/1] vrrp vrid 1 track 1 weight reduced 250
配置完成后,在Host A上可以ping通外网。通过display vrrp verbose命令查看配置后的结果。
# 显示Device A上备份组1的详细信息。
[DeviceA-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 5000
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
# 显示Device B上备份组1的详细信息。
[DeviceB-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 5000
Become Master : 426ms 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
# 显示Device C上备份组1的详细信息。
[DeviceC-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 5000
Become Master : 417ms 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中Device A为Master路由器,Device B和Device C 为Backup路由器。Device A、Device B和Device C上各自存在一个AVF,并存在作为备份的两个LVF。
# 当Device A的上行接口GigabitEthernet1/0/2出现故障后,通过display vrrp verbose命令查看Device A上备份组的详细信息。
[DeviceA-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 120 Running Pri : 120
Preempt Mode : Yes Delay Time : 5000
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命令查看Device C上备份组的详细信息。
[DeviceC-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 5000
Become Master : 412ms 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
以上显示信息表示Device A的上行接口出现故障后,Device A上虚拟转发器的权重降低为5,低于失效下限。Device A上所有虚拟转发器的状态均变为Initialized,不能再用于转发。Device C成为虚拟MAC地址000f-e2ff-0011对应虚拟转发器的AVF,接管Device A的转发任务。
# Timeout Timer超时后(约1800秒后),查看Device C上备份组的详细信息。
[DeviceC-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Backup
Config Pri : 100 Running Pri : 100
Preempt Mode : Yes Delay Time : 5000
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的报文。
# Device A出现故障后,通过display vrrp verbose命令查看Device B上备份组的详细信息。
[DeviceB-GigabitEthernet1/0/1] display vrrp verbose
IPv4 Virtual Router Information:
Running Mode : Load Balance
Total number of virtual routers : 1
Interface GigabitEthernet1/0/1
VRID : 1 Adver Timer : 100
Admin Status : Up State : Master
Config Pri : 110 Running Pri : 110
Preempt Mode : Yes Delay Time : 5000
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
以上显示信息表示Device A出现故障后,Device B的优先级高于Device C,将抢占成为Master路由器,同时删除了虚拟MAC地址000f-e2ff-0011对应的虚拟转发器。
(0)
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论