天天看點

ensp-VRRP的配置

VRRP基本配置環境拓撲:

ensp-VRRP的配置

VRRP基本配置環境中的IP位址規劃:

ensp-VRRP的配置

在路由器接口添加VRRP配置:

[AR1]interface g0/0/0
[AR1-GigabitEthernet0/0/0]vrrp vrid 10 virtual-ip 10.10.10.254
[AR1-GigabitEthernet0/0/0]vrrp vrid 10 priority 150
           
[AR2]interface g0/0/0
[AR2-GigabitEthernet0/0/0]vrrp vrid 10 virtual-ip 10.10.10.254
           

檢查VRRP狀态:

[AR1]display vrrp brief 
Total:1     Master:1     Backup:0     Non-active:0      
VRID  State        Interface                Type     Virtual IP     
----------------------------------------------------------------
10    Master       GE0/0/0                  Normal   10.10.10.254   
           
[AR2]display vrrp brief 
Total:1     Master:0     Backup:1     Non-active:0      
VRID  State        Interface                Type     Virtual IP     
----------------------------------------------------------------
10    Backup       GE0/0/0                  Normal   10.10.10.254   
           

檢視VRRP版本:

[AR1]display vrrp protocol-information 
 VRRP protocol information is shown as below: 
    VRRP protocol version : V2
    Send advertisement packet mode : send v2 only 
           

在PC10上驗證VRRP的配置效果:

PC10>ping 192.168.0.10
Ping 192.168.0.10: 32 data bytes, Press Ctrl_C to break
From 192.168.0.10: bytes=32 seq=1 ttl=254 time=46 ms
From 192.168.0.10: bytes=32 seq=2 ttl=254 time=16 ms
From 192.168.0.10: bytes=32 seq=3 ttl=254 time=47 ms
From 192.168.0.10: bytes=32 seq=4 ttl=254 time=47 ms
From 192.168.0.10: bytes=32 seq=5 ttl=254 time=31 ms
--- 192.168.0.10 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 16/37/47 ms
PC10>tracert 192.168.0.10
traceroute to 192.168.0.10, 8 hops max
(ICMP), press Ctrl+C to stop
 1  10.10.10.253   31 ms  47 ms  47 ms
 2  192.168.0.10   62 ms  63 ms  78 ms
           

檢查VRRP狀态:

[AR1]display vrrp brief 
Total:1     Master:1     Backup:0     Non-active:0      
VRID  State        Interface                Type     Virtual IP     
----------------------------------------------------------------
10    Master       GE0/0/0                  Normal   10.10.10.254   
           
[AR2]display vrrp brief 
Total:1     Master:0     Backup:1     Non-active:0      
VRID  State        Interface                Type     Virtual IP     
----------------------------------------------------------------
10    Backup       GE0/0/0                  Normal   10.10.10.254   
           

檢視VRRP版本:

[AR1]display vrrp protocol-information 
 VRRP protocol information is shown as below: 
    VRRP protocol version : V2
    Send advertisement packet mode : send v2 only 
           

在PC10上驗證VRRP的配置效果:

PC10>ping 192.168.0.10
Ping 192.168.0.10: 32 data bytes, Press Ctrl_C to break
From 192.168.0.10: bytes=32 seq=1 ttl=254 time=46 ms
From 192.168.0.10: bytes=32 seq=2 ttl=254 time=16 ms
From 192.168.0.10: bytes=32 seq=3 ttl=254 time=47 ms
From 192.168.0.10: bytes=32 seq=4 ttl=254 time=47 ms
From 192.168.0.10: bytes=32 seq=5 ttl=254 time=31 ms
--- 192.168.0.10 ping statistics ---
  5 packet(s) transmitted
  5 packet(s) received
  0.00% packet loss
  round-trip min/avg/max = 16/37/47 ms
PC10>tracert 192.168.0.10
traceroute to 192.168.0.10, 8 hops max
(ICMP), press Ctrl+C to stop
 1  10.10.10.253   31 ms  47 ms  47 ms
 2  192.168.0.10   62 ms  63 ms  78 ms
           

觀察路由器接口的VRRP狀态變化情況:

[AR1]display vrrp state-change interface GigabitEthernet 0/0/0 vrid 10
Time                               SourceState  DestState   Reason  
-------------------------------------------------------------------------------
2017-03-28 03:45:00 UTC-08:00      Initialize   Backup      Interface up 
2017-03-28 03:45:03 UTC-08:00      Backup       Master      Protocol timer expired
2017-03-28 04:52:09 UTC-08:00      Master       Backup      Priority calculation
2017-03-28 05:14:17 UTC-08:00      Backup       Master      Priority calculation
           

繼續閱讀