VRRP Configuration
此内容尚不支持你的语言。
show vrrp interface
Section titled “show vrrp interface”[Command] show vrrp interface {vlan|ethernet|link-aggregationID**}** show vrrpID
[Purpose] View detailed information about the VRRP backup group
[View] System view
[Use Cases]
sonic# show vrrp 1Virtual Router ID 1Protocol Version 3Autoconfigured NoShutdown NoInterface Vlan10VRRP interface (v4) vrrp4-1-1VRRP interface (v6) NonePrimary IP (v4) 10.1.1.1Primary IP (v6) ::Virtual MAC (v4) 00:00:5e:00:01:01Virtual MAC (v6) 00:00:5e:00:02:01Status (v4) MasterStatus (v6) InitializePriority 100Effective Priority (v4) 100Effective Priority (v6) 100Preempt Mode YesAccept Mode YesAdvertisement Interval 1500 msMaster Advertisement Interval (v4) 1500 msMaster Advertisement Interval (v6) 0 msAdvertisements Tx (v4) 2546Advertisements Tx (v6) 0Advertisements Rx (v4) 892Advertisements Rx (v6) 0Gratuitous ARP Tx (v4) 2Neigh. Adverts Tx (v6) 0State transitions (v4) 4State transitions (v6) 0Skew Time (v4) 910 msSkew Time (v6) 0 msMaster Down Interval (v4) 5410 msMaster Down Interval (v6) 0 msIPv4 Addresses 1.................................. 10.1.1.11IPv6 Addresses 0show vrrp summary
Section titled “show vrrp summary”[Command] show vrrp summary
[Purpose] View VRRP backup group information
[View] System view
[Use Cases]
sonic# show vrrp summaryInterface VRID Priority IPv4 IPv6 State (v4) State (v6)----------------------------------------------------------------------Vlan10 1 150 1 1 Master MasterVlan10 2 30 1 1 Backup Backup[Command] vrrpID**[versionID]**
[Purpose] Create a VRRP backup group and specify the VRRP version.
[View] Interface view
[Parameter]
| Parameter | Description |
|---|---|
| vrrp | The range of value is: 1-255 |
| version | The default value is 3 |
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# vrrp 1 version 2vrrp ID priority
Section titled “vrrp ID priority”[Command] vrrpIDpriorityVALUE
[Purpose] Configure the priority of the device in the VRRP backup group
[View] Interface view
[Parameter]
| Parameter | Description |
|---|---|
| priority | The range of value is: 1-254, the default value is:100. Higher numbers indicate higher priority. |
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# vrrp 1 priority 20vrrp ID advertisement-interval
Section titled “vrrp ID advertisement-interval”[Command] vrrpIDadvertisement-intervalVALUE
[Purpose] Configure the interval for sending VRRP advertisement packets
[View] Interface view
[Parameter]
| Parameter | Description |
|---|---|
| VALUE | The range is from 10 to 40950 milliseconds, default value is 1000 milliseconds |
[Usage Scenario] The master device periodically sends VRRP advertisement packets to the backup devices within the group to notify them of its normal operation. If a backup device does not receive VRRP advertisement packets even after the Master_Down_Interval timer expires, a new master will be elected.
When the master device voluntarily relinquishes its master status (such as when it leaves the backup group), it sends an advertisement packet with a priority of 0. This triggers a fast transition of the backup device to become the master, without waiting for the Master_Down_Interval timer to expire. The time taken for this transition is known as the Skew time, calculated as (256 - priority of the backup device) / 256, in centiseconds.
When the master device encounters a network failure and cannot send advertisement packets, the backup device cannot immediately determine its working status. Only after the Master_Down_Interval timer expires will the backup device consider the master device as unable to function normally and switch its status to master. The Master_Down_Interval timer is set to 3×Advertisement_Interval + Skew_time, in centiseconds.
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# vrrp 1 advertisement-interval 2500[Command] vrrpIDipA.B.C.D/M
[Purpose] Create a VRRP backup group and assign a virtual IP address to the backup group
[View] Interface view
[Usage Scenario] VRRP allows multiple devices to form a virtual switch without changing the network topology. By configuring the virtual switch as the gateway, it provides gateway redundancy
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# vrrp 1 ip 192.168.0.1/24vrrp ip send-gratuitous-arp interval
Section titled “vrrp ip send-gratuitous-arp interval”[Command] vrrp ip send-gratuitous-arp intervalvalue
[Purpose] Configure the interval for Master to send gratuitous ARP packets
[Parameter]
| Parameter | Description |
|---|---|
| VALUE | Interval,The range is from 10 to 600 |
[View] System view
[Usage Scenario] In a VRRP backup group, to ensure the MAC table entries on downstream switches are correct, the Master device periodically sends gratuitous ARP packets to refresh the MAC address table entries on the downstream switches
[Use Cases]
sonic(config)# vrrp ip send-gratuitous-arp interval 150vrrp ID preempt
Section titled “vrrp ID preempt”[Command] vrrpidpreempt
[Purpose] Configure the switch in VRRP backup group with preempt mode
[Parameter]
| Parameter | Description |
|---|---|
| ID | The range is from 1 to 255 |
[View] VLAN view
[Usage Scenario] In an unstable network, the backup device may not always receive VRRP packets promptly, causing frequent VRRP state changes and network oscillations. To enhance the stability of the active/standby state, the user configures the switch in VRRP backup group with preempt mode
[Use Cases]
sonic(config-vlanif-10)# vrrp 1 preemptvrrp ID shutdown
Section titled “vrrp ID shutdown”[Command] vrrp shutdown
[Purpose] Configure the criteria for this backup group to withdraw from the VRRP election
[View] Interface view
[Usage Scenario] Configure the criteria for this backup group to withdraw from the VRRP election and set the interface’s VRRP state to ‘initial’.
[Use Cases]
sonic(config)# interface ethernet 1sonic(config-if-1)# vrrp shutdownvrrp default
Section titled “vrrp default”[Command] vrrp default advertisement-intervalVALUE vrrp default preempt vrrp default priotiryVALUE vrrp default shutdown
[Purpose] Configure default values for VRRP parameters
[View] System configuration view
[Usage Scenario] In the system configuration view, configure default information for VRRP backup groups. Once configured, all backup groups can use this configuration as default. If a backup group specifies specific parameters, those will take precedence over the default configuration.
[Use Cases]
sonic(config)# vrrp default priotiry 10