Thursday, July 7, 2011

First Hop Redundancy Protocols Part 2 - VRRP Gateway redundancy with static cost based Shortest path OSPF routing

After HSRP priority tracker implementation, here is VRRP (Virtual Router Redundancy Protocol) implementation. VRRP is Open-standard protocol. VRRP has Master & Backup routers with same overthrow capability as in HSRP. Master & Backup can be decided on basis of priority. Interface tracking can be enabled in supporting devices. I am not using Interface tracking here. VRRP is generally used for Router redundancy with High-end router as Master followed by Mid-level router as fail-over to sustain traffic for Master maintenance period.

I have implemented OSPF(Open Shortest Path First) here to demonstrate fast convergence of OSPF protocol.OSPF network configured is point-to-point network as no boundary router is present here. Complete OSPF area is backbone area i.e. Area 0. This scenario typically represents Multihoming WAN corporate networks to increase network resiliency. I am using single area OSPF configuration as in regard to achieve VRRP. I will post Multi-area OSPF configuration of Stub & Not-so-Stub area (NSSA) in upcoming articles. VRRP does not use UDP as communication protocol, it uses IP at 112 port. VRRP uses multicast address 224.0.0.18. Only one router remains in "Master" state, rest of the configured routers remain in "Backup" state. Remember HSRP & VRRP are not Load-balancing protocols, they do not distribute connections on basis of MAC addresses or IP addresses or in Round-robin. GLBP does load-balancing.


Master Routers R1 & R3 are implemented typically with high end capability to support faster processing and convergence, whereas Backup Routers R3 & R4 are mid-range routers to handle traffic only till primary comes up after maintenance. Virtualbox Microcore Linux Virtual Machines interfaces are bridged with Cloud interfaces. Different port shut & Router failure scenarios are tested to observe the behavior. OSPF is a Link-state routing protocol. I also observed that for the same architecture EIGRP protocol took more time for convergence & route propagation. EIGRP uses Distance-Vector routing Algorithm.
  • In OSPF serial link has default cost of 64. OSPF interface cost can be set to prioritize the outbound interface for packet.
  • If the Interface on which VRRP is configured goes down, then VRRP goes into "Init" state & will no longer become "Master". "Backup" router next in priority then becomes "Master".
  • Backup router will only become Master if 
    • Master router fails & goes down
    • VRRP interface on Master router goes down
  • VRRP Virtual IP will always point to Master routers interface IP, even though no outbound interface is present to reach destination network. OSPF protocol is required to take care of this preventing blackhole situation.
  • Packets will be routed through best possible low cost interfaces, so combination of Master Routers with low cost links will be computed.
  • Route selection process happens fast in OSPF providing better performance.
  • OSPF can also send traffic from Master router (say R1) to Backup router (say R2) directly if the best possible low cost path is present.
  • As there is no BDR present here, point-to-point OSPF network type is needed to be configured to share route information's.
  • Serial Interfaces only are configured in Point-to-Point configuration. 
  • VRRP facing interfaces are in broadcast mode providing BDR status 
Routing changes - 
-----------------------------------------------------------------------------------------------------------------------------------------
Shut Interfaces                                         Master Routers        Host 1 to Host 2                Host 2 to Host 1     
-----------------------------------------------------------------------------------------------------------------------------------------
R3 f0/0                                                             R1,R4            SW1-R1-R2-R4-SW2          SW2-R4-R2-SW1                
R3 f0/0, R1 s0/1                                              R1,R4            SW1-R1-R2-R4-SW2          SW2-R4-R2-SW1                      
R3 f0/0, R1 s0/1,R3 s0/1                                R1,R4            SW1-R1-R2-R4-SW2          SW2-R4-R2-SW1              
R3 f0/0, R1 s0/1,R3 s0/1, R1 s0/0                R1,R4             SW1-R1-R2-R4-SW2          SW2-R4-R2-SW1                  
R3 f0/0, R1 s0/1,R3 s0/1, R1 s0/0, R1 f0/0  R2,R4             SW1-R2-R4-SW2                SW2-R4-R2-SW1            
R1 s0/0, R2 s0/0                                             R1,R3             SW1-R1-R4-SW2                SW2-R3-R2-SW1               


