【实验】不会部署VRRP?看完就会了
拓撲圖
?
?
?
?
規格
?
?
?
?
適用于所有版本、所有形態的AR路由器。
?
組網需求
?
?
?
?
如圖1所示,作為RouterA和RouterB的AR路由器加入兩個VRRP備份組以實現備份組中各設備既能相互備份,又能分擔網絡流量。
RouterA作為備份組1的Master,兼任備份組2的Backup。
RouterB作為備份組2的Master,兼任備份組1的Backup。
HostA使用備份組1作網關,HostC主機使用備份組2作為網關。
?
操作步驟
?
?
?
?
1.RouterA的配置
#
interface Ethernet1/0/0
?ip address 192.168.1.1 255.255.255.0?
#
interface Ethernet2/0/0
?ip address 10.1.1.1 255.255.255.0??
//連接HostA的接口的IP地址
?vrrp vrid 1 virtual-ip 10.1.1.111??
//配置備份組1的虛擬網關地址
?vrrp vrid 1 priority 120???????????
//配置RouterA在備份組1中的優先級為120
?vrrp vrid 2 virtual-ip 10.1.1.112??
//配置備份組2的虛擬網關地址
#
ospf 1
?area 0.0.0.0
??network?192.168.1.0 0.0.0.255
??network?10.1.1.0 0.0.0.255
#
?
2.RouterB的配置
#
interface Ethernet1/0/0
?ip address 192.168.2.1 255.255.255.0
#
interface Ethernet2/0/0
?ip address 10.1.1.2 255.255.255.0??
//連接HostC的接口的IP地址
?vrrp vrid 1 virtual-ip 10.1.1.111?
//配置備份組1的虛擬網關地址
?vrrp vrid 2 virtual-ip 10.1.1.112??
//配置備份組2的虛擬網關地址
?vrrp vrid 2 priority 120??????????
?//配置RouterB在備份組2中的優先級為120
#
ospf 1
?area 0.0.0.0
??network?192.168.2.0 0.0.0.255
??network?10.1.1.0 0.0.0.255
#
?
3.RouterC的配置
#
interface Ethernet1/0/0
?ip address 192.168.1.2 255.255.255.0?
#
interface Ethernet2/0/0
?ip address 192.168.2.2 255.255.255.0
#
interface Ethernet3/0/0
?ip address 20.1.1.1 255.255.255.0
#
ospf 1
?area?0.0.0.0
??network?192.168.1.0 0.0.0.255
??network?192.168.2.0 0.0.0.255
??network?20.1.1.0 0.0.0.255
#
?
4.驗證配置結果
# 在HostA上對HostB進行tracert測試,可以看到HostA經過RouterA和RouterC到達HostB。顯示信息看如下:
?
?
# 在HostC上對HostB進行tracert測試,可以看到HostC經過RouterB和RouterC到達HostB。顯示信息看如下:
?
?
# 在RouterA上執行display vrrp命令,可以看到RouterA分別作為備份組1的Master和備份組2的Backup。其中備份組1的“state”為Master,備份組2的“state”為Backup。
display vrrp
??Ethernet2/0/0?| Virtual Router 1
????state??????????:?Master
????Virtual?IP?????: 10.1.1.111
????Master?IP??????: 10.1.1.1
????PriorityRun????:?120
????PriorityConfig?: 120
????MasterPriority?: 120
????Preempt????????: YES?????Delay Time : 0 s
????TimerRun???????:?1 s
????TimerConfig????:?1 s
????Auth?Type??????: NONE
????Virtual?Mac????:??0000-5e00-0101
????Check?TTL??????: YES
????Config?type????: normal-vrrp
????Backup-forward?: disabled
????Create?time????: 2007-11-22 16:02:21
????Last?change time : 2007-11-22 16:02:25
??Ethernet2/0/0?| Virtual Router 2
????state??????????:?Backup
????Virtual?IP?????: 10.1.1.112
????Master?IP??????: 10.1.1.2
????PriorityRun????:?100
????PriorityConfig?: 100
????MasterPriority?: 100
????Preempt????????:?YES?????Delay Time : 0 s
????TimerRun???????:?1 s
????TimerConfig????:?1 s
????Auth?Type??????: NONE
????Virtual?Mac????:??0000-5e00-0102
????Check?TTL??????: YES
????Config?type????: normal-vrrp
????Backup-forward?: disabled
????Create?time????: 2007-11-22 16:03:05
????Last?change time : 2007-11-22 16:03:09
?
# 在RouterB的Ethernet2/0/0接口上執行shutdown命令,模擬備份組2的網關故障。在RouterA上執行display vrrp命令,可以看到RouterA分別作為備份組1的Master和備份組2的Master。其中,備份組1和備份組2的“state”均為Master。此時,兩個VRRP備份組的虛擬網關都在RouterA上。
display vrrp
??Ethernet2/0/0?| Virtual Router 1
????state??????????:?Master
????Virtual?IP?????: 10.1.1.111
????Master?IP??????: 10.1.1.1
????PriorityRun????:?120
????PriorityConfig?: 120
????MasterPriority?: 120
????Preempt????????:?YES?????Delay Time : 0 s
????TimerRun???????:?1 s
????TimerConfig????:?1 s
????Auth?Type??????: NONE
????Virtual?Mac????:??0000-5e00-0101
????Check?TTL??????: YES
????Config?type????: normal-vrrp
????Backup-forward?: disabled
????Create?time????: 2007-11-22 16:02:21
????Last?change time : 2007-11-22 16:02:25
??Ethernet2/0/0?| Virtual Router 2
????state??????????:?Master
????Virtual?IP?????: 10.1.1.112
????Master?IP??????: 10.1.1.1
????PriorityRun????:?100
????PriorityConfig?: 100
????MasterPriority?: 100
????Preempt????????:?YES?????Delay Time : 0 s
????TimerRun???????:?1 s
????TimerConfig????:?1 s
????Auth?Type??????: NONE
????Virtual?Mac????:??0000-5e00-0102
????Check?TTL??????: YES
????Config?type????: normal-vrrp
????Backup-forward?: disabled
????Create?time????: 2007-11-22 16:03:05
????Last?change time : 2007-11-22 16:03:09
總結
以上是生活随笔為你收集整理的【实验】不会部署VRRP?看完就会了的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 【干货】救火必备:线上故障排查套路大全
- 下一篇: 【实验】小型网络WLAN架构实战案例