VRRP のカスタマイズ
設定例
VRRP の動作のカスタマイズはオプションです。VRRP グループをイネーブルにするとすぐに、そのグループは動作を開始することに注意してください。VRRP をカスタマイズする前に、VRRP グループをイネーブルにした場合、機能のカスタマイズが完了しないうちに、ルータがそのグループの制御をテイクオーバーし、マスター仮想ルータになる可能性があります。このため、VRRP をカスタマイズする場合には、カスタマイズを行ってから VRRP をイネーブルにすることを推奨します。
Router#configure
Router(config)#router vrrp
router(config-vrrp)#interface TenGigE 0/0/0/2
router(config-vrrp)#delay minimum 2 reload 10
/* (Optional) Delays the startup of the state machine when an interface comes up. */
router(config-vrrp-if)#address-family ipv6
router(config-vrrp-address-family)#vrrp 3
/* The version keyword is available only if IPv4 address-family is selected. */
router(config-vrrp-virtual-router)#text-authentication text1
/* (Optional) Configures the simple text authentication used for VRRP packets received from other routers running VRRP. */
router(config-vrrp-virtual-router)#accept-mode disable
/* Disables the installation of routes for the VRRP virtual addresses. */
router(config-vrrp-virtual-router)#priority 254
/* (Optional) Sets the priority of the virtual router. */
router(config-vrrp-virtual-router)#preempt delay 15
/* (Optional) Controls which router becomes the master router. */
router(config-vrrp-virtual-router)#timer 4
/* (Optional) Configures the interval between successive advertisements by the master router in a VRRP virtual router. */
router(config-vrrp-virtual-router)#track interface TenGigE 0/0/0/2 30
/* (Optional) Configures the VRRP to track an interface. */
router(config-vrrp-virtual-router)#commit
実行コンフィギュレーション
Router#show running-config router vrrp
router vrrp
interface TenGigE 0/0/0/2
delay minimum 2 reload 10
address-family ipv6
vrrp 3
text-authentication
accept-mode disable
priority 254
preempt delay 15
timer 4
track interface TenGigE 0/0/0/2 30
!
確認
Router#show vrrp detail
TenGigE0/0/0/2 - IPv4 vrID 3
State is Master, IP address owner
1 state changes, last state change 00:01:00
State change history:
May 19 12:28:59.825 UTC Init -> Master Virtual IP configured
Last resign sent: Never
Last resign received: Never
Virtual IP address is 10.0.0.1
Virtual MAC address is 0000.5E00.0103, state is active
Master router is local
Version is 2
Advertise time 4 secs
Master Down Timer 12.015 (3 x 4 + (1 x 4/256))
Minimum delay 2 sec, reload delay 10 sec
Current priority 255
Configured priority 254, may preempt
minimum delay 15 secs
Authentication enabled, string "text1"
Tracked items: 1/1 up: 30 decrement
Object name State Decrement
TenGigE0/0/0/2 Up 30