Net Eng

HSRP 본문

Network/실습

HSRP

欲心 2024. 6. 25. 14:41

■ HSRP(Hot Standby Router Protocol)

-가상 게이트웨이를 생성
-Cisco 전용
-Group화를 하여 설정

 

 

■ HSRP 설정 (장애내성)

 

R1

conf t
int fa0/0
ip addr 172.16.1.100 255.255.255.0
no sh
int s1/0
ip addr 192.168.13.1 255.255.255.0
no sh
router rip
passive-interface fa0/0
ver 2
net 172.16.1.0
net 192.168.13.0
no auto

 

R2

conf t
int fa0/0
ip addr 172.16.1.200 255.255.255.0
no sh
int s1/1
ip addr 192.168.23.1 255.255.255.0
no sh
router rip
ver 2
net 172.16.1.0
net 192.168.23.0
no auto

 

R3

conf t
int s1/2
ip addr 192.168.34.1 255.255.255.0
no sh
int s1/0
ip addr 192.168.13.2 255.255.255.0
no sh
int s1/1
ip addr 192.168.23.2 255.255.255.0
no sh
router rip
ver 2
net 192.168.34.0
net 192.168.13.0
net 192.168.23.0
no auto

 

R4

conf t
int fa0/0
ip addr 192.168.4.254 255.255.255.0
no sh
int s1/2
ip addr 192.168.34.2 255.255.255.0
no sh
router rip
ver 2
net 192.168.34.0
net 192.168.4.0
no auto

 

PC

PC1
ip 172.16.1.1 255.255.255.0

PC2
ip 172.16.1.2 255.255.255.0

PC5
ip 192.168.4.1 255.255.255.0 192.168.4.254

 

HSRP 설정

 

R1

conf t
int fa0/0
standby 1 priority 255 		# Active Router 지정에 사용 높을수록 우선
standby 1 ip 172.16.1.254	# 가상 게이트웨이 주소 지정

 

R2

conf t
int fa0/0
standby 1 ip 172.16.1.254

 

PC

PC1
ip 172.16.1.1 255.255.255.0 172.16.1.254

PC2
ip 172.16.1.2 255.255.255.0 172.16.1.254

 

R1

int fa0/0
sh

 

R2 라우터

→ 자동으로 Standby에서 Active로 변경된다.

→ 하지만 no sh 명령어로 활성화를 시켜도 R1은 Standby로 유지된다

 

이를 해결하기 위해 R1 라우터에서 아래 명령어를 입력한다

standby 1 preempt		# Active 역활 회복(선취권)

 

R1 라우터

 

PC1

ping 192.168.4.1 -t

 

 

→ 약 4초에 한번씩 멀티캐스팅 주소로 정보를 주고 받는다.

 

HSRP 패킷 내용

 

 

 

설정 이후 172.16.2.0/24 네트워크를 추가하여 R2를 Active Router로 함

 

PC

PC3
ip 172.16.2.1 255.255.255.0 172.16.2.254

PC4
ip 172.16.2.2 255.255.255.0 172.16.2.254

 

R1

conf t
int fa0/0
ip addr 172.16.2.100 255.255.255.0 secondary
standby 2 ip 172.16.2.254

 

R2

conf t
int fa0/0
ip addr 172.16.2.200 255.255.255.0 secondary
standby 2 ip 172.16.2.254
standby 2 preempt
standby 2 priority 255

 

■ 실습파일

HSRP.7z
0.00MB

'Network > 실습' 카테고리의 다른 글

GLBP  (0) 2024.06.26
VRRP  (0) 2024.06.26
Etherchannel  (0) 2024.06.25
MAC 보안  (0) 2024.06.24
장비 실습  (0) 2024.06.22