νƒœκ·Έ 보관물: VRRP

[FHRP] VRRP에 λŒ€ν•΄

  1. VRRP
  2. VRRP μ„€μ •
  3. VRRP λΆ€ν•˜λΆ„μ‚°

1. VRRP

Virtual Router Redundancy Protocol

ν‘œμ€€ κ²Œμ΄νŠΈμ›¨μ΄ 이쀑화 ν”„λ‘œν† μ½œμ΄λ‹€. HSRP와 달리 μ—¬λŸ¬ 벀더 μž₯λΉ„μ—μ„œ μ‚¬μš©ν•  수 μžˆλ‹€.

κ·Έλ¦Ό1. VRRP

VRRP μ—­ν• 

Virtual Router Master :
κ²Œμ΄νŠΈμ›¨μ΄ 역할을 ν•˜λŠ” λΌμš°ν„°.
Master λΌμš°ν„° μ„ μΆœμ€ ‘가상IP와 μ‹€μ œIPκ°€ λ™μΌν•œ λΌμš°ν„°’ β†’ ‘VRRP의 μš°μ„ μˆœμœ„κ°€ 높은 λΌμš°ν„°’ β†’ ‘μΈν„°νŽ˜μ΄μŠ€ IPκ°€ 높은 λΌμš°ν„°’ μˆœμ΄λ‹€.

Virtual Router Backup :
Master λΌμš°ν„° μž₯μ•  μ‹œ 역할을 μ΄μ–΄λ°›λŠ” λΌμš°ν„°.

VRRP νŠΉμ§•

  • λͺ©μ μ§€ IP : 224.0.0.18 , Multicast.
  • IPv4 νŒ¨ν‚· λ‚΄ ‘Protocol’ ν•„λ“œ : 112번
  • Master λΌμš°ν„°λŠ” 1μ΄ˆλ§ˆλ‹€ VRRP μš°μ„ μˆœμœ„ 와 μƒνƒœλ₯Ό κ΄‘κ³ ν•œλ‹€.
  • μ‹€μ œ μ„€μ •λœ μΈν„°νŽ˜μ΄μŠ€ IPλ₯Ό 가상IP둜 μ‚¬μš©ν•  수 μžˆλ‹€.

VRRP 인증

κ³΅κ²©μžκ°€ Master λΌμš°ν„°λ‘œ μ„ μΆœλ˜λŠ” 것을 λ°©μ§€ν•˜κΈ° μœ„ν•΄ Plain-Text, MD5 인증을 μ„€μ •ν•  수 μžˆλ‹€.


2. VRRP μ„€μ •

κΈ°λ³Έμ„€μ • β†’ VRRP μ„€μ • β†’ VRRP μ„€μ • 확인 β†’ VRRP 인증

[κΈ°λ³Έ]
– IP μ„€μ •
각 μž₯λΉ„μ˜ μΈν„°νŽ˜μ΄μŠ€
(PC GWλŠ” Virtual IP둜 μ„€μ •)

– OSPF λΌμš°νŒ…
R1 fa0/0, fa1/0
R2 fa0/1, fa1/0
SW2 fa0/0, fa0/1, loopback 0

[VRRP μ„€μ •]

R1(config)# track 1 int fa1/0 line-protocol
R1(config-track)# exit
R1(config)#
R1(config)# int fa1/0
R1(config-if)# vrrp 1 ip 10.10.100.253
R1(config-if)# vrrp 1 priority 105
R1(config-if)# vrrp 1 preempt delay minimum 180
R1(config-if)# vrrp 1 timers advertise 1
R1(config-if)# vrrp 1 timers learn
R1(config-if)# vrrp 1 track 1


R2(config)# int fa1/0
R2(config-if)# vrrp 1 ip 10.10.100.253
R2(config-if)# vrrp 1 timers advertise 1
R2(config-if)# vrrp 1 timers learn

