VRRP負載平衡及連接埠跟蹤實現主備切換

來源:互聯網
上載者:User

標籤:查看   鏈路   enabled   -o   add   ISE   vrrp   expires   配置   

VRRP 實驗

1、 實現PC1和PC2的流量分別走R1和R2,實現負載平衡
2、 跟蹤連接埠,當外部鏈路出現故障實現主備切換.

R1#conf t
R1(config)#interface e0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#
R1(config-if)#vrrp 10 ip 192.168.1.254 vrrp 10號組虛擬ip地址
R1(config-if)#vrrp 10 priority 120 設定R1的vrrp10號組優先順序為120 (R1成為主路由)
R1(config-if)#vrrp 10 preempt 設定搶佔模式(預設開啟)
R1(config-if)#vrrp 20 ip 192.168.1.253 vrrp 20號組虛擬ip地址
R1(config-if)#vrrp 20 preempt 設定搶佔模式(預設開啟)
R1(config-if)#vrrp 20 priority 100 設定R1的vrrp20號組優先順序為100 (預設)

R1#wr 儲存配置

R2#conf t
R2(config)#interface e0/0
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#vrrp 10 ip 192.168.1.254
R2(config-if)#vrrp 10 preempt
R2(config-if)#vrrp 20 ip 192.168.1.253
R2(config-if)#vrrp 20 priority 120
R2(config-if)#vrrp 20 preempt
R2(config-if)#end
R2#
R2#show vrrp 查看結果,R1是10組的master,R2是20組的master
Ethernet0/0 - Group 10
State is Backup
Virtual IP address is 192.168.1.254
Virtual MAC address is 0000.5e00.010a
Advertisement interval is 1.000 sec
Preemption enabled
Priority is 100
Master Router is 192.168.1.1, priority is 120
Master Advertisement interval is 1.000 sec
Master Down interval is 3.609 sec (expires in 2.813 sec)

Ethernet0/0 - Group 20
State is Master
Virtual IP address is 192.168.1.253
Virtual MAC address is 0000.5e00.0114
Advertisement interval is 1.000 sec
Preemption enabled
Priority is 120
Master Router is 192.168.1.2 (local), priority is 120
Master Advertisement interval is 1.000 sec
Master Down interval is 3.531 sec

R2#wr 儲存配置

VRRP負載平衡及連接埠跟蹤實現主備切換

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.