- Table of Contents
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 06-VSRP configuration | 226.57 KB |
VSRP control channel fast detection
Support of service modules for VSRP
Restrictions and guidelines: Subinterface configuration consistency
Enabling SNMP notifications for VSRP
Restrictions and guidelines for configuring VSRP for ARP
Specifying the TCP port number for establishing ARP service backup data channels
Associating an IGMP-enabled interface with a VSRP instance
Enabling VSRP load sharing on an IGMP-enabled interface
Specifying the TCP port number for establishing IGMP service backup data channels
Enabling IGMP data synchronization
Display and maintenance commands for VSRP
Example: Configuring VSRP and S-Trunk collaboration for ARP
Example: Configuring VSRP load sharing on an IGMP-enabled interface
Configuring VSRP
About VSRP
Virtual Service Redundancy Protocol (VSRP) provides unified device-level backup for multiple user services between two devices operating in master/backup mode.
When the master and backup devices are operating correctly, VSRP backs up user data of service modules from the master device to the backup device. When the master device or its link fails, the user services can be fast switched to the backup device. When the original master device or its link is recovered, the user services fall back to the original master device to ensure service continuity.
Basic concepts
VSRP includes the following components:
· VSRP group—A VSRP group contains two peer devices that are enabled with VSRP.
· VSRP peer—The member devices in a VSRP group are the peer of each other, with one as master and the other as backup. You must configure the peer IP address on each device to create a VSRP group.
· VSRP instance—A VSRP instance is associated with one service to back up service data from the master to the backup for service continuity.
· VSRP control channel and data channel—The VSRP peers in a VSRP group synchronize VSRP instance state information and service data by establishing TCP control and data channels.
¡ Control channel—The master backs up the status of all VSRP instances on the VSRP group to the backup in real time over the control channel.
¡ Data channel—VSRP establishes a data channel to back up data in real time for each service associated with a VSRP instance on the VSRP group. This backup mechanism ensures that the backup device takes over the services when the master fails.
Both TCP control and data channels are initiated by the peer with lower IP address to the peer with higher IP address.
VSRP operating mechanism
A VSRP group contains two peer devices that are enabled with VSRP. VSRP collaborates with VRRP or S-Trunk to determine the role of each peer device in a VSRP group as master or backup.
VSRP is typically used on a network that contains broadband remote access servers (BRASs). To ensure service continuity, the master BRAS backs up authentication, accounting, and management information to the backup BRAS in real time.
S-Trunk collaboration
To use S-Trunk together with VSRP, you must configure the same smart trunk on the peers in a VSRP group. As shown in Figure 1, VSRP determines the roles of the peer devices in the VSRP group based on their roles in the S-Trunk system. The VSRP master is the primary S-Trunk member device, and the VSRP backup is the secondary S-Trunk member device. The master forwards traffic and backs up the services to the backup device. When the master in the VSRP group fails, the backup takes over to ensure service continuity. For more information about S-Trunk, see "Configuring S-Trunk."
Figure 1 VSRP-S-Trunk collaboration
VSRP backup modes
A VSRP instance supports the following backup modes:
· Cold backup mode—In cold backup mode, two devices deployed with VSRP provide only device-level service redundancy. Service data is backed up between the master and backup devices. When a switchover occurs, the new master device might experience a temporary service interruption due to the lack of service data. This mode is applicable to the scenarios that are not sensitive to temporary service interruptions.
· Hot backup mode (1:1 backup)—The backup device issues backup data to the data plane as soon as it receives the data from the master. In this mode, the backup takes over quickly when the master fails. This mode is applicable to scenarios where a device acts as the backup in only one VSRP group.
VSRP provides the following hot backup modes:
¡ Dual-active hot backup mode—Both the master and backup devices are active to load share traffic. This mode is supported only in the VSRP and S-Trunk collaboration network. Do not configure this mode in other networks.
¡ Single-active hot backup mode—The master device is active to process service traffic, and the backup device takes over when the master device fails.
VSRP control channel fast detection
By default, a VSRP group detects the state of the failover link based only on the state of the TCP control channel. To fast detect the state of the failover link, you can perform the following tasks:
1. Use NQA or BFD to monitor the state of the failover link.
2. Establish the collaboration between the failover link state and NQA or BFD through the Track function.
A VSRP group operates differently depending on the state of the track entry associated with the VSRP group:
· When the track entry is in Positive or NotReady state, a device attempts to establish a TCP control channel with its peer.
· When the track entry changes to Negative state, the device terminates the TCP control channel.
Support of service modules for VSRP
VSRP provides unified backup for multiple user services between the master and backup devices. VSRP can work with any of the following service modules in the current version:
· ARP.
· IGMP.
Restrictions and guidelines: Subinterface configuration consistency
As a best practice to maintain data consistency, make sure the peer devices in a VSRP group have consistent main interface and subinterface configuration, including but not limited to the following settings:
· Subinterface numbers.
· VLAN configuration.
· VPN configuration.
VSRP tasks at a glance
To configure VSRP, perform the following tasks:
2. Configuring a VSRP instance
3. (Optional.) Enabling VSRP logging
4. (Optional.) Enabling SNMP notifications for VSRP
5. Configuring VSRP for a service module
Configuring a VSRP group
1. Enter system view.
system-view
2. Create a VSRP group and enter the VSRP peer view.
vsrp peer peer-name
3. Configure TCP connection parameters for establishing VSRP channels to the peer.
peer [ ipv6 ] peer-ip-address local local-ip-address [ port port-id ]
By default, no VSRP channels are established to the peer.
The TCP port cannot be in use. To view the TCP port numbers in use, execute the display [ ipv6 ] tcp command.
4. (Optional.) Associate a VSRP group with a track entry.
track track-entry-number
Configuring a VSRP instance
About this task
A VSRP instance backs up data for its associated service.
A VSRP instance can be bound to only one VSRP group. Each VSRP instance on a VSRP group is identified by a unique backup ID.
The master forwards traffic and backs up service data to the backup device at the specified interval or when the specified traffic threshold is reached.
Procedure
1. Enter system view.
system-view
2. Create a VSRP instance and enter VSRP instance view.
vsrp instance instance-name
3. Specify a backup ID for the VSRP instance.
backup id backup-id peer peer-name
By default, a VSRP instance has no ID.
4. Configure collaboration of the VSRP instance with a module for VSRP role assignment.
Bind the VSRP instance to a smart trunk member interface.
bind s-trunk s-trunk-id interface route-aggregation interface-number
By default, a VSRP instance is not bound to any smart trunk member interface.
If you execute the following commands multiple times for a VSRP instance, the most recent configuration takes effect:
¡ bind interface
¡ bind s-trunk
5. Set the backup mode of the VSRP instance.
backup mode { cold | hot [ dual-active ] }
By default, a VSRP instance operates in hot backup mode.
The dual-active keyword is supported only in the VSRP and S-Trunk collaboration network. Do not configure this keyword in other networks.
6. (Optional.) Set a traffic backup interval or a traffic threshold that triggers a traffic backup.
traffic backup { interval interval-value | threshold threshold-value } *
By default, a VSRP instance backs up traffic at 10-minute intervals or when the traffic reaches 50 MB.
Enabling VSRP logging
About this task
If logging is enabled for VSRP, a log messages generated after an important event occurs, such as VSRP connection setup, abnormal VSRP connection, or VSRP instance status switchover.
The VSRP logging feature sends log messages to the information center. The information center can then output log messages from different source modules to different destinations. For more information about information center, see Network Management and Monitoring Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Enable VSRP logging.
vsrp log enable
By default, VSRP logging is disabled.
Enabling SNMP notifications for VSRP
About this task
If SNMP notifications are enabled for VSRP, a notification is sent to the SNMP module after an important event occurs, such as VSRP connection setup, abnormal VSRP connection, or VSRP instance status switchover.
For SNMP notifications to be sent correctly, you must also configure SNMP on the device. For more information about SNMP configuration, see Network Management and Monitoring Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Enable SNMP notifications for VSRP.
snmp-agent trap enable vsrp
By default, SNMP notifications are enabled for VSRP.
Configuring VSRP for ARP
About VSRP for ARP
This feature enables the master to back up the ARP entries to the backup to ensure ARP entry consistency. When the master fails or its links fail, the backup can take over to forward traffic immediately without traffic loss.
Restrictions and guidelines for configuring VSRP for ARP
· You must associate the peer interfaces on the master and backup access devices with the same VSRP instance.
· If you configure VLAN termination on the subinterfaces on the master and backup access devices, make sure the peer subinterfaces terminate the same VLAN IDs.
· You cannot associate different interfaces on a device with the same VSRP instance.
· You can associate different subinterfaces of an interface with the same VSRP instance or with different VSRP instances.
· On a subinterface, the VSRP instance association configured in subinterface view takes precedence over the one configured by using the arp vsrp-instance apply sub-interface command.
Enabling VSRP for ARP
Restrictions and guidelines
To associate a main interface and its subinterfaces with the same VSRP instance, you can use the arp vsrp-instance apply sub-interface command on the main interface to simplify configuration.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
The following types of interfaces are supported:
¡ Layer 3 Ethernet interface.
¡ Layer 3 Ethernet subinterface.
¡ Layer 3 aggregate interface.
¡ Layer 3 aggregate subinterface.
3. Associate ARP with a VSRP instance.
arp vsrp-instance vsrp-instance-name [ apply sub-interface ]
By default, ARP is not associated with any VSRP instance on an interface.
Specifying the TCP port number for establishing ARP service backup data channels
About this task
To back up ARP entries, the master must establish a TCP data channel with the backup. You can use this command to change the TCP port number for establishing the data channel.
Restrictions and guidelines
To establish ARP service backup data channels successfully, you must specify the same TCP port number on the master and backup devices.
The specified port number cannot be a TCP port number in use.
Procedure
1. Enter system view.
system-view
2. Specify a TCP port number for VSRP to establish ARP service backup data channels.
arp vsrp-port port-number
The default TCP port number is 60043.
Configuring VSRP for IGMP
About VSRP for IGMP
Associating an IGMP-enabled interface with a VSRP instance
Restrictions and guidelines
You must associate the peer IGMP-enabled interfaces on the master and the backup with the same VSRP instance. You cannot configure PIM on these interfaces. For more information about PIM, see IP Multicast Configuration Guide.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Associate the interface with a VSRP instance.
igmp vsrp-instance vsrp-instance-name
By default, an IGMP-enabled interface is not associated with any VSRP instance.
Enabling VSRP load sharing on an IGMP-enabled interface
About this task
In a VSRP group, the master device by default forwards all multicast traffic. After you enable VSRP load sharing, the master and backup devices forward multicast traffic for odd multicast group addresses and even multicast group addresses, respectively.
You can disable multicast traffic fallback upon recovery of a failed member device or configure a recovered member device to wait a period of time before it load shares multicast traffic.
Restrictions and guidelines
You must configure the same VSRP load sharing settings on the two member devices in the same VSRP group.
If you configure VSRP load sharing on a subinterface, follow these restrictions:
· Make sure the subinterface and its main interface are associated with the same VSRP instance.
· Configure VSRP load sharing on the main interface. Otherwise, VSRP load sharing does not take effect on the subinterface.
If the member devices in a VSRP group fail simultaneously, the member device that first recovers forwards all multicast traffic. When the other member device also recovers, it loads share multicast traffic immediately, whether you enable VSRP load sharing or not. In this situation, transient multicast traffic loss will occur.
In a VSRP group, if a non-direct uplink fails on a member device, the other member device forwards all multicast traffic. When the non-direct uplink recovers, the downstream VSRP member device loads share multicast traffic immediately, whether you enable VSRP load sharing or not. In this situation, transient multicast traffic loss will occur.
When you set the multicast traffic fallback delay, follow these restrictions and guidelines:
· To prevent absence of multicast forwarding entries from causing multicast traffic loss, increase this delay.
· To prevent a recovered member device from being idle, decrease this delay.
· Make sure this delay is longer than the maximum response time for IGMP general queries (configurable with the igmp max-response-time command).
· If you do not set the maximum response time for IGMP general queries, set this delay to be longer than 60 seconds.
During multicast traffic fallback, multicast traffic loss or duplication might occur. In an environment that requires high availability of multicast services, disable multicast traffic fallback.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Enable VSRP load sharing on the interface.
igmp vsrp-load-balance [ no-restore | restore-delay delay-time ]
By default, VSRP load sharing is disabled on an IGMP-enabled interface. Only the master device forwards multicast traffic.
Specifying the TCP port number for establishing IGMP service backup data channels
About this task
To back up the IGMP service on an IGMP-enabled interface, the master and the backup must establish a TCP data channel. You can change the TCP port number for establishing the data channel.
Restrictions and guidelines
To establish IGMP service backup data channels successfully, you must specify the same TCP port number on the master and backup devices.
The specified port number cannot be a TCP port number in use.
Procedure
1. Enter system view.
system-view
2. Specify a TCP port number for VSRP to establish IGMP service backup data channels.
igmp vsrp-port port-number
Enabling IGMP data synchronization
About this task
Enable IGMP data synchronization on an IGMP-enabled interface if you are not sure whether the master and the backup can both receive IGMP packets.
Disable IGMP data synchronization if the master and the backup can both receive IGMP packets. For example, you can disable IGMP data synchronization if you have not configured IPoE, PPP, or portal authentication for multicast users.
The synchronized IGMP data will age out after you disable IGMP data synchronization.
Procedure
1. Enter system view.
system-view
2. Enter interface view.
interface interface-type interface-number
3. Enable IGMP data synchronization.
igmp vsrp-sync enable
By default, IGMP data synchronization is enabled.
Display and maintenance commands for VSRP
Execute display commands in any view.
|
Task |
Command |
|
Display VSRP instance information. |
display vsrp instance [ instance-name ] |
|
Display VSRP group information. |
display vsrp peer [ peer-name ] |
VSRP configuration examples
Example: Configuring VSRP and S-Trunk collaboration for ARP
Network configuration
As shown in Figure 2, configure VSRP to back up ARP entries between Device A and Device B.
· Configure smart trunk 1 on Device A and Device B, and assign Route-Aggregation 1 of Device A and Device B to the smart trunk. Configure Route-Aggregation 1 of Device A as the primary member interface, and configure Route-Aggregation 1 of Device B as the secondary member interface.
· Enable VSRP for ARP on Route-Aggregation 1 of Device A and Device B.
· Configure VSRP and S-Trunk collaboration.
Configuring the CE
1. Assign IP addresses to the interfaces, as shown in Figure 2. (Details not shown.)
2. Configure link aggregation:
<CE> system-view
[CE] interface route-aggregation 1
[CE-Route-Aggregation1] link-aggregation mode dynamic
[CE-Route-Aggregation1] quit
[CE] interface gigabitethernet 1/0/7
[CE-GigabitEthernet1/0/7] port link-aggregation group 1
[CE-GigabitEthernet1/0/7] quit
[CE] interface gigabitethernet 1/0/8
[CE-GigabitEthernet1/0/8] port link-aggregation group 1
[CE-GigabitEthernet1/0/8] quit
Configuring PE 1
1. Assign IP addresses to the interfaces, as shown in Figure 2. (Details not shown.)
2. Configure LACP system settings to set up the S-Trunk system.
<PE1> system-view
[PE1] lacp system-priority 10
[PE1] lacp system-mac 1-1-1
[PE1] lacp system-number 1
3. Configure S-Trunk protocol packet parameters.
[PE1] s-trunk udp-port 2048
[PE1] s-trunk id 1
[PE1-s-trunk1] s-trunk ip destination 2.1.1.2 source 2.1.1.1
[PE1-s-trunk1] quit
4. Configure static BFD to monitor link status for S-Trunk.
[PE1] bfd static bfd1 peer-ip 2.1.1.2 source-ip 2.1.1.1 discriminator local 1 remote 2
[PE1-bfd-static-session-bfd1] quit
[PE1] s-trunk id 1
[PE1-s-trunk1] s-trunk bfd-session bfd1
[PE1-s-trunk1] quit
5. Create smart trunk 1 and assign member interfaces to it.
[PE1] interface route-aggregation 1
[PE1-Route-Aggregation1] link-aggregation mode dynamic
[PE1-Route-Aggregation1] s-trunk 1
[PE1-Route-Aggregation1] quit
[PE1] interface gigabitethernet 1/0/6
[PE1-GigabitEthernet1/0/6] port link-aggregation group 1
[PE1-GigabitEthernet1/0/6] quit
6. Configure a VSRP instance:
# Create VSRP group pr1 and enter VSRP peer view.
[PE1] vsrp peer pr1
# Specify the local IP address 2.1.1.1 and the peer address 2.1.1.2.
[PE1-vsrp-peer-pr1] peer 2.1.1.2 local 2.1.1.1
[PE1-vsrp-peer-pr1] quit
# Create VSRP instance vs1 and enter its view.
[PE1] vsrp instance vs1
# Specify the backup ID of VSRP instance vs1 as 1 in VSRP group pr1.
[PE1-vsrp-instance-vs1] backup id 1 peer pr1
# Bind VSRP instance vs1 to Route-Aggregation 1 in smart trunk 1.
[PE1-vsrp-instance-vs1] bind s-trunk 1 interface route-aggregation 1
[PE1-vsrp-instance-vs1] quit
7. Configure VSRP for ARP:
# Enter the view of Router-Aggregation 1.
[PE1] interface route-aggregation 1
# Associate ARP with VSRP instance vs1.
[PE1–Route-Aggregation1] arp vsrp-instance vs1
[PE1–Route-Aggregation1] quit
# Specify TCP port 1024 for VSRP to establish data channels for ARP service backup.
[PE1] arp vsrp-port 1024
Configuring PE 2
1. Assign IP addresses to the interfaces, as shown in Figure 2. (Details not shown.)
2. Configure LACP system settings to set up the S-Trunk system.
<PE2> system-view
[PE2] lacp system-priority 10
[PE2] lacp system-mac 1-1-1
[PE2] lacp system-number 2
3. Configure S-Trunk protocol packet parameters.
[PE2] s-trunk udp-port 2048
[PE2] s-trunk id 1
[PE2-s-trunk1] s-trunk ip destination 2.1.1.1 source 2.1.1.2
[PE2-s-trunk1] quit
4. Configure static BFD to monitor link status for S-Trunk.
[PE2] bfd static bfd1 peer-ip 2.1.1.1 source-ip 2.1.1.2 discriminator local 2 remote 1
[PE2-bfd-static-session-bfd1] quit
[PE2] s-trunk id 1
[PE2-s-trunk1] s-trunk bfd-session bfd1
[PE2-s-trunk1] quit
5. Create smart trunk 1 and assign member interfaces to it.
[PE2] interface route-aggregation 1
[PE2-Route-Aggregation1] link-aggregation mode dynamic
[PE2-Route-Aggregation1] s-trunk 1
[PE2-Route-Aggregation1] quit
[PE2] interface gigabitethernet 1/0/6
[PE2-GigabitEthernet1/0/6] port link-aggregation group 1
[PE2-GigabitEthernet1/0/6] quit
6. Configure a VSRP instance:
# Create VSRP group pr1 and enter VSRP peer view.
[PE2] vsrp peer pr1
# Specify the local IP address 2.1.1.2 and the peer address 2.1.1.1.
[PE2-vsrp-peer-pr1]peer 2.1.1.1 local 2.1.1.2
[PE2-vsrp-peer-pr1] quit
# Create VSRP instance vs1 and enter its view.
[PE2] vsrp instance vs1
# Specify the backup ID of VSRP instance vs1 as 1 in VSRP group pr1.
[PE2-vsrp-instance-vs1] backup id 1 peer pr1
# Bind VSRP instance vs1 to Route-Aggregation 1 in smart trunk 1.
[PE2-vsrp-instance-vs1] bind s-trunk 1 interface route-aggregation 1
[PE2-vsrp-instance-vs1] quit
7. Configure VSRP for ARP:
# Enter the view of Router-Aggregation 1.
[PE2] interface route-aggregation 1
# Associate ARP with VSRP instance vs1.
[PE2–Route-Aggregation1] arp vsrp-instance vs1
[PE2–Route-Aggregation1] quit
# Specify TCP port 1024 for VSRP to establish data channels for ARP service backup.
[PE2] arp vsrp-port 1024
Verifying the configuration
# Verify that the PE 1 and PE 2 are the primary and secondary S-Trunk member devices, respectively.
[PE1] display s-trunk verbose 1
Trunk-wide info and statistics
S-Trunk ID: 1
Revert: Enabled Revert-delay(s): 120
Local bridge MAC: 666d-17c0-0100 Peer bridge MAC: 666d-3a83-0200
Local Priority: 32768 Peer Priority: 32768
DevRole (Trigger): Primary (PRIORITY)
DestIP: 2.1.1.2 SrcIP: 2.1.1.1
Local hello interval(100ms): 10 Local hello timeout(100ms): 200
InStrunkPDUs: 2575 OutStrunkPDUs: 2810
InDrops: 2 OutDrops: 64
Peer hello interval(100ms): 10 Peer hello timeout(100ms): 200
BFD session: bfd1
Trunk member info
Local LinkState ConfigRole OperRole (Trigger) Peer
RAGG1 Up Auto Primary (PEER_MEMBER_DOWN) RAGG1
[PE2] display s-trunk verbose 1
Trunk-wide info and statistics
S-Trunk ID: 1
Revert: Enabled Revert-delay(s): 120
Local bridge MAC: 666d-3a83-0200 Peer bridge MAC: 666d-17c0-0100
Local Priority: 32768 Peer Priority: 32768
DevRole (Trigger): Secondary (PRIORITY)
DestIP: 2.1.1.1 SrcIP: 2.1.1.2
Local hello interval(100ms): 10 Local hello timeout(100ms): 200
InStrunkPDUs: 2634 OutStrunkPDUs: 2664
InDrops: 0 OutDrops: 0
Peer hello interval(100ms): 10 Peer hello timeout(100ms): 200
BFD session: bfd1
Trunk member info
Local LinkState ConfigRole OperRole (Trigger) Peer
RAGG1 Down Auto Secondary (PEER_MEMBER_UP) RAGG1
# Verify that PE 1 and PE 2 are the VSRP master and backup, respectively.
· On the master:
[PE1] display vsrp instance
VSRP instance name: vs1
VSRP peer name: pr1
Backup ID:1
Bound S-Trunk: 1 Interface Route-Aggregation1
Instance status: Master
Local status: Master
Peer status: Backup
Backup mode: Hot
Traffic backup interval: 10(minutes)
Traffic backup threshold: 50(MB)
Route advertisement: Master only
· On the backup:
[PE2] display vsrp instance
VSRP instance name: vs1
VSRP peer name: pr1
Backup ID:1
Bound S-Trunk: 1 Interface Route-Aggregation1
Instance status: Backup
Local status: Backup
Peer status: Master
Backup mode: Hot
Traffic backup interval: 10(minutes)
Traffic backup threshold: 50(MB)
Route advertisement: Master only
# Verify that both Device A and Device B have the ARP information for Route-Aggregation 1.
· On the master:
[PE1] display arp all
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
1.1.1.3 0001-0001-0001 -- RAGG1 20 D
· On the backup:
[PE2] display arp all
Type: S-Static D-Dynamic O-Openflow R-Rule M-Multiport I-Invalid
IP address MAC address VLAN/VSI name Interface Aging Type
1.1.1.3 0001-0001-0001 -- RAGG1 -- R
Example: Configuring VSRP load sharing on an IGMP-enabled interface
Network configuration
As shown in Figure 3, perform the following tasks:
· Enable IGMP on the interface of the access device (Device D) connected to the user.
· Configure PIM and enable PIM-SM on the interfaces connecting the access devices and upstream router (Device C).
· Configure the upstream router as the RP.
· Add the downstream interfaces on Device A and Device B to the same Layer 3 aggregation group.
· Connect Device D to Device A and Device B through a Layer 2 aggregate interface.
· Configure the source and destination IP addresses for the S-Trunk protocol packets (without OSPF configuration).
Procedure
1. Assign IP addresses to the interfaces, and configure routes for the devices to reach one another. (Details not shown.)
2. Configure Device A:
# Set the destination UDP port of IPv4 S-Trunk protocol packets.
<DeviceA> system-view
[DeviceA] s-trunk udp-port 2048
# Associate track entry 1 with static BFD session bfd2.
[DeviceA] track 1 bfd static bfd2
# Create a monitor link group and specify member interfaces for it.
[DeviceA] monitor-link group 1
[DeviceA-mtlk-group1] port gigabitethernet 1/0/6 downlink
[DeviceA-mtlk-group1] port gigabitethernet 1/0/7 uplink
[DeviceA-mtlk-group1] quit
# Create a Layer 3 aggregate interface operating in dynamic link aggregation mode, and enable PIM and IGMP on the interface.
[DeviceA] interface Route-Aggregation1
[DeviceA-Route-Aggregation1] link-aggregation mode dynamic
[DeviceA-Route-Aggregation1] pim sm
[DeviceA-Route-Aggregation1] igmp enable
[DeviceA-Route-Aggregation1] quit
# Specify the local IP address as 1.1.1.1 and the peer IP address as 1.1.1.2 for VSRP to establish VSRP channels, and associate a track entry with VSRP.
[DeviceA] vsrp peer 1
[DeviceA-vsrp-peer-1] peer 1.1.1.2 local 1.1.1.1
[DeviceA-vsrp-peer-1] track 1
[DeviceA-vsrp-peer-1] quit
# Create a VSRP instance.
[DeviceA] vsrp instance 1
[DeviceA-vsrp-instance-1] backup id 1 peer 1
[DeviceA-vsrp-instance-1] bind s-trunk 1 interface Route-Aggregation1
[DeviceA-s-trunk1]quit
# Configure S-Trunk parameters.
[DeviceA] s-trunk id 1
[DeviceA-s-trunk1] s-trunk bfd-session strunk1
[DeviceA-s-trunk1] s-trunk role priority 100
[DeviceA-s-trunk1] s-trunk ip destination 23.0.0.12 source 23.0.0.21
[DeviceA-s-trunk1] quit
# Associate IGMP-enabled interface Route-Aggregation 1 with a VSRP instance, configure the role of the S-Trunk member interface as primary, and enable VSRP load sharing on the interface
[DeviceA] interface Route-Aggregation1
[DeviceA-Route-Aggregation1] igmp vsrp-instance 1
[DeviceA-Route-Aggregation1] igmp vsrp-load-balance restore-delay 30
[DeviceA-Route-Aggregation1] s-trunk 1
[DeviceA-Route-Aggregation1] s-trunk port-role primary
[DeviceA-Route-Aggregation1] quit
# Create a loopback interface to establish VSRP channels.
[DeviceA] interface LoopBack1
[DeviceA-LoopBack1] ip address 1.1.1.1 255.255.255.255
[DeviceA-LoopBack1] ospf 1 area 0.0.0.0
[DeviceA-LoopBack1] pim sm
[DeviceA-LoopBack1] quit
# Configure static BFD to monitor link status for S-Trunk.
[DeviceA] bfd static bfd2 peer-ip 1.1.1.2 source-ip 1.1.1.1 discriminator local 3 remote 4
[DeviceA-bfd-static-session-bfd2] quit
[DeviceA] bfd static strunk1 peer-ip 23.0.0.12 source-ip 23.0.0.21 discriminator local 1 remote 2
[DeviceA-bfd-static-session-strunk1] quit
# Enable IP multicast routing.
[DeviceA] multicast routing
3. Configure Device B:
Configure Device B in the same way Device A is configured. (Details not shown.)
4. Configure Device C:
# Enable IP multicast routing.
<DeviceC> system-view
[DeviceC] multicast routing
[DeviceC-mrib] quit
# Enable PIM-SM on both the upstream and downstream interfaces.
[DeviceC] interface gigabitethernet 1/0/6
[DeviceC-GigabitEthernet1/0/6] pim sm
[DeviceC-GigabitEthernet1/0/6] quit
[DeviceC] interface gigabitethernet 1/0/7
[DeviceC-GigabitEthernet1/0/7] pim sm
[DeviceC-GigabitEthernet1/0/7] quit
[DeviceC] interface gigabitethernet 1/0/8
[DeviceC-GigabitEthernet1/0/8] pim sm
[DeviceC-GigabitEthernet1/0/8] quit
# Configure Device C as the BSR and RP.
[DeviceC] pim
[DeviceC-pim] c-bsr 10.0.0.12
[DeviceC-pim] c-rp 10.0.0.12
[DeviceC-pim] quit
Verifying the configuration
# Verify that Device A (the master) and Device B (the backup) have the same IGMP interface and group information. The master and backup devices forward multicast traffic for odd multicast group addresses and even multicast group addresses, respectively.
· On the master:
[DeviceA] display igmp interface verbose
Route-Aggregation1(31.0.0.2):
IGMP is enabled.
IGMP version: 2
Query interval for IGMP: 125s
Other querier present time for IGMP: 255s
Maximum query response time for IGMP: 10s
Last member query interval: 1s
Last member query count: 2
Startup query interval: 31s
Startup query count: 2
General query timer expiry (hh:mm:ss): 00:01:00
Querier for IGMP: 31.0.0.2 (This router)
IGMP activity: 5935 join(s), 1934 leave(s)
Multicast routing on this interface: Enabled
Robustness: 2
Require-router-alert: Disabled
Fast-leave: Disabled
Startup-query: Off
Other-querier-present-timer-expiry (hh:mm:ss): Off
Authorization: Disabled
Join-by-session: Disabled
User-VLAN-aggregation: Disabled
VSRP instance: 1 (State is master, synchronization is on)
VSRP forward mode: odd (Wait to restore is 30s)
IGMP groups reported in total: 4001
· On the backup:
[DeviceB] display igmp interface verbose
Route-Aggregation1(31.0.0.1):
IGMP is enabled.
IGMP version: 2
Query interval for IGMP: 125s
Other querier present time for IGMP: 255s
Maximum query response time for IGMP: 10s
Last member query interval: 1s
Last member query count: 2
Startup query interval: 31s
Startup query count: 2
General query timer expiry (hh:mm:ss): Off
Querier for IGMP: 31.0.0.1 (This router)
IGMP activity: 6068 join(s), 2067 leave(s)
Multicast routing on this interface: Enabled
Robustness: 2
Require-router-alert: Disabled
Fast-leave: Disabled
Startup-query: On
Other-querier-present-timer-expiry (hh:mm:ss): Off
Authorization: Disabled
Join-by-session: Disabled
User-VLAN-aggregation: Disabled
VSRP instance: 1 (State is backup)
VSRP forward mode: even (Wait to restore is 30s)
IGMP groups reported in total: 4001