2: κ°μ‹œν•  μΈν„°νŽ˜μ΄μŠ€λ‚˜ 경둜λ₯Ό μ§€μ •ν•œλ‹€. line-protocol μ˜΅μ…˜μ„ μ‚¬μš©ν•˜λ©΄ ν•΄λ‹Ή μΈν„°νŽ˜μ΄μŠ€μ˜ Layer 2 μƒνƒœμ— 따라 Up / Down μƒνƒœλ‘œ νŒλ‹¨ν•œλ‹€. 경둜λ₯Ό μ§€μ •ν•˜κ³ μž ν•œλ‹€λ©΄, “track 2 ip route 10.10.0.1/32 reachability” μ΄λ ‡κ²Œ ν•  수 μžˆλ‹€.
6: vrrp 그룹은 1-255 μ‚¬μ΄λ‘œ μ§€μ •ν•  수 μžˆλ‹€.
7: κΈ°λ³Έ PriorityλŠ” 100이닀. R1을 Master λΌμš°ν„°λ‘œ μ„ μ •ν•˜κΈ° μœ„ν•΄ Priority 105둜 μ„€μ •ν–ˆλ‹€.
8: Master λΌμš°ν„°κ°€ μž₯μ• λ‘œ 인해 Backup λΌμš°ν„°λ‘œ λ³€κ²½λ˜μ—ˆμ„ λ•Œ, μž₯μ•  볡ꡬ 이후 λ‹€μ‹œ Master λΌμš°ν„°λ‘œ λ™μž‘ν•  수 있게 ν•œλ‹€. 기본적으둜 μΈν„°νŽ˜μ΄μŠ€κ°€ λ‹€μ‹œ ν™œμ„±ν™”(μž₯애볡ꡬ)됐을 λ•Œ, λ°”λ‘œ Master λΌμš°ν„°λ‘œ λŒμ•„κ°€λŠ”λ° λΌμš°νŒ… ν…Œμ΄λΈ” λ―Έμ™„μ„±μœΌλ‘œ μ œλŒ€λ‘œ 된 톡신을 ν•˜μ§€ λͺ»ν•˜λŠ” κ²½μš°κ°€ λ°œμƒν•  수 μžˆλ‹€. κ·Έλž˜μ„œ μΈν„°νŽ˜μ΄μŠ€κ°€ λ‹€μ‹œ ν™œμ„±ν™”λ˜κ³ λ‚˜μ„œ 180초 이후 Master둜 λ™μž‘λ˜λ„λ‘ μ„€μ •ν–ˆλ‹€.
9: vrrp κ΄‘κ³  μ£ΌκΈ°λ₯Ό 1초둜 μ§€μ •ν•œλ‹€. 사싀 기본값이 1μ΄ˆμ΄λ―€λ‘œ κ΄‘κ³  μ£ΌκΈ°λ₯Ό κ·ΈλŒ€λ‘œ 1초둜 μ‚¬μš©ν• κ±°λΌλ©΄, λ³„λ„λ‘œ μ„€μ •ν•˜μ§€ μ•Šμ•„λ„ λœλ‹€. VRRP λΌμš°ν„°λ“€λΌλ¦¬ κ΄‘κ³  μ£ΌκΈ°κ°€ λ°˜λ“œμ‹œ 동일해야 ν•œλ‹€. μ„œλ‘œ λ‹€λ₯΄λ‹€λ©΄ VRRPκ°€ λ™μž‘ν•˜μ§€ μ•ŠλŠ”λ‹€.
10: Master λΌμš°ν„°μ— μ„€μ •λœ VRRP κ΄‘κ³  μ£ΌκΈ° 값을 λ°°μš°λ„λ‘ ν•œλ‹€. μ§€κΈˆμœΌλ‘œμ¨λŠ” μΆ”ν›„ Masterμƒνƒœμ—μ„œ Backup으둜 변경될 λ•Œ, μ μš©λœλ‹€. μ•žμ„œ μ΄μ•ΌκΈ°ν•œ κ΄‘κ³  μ£ΌκΈ°κ°€ 달라 VRRPκ°€ λ™μž‘ν•˜μ§€ μ•ŠλŠ” 상황을 λ°©μ§€ν•˜λŠ” 섀정이닀.

