How to Configure VRRP
- Customizing VRRP
- Enabling VRRP
- Configuring VRRP Object Tracking
- Configuring VRRP Text Authentication
Customizing VRRP
Customizing the behavior of VRRP is optional. Be aware that as soon as you enable a VRRP group, that group is operating. It is possible that if you first enable a VRRP group before customizing VRRP, the router could take over control of the group and become the virtual router master before you have finished customizing the feature. Therefore, if you plan to customize VRRP, it is a good idea to do so before enabling VRRP.
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip address ip-address mask
5. vrrp group description text
6. vrrp group priority level
7. vrrp group preempt [delay minimum seconds]
8. vrrp group timers advertise [msec] interval
9. vrrp group timers learn
10. exit
11. no vrrp sso
DETAILED STEPS
Enabling VRRP
SUMMARY STEPS
1. enable
2. configure terminal
3. interface type number
4. ip address ip-address mask
5. vrrp group ip ip-address [secondary]
6. end
7. show vrrp [brief] | group]
8. show vrrp interface type number [brief]
DETAILED STEPS
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 | enable Example: Router> enable
|
Enables privileged EXEC mode.
| ||
Step 2 | configure terminal Example: Router# configure terminal
|
Enters global configuration mode.
| ||
Step 3 | interface type number Example: Router(config)# interface GigabitEthernet 0/0/0
|
Enters interface configuration mode.
| ||
Step 4 | ip address ip-address mask Example: Router(config-if)# ip address 172.16.6.5 255.255.255.0
|
Configures an IP address for an interface.
| ||
Step 5 | vrrp group ip ip-address [secondary] Example: Router(config-if)# vrrp 10 ip 172.16.6.1
|
Enables VRRP on an interface.
| ||
Step 6 | end Example: Router(config-if)# end
|
Returns to privileged EXEC mode.
| ||
Step 7 | show vrrp [brief] | group] Example: Router# show vrrp 10
|
(Optional) Displays a brief or detailed status of one or all VRRP groups on the router.
| ||
Step 8 | show vrrp interface type number [brief] Example: Router# show vrrp interface GigabitEthernet 0/0/0
|
(Optional) Displays the VRRP groups and their status on a specified interface.
|
Configuring VRRP Object Tracking
SUMMARY STEPS
1. enable
2. configure terminal
3. track object-number interface type number {line-protocol | ip routing}
4. interface type number
5. vrrp group ip ip-address
6. vrrp group priority level
7. vrrp group track object-number [decrement priority]
8. end
9. show track [object-number]
DETAILED STEPS
Command or Action | Purpose | |
---|---|---|
Step 1 | enable Example: Router> enable
|
Enables privileged EXEC mode.
|
Step 2 | configure terminal Example: Router# configure terminal
|
Enters global configuration mode.
|
Step 3 | track object-number interface type number {line-protocol | ip routing} Example: Router(config)# track 2 interface serial 6 line-protocol
|
Configures an interface to be tracked where changes in the state of the interface affect the priority of a VRRP group.
|
Step 4 | interface type number Example: Router(config)# interface Ethernet 2
|
Enters interface configuration mode.
|
Step 5 | vrrp group ip ip-address Example: Router(config-if)# vrrp 1 ip 10.0.1.20
|
Enables VRRP on an interface and identifies the IP address of the virtual router.
|
Step 6 | vrrp group priority level Example: Router(config-if)# vrrp 1 priority 120
|
Sets the priority level of the router within a VRRP group.
|
Step 7 | vrrp group track object-number [decrement priority] Example: Router(config-if)# vrrp 1 track 2 decrement 15
|
Configures VRRP to track an object.
|
Step 8 | end Example: Router(config-if)# end
|
Returns to privileged EXEC mode.
|
Step 9 | show track [object-number] Example: Router# show track 1
|
Displays tracking information.
|
Configuring VRRP Text Authentication
Before You Begin
Interoperability with vendors that may have implemented the RFC 2338 method is not enabled.
Text authentication cannot be combined with MD5 authentication for a VRRP group at any one time. When MD5 authentication is configured, the text authentication field in VRRP hello messages is set to all zeros on transmit and ignored on receipt, provided the receiving router also has MD5 authentication enabled.
SUMMARY STEPS
1. enable
2. configure terminal
3. terminal interface type number
4. ip address ip-address mask [secondary]
5. vrrp group authentication text text-string
6. vrrp group ip ip-address
7. Repeat Steps 1 through 6 on each router that will communicate.
8. end
DETAILED STEPS
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 | enable Example: Router> enable
|
Enables privileged EXEC mode.
| ||
Step 2 | configure terminal Example: Router# configure terminal
|
Enters global configuration mode.
| ||
Step 3 | terminal interface type number Example: Router(config)# interface Ethernet 0/1
|
Configures an interface type and enters interface configuration mode.
| ||
Step 4 | ip address ip-address mask [secondary] Example: Router(config-if)# ip address 10.0.0.1 255.255.255.0
|
Specifies a primary or secondary IP address for an interface.
| ||
Step 5 | vrrp group authentication text text-string Example: Router(config-if)# vrrp 1 authentication text textstring1
|
Authenticates VRRP packets received from other routers in the group.
| ||
Step 6 | vrrp group ip ip-address Example: Router(config-if)# vrrp 1 ip 10.0.1.20
|
Enables VRRP on an interface and identifies the IP address of the virtual router.
| ||
Step 7 | Repeat Steps 1 through 6 on each router that will communicate. |
—
| ||
Step 8 | end Example: Router(config-if)# end
|
Returns to privileged EXEC mode.
|
Configuration Examples for VRRP
- Example: Configuring VRRP
- Example: VRRP Object Tracking
- Example: VRRP Object Tracking Verification
- Example: VRRP Text Authentication
- Example: VRRP MIB Trap
Example: Configuring VRRP
In the following example, Router A and Router B each belong to three VRRP groups.
In the configuration, each group has the following properties:
Router A
Router(config)# interface GigabitEthernet 1/0/0Router(config-if)# ip address 10.1.0.2 255.0.0.0Router(config-if)# vrrp 1 priority 120Router(config-if)# vrrp 1 authentication ciscoRouter(config-if)# vrrp 1 timers advertise 3Router(config-if)# vrrp 1 timers learnRouter(config-if)# vrrp 1 ip 10.1.0.10Router(config-if)# vrrp 5 priority 100Router(config-if)# vrrp 5 timers advertise 30Router(config-if)# vrrp 5 timers learnRouter(config-if)# vrrp 5 ip 10.1.0.50Router(config-if)# vrrp 100 timers learnRouter(config-if)# no vrrp 100 preemptRouter(config-if)# vrrp 100 ip 10.1.0.100Router(config-if)# no shutdown
Router B
Router(config)# interface GigabitEthernet 1/0/0Router(config-if)# ip address 10.1.0.1 255.0.0.0Router(config-if)# vrrp 1 priority 100Router(config-if)# vrrp 1 authentication ciscoRouter(config-if)# vrrp 1 timers advertise 3Router(config-if)# vrrp 1 timers learnRouter(config-if)# vrrp 1 ip 10.1.0.10Router(config-if)# vrrp 5 priority 200Router(config-if)# vrrp 5 timers advertise 30Router(config-if)# vrrp 5 timers learnRouter(config-if)# vrrp 5 ip 10.1.0.50Router(config-if)# vrrp 100 timers learnRouter(config-if)# no vrrp 100 preemptRouter(config-if)# vrrp 100 ip 10.1.0.100Router(config-if)# no shutdown
Example: VRRP Object Tracking
In the following example, the tracking process is configured to track the state of the line protocol on serial interface 0/1. VRRP on Ethernet interface 1/0 then registers with the tracking process to be informed of any changes to the line protocol state of serial interface 0/1. If the line protocol state on serial interface 0/1 goes down, then the priority of the VRRP group is reduced by 15.
Router(config)# track 1 interface Serial 0/1 line-protocolRouter(config-track)# exitRouter(config)# interface Ethernet 1/0Router(config-if)# ip address 10.0.0.2 255.0.0.0Router(config-if)# vrrp 1 ip 10.0.0.3Router(config-if)# vrrp 1 priority 120Router(config-if)# vrrp 1 track 1 decrement 15
Example: VRRP Object Tracking Verification
Router# show vrrpEthernet1/0 - Group 1State is MasterVirtual IP address is 10.0.0.3Virtual MAC address is 0000.5e00.0101Preemption is enabledAdvertisement interval is 1.000 sec min delay is 0.000 secMaster Router is 10.0.0.2 (local), priority is 105Priority is 105 Track object 1 state Down decrement 15Router# show trackMaster Advertisement interval is 1.000 sec Master Down interval is 3.531 secTrack 1Interface Serial0/1 line-protocolLine protocol is Down (hw down)Tracked by:1 change, last change 00:06:53VRRP Ethernet1/0 1
No comments:
Post a Comment