라우터와 라우터 사이에 가상의 IP와 MAC 주소를 지정하여
생성된 가상의 IP와 MAC주소를 기본 게이트웨이로 사용한다.
================================================
================================================
HSRP 기본
- HSRP는 인터페이스 레벨에서 구성된다.
- 가상의 IP와 MAC 주소를 사용한다.
- 협상을 통해 Active와 Standby 라우터가 선출되며 hello 패킷을 통해 서로가 살아있음을 확인한다.
- Active 라우터로 부터 hello 패킷의 응답이 없으면 Standby 라우터가 Active 라우터로 전환된다.
- 두 라우터는 HSRP 인터페이스에 대해 물리적인 IPv4, MAC 주소를 가지고있다.
- 그리고 또한 같은 인터페이스에 HSRP에 대한 가상의 IP, MAC 주소도 구성되어 있다.
구성 명령어
interface "interface 이름"
ip address "물리적인 아이피" "서브넷 마스크"
no shutdown
standby 1 ip "가상의 아이피"
**당연히 페어를 이룰 라우터에 같은 가상의 아이피를 할당해야한다.
show standby -> HSRP 검증 명령어
================================================
================================================
HSRP 심화
우선순위 & 선점
- 우선순위가 높은 라우터가 선호되며 기본값은 100이다.
- 우선순위 값이 동일할 경우 가장 높은 IP 주소가 선출된다.
- 선점(Pre-emption)이 활성화 되어 있으면 장애로 다운되고 다시 켜져도
선점이 활성화된 라우터가 Active가 된다. (전환시 순단 발생)
구성 명령어
standby 1 priority "원하는 값" -> 우선순위 값
standby 1 preempt -> 선점 활성화
예시))
Router 1
interface g0/1
ip address 10.10.10.2 255.255.255.0
no shutdown
standby 1 ip 10.10.10.1
standby 1 priority 110
standby 1 preempt
Router 2
interface g0/1
ip address 10.10.10.3 255.255.255.0
no shutdown
standby 1 ip 10.10.10.1
standby 1 priority 90
버전
- 기본값은 버전 1이고 2도 있다.
- 두 라우터는 같은 버전을 사용하여야 한다.
구성 명령어
standby version 2
Load balance
- 서로 다른 IP주소로 두 개의 다른 HSRP 그룹을 구성하면 된다.
예시))
Router 1
interface g0/1
ip address 10.10.10.2 255.255.255.0
no shutdown
standby 1 ip 10.10.10.1
standby 1 priority 110
standby 1 preempt
standby 2 10.10.10.254
standby 2 priority 90
Router 2
interface g0/1
ip address 10.10.10.3 255.255.255.0
no shutdown
standby 1 ip 10.10.10.1
standby 1 priority 90
standby 2 ip 10.10.10.254
standby 2 priority 110
standby 2 preempt
또 다른 로드밸런싱 방법
동일한 라우터 쌍을 통해 여러 서브넷이 지나가는 경우
예를들어 10개의 서브넷이 있다면 5개씩 나눠서 통과되게 만드는 것이다.
예시))
Router 1
interface g0/1
ip address 10.10.10.2 255.255.255.0
no shutdown
standby 1 ip 10.10.10.1
standby 1 priority 110
standby 1 preempt
interface g0/2
ip address 10.10.20.2 255.255.255.0
no shutdown
standby 1 ip 10.10.20.1
standby 1 priority 90
Router 2
interface g0/1
ip address 10.10.10.3 255.255.255.0
no shutdown
standby 1 ip 10.10.10.1
standby 1 priority 90
interface g0/2
ip address 10.10.20.3 255.255.255.0
no shutdown
standby 1 ip 10.10.20.1
standby 1 priority 110
standby 1 preempt
'Network' 카테고리의 다른 글
BGP - Part 3 (1) | 2025.01.02 |
---|---|
BGP - Part 2 (0) | 2025.01.01 |
BGP - Part 1 (0) | 2024.12.30 |
STP (0) | 2024.12.11 |
OSPF (1) | 2024.11.27 |