[VRRP 섀정확인]
– show vrrp brief

R1이 Master λΌμš°ν„° , R2κ°€ Backup λΌμš°ν„°κ°€ 된 것을 확인할 수 μžˆλ‹€.

– show vrrp

가상 IP, λΌμš°ν„°μ˜ μš°μ„ μˆœμœ„, Master λΌμš°ν„° 등을 확인할 수 μžˆλ‹€.

[VRRP 인증]
– Plain-Text 인증

R1(config)# int fa1/0
R1(config-if)# vrrp 1 authentication text <WORD>


R2(config)# int fa1/0
R2(config-if)# vrrp 1 authentication text <WORD>

– MD5 인증 (Key-String)

R1(config)# int fa1/0
R1(config-if)# vrrp 1 authentication md5 key-string <WORD>


R2(config)# int fa1/0
R2(config-if)# vrrp 1 authentication md5 key-string <WORD>

– MD5 인증 (Key-Chain)

R1(config)# key chain <NAME>
R1(config-keychain)# key [0-2147483647]
R1(config-keychain-key)# key-string <WORD>
R1(config-keychain-key)# exit
R1(config-keychain)# exit
R1(config)#
R1(config)# int fa1/0
R1(config-if)# vrrp 1 authentication md5 key-chain <NAME>


R2(config)# key chain <NAME>
R2(config-keychain)# key [0-2147483647]
R2(config-keychain-key)# key-string <WORD>
R2(config-keychain-key)# exit
R2(config-keychain)# exit
R2(config)#
R2(config)# int fa1/0
R2(config-if)# vrrp 1 authentication md5 key-chain <NAME>

3. VRRP λΆ€ν•˜ λΆ„μ‚°

MHSRP처럼 VRRP도 각 κ·Έλ£Ήλ³„λ‘œ Master λΌμš°ν„°λ₯Ό μ§€μ •ν•˜μ—¬ λΆ€ν•˜ 뢄산을 ν•  수 μžˆλ‹€.

R1κ³Ό R2λ₯Ό VRRP 1, 2 그룹으둜 λ‚˜λˆ„κ³ ,
각각 10.10.100.253 / 10.10.100.254λ₯Ό ν• λ‹Ήν•œλ‹€.
PC의 GW도 각각 μ§€μ •ν•œλ‹€.
μ΄λ ‡κ²Œ VRRP λΆ€ν•˜ 뢄산을 ν•  수 μžˆλ‹€.

[VRRP λΆ€ν•˜ λΆ„μ‚° μ„€μ •]

R1(config)# track 1 int fa1/0 line-protocol
R1(config-track)# exit
R1(config)#
R1(config)# int fa1/0
R1(config-if)# vrrp 1 ip 10.10.100.253
R1(config-if)# vrrp 1 priority 105
R1(config-if)# vrrp 1 preempt delay minimum 180
R1(config-if)# vrrp 1 timers advertise 1
R1(config-if)# vrrp 1 timers learn
R1(config-if)# vrrp 1 track 1
R1(config-if)# 
R1(config-if)# vrrp 2 ip 10.10.100.254
R1(config-if)# vrrp 2 timers advertise 1
R1(config-if)# vrrp 2 timers learn

R2(config)# track 1 int fa1/0 line-protocol
R2(config-track)# exit
R2(config)#
R2(config)# int fa1/0
R2(config-if)# vrrp 1 ip 10.10.100.253
R2(config-if)# vrrp 1 timers advertise 1
R2(config-if)# vrrp 1 timers learn
R2(config-if)# 
R2(config-if)# vrrp 2 ip 10.10.100.254
R2(config-if)# vrrp 2 priority 105
R2(config-if)# vrrp 2 preempt delay minimum 180
R2(config-if)# vrrp 2 timers advertise 1
R2(config-if)# vrrp 2 timers learn
R2(config-if)# vrrp 2 track 1