네트워크 및 서버/네트워크

VRRP(Virtual Router Redundancy Protocol)

잉여토끼 2024. 10. 18. 14:55

VRRP

Virtual Router Redundancy Protocol

특징

  • HSRP와 달리 표준이므로 cisco장비가 아닌 제품에서도 지원 가능
  • 아우터 인터페이스에 설정된 실제 IP를 V-Ip로 설정
  • VRRP Adverisement Pack을 전송하여 Master - Backup 관계를 유지

HSRP와의 차이

  HSRP VRRP
프로토콜 적용 범위 sisco 독점 프로토콜 IEEE 표준
그룹 번호 16 groups 255 groups
작동 방식 1 active 1 standby another learn 1 master another backup
인터페이스 IP로
VIP 설정 가능 여부
O X
MAC 주소 v1 : 0000.0C07.Axxx
v2 : 0000.0C9F.Fxxx
0000.5E00.01xx

 

라우터 선출 우선순위

  1. 가상 IP주소와 인터페이스 IP주소가 같은 라우터
  2. VRRP Priority [기본값 : 100]
  3. Interface IP가 높은 라우터

VRRP Adverisement Packet

  • HSRP의 Hello패킷 역할
  • Master가 Backup라우터에게 전송하여 자신이 존재함을 알림
  • 기본 전송 속도 1초
  • 그룹에게 전송 --> 224.0.0.18 주소 사용

 

 


 

 

 

설정 명령어

우선순위 설정

conf t
int [Interface]
vrrp [Group Num] priority [Priority Num]

 

광고 주기 설정

conf t
int [Interface]
vrrp [Group Num] timers advertise [Time(s)]
vrrp [Group Num] timers learn

 

가상 IP 설정 및 활성화

conf t
int [Interface]
vrrp [Group Num] ip [IP]

 

트래킹 설정

conf t
track [Track Num] interface [Interface] line-protocol
int [Interface]
vrrp [Group Num] track [Track Num]

 

Priority 감소값 설정

conf t
int [Interface]
vrrp [Group Num] track [Track Num] decrement [Decrement Num]

 

상태 확인

show vrrp

 

평문 인증

conf t
int [Interface]
vrrp [Group Num] authentication text [String]

 

MD5 인증

conf t
key chain [Chain Name]
key [Key num]
key-string [Key String]
int [Interface]
vrrp [Group Num] authentication MD5 key-chain [Key Name]