Router Configurations - 
R1 - 
-----------------------------------------------------------------------------------------------------------------------------------------
interface Loopback1
ip address 199.199.199.199 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.56.250 255.255.255.0
duplex auto
speed auto
vrrp 20 ip 192.168.56.252
vrrp 20 timers advertise 5
vrrp 20 priority 125
vrrp 20 authentication text ninja
!
interface Serial0/0
ip address 11.1.1.1 255.255.255.0
ip ospf network point-to-point
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/1
ip address 12.1.1.1 255.255.255.0
ip ospf network point-to-point
ip ospf cost 80
!
router ospf 1
log-adjacency-changes
network 11.1.1.0 0.0.0.255 area 0
network 12.1.1.0 0.0.0.255 area 0
network 192.168.56.0 0.0.0.255 area 0

R2 - 
-----------------------------------------------------------------------------------------------------------------------------------------
interface Loopback1                                               
 ip address 198.198.198.198 255.255.255.255                       
!                                                                  
interface FastEthernet0/0                                          
 ip address 192.168.56.251 255.255.255.0                             
 duplex auto                                                         
 speed auto                                                        
 vrrp 20 ip 192.168.56.252                                           
 vrrp 20 timers learn                                              
 vrrp 20 priority 120                                              
 vrrp 20 authentication text ninja                                   
!                                                                  
interface Serial0/0                                                
 ip address 14.1.1.1 255.255.255.0                                   
 ip ospf network point-to-point                                    
!                                                                  
interface FastEthernet0/1                                          
 no ip address                                                          
 shutdown                                                          
 duplex auto                                                          
 speed auto                                                        
!                                                                  
interface Serial0/1                                                
 ip address 13.1.1.1 255.255.255.0                                   
 ip ospf network point-to-point                                    
 ip ospf cost 80                                                   
!                                                                  
router ospf 1                                                      
 log-adjacency-changes                                                
 network 13.1.1.0 0.0.0.255 area 0                                                  
 network 14.1.1.0 0.0.0.255 area 0                                   
 network 192.168.56.0 0.0.0.255 area 0                               

R3 - 
-----------------------------------------------------------------------------------------------------------------------------------------
interface Loopback1                                                
 ip address 195.195.195.195 255.255.255.255                        
!                                                                  
interface FastEthernet0/0                                          
 ip address 192.168.57.250 255.255.255.0                            
 duplex auto                                                         
 speed auto                                                       
 vrrp 21 ip 192.168.57.252                                        
 vrrp 21 timers advertise 5                                        
 vrrp 21 priority 125                                              
 vrrp 21 authentication text ninja                                   
!                                                                  
interface Serial0/0                                                
 ip address 11.1.1.2 255.255.255.0                                    
 ip ospf network point-to-point                                    
!                                                                  
interface FastEthernet0/1                                          
 no ip address                                                        
 shutdown                                                          
 duplex auto                                                        
 speed auto                                                        
!                                                                  
interface Serial0/1                                                
 ip address 13.1.1.2 255.255.255.0                                    
 ip ospf network point-to-point                                    
 ip ospf cost 80                                                        
!                                                                 
router ospf 1                                                     
 log-adjacency-changes                                               
 network 11.1.1.0 0.0.0.255 area 0                                 
 network 13.1.1.0 0.0.0.255 area 0                                   
 network 192.168.57.0 0.0.0.255 area 0                             


R4 -
-----------------------------------------------------------------------------------------------------------------------------------------
interface Loopback1                                               
 ip address 191.191.191.191 255.255.255.255
!
interface FastEthernet0/0
 ip address 192.168.57.251 255.255.255.0
 duplex auto
 speed auto
 vrrp 21 ip 192.168.57.252
 vrrp 21 timers learn
 vrrp 21 priority 120
 vrrp 21 authentication text ninja
