본문 바로가기

Implementing Layer3 High Availabillity - 1.HSRP (Host Standby Router Protocol)

액트 2019. 5. 28.
반응형

@ Implementing Layer3 High Availabillity 

 

- 외부로 통신할 수 있는 Gateway를 여러개 만들어서 끊어져도 통신하겠다.

 

@ HSRP

 


- HSRP (Host Standby Router Protocol) : 상시 대기 라우터 프로토콜

 

 

 

 

 

 



 

- 여러개의 L3장치에 Gateway를 준 다음 이를 하나의 그룹으로 묶는다.

- 이 그룹을 대표하는 가상 장치를 하나 만든 후 이 대표 가상 장치의 Gateway의 주소를 PC에 준다.








 

- 두 개의 Gateway중 이동되는 경로를 Active Router라 한다.

- Active Router는 내가 살아 있다는 Hello 3초마다 Standby Router에게 보낸다.
  Active Router 수행 후 죽으면(hold time : 10 초) -> Standby가 Active가 되어 수행

- Active로 수행할 Ruoter는 Priority로 선정 -> 둘다 Priority가 같으면 IP주소 높은 아이가 Active

- Default Priority는 100

 

※ 주의 사항 : Active가 Root Bridge 가 되어야 한다.

 

 

- 나머지 하나를 standby Router라 한다.

 

 

 

 


< 묶는 명령어 > 

 standby <그룹번호> ip <대표가상IP주소>            // 가상 IP주소 주는 순간 HSRP 작동

 

< 수동 Priority 선정 명령어 >
standby <그룹번호> priority <숫자>

- Default Priority는 100

 

< preampt 명령어 >

- 죽었다가 다시 복구되면 Active 기능을 다시 수행하겠다

standby <그룹번호> preampt

 

해커의 Active가 되면 안되니깐 인증을 걸어준다.

< 명령어 >

default password : cisco
standby <그룹번호> authentication <password>




 

standby <그룹번호> timers msec <helloTimer> <holdTimer>
-> holdtime은 hellotime의 3배 이상
 


죽었다 복구 할시 바로 Active기능을 뺏어오면 안된다 -> STP,라우팅 등이 안되어 있다. -> 명령어
standby <그룹번호> preampt dela minimum <초>    // 최소 STP 때문에 50초 이상을 설정해준다.
 

 

 

 

Tracking = 추적하는 것

 


SW4 에서 아래 포트가 끊어지면 SW3로 잘 갈텐데. fa0/23 위에 포트가 끊어지면 HSRP 는 잘 동작하므로
스위치로 오게 된다. 불필요한 경로를 방지하기 위해서 track 기능을 주게 된다.

 

 

standby 100 track fa 0/23 20
// standby 그룹 100번의 track를 걸겠다. fa 0/23 에 . fa0/23이 끊어지면 priority를 20을 떨어트리겠다.
standby 100 trank fa 0/24 (10)                    

// default는 10 이다.

 

주의 : 우선순위 조절을 잘 해야한다.
우선순위 디폴트값은 10이기 때문에 track 기능으로 깍여도 priority가 같다면 IP를 보게 되는데 이는 더 높은 IP를 active로 설정한다. 하지만 차단된 스위치의 IP가 더 높게 된다면 여전히 Active로 될 것이다.

 

 

Root Bridge랑 Active랑 같아야 한다.

 

< Root Bridge 지정 명령어 >
spanning-tree vlan 10 root primary       // root bridge 
spanning-tree vlan 20 root secondary  // secondary root bridge

 

< 확인 >
traceroute 쳤을 때 Root Bridge로 가는 경로
SW1, SW3 에서 show standby brief 확인
SW2 에서 show mac-address-table 확인

 

 

< 명령어 정리 >

vlan 10

vlan 20 

spanning-tree vlan 10 root primary                       // vlan10 을 Root Bridge로 선정
spanning-tree vlan 20 root secondary                   // Root Bridge Down 되면 Root Bridge 선정
int vlan 10
no shut
ip add 10.10.10.201 255.255.255.0                   
standby 10 ip 10.10.10.254                               // 대표 IP 선정          
standby 10 priority 110                                      // Active를 위한 Priority 수동 설정

standby 10 preempt delay minimum 60                    // Down 후 Up시 60초 후에 Active 가져온다.
standby 10 authentication TEST10                         // 인증 
standby 10 track fa 1/5 20
                                                   // track 설정

 

 

 

< 실습 >

 

SW1 : Active
SW1과 SW3 을 HSRP 그룹으로 묶는다.

R1,R2는 Default Gateway로 잡는다.
R1,R2의 Gateway는 virtual IP : 1.1.100.254

!---- preconfig
ena
conf t
ena sec cisco
no ip domain-lookup
line console 0
password cisco
login
exec-timeout 0 0
logg sync
exi
username CCNP password itbank321
line vty 0 4
login local
exi


!---- R1
int fa 0/1
no shut
ip add 1.1.100.1 255.255.255.0
exi
ip route 0.0.0.0 0.0.0.0 1.1.100.254
exi

 

!---- R2
int fa 0/1
no shut
ip add 1.1.100.2 255.255.255.0
exi
ip route 0.0.0.0 0.0.0.0 1.1.100.254
exi


!---- SW2
vlan 100

int range fa 1/1 ,fa 1/2 ,fa 1/15 ,fa 1/11
no shut
sw mode acc
sw acc vlan 100
exi


!---- SW1
vlan 100

int vlan 100
no shut
ip add 1.1.100.201 255.255.255.0

standby 100 ip 1.1.100.254
standby 100 priority 110
standby 100 timers msec 200 msec 750
standby 100 preempt delay minimum 60
standby 100 authentication TEST

int fa 1/15
no shut
sw mode acc
sw acc vlan 100

int fa 1/13
no switchport
ip add 1.1.14.1 255.255.255.0
exi

ip routing
router eigrp 100
net 1.0.0.0
exi

 


!---- SW3
vlan 100

int vlan 100
no shut
ip add 1.1.100.203 255.255.255.0

standby 100 ip 1.1.100.254
standby 100 priority 100
standby 100 timers msec 200 msec 750   
standby 100 authentication TEST

int fa 1/13
no shut
sw mode acc
sw acc vlan 100
exi

int fa 1/15
no sw
ip add 1.1.34.3 255.255.255.0
exi

ip routing
router eigrp 100
net 1.0.0.0
exi


!---- SW4
int lo 0
no shut
ip add 1.1.4.4 255.255.255.0
exi

int fa 1/11
no sw
ip add 1.1.14.4 255.255.255.0
exi

int fa 1/15
no sw
ip add 1.1.34.4 255.255.255.0
exi

ip routing
router eigrp 100
net 1.0.0.0
exi


< 확인 >
각 Router 에서 routing table 확인
R1 에서 traceroute 1.1.4.4 쳤을 때 Root Bridge로 가는 경로
SW1, SW3 에서 show standby brief 확인
SW2 에서 show mac-address-table 확인

반응형

'IT > 하드웨어' 카테고리의 다른 글

[ 실습 ] HSRP LAB 3  (0) 2019.05.29
[ 실습 ] HSRP LAB 2  (0) 2019.05.29
[실습] DHCP 설정  (0) 2019.05.28
DHCP (Dynamic Host Configuration Protocol) Service  (0) 2019.05.28
InterVLAN3 실습  (0) 2019.05.28

댓글