!
interface Serial0/0
 ip address 14.1.1.2 255.255.255.0
 ip ospf network point-to-point
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 ip address 12.1.1.2 255.255.255.0
 ip ospf network point-to-point
 ip ospf cost 80
!
router ospf 1
 log-adjacency-changes
 network 12.1.1.0 0.0.0.255 area 0
 network 14.1.1.0 0.0.0.255 area 0
 network 192.168.57.0 0.0.0.255 area 0

OSPF Interface output on R1 - 
-----------------------------------------------------------------------------------------------------------------------------------------
R1#sh ip ospf int
FastEthernet0/0 is up, line protocol is up
  Internet Address 192.168.56.250/24, Area 0
  Process ID 1, Router ID 199.199.199.199, Network Type BROADCAST, Cost: 1
  Transmit Delay is 1 sec, State DR, Priority 1
  Designated Router (ID) 199.199.199.199, Interface address 192.168.56.250
  Backup Designated router (ID) 198.198.198.198, Interface address 192.168.56.251
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:07
  Index 3/3, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 4 msec, maximum is 4 msec
  Neighbor Count is 1, Adjacent neighbor count is 1
    Adjacent with neighbor 198.198.198.198  (Backup Designated Router)
  Suppress hello for 0 neighbor(s)
Serial0/1 is up, line protocol is up
  Internet Address 12.1.1.1/24, Area 0
  Process ID 1, Router ID 199.199.199.199, Network Type POINT_TO_POINT, Cost: 80
  Transmit Delay is 1 sec, State POINT_TO_POINT,
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40                                            
    Hello due in 00:00:00                                            
  Index 2/2, flood queue length 0                                    
  Next 0x0(0)/0x0(0)                                                               
  Last flood scan length is 1, maximum is 1                          
  Last flood scan time is 0 msec, maximum is 4 msec                  
  Neighbor Count is 1, Adjacent neighbor count is 1                  
    Adjacent with neighbor 191.191.191.191                                     
  Suppress hello for 0 neighbor(s)                                               
Serial0/0 is up, line protocol is up                                           
  Internet Address 11.1.1.1/24, Area 0                                            
  Process ID 1, Router ID 199.199.199.199, Network Type                           POINT_TO_POINT, Cost: 64                                                        
  Transmit Delay is 1 sec, State POINT_TO_POINT,                                
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5                                                                    
    oob-resync timeout 40                                            
    Hello due in 00:00:02                                            
  Index 1/1, flood queue length 0                                    
  Next 0x0(0)/0x0(0)                                                           
  Last flood scan length is 1, maximum is 1                          
  Last flood scan time is 4 msec, maximum is 4 msec                  
  Neighbor Count is 1, Adjacent neighbor count is 1                  
    Adjacent with neighbor 195.195.195.195                                  
  Suppress hello for 0 neighbor(s)                                            
R1#                                                               


OSPF Neighbor information for R1 - 
-----------------------------------------------------------------------------------------------------------------------------------------
R1#sh ip ospf neighbor                                                                
Neighbor ID    Pri State   Dead Time Address         Interface                 
198.198.198.198 1  FULL/BDR 00:00:38 192.168.56.251  FastEthernet0/0 
191.191.191.191 0  FULL/  - 00:00:30 12.1.1.2        Serial0/1                   
195.195.195.195 0  FULL/  - 00:00:34 11.1.1.2        Serial0/0                    
R1#                                                                  

BDR - Backup designated Router, this is due to the Broadcast Network type for the R1 f0/0 interface present. From the First line in neighbor information, R2 f0/0 interface will become Designated router if current designated router has problem or fails. R2 f0/0 has IP address 192.168.56.251 which is backup VRRP IP address present in VRRP group 20. Rest of the Serial links are Point-to-Point.
That's it guys, Njoy Networking.

No comments:

Post a Comment