- Table of Contents
-
- 11-High Availability Configuration Guide
- 00-Preface
- 01-Ethernet OAM configuration
- 02-DLDP configuration
- 03-RRPP configuration
- 04-ERPS configuration
- 05-Smart Link configuration
- 06-Monitor Link configuration
- 07-Error code detection configuration
- 08-VRRP configuration
- 09-VSRP configuration
- 10-BFD configuration
- 11-Track configuration
- 12-Process placement configuration
- 13-Interface collaboration configuration
- 14-Reth interface and redundancy group configuration
- Related Documents
-
| Title | Size | Download |
|---|---|---|
| 09-VSRP configuration | 361.62 KB |
VSRP control channel fast detection
Support of service modules for VSRP
Restrictions and guidelines: Subinterface configuration consistency
Specifying a virtual IPv6 address
Configuring VSRP for DHCPv4 server
Associating a DHCPv4 address pool with a VSRP instance
Associating a client-side interface with a VSRP instance
Specifying the TCP port number for establishing DHCPv4 server service backup data channels
Configuring VSRP for DHCPv6 server
Restrictions and guidelines for configuring VSRP for a DHCPv6 address pool
Associating a DHCPv6 address pool with a VSRP instance
Associating a client-side interface with a VSRP instance
Specifying the TCP port number for establishing DHCPv6 server service backup data channels
Display and maintenance commands for VSRP
Example: Configuring MSTP, VRRP, and VSRP for DHCP servers
Example: Configuring VRRP and VSRP for DHCP servers connected through a Layer 3 network
Configuring VSRP
About VSRP
To avoid user service interruption, Virtual Service Redundancy Protocol (VSRP) backs up user services between two devices for which HA features are configured to provide node redundancy, such as VRRP and S-Trunk.
The devices are assigned the primary and secondary roles by the HA features. When the primary device is operating correctly, VSRP backs up the user service data on the primary device to the secondary device. If the primary device fails or its links fail, user services fail over to the secondary device. The user services will fall back to the primary device after the primary device or its links recover.
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 the TCP control and data channels are initiated by the peer with lower IP address to the peer with higher IP address.
VSRP operating mechanism
VSRP takes advantage of VRRP to determine the role of each peer device in a VSRP group as master or backup.
As shown in Figure 1, a VSRP group contains two peer devices, which must be assigned to the same VRRP group.
VSRP determines the roles of the peer devices in the VSRP group in consistent with their roles in the VRRP group.
The master forwards traffic and backs up the services to the backup device either at a regular interval or when traffic reaches the specified threshold.
When the master in the VSRP group fails, the backup takes over to ensure service continuity. For more information about VRRP, see "Configuring VRRP."
VSRP backup modes
A VSRP instance supports the following backup modes:
· 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.
· Warm backup mode (N:1 backup)—The backup device issues received backup data to the data plane when the master fails. This mode has a longer failover delay than hot backup mode. This mode is applicable to scenarios where a device acts as the backup in more than one VSRP group.
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 can work with any of the following service modules in the current version:
· DHCPv4.
· DHCPv6.
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 is not supported by the S6520X-EI-G and WS6520-WiNet devices.
VSRP tasks at a glance
To configure VSRP, perform the following tasks:
2. Configuring a VSRP instance
3. Specifying a virtual IPv6 address
This task is required if you enable VSRP for DHCPv6 on a IPv6 network.
4. Configuring VSRP for a service module
¡ Configuring VSRP for DHCPv4 server
¡ Configuring VSRP for DHCPv6 server
Prerequisites for VSRP
Perform the following tasks on the two peer devices in a VSRP group:
1. Configure VRRP to operate in standard mode.
2. Configure a VRRP group on the two peer devices to determine their role in the VSRP group.
|
|
NOTE: Binding a VSRP group to an existing VRRP group does not affect the functionality of the VRRP group. |
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. Choose one option as needed:
¡ Configure parameters for establishing IPv4 VSRP channels to the peer.
peer peer-ip-address local local-ip-address [ port port-id ]
¡ Configure parameters for establishing IPv6 VSRP channels to the peer.
peer ipv6 peer-ipv6-address local local-ipv6-address [ port port-id ]
The TCP port in this command is for establishing the control channel, which cannot be a TCP port number in use. By default, TCP port 60032 is used if no TCP port is specified.
You can specify the TCP ports for establishing data channels by service type in system view when you configure VSRP for each service.
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.
Restrictions and guidelines
The NAS parameters (IP address, interface, and host name) on a VSRP instance are shared by the VSRP member devices for the associated service. Configure NAS settings on a VSRP instance if its associated service requires the NAS parameters to remain unchanged after a master/backup switchover. For example, the settings are applicable to the following scenarios:
· Avoid re-authentication on master/backup switchover by maintaining the same NAS-IP-address, NAS-Port, and host name in packets sent to the RADIUS server.
· Maintain the same Option 82 values in packets sent to the DHCP server.
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. Bind the VSRP instance to a VRRP group. Choose one option as needed:
¡ Bind the VSRP instance to an IPv4 VRRP group.
bind vrrp vrid virtual-router-id interface interface-type interface-number
By default, a VSRP instance is not bound to an IPv4 VRRP group.
¡ Bind the VSRP instance to an IPv6 VRRP group.
bind vrrp ipv6 vrid virtual-router-id interface interface-type interface-number
By default, a VSRP instance is not bound to an IPv6 VRRP group.
5. Set the backup mode of the VSRP instance.
backup mode { hot | warm }
By default, a VSRP instance operates in hot backup mode.
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.
7. (Optional.) Configure NAS parameters.
nas { id host-name | ip ip-address | port interface-type interface-number }
By default, no NAS parameters are configured.
Specifying a virtual IPv6 address
About this task
To enable VSRP for IPv6 services (such as DHCPv6), you must specify a virtual IPv6 address for the service-enabled interface. In a VSRP instance, you must configure the same virtual IPv6 address on the master and the backup. Then the master advertises the virtual IPv6 address as the gateway address in RA messages to the hosts. In this way, traffic from the hosts can be directed to the master.
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.
¡ VLAN interface.
3. Specify a virtual IPv6 address for the interface that is associated with a VSRP instance.
ipv6 virtual-address ipv6-address vsrp vsrp-instance
By default, no virtual IPv6 address is specified for the interface.
Configuring VSRP for DHCPv4 server
About VSRP for DHCPv4 server
You can use VSRP to back up the address assignment data for a DHCPv4 address pool by associating that address pool with a VSRP instance.
If the peer client-side interfaces on the master and backup DHCPv4 servers have different interface names, you must also associate the interfaces with the same VSRP instance. The peer client-side interfaces are client-side interfaces that connect the master and backup DHCPv4 servers to the same subnet.
When the VSRP instance state is Master, the DHCPv4 server to which the DHCPv4 address pool belongs is the master device. When the VSRP instance state is Backup, the DHCPv4 server to which the DHCPv4 address pool belongs is the backup device.
In a VSRP group, the master DHCPv4 server assigns IP addresses together with other configuration parameters to DHCPv4 clients. The backup DHCPv4 server only receives the address pool data backed up from the master DHCPv4 server. The DHCPv4 address pool data includes lease bindings and conflicting IP addresses. For more information about DHCPv4, see Layer 3—IP Services Configuration Guide.
Associating a DHCPv4 address pool with a VSRP instance
1. Enter system view.
system-view
2. Create a DHCPv4 address pool and enter its view.
dhcp server ip-pool pool-name
3. Associate the address pool with a VSRP instance.
vsrp-instance vsrp-instance-name
By default, a DHCPv4 address pool is not associated with any VSRP instance.
Associating a client-side interface with a VSRP instance
About this task
If the peer client-side interfaces on the master and backup DHCPv4 servers have different interface names, you must also associate the interfaces to the same VSRP instance.
This configuration is not required if the peer client-side interfaces have the same interface name.
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.
3. Associate the interface with a VSRP instance.
dhcp vsrp-instance vsrp-instance-name
By default, a DHCPv4 client-side interface is not associated with a VSRP instance.
Specifying the TCP port number for establishing DHCPv4 server service backup data channels
About this task
To back up address assignment data for a DHCPv4 address pool, the master DHCPv4 server must establish a data channel with the backup DHCPv4 server. You can change the port number for establishing the data channel.
Restrictions and guidelines
To establish DHCPv4 server 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 DHCPv4 server service backup data channels.
dhcp vsrp port port-number
The default TCP port number is 60037.
Configuring VSRP for DHCPv6 server
About VSRP for DHCPv6 server
You can use VSRP to back up the address assignment data for a DHCPv6 address pool by associating that address pool with a VSRP instance.
If the peer client-side interfaces on the master and backup DHCPv6 servers have different interface names, you must also associate the interfaces with the same VSRP instance. The peer client-side interfaces are client-side interfaces that connect the master and backup DHCPv6 servers to the same subnet.
When the VSRP instance state is Master, the DHCPv6 server to which the DHCPv6 address pool belongs is the master device. When the VSRP instance state is Backup, the DHCPv6 server to which the DHCPv6 address pool belongs is the backup device.
In a VSRP group, the master DHCPv6 server assigns IP addresses together with other configuration parameters to DHCPv6 clients. The backup DHCPv6 server only receives the address pool data backed up from the master DHCPv6 server. The DHCPv6 address pool data includes lease bindings and conflicting IP addresses. For more information about DHCPv6, see Layer 3—IP Services Configuration Guide.
Restrictions and guidelines for configuring VSRP for a DHCPv6 address pool
For DHCPv6 clients to correctly renew leases or release IPv6 addresses after a switchover, use the virtual-duid command to generate the same virtual DUID for the master and the backup.
Associating a DHCPv6 address pool with a VSRP instance
1. Enter system view.
system-view
2. Create a DHCPv6 address pool and enter its view.
ipv6 dhcp pool pool-name
3. Associate the address pool with a VSRP instance.
vsrp-instance vsrp-instance-name
By default, a DHCPv6 address pool is not associated with a VSRP instance.
4. Specify a virtual DUID for the DHCPv6 server.
virtual-duid { enterprise-number enterprise-number identifier identifier | hardware-type hardware-type address address }
By default, no virtual DUID is specified for a DHCPv6 server. The DHCPv6 server uses its real DUID.
Associating a client-side interface with a VSRP instance
About this task
If the peer client-side interfaces on the master and backup DHCPv6 servers have different interface names, you must also associate the interfaces to the same VSRP instance.
This configuration is not required if the peer client-side interfaces have the same interface name.
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.
3. Associate the interface with a VSRP instance.
ipv6 dhcp vsrp-instance vsrp-instance-name
By default, a DHCPv6 client-side interface is not associated with a VSRP instance.
Specifying the TCP port number for establishing DHCPv6 server service backup data channels
About this task
To back up address assignment data for a DHCPv6 address pool, the master DHCPv6 server must establish a data channel with the backup DHCPv6 server. You can change the port number for establishing the data channel.
Restrictions and guidelines
To establish DHCPv6 server 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 DHCPv6 server service backup data channels.
ipv6 dhcp vsrp port port-number
The default TCP port number is 60038.
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 MSTP, VRRP, and VSRP for DHCP servers
Network configuration
As shown in Figure 2, the access layer device is dual homed to the distribution layer devices. For network availability, make sure the following requirements are met:
· Device A and Device B use Layer 2 aggregate interfaces to connect each other and the downstream device.
· Create VRRP groups on Device A and Device B to act as the internal network gateways.
· Deploy link redundancy in the network, so that Device C can load-share its uplink traffic between the two uplinks. Traffic from Host A (in VLAN 20) is sent to Device A, and traffic from Host B (in VLAN 30) is sent to Device B.
· When one uplink is disconnected, all traffic is switched over to the other uplink for forwarding.
· Avoid loops in the Layer 2 network caused by redundancy deployment.
Table 1 shows the IP address plan in this example.
|
Configuration item |
Data |
|
|
Device A |
VLAN-interface 20 |
Assign XGE1/0/3, XGE1/0/4, XGE1/0/5, and XGE1/0/6 to VLAN 20, and configure the IP address for VLAN-interface 20 as 10.1.20.2/24. Enable the DHCP server feature on VLAN-interface 20, and specify subnet 10.1.20.0/24 for address allocation, with assignable IP addresses 10.1.20.10 to 10.1.20.250. |
|
VLAN-interface 30 |
Assign XGE1/0/3, XGE1/0/4, XGE1/0/5, and XGE1/0/6 to VLAN 30, and configure the IP address for VLAN-interface 30 as 10.1.30.2/24. Enable the DHCP server feature on VLAN-interface 30, and specify subnet 10.1.30.0/24 for address allocation, with assignable IP addresses 10.1.30.10 to 10.1.30.250. |
|
|
Device B |
VLAN-interface 20 |
Assign XGE1/0/3, XGE1/0/4, XGE1/0/5, and XGE1/0/6 to VLAN 20, and configure the IP address for VLAN-interface 20 as 10.1.20.3/24. Enable the DHCP server feature on VLAN-interface 20, and specify subnet 10.1.20.0/24 for address allocation, with assignable IP addresses 10.1.20.10 to 10.1.20.250. |
|
VLAN-interface 30 |
Assign XGE1/0/3, XGE1/0/4, XGE1/0/5, and XGE1/0/6 to VLAN 30, and configure the IP address for VLAN-interface 30 as 10.1.30.3/24. Enable the DHCP server feature on VLAN-interface 30, and specify subnet 10.1.30.0/24 for address allocation, with assignable IP addresses 10.1.30.10 to 10.1.30.250. |
|
Analysis
· Deploy MSTP between Device A, Device B, and Device C to eliminate loops in the network. Configure spanning tree instances to generate different network topologies for VLAN 20 and VLAN 30.
· Deploy VRRP on Device A and Device B to achieve link redundancy backup and create multiple VRRP groups to achieve load sharing of Layer 3 traffic.
¡ Configure the virtual IP address for VRRP group 20 as 10.1.20.1/24, which acts as the gateway for the hosts in VLAN 20. Configure Device A as the master and Device B as the backup for VRRP group 20.
¡ Configure the virtual IP address for VRRP group 30 as 10.1.30.1/24, which acts as the gateway for the hosts in VLAN 30. Configure Device A as the backup and Device B as the master for VRRP group 30.
· On Device A and Device B, create DHCP address pool 20 to allocate IP addresses for the devices in VLAN 20, and create DHCP address pool 30 to allocate IP addresses for the devices in VLAN 30.
· Deploy VSRP on Device A and Device B to implement hot backup for the DHCP address pools.
Restrictions and guidelines
In this configuration example, the Ethernet interfaces on all devices are required to operate in Layer 2 mode. To change the link mode of an Ethernet interface to Layer 2, execute the port link-mode bridge command.
Configuring MSTP on Device A
1. Configure Layer 2 aggregate interfaces:
# Configure Layer 2 aggregate interface Bridge-Aggregation 2 and bind it to physical interfaces Ten-GigabitEthernet 1/0/3 and Ten-GigabitEthernet 1/0/4 to connect Device B. Configure Layer 2 aggregate interface Bridge-Aggregation 3 and bind it to physical interfaces Ten-GigabitEthernet 1/0/5 and Ten-GigabitEthernet 1/0/6 to connect downstream Device C.
<DeviceA> system-view
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] quit
[DeviceA] interface range ten-gigabitethernet 1/0/3 ten-gigabitethernet 1/0/4
[DeviceA-if-range] port link-aggregation group 2
[DeviceA-if-range] undo shutdown
[DeviceA-if-range] quit
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] quit
[DeviceA] interface range ten-gigabitethernet 1/0/5 ten-gigabitethernet 1/0/6
[DeviceA-if-range] port link-aggregation group 3
[DeviceA-if-range] undo shutdown
[DeviceA-if-range] quit
# Create VLANs 20 and 30. Configure Bridge-Aggregation 2 to operate in dynamic mode, configure the interface as a trunk port, and assign it to VLANs 20 and 30. Configure Bridge-Aggregation 3 to operate in dynamic mode, configure the interface as a trunk port, and assign it to VLANs 20 and 30.
[DeviceA] vlan 20 30
[DeviceA] interface bridge-aggregation 2
[DeviceA-Bridge-Aggregation2] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation2] port link-type trunk
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceA-Bridge-Aggregation2] port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceA-Bridge-Aggregation2] undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceA-Bridge-Aggregation2] quit
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation3] port link-type trunk
Configuring Ten-GigabitEthernet1/0/5 done.
Configuring Ten-GigabitEthernet1/0/6 done.
[DeviceA-Bridge-Aggregation3] port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/5 done.
Configuring Ten-GigabitEthernet1/0/6 done.
[DeviceA-Bridge-Aggregation3] undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/5 done.
Configuring Ten-GigabitEthernet1/0/6 done.
[DeviceA-Bridge-Aggregation3] quit
2. Configure MSTP settings:
# Configure the MST region.
[DeviceA] stp region-configuration
[DeviceA-mst-region] region-name reg
[DeviceA-mst-region] instance 20 vlan 20
[DeviceA-mst-region] instance 30 vlan 30
# Activate MST region configuration.
[DeviceA-mst-region] active region-configuration
[DeviceA-mst-region] quit
# Specify Device A as the root bridge of MSTI 20 and a secondary root bridge of MSTI 30.
[DeviceA] stp instance 20 root primary
[DeviceA] stp instance 30 root secondary
# Enable root guard on Bridge-Aggregation 3.
[DeviceA] interface bridge-aggregation 3
[DeviceA-Bridge-Aggregation3] stp root-protection
[DeviceA-Bridge-Aggregation3] quit
# Configure the spanning tree device to operate in MSTP mode, and globally enable the spanning tree feature.
[DeviceA] stp mode mstp
[DeviceA] stp global enable
Configuring MSTP on Device B
1. Configure Layer 2 aggregate interfaces:
# Configure Layer 2 aggregate interface Bridge-Aggregation 2 and bind it to physical interfaces Ten-GigabitEthernet 1/0/3 and Ten-GigabitEthernet 1/0/4 to connect Device A. Configure Layer 2 aggregate interface Bridge-Aggregation 3 and bind it to physical interfaces Ten-GigabitEthernet 1/0/5 and Ten-GigabitEthernet 1/0/6 to connect downstream Device C.
<DeviceB> system-view
[DeviceB] interface bridge-aggregation 2
[DeviceB-Bridge-Aggregation2] quit
[DeviceB] interface range ten-gigabitethernet 1/0/3 ten-gigabitethernet 1/0/4
[DeviceB-if-range] port link-aggregation group 2
[DeviceB-if-range] undo shutdown
[DeviceB-if-range] quit
[DeviceB] interface bridge-aggregation 3
[DeviceB-Bridge-Aggregation3] quit
[DeviceB] interface range ten-gigabitethernet 1/0/5 ten-gigabitethernet 1/0/6
[DeviceB-if-range] port link-aggregation group 3
[DeviceB-if-range] undo shutdown
[DeviceB-if-range] quit
# Create VLANs 20 and 30. Configure Bridge-Aggregation 2 to operate in dynamic mode, configure the interface as a trunk port, and assign it to VLANs 20 and 30. Configure Bridge-Aggregation 3 to operate in dynamic mode, configure the interface as a trunk port, and assign it to VLANs 20 and 30.
[DeviceB] vlan 20 30
[DeviceB] interface bridge-aggregation 2
[DeviceB-Bridge-Aggregation2] link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation2] port link-type trunk
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceB-Bridge-Aggregation2] port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceB-Bridge-Aggregation2] undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceB-Bridge-Aggregation2] quit
[DeviceB] interface bridge-aggregation 3
[DeviceB-Bridge-Aggregation3] link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation3] port link-type trunk
Configuring Ten-GigabitEthernet1/0/5 done.
Configuring Ten-GigabitEthernet1/0/6 done.
[DeviceB-Bridge-Aggregation3] port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/5 done.
Configuring Ten-GigabitEthernet1/0/6 done.
[DeviceB-Bridge-Aggregation3] undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/5 done.
Configuring Ten-GigabitEthernet1/0/6 done.
[DeviceB-Bridge-Aggregation3] quit
2. Configure MSTP settings:
# Configure the MST region.
[DeviceB] stp region-configuration
[DeviceB-mst-region] region-name reg
[DeviceB-mst-region] instance 20 vlan 20
[DeviceB-mst-region] instance 30 vlan 30
# Activate MST region configuration.
[DeviceB-mst-region] active region-configuration
[DeviceB-mst-region] quit
# Specify Device B as the root bridge of MSTI 30 and a secondary root bridge of MSTI 20.
[DeviceB] stp instance 30 root primary
[DeviceB] stp instance 20 root secondary
# Enable root guard on Bridge-Aggregation 3.
[DeviceB] interface bridge-aggregation 3
[DeviceB-Bridge-Aggregation3] stp root-protection
[DeviceB-Bridge-Aggregation3] quit
# Configure the spanning tree device to operate in MSTP mode, and globally enable the spanning tree feature.
[DeviceB] stp mode mstp
[DeviceB] stp global enable
Configuring MSTP on Device C
1. Configure Layer 2 aggregate interfaces as uplink interfaces:
# Configure Layer 2 aggregate interface Bridge-Aggregation 1 and bind it to physical interfaces Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2 to connect upstream Device A. Configure Layer 2 aggregate interface Bridge-Aggregation 2 and bind it to physical interfaces Ten-GigabitEthernet 1/0/3 and Ten-GigabitEthernet 1/0/4 to connect upstream Device B.
<DeviceC> system-view
[DeviceC] vlan 20 30
[DeviceC] interface bridge-aggregation 1
[DeviceC-Bridge-Aggregation1] quit
[DeviceC] interface range ten-gigabitethernet 1/0/1 ten-gigabitethernet 1/0/2
[DeviceC-if-range] port link-aggregation group 1
[DeviceC-if-range] undo shutdown
[DeviceC-if-range] quit
[DeviceC] interface bridge-aggregation 1
[DeviceC-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceC-Bridge-Aggregation1] port link-type trunk
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceC-Bridge-Aggregation1] port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceC-Bridge-Aggregation1] undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceC-Bridge-Aggregation1] quit
[DeviceC] interface bridge-aggregation 2
[DeviceC-Bridge-Aggregation2] quit
[DeviceC] interface range ten-gigabitethernet 1/0/3 ten-gigabitethernet 1/0/4
[DeviceC-if-range] port link-aggregation group 2
[DeviceC-if-range] undo shutdown
[DeviceC-if-range] quit
[DeviceC] interface bridge-aggregation 2
[DeviceC-Bridge-Aggregation2] link-aggregation mode dynamic
[DeviceC-Bridge-Aggregation2] port link-type trunk
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceC-Bridge-Aggregation2] port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceC-Bridge-Aggregation2] undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceC-Bridge-Aggregation2] quit
2. Configure downstream interfaces Ten-GigabitEthernet 1/0/5 and Ten-GigabitEthernet 1/0/6.
# Specify Ten-GigabitEthernet 1/0/5 as an access port and assign it to VLAN 20.
[DeviceC] interface ten-gigabitethernet 1/0/5
[DeviceC-Ten-GigabitEthernet1/0/5] port link-type access
[DeviceC-Ten-GigabitEthernet1/0/5] port access vlan 20
[DeviceC-Ten-GigabitEthernet1/0/5] undo shutdown
[DeviceC-Ten-GigabitEthernet1/0/5] quit
# Specify Ten-GigabitEthernet 1/0/6 as an access port and assign it to VLAN 30.
[DeviceC] interface ten-gigabitethernet 1/0/6
[DeviceC-Ten-GigabitEthernet1/0/6] port link-type access
[DeviceC-Ten-GigabitEthernet1/0/6] port access vlan 30
[DeviceC-Ten-GigabitEthernet1/0/6] undo shutdown
[DeviceC-Ten-GigabitEthernet1/0/6] quit
3. Configure MSTP settings:
# Configure the MST region.
[DeviceC] stp region-configuration
[DeviceC-mst-region] region-name reg
[DeviceC-mst-region] instance 20 vlan 20
[DeviceC-mst-region] instance 30 vlan 30
# Activate MST region configuration.
[DeviceC-mst-region] active region-configuration
[DeviceC-mst-region] quit
# Configure Ten-GigabitEthernet 1/0/5 and Ten-GigabitEthernet 1/0/6 as edge ports, and enable BPDU guard on them.
[DeviceC] interface range ten-gigabitethernet 1/0/5 to ten-gigabitethernet 1/0/6
[DeviceC-if-range] stp edged-port
Edge port should only be connected to terminal. It will cause temporary loops if port Ten-GigabitEthernet1/0/5 is connected to bridges. Please use it carefully.
Edge port should only be connected to terminal. It will cause temporary loops if port Ten-GigabitEthernet1/0/6 is connected to bridges. Please use it carefully.
[DeviceC-if-range] stp port bpdu-protection enable
[DeviceC-if-range] quit
# Configure the spanning tree device to operate in MSTP mode, and globally enable the spanning tree feature.
[DeviceC] stp mode mstp
[DeviceC] stp global enable
Configuring VRRP on Device A
# Create VLAN-interface 20, and assign IP address 10.1.20.2/24 to it. Create VRRP group 20, and set its virtual IP address to 10.1.20.1. Configure the priority of Device A in VRRP group 1 as 120 (for Device A to become the master), enable the preemptive mode for Device A, and set the preemption delay to 5000 centiseconds.
[DeviceA] interface vlan-interface 20
[DeviceA-Vlan-interface20] ip address 10.1.20.2 24
[DeviceA-Vlan-interface20] vrrp vrid 20 virtual-ip 10.1.20.1
[DeviceA-Vlan-interface20] vrrp vrid 20 priority 120
[DeviceA-Vlan-interface20] vrrp vrid 20 preempt-mode delay 5000
[DeviceA-Vlan-interface20] quit
# Create VLAN-interface 30, and assign IP address 10.1.30.2/24 to it. Create VRRP group 30, and set its virtual IP address to 10.1.30.1.
[DeviceA] interface vlan-interface 30
[DeviceA-Vlan-interface30] ip address 10.1.30.2 24
[DeviceA-Vlan-interface30] vrrp vrid 30 virtual-ip 10.1.30.1
[DeviceA-Vlan-interface30] quit
Configuring VRRP on Device B
# Create VLAN-interface 20, and assign IP address 10.1.20.3/24 to it. Create VRRP group 20, and set its virtual IP address to 10.1.20.1.
[DeviceB] interface vlan-interface 20
[DeviceB-Vlan-interface20] ip address 10.1.20.3 24
[DeviceB-Vlan-interface20] vrrp vrid 20 virtual-ip 10.1.20.1
[DeviceB-Vlan-interface20] quit
# Create VLAN-interface 30, and assign IP address 10.1.30.3/24 to it. Create VRRP group 30, and set its virtual IP address to 10.1.30.1. Configure the priority of Device B in VRRP group 30 as 120 (for Device B to become the master), enable the preemptive mode for Device B, and set the preemption delay to 5000 centiseconds.
[DeviceB-Vlan-interface20] interface vlan-interface 30
[DeviceB-Vlan-interface30] ip address 10.1.30.3 24
[DeviceB-Vlan-interface30] vrrp vrid 30 virtual-ip 10.1.30.1
[DeviceB-Vlan-interface30] vrrp vrid 30 priority 120
[DeviceB-Vlan-interface30] vrrp vrid 30 preempt-mode delay 5000
[DeviceB-Vlan-interface30] quit
Configuring VSRP on Device A
1. Configure VSRP instance forvlan20 for backing up the address pool of VLAN 20.
# Create VSRP group forvlan20 and enter VSRP peer view. Specify the peer IP address as 10.1.20.3 and the local IP address as 10.1.20.2.
[DeviceA] vsrp peer forvlan20
[DeviceA-vsrp-peer-forvlan20] peer 10.1.20.3 local 10.1.20.2
[DeviceA-vsrp-peer-forvlan20] quit
# Create VSRP instance forvlan20 and enter VSRP instance view. Associate the VSRP instance with VSRP group forvlan20 and set its backup ID to 1. Bind VSRP instance forvlan20 to VRRP group 20 on VLAN-interface 20.
[DeviceA] vsrp instance forvlan20
[DeviceA-vsrp-instance-forvlan20] backup id 1 peer forvlan20
[DeviceA-vsrp-instance-forvlan20] bind vrrp vrid 20 interface Vlan-interface 20
[DeviceA-vsrp-instance-forvlan20] quit
[DeviceA] interface vlan-interface 20
[DeviceA-Vlan-interface20] dhcp vsrp forvlan20
[DeviceA-Vlan-interface20] quit
2. Configure VSRP instance forvlan30 for backing up the address pool of VLAN 30.
# Create VSRP group forvlan30 and enter VSRP peer view. Specify the peer IP address as 10.1.30.3 and the local IP address as 10.1.30.2.
[DeviceA] vsrp peer forvlan30
[DeviceA-vsrp-peer-forvlan30] peer 10.1.30.3 local 10.1.30.2
[DeviceA-vsrp-peer-forvlan30] quit
# Create VSRP instance forvlan30 and enter VSRP instance view. Associate the VSRP instance with VSRP group forvlan30 and set its backup ID to 1. Bind VSRP instance forvlan30 to VRRP group 30 on VLAN-interface 30.
[DeviceA] vsrp instance forvlan30
[DeviceA-vsrp-instance-forvlan30] backup id 1 peer forvlan30
[DeviceA-vsrp-instance-forvlan30] bind vrrp vrid 30 interface Vlan-interface 30
[DeviceA-vsrp-instance-forvlan30] quit
[DeviceA] interface vlan-interface 30
[DeviceA-Vlan-interface30] dhcp vsrp forvlan30
[DeviceA-Vlan-interface30] quit
Configuring VSRP on Device B
1. Configure VSRP instance forvlan20 for backing up the address pool of VLAN 20.
# Create VSRP group forvlan20 and enter VSRP peer view. Specify the peer IP address as 10.1.20.2 and the local IP address as 10.1.20.3.
[DeviceB] vsrp peer forvlan20
[DeviceB-vsrp-peer-forvlan20] peer 10.1.20.2 local 10.1.20.3
[DeviceB-vsrp-peer-forvlan20] quit
# Create VSRP instance forvlan20 and enter VSRP instance view. Associate the VSRP instance with VSRP group forvlan20 and set its backup ID to 1. Bind VSRP instance forvlan20 to VRRP group 20 on VLAN-interface 20.
[DeviceB] vsrp instance forvlan20
[DeviceB-vsrp-instance-forvlan20] backup id 1 peer forvlan20
[DeviceB-vsrp-instance-forvlan20] bind vrrp vrid 20 interface Vlan-interface 20
[DeviceB-vsrp-instance-forvlan20] quit
[DeviceB] interface vlan-interface 20
[DeviceB-Vlan-interface20] dhcp vsrp forvlan20
[DeviceB-Vlan-interface20] quit
2. Configure VSRP instance forvlan30 for backing up the address pool of VLAN 30.
# Create VSRP group forvlan30 and enter VSRP peer view. Specify the peer IP address as 10.1.30.3 and the local IP address as 10.1.30.2.
[DeviceA] vsrp peer forvlan30
[DeviceA-vsrp-peer-forvlan30] peer 10.1.30.3 local 10.1.30.2
[DeviceA-vsrp-peer-forvlan30] quit
# Create VSRP instance forvlan30 and enter VSRP instance view. Associate the VSRP instance with VSRP group forvlan30 and set its backup ID to 1. Bind VSRP instance forvlan30 to VRRP group 30 on VLAN-interface 30.
[DeviceB] vsrp instance forvlan30
[DeviceB-vsrp-instance-forvlan30] backup id 1 peer forvlan30
[DeviceB-vsrp-instance-forvlan30] bind vrrp vrid 30 interface Vlan-interface 30
[DeviceB-vsrp-instance-forvlan30] quit
[DeviceB] interface vlan-interface 30
[DeviceB-Vlan-interface30] dhcp vsrp forvlan30
[DeviceB-Vlan-interface30] quit
Configuring DHCP address pools on Device A
1. Configure DHCP address pool 20 to allocate IP addresses for the devices in VLAN 20.
# Create DHCP address pool 20, and specify subnet 10.1.20.0/24 for address allocation, with assignable IP addresses 10.1.20.10 to 10.1.20.250 (the remaining IP addresses are reserved for the devices such as servers). Specify the gateway address as the virtual IP address 10.1.20.1 of VRRP group 20.
[DeviceA] dhcp server ip-pool 20
[DeviceA-dhcp-pool-20] network 10.1.20.0 mask 255.255.255.0
[DeviceA-dhcp-pool-20] address range 10.1.20.10 10.1.20.250
[DeviceA-dhcp-pool-20] expired day 30
[DeviceA-dhcp-pool-20] dns-list 10.1.20.1
[DeviceA-dhcp-pool-20] gateway-list 10.1.20.1
[DeviceA-dhcp-pool-20] vsrp-instance forvlan20
[DeviceA-dhcp-pool-20] quit
[DeviceA] interface vlan-interface 20
[DeviceA-Vlan-interface20] dhcp select server
[DeviceA-Vlan-interface20] quit
2. Configure DHCP address pool 30 to allocate IP addresses for the devices in VLAN 30.
# Create DHCP address pool 30, and specify subnet 10.1.30.0/24 for address allocation, with assignable IP addresses 10.1.30.10 to 10.1.30.250 (the remaining IP addresses are reserved for the devices such as servers). Specify the gateway address as the virtual IP address 10.1.30.1 of VRRP group 30.
[DeviceA] dhcp server ip-pool 30
[DeviceA-dhcp-pool-30] network 10.1.30.1 mask 255.255.255.0
[DeviceA-dhcp-pool-30] address range 10.1.30.10 10.1.30.250
[DeviceA-dhcp-pool-30] expired day 30
[DeviceA-dhcp-pool-30] dns-list 10.1.30.1
[DeviceA-dhcp-pool-30] gateway-list 10.1.30.1
[DeviceA-dhcp-pool-30] vsrp-instance forvlan30
[DeviceA-dhcp-pool-30] quit
[DeviceA] interface vlan-interface 30
[DeviceA-Vlan-interface30] dhcp select server
[DeviceA-Vlan-interface30] quit
3. Enable DHCP.
[DeviceA] dhcp enable
[DeviceA] dhcp server request-ip-address check
Configuring DHCP address pools on Device B
1. Configure DHCP address pool 20 to allocate IP addresses for the devices in VLAN 20.
# Create DHCP address pool 20, and specify subnet 10.1.20.0/24 for address allocation, with assignable IP addresses 10.1.20.10 to 10.1.20.250 (the remaining IP addresses are reserved for the devices such as servers). Specify the gateway address as the virtual IP address 10.1.20.1 of VRRP group 20.
[DeviceB] dhcp server ip-pool 20
[DeviceB-dhcp-pool-20] network 10.1.20.0 mask 255.255.255.0
[DeviceB-dhcp-pool-20] address range 10.1.20.10 10.1.20.250
[DeviceB-dhcp-pool-20] expired day 30
[DeviceB-dhcp-pool-20] dns-list 10.1.20.1
[DeviceB-dhcp-pool-20] gateway-list 10.1.20.1
[DeviceB-dhcp-pool-20] vsrp-instance forvlan20
[DeviceB-dhcp-pool-20] quit
[DeviceB] interface vlan-interface 20
[DeviceB-Vlan-interface20] dhcp select server
[DeviceB-Vlan-interface20] quit
2. Configure DHCP address pool 30 to allocate IP addresses for the devices in VLAN 30.
# Create DHCP address pool 30, and specify subnet 10.1.30.0/24 for address allocation, with assignable IP addresses 10.1.30.10 to 10.1.30.250 (the remaining IP addresses are reserved for the devices such as servers). Specify the gateway address as the virtual IP address 10.1.30.1 of VRRP group 30.
[DeviceB] dhcp server ip-pool 30
[DeviceB-dhcp-pool-30] network 10.1.30.1 mask 255.255.255.0
[DeviceB-dhcp-pool-30] address range 10.1.30.10 10.1.30.250
[DeviceB-dhcp-pool-30] expired day 30
[DeviceB-dhcp-pool-30] dns-list 10.1.30.1
[DeviceB-dhcp-pool-30] gateway-list 10.1.30.1
[DeviceB-dhcp-pool-30] vsrp-instance forvlan30
[DeviceB-dhcp-pool-30] quit
[DeviceB] interface vlan-interface 30
[DeviceB-Vlan-interface30] dhcp select server
[DeviceB-Vlan-interface30] quit
3. Enable DHCP.
[DeviceB] dhcp enable
[DeviceB] dhcp server request-ip-address check
Configuring the hosts
1. Configure Host A to automatically obtain an IP address, and specify its default gateway address as 10.1.20.1. (Details not shown.)
2. Configure Host B to automatically obtain an IP address, and specify its default gateway address as 10.1.30.1. (Details not shown.)
Verifying the MSTP configuration
|
IMPORTANT: This configuration example involves multiple features. As a best practice, verify whether a feature is operating correctly after you configure it. If the feature fails to operate correctly, identify and resolve the issue first, and then configure the next feature. For example, after you configure MSTP, verify the MSTP configuration, and then configure VRRP and verify VRRP configuration. |
1. Verify MSTP configuration on Device A:
# Verify that all interfaces on Device A are in forwarding status, and Bridge-Aggregation 2 is the root port for MSTI 30.
[DeviceA] display stp brief
MST ID Port Role STP State Protection
0 Bridge-Aggregation2 DESI FORWARDING NONE
0 Bridge-Aggregation3 DESI FORWARDING NONE
20 Bridge-Aggregation2 DESI FORWARDING NONE
20 Bridge-Aggregation3 DESI FORWARDING NONE
30 Bridge-Aggregation2 ROOT FORWARDING NONE
30 Bridge-Aggregation3 DESI FORWARDING NONE
2. Verify MSTP configuration on Device B:
# Verify that all interfaces on Device B are in forwarding status, and Bridge-Aggregation 2 is the root port for MSTI 20.
[DeviceB] display stp brief
MST ID Port Role STP State Protection
0 Bridge-Aggregation2 ROOT FORWARDING NONE
0 Bridge-Aggregation3 DESI FORWARDING NONE
20 Bridge-Aggregation2 ROOT FORWARDING NONE
20 Bridge-Aggregation3 DESI FORWARDING NONE
30 Bridge-Aggregation2 DESI FORWARDING NONE
30 Bridge-Aggregation3 DESI FORWARDING NONE
3. Verify MSTP configuration on Device C:
Verify that Bridge-aggregation 2 is a blocked port for MSTI 20, and Bridge-Aggregation 1 is a blocked port for MSTI 30.
[DeviceC] display stp brief
MST ID Port Role STP State Protection
0 Bridge-Aggregation1 ROOT FORWARDING NONE
0 Bridge-Aggregation2 ALTE DISCARDING NONE
0 Ten-GigabitEthernet1/0/5 DESI FORWARDING NONE
20 Bridge-Aggregation1 ROOT FORWARDING NONE
20 Bridge-Aggregation2 ALTE DISCARDING NONE
20 Ten-GigabitEthernet1/0/5 DESI FORWARDING NONE
30 Bridge-Aggregation1 ALTE DISCARDING NONE
30 Bridge-Aggregation2 ROOT FORWARDING NONE
Verifying the VRRP configuration
1. Verify VRRP configuration on Device A:
Verify that Device A is the master in VRRP group 20 and backup in VRRP group 30.
[DeviceA] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
----------------------------------------------------------------------------
Vlan20 20 Master 120 100 Not supported 10.1.20.1
Vlan30 30 Backup 100 100 Not supported 10.1.30.1
2. Verify VRRP configuration on Device B:
Verify that Device B is the backup in VRRP group 20 and master in VRRP group 30.
[DeviceB] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
----------------------------------------------------------------------------
Vlan20 20 Backup 100 100 Not supported 10.1.20.1
Vlan30 30 Master 120 100 Not supported 10.1.30.1
Verifying the VSRP configuration
1. Verify that the TCP control channel state is Connected for all VSRP groups on Device A.
[DeviceA] display vsrp peer
VSRP peer name: forvlan20
TCP status: Connected
Peer IP: 10.1.20.3
Local IP: 10.1.20.2
Port: 60032
VSRP peer name: forvlan30
TCP status: Connected
Peer IP: 10.1.30.3
Local IP: 10.1.30.2
Port: 60032
2. Verify that the TCP control channel state is Connected for all VSRP groups on Device B.
[DeviceB] display vsrp peer
VSRP peer name: forvlan20
TCP status: Connected
Peer IP: 10.1.20.2
Local IP: 10.1.20.3
Port: 60032
VSRP peer name: forvlan30
TCP status: Connected
Peer IP: 10.1.30.2
Local IP: 10.1.30.3
Port: 60032
Verifying the DHCP address pool backup information
Disable the NIC on Host A, and then enable the NIC. Verify that Device A can allocate IP address 10.1.20.10 to Host A, and you can also view the information on Device B. View VSRP logs on Device A and Device B to verify that Device A has backed up DHCP address information to Device B.
[DeviceA] display dhcp server ip-in-use
IP address Client-identifier/ Lease expiration Type
Hardware address
10.1.20.10 0108-0027-0038-f1 Jun 29 17:09:10 2024 Auto(C)
[DeviceB] display dhcp server ip-in-use
IP address Client-identifier/ Lease expiration Type
Hardware address
10.1.20.10 0108-0027-0038-f1 Jun 29 17:08:38 2024 Auto(C)
Example: Configuring VRRP and VSRP for DHCP servers connected through a Layer 3 network
Network configuration
As shown in Figure 3, the access layer device is dual homed to the distribution layer devices Device A and Device B. Device A and Device B are connected to Device D through their respective Layer 3 devices. For network availability, make sure the following requirements are met:
· Device A and Device B use Layer 2 aggregate interfaces to connect to the downstream device.
· Create VRRP groups on Device A and Device B to act as the internal network gateways.
· Deploy link redundancy in the network, so that Device C can load-share its uplink traffic between the two uplinks. Traffic from Host A (in VLAN 20) is sent to Device A, and traffic from Host B (in VLAN 30) is sent to Device B.
· When one uplink is disconnected, all traffic is switched over to the other uplink for forwarding.
Table 2 shows the IP address plan in this example.
|
Configuration item |
Data |
|
|
Device A |
VLAN-interface 20 |
Assign XGE1/0/1 and XGE1/0/2 to VLAN 20, and configure the IP address for VLAN-interface 20 as 10.1.20.2/24. Enable the DHCP server feature on VLAN-interface 20, and specify subnet 10.1.20.0/24 for address allocation, with assignable IP addresses 10.1.20.10 to 10.1.20.250. |
|
VLAN-interface 30 |
Assign XGE1/0/1 and XGE1/0/2 to VLAN 30, and configure the IP address for VLAN-interface 30 as 10.1.30.2/24. Enable the DHCP server feature on VLAN-interface 30, and specify subnet 10.1.30.0/24 for address allocation, with assignable IP addresses 10.1.30.10 to 10.1.30.250. |
|
|
Device B |
VLAN-interface 20 |
Assign XGE1/0/1 and XGE1/0/2 to VLAN 20, and configure the IP address for VLAN-interface 20 as 10.1.20.3/24. Enable the DHCP server feature on VLAN-interface 20, and specify subnet 10.1.20.0/24 for address allocation, with assignable IP addresses 10.1.20.10 to 10.1.20.250. |
|
VLAN-interface 30 |
Assign XGE1/0/1 and XGE1/0/2 to VLAN 30, and configure the IP address for VLAN-interface 30 as 10.1.30.3/24. Enable the DHCP server feature on VLAN-interface 30, and specify subnet 10.1.30.0/24 for address allocation, with assignable IP addresses 10.1.30.10 to 10.1.30.250. |
|
Analysis
· Configure OSPF for Device A, Device B, and Device D, so that they each have a route to reach one another.
· Deploy VRRP on Device A and Device B to achieve link redundancy backup and create multiple VRRP groups to achieve load sharing of Layer 3 traffic.
¡ Configure the virtual IP address for VRRP group 20 as 10.1.20.1/24, which acts as the gateway for the hosts in VLAN 20. Configure Device A as the master and Device B as the backup for VRRP group 20.
¡ Configure the virtual IP address for VRRP group 30 as 10.1.30.1/24, which acts as the gateway for the hosts in VLAN 30. Configure Device A as the backup and Device B as the master for VRRP group 30.
· On Device A and Device B, create DHCP address pool 20 to allocate IP addresses for the devices in VLAN 20, and create DHCP address pool 30 to allocate IP addresses for the devices in VLAN 30.
· Deploy VSRP on Device A and Device B to implement hot backup for the DHCP address pools.
Restrictions and guidelines
In this configuration example, the Ethernet interfaces on all devices are required to operate in Layer 2 mode. To change the link mode of an Ethernet interface to Layer 2, execute the port link-mode bridge command.
Configuring VRRP on Device A
1. Configure Layer 2 aggregate interface settings:
# Configure Layer 2 aggregate interface Bridge-Aggregation 1 and bind it to physical interfaces Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2 to connect downstream Device C.
<DeviceA>system-view
System View: return to User View with Ctrl+Z.
[DeviceA]interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1]quit
[DeviceA]interface range ten-gigabitethernet 1/0/1 ten-gigabitethernet 1/0/2
[DeviceA-if-range] port link-aggregation group 1
[DeviceA-if-range] undo shutdown
[DeviceA-if-range] quit
# Create VLANs 20 and 30. Configure Bridge-Aggregation 1 to operate in dynamic mode, configure the interface as a trunk port, and assign it to VLANs 20 and 30.
[DeviceA] vlan 20 30
[DeviceA] interface bridge-aggregation 1
[DeviceA-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceA-Bridge-Aggregation1] port link-type trunk
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceA-Bridge-Aggregation1] port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceA-Bridge-Aggregation1] undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceA-Bridge-Aggregation1]quit
2. Configure VRRP:
# Create VLAN-interface 20, and assign IP address 10.1.20.2/24 to it. Create VRRP group 20, and set its virtual IP address to 10.1.20.1. Configure the priority of Device A in VRRP group 1 as 120 (for Device A to become the master), enable the preemptive mode for Device A, and set the preemption delay to 5000 centiseconds.
[DeviceA] interface vlan-interface 20
[DeviceA-Vlan-interface20] ip address 10.1.20.2 24
[DeviceA-Vlan-interface20] vrrp vrid 20 virtual-ip 10.1.20.1
[DeviceA-Vlan-interface20] vrrp vrid 20 priority 120
[DeviceA-Vlan-interface20] vrrp vrid 20 preempt-mode delay 5000
[DeviceA-Vlan-interface20] quit
# Create VLAN-interface 30, and assign IP address 10.1.30.2/24 to it. Create VRRP group 30, and set its virtual IP address to 10.1.30.1.
[DeviceA] interface vlan-interface 30
[DeviceA-Vlan-interface30] ip address 10.1.30.2 24
[DeviceA-Vlan-interface30] vrrp vrid 30 virtual-ip 10.1.30.1
[DeviceA-Vlan-interface30] quit
Configuring VRRP on Device B
1. Configure Layer 2 aggregate interface settings:
# Configure Layer 2 aggregate interface Bridge-Aggregation 1 and bind it to physical interfaces Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2 to connect downstream Device C.
<DeviceB>system-view
System View: return to User View with Ctrl+Z.
[DeviceB]interface bridge-aggregation 1
[DeviceB-Bridge-Aggregation1]quit
[DeviceB]interface range ten-gigabitethernet 1/0/1 ten-gigabitethernet 1/0/2
[DeviceB-if-range]port link-aggregation group 1
[DeviceB-if-range]undo shutdown
[DeviceB-if-range]quit
# Create VLANs 20 and 30. Configure Bridge-Aggregation 1 to operate in dynamic mode, configure the interface as a trunk port, and assign it to VLANs 20 and 30.
[DeviceB]vlan 20 30
[DeviceB]interface bridge-aggregation 1
[DeviceB-Bridge-Aggregation1]link-aggregation mode dynamic
[DeviceB-Bridge-Aggregation1]port link-type trunk
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceB-Bridge-Aggregation1]port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceB-Bridge-Aggregation1]undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceB-Bridge-Aggregation1]quit
2. Configure VRRP:
# Create VLAN-interface 20, and assign IP address 10.1.20.3/24 to it. Create VRRP group 20, and set its virtual IP address to 10.1.20.1.
[DeviceB] interface vlan-interface 20
[DeviceB-Vlan-interface20] ip address 10.1.20.3 24
[DeviceB-Vlan-interface20] vrrp vrid 20 virtual-ip 10.1.20.1
[DeviceB-Vlan-interface20] quit
# Create VLAN-interface 30, and assign IP address 10.1.30.3/24 to it. Create VRRP group 30, and set its virtual IP address to 10.1.30.1. Configure the priority of Device B in VRRP group 30 as 120 (for Device B to become the master), enable the preemptive mode for Device B, and set the preemption delay to 5000 centiseconds.
[DeviceB-Vlan-interface20] interface vlan-interface 30
[DeviceB-Vlan-interface30] ip address 10.1.30.3 24
[DeviceB-Vlan-interface30] vrrp vrid 30 virtual-ip 10.1.30.1
[DeviceB-Vlan-interface30] vrrp vrid 30 priority 120
[DeviceB-Vlan-interface30] vrrp vrid 30 preempt-mode delay 5000
[DeviceB-Vlan-interface30] quit
Configuring VRRP on Device C
1. Configure Layer 2 aggregate interfaces as uplink interfaces:
# Configure Layer 2 aggregate interface Bridge-Aggregation 1 and bind it to physical interfaces Ten-GigabitEthernet 1/0/1 and Ten-GigabitEthernet 1/0/2 to connect upstream Device A. Configure Layer 2 aggregate interface Bridge-Aggregation 2 and bind it to physical interfaces Ten-GigabitEthernet 1/0/3 and Ten-GigabitEthernet 1/0/4 to connect upstream Device B.
<DeviceC> system-view
[DeviceC] vlan 20 30
[DeviceC] interface bridge-aggregation 1
[DeviceC-Bridge-Aggregation1] quit
[DeviceC] interface range ten-gigabitethernet 1/0/1 ten-gigabitethernet 1/0/2
[DeviceC-if-range] port link-aggregation group 1
[DeviceC-if-range] undo shutdown
[DeviceC-if-range] quit
[DeviceC] interface bridge-aggregation 1
[DeviceC-Bridge-Aggregation1] link-aggregation mode dynamic
[DeviceC-Bridge-Aggregation1] port link-type trunk
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceC-Bridge-Aggregation1] port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceC-Bridge-Aggregation1] undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/1 done.
Configuring Ten-GigabitEthernet1/0/2 done.
[DeviceC-Bridge-Aggregation1] quit
[DeviceC] interface bridge-aggregation 2
[DeviceC-Bridge-Aggregation2] quit
[DeviceC] interface range ten-gigabitethernet 1/0/3 ten-gigabitethernet 1/0/4
[DeviceC-if-range] port link-aggregation group 2
[DeviceC-if-range] undo shutdown
[DeviceC-if-range] quit
[DeviceC] interface bridge-aggregation 2
[DeviceC-Bridge-Aggregation2] link-aggregation mode dynamic
[DeviceC-Bridge-Aggregation2] port link-type trunk
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceC-Bridge-Aggregation2] port trunk permit vlan 20 30
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceC-Bridge-Aggregation2] undo port trunk permit vlan 1
Configuring Ten-GigabitEthernet1/0/3 done.
Configuring Ten-GigabitEthernet1/0/4 done.
[DeviceC-Bridge-Aggregation2] quit
2. Configure downstream interfaces Ten-GigabitEthernet 1/0/5 and Ten-GigabitEthernet 1/0/6.
# Specify Ten-GigabitEthernet 1/0/5 as an access port and assign it to VLAN 20.
[DeviceC] interface ten-gigabitethernet 1/0/5
[DeviceC-Ten-GigabitEthernet1/0/5] port link-type access
[DeviceC-Ten-GigabitEthernet1/0/5] port access vlan 20
[DeviceC-Ten-GigabitEthernet1/0/5] undo shutdown
[DeviceC-Ten-GigabitEthernet1/0/5] quit
# Specify Ten-GigabitEthernet 1/0/6 as an access port and assign it to VLAN 30.
[DeviceC] interface ten-gigabitethernet 1/0/6
[DeviceC-Ten-GigabitEthernet1/0/6] port link-type access
[DeviceC-Ten-GigabitEthernet1/0/6] port access vlan 30
[DeviceC-Ten-GigabitEthernet1/0/6] undo shutdown
[DeviceC-Ten-GigabitEthernet1/0/6] quit
Configuring Layer 3 network access settings on Device A
1. Assign IP address 10.1.1.2/24 to Ten-GigabitEthernet 1/0/7.
[DeviceA] interface ten-gigabitethernet 1/0/7
[DeviceA-Ten-GigabitEthernet1/0/7] port link-mode route
The configuration of the interface will be restored to the default. Continue? [Y/N]:y
[DeviceA-Ten-GigabitEthernet1/0/7] ip address 10.1.1.2 24
[DeviceA-Ten-GigabitEthernet1/0/7] quit
2. Configure OSPF.
[DeviceA] router id 1.1.1.1
[DeviceA] ospf
[DeviceA-ospf-1] area 0
[DeviceA-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] network 10.1.20.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] network 10.1.30.0 0.0.0.255
[DeviceA-ospf-1-area-0.0.0.0] quit
Configuring Layer 3 network access settings on Device B
1. Assign IP address 10.1.2.2/24 to uplink interface Ten-GigabitEthernet 1/0/7.
[DeviceB] interface ten-gigabitethernet 1/0/7
[DeviceB-Ten-GigabitEthernet1/0/7] port link-mode route
The configuration of the interface will be restored to the default. Continue? [Y/N]:y
[DeviceB-Ten-GigabitEthernet1/0/7] ip address 10.1.2.2 24
[DeviceB-Ten-GigabitEthernet1/0/7] quit
2. Configure OSPF settings.
[DeviceB] router id 2.2.2.2
[DeviceB] ospf
[DeviceB-ospf-1] area 0
[DeviceB-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255
[DeviceB-ospf-1-area-0.0.0.0] network 10.1.20.0 0.0.0.255
[DeviceB-ospf-1-area-0.0.0.0] network 10.1.30.0 0.0.0.255
[DeviceB-ospf-1-area-0.0.0.0] quit
[DeviceB-ospf-1] quit
Configuring Layer 3 network settings on Device D
1. Assign IP address 10.1.1.1/24 to downlink interface Ten-GigabitEthernet 1/0/6 to connect Device A. Assign IP address 10.1.2.1/24 to downlink interface Ten-GigabitEthernet 1/0/7 to connect Device B.
<DeviceD> system-view
[DeviceD] interface ten-gigabitethernet 1/0/6
[DeviceD-Ten-GigabitEthernet1/0/6] port link-mode route
The configuration of the interface will be restored to the default. Continue? [Y/N]:y
[DeviceD-Ten-GigabitEthernet1/0/6] ip address 10.1.1.1 24
[DeviceD-Ten-GigabitEthernet1/0/6] quit
[DeviceD] interface ten-gigabitethernet 1/0/7
[DeviceD-Ten-GigabitEthernet1/0/7] port link-mode route
The configuration of the interface will be restored to the default. Continue? [Y/N] y
[DeviceD-Ten-GigabitEthernet1/0/7] ip address 10.1.2.1 24
[DeviceD-Ten-GigabitEthernet1/0/7] quit
2. Configure OSPF settings.
[DeviceD] router id 4.4.4.4
[DeviceD] ospf
[DeviceD-ospf-1] area 0
[DeviceD-ospf-1-area-0.0.0.0] network 10.1.1.0 0.0.0.255
[DeviceD-ospf-1-area-0.0.0.0] network 10.1.2.0 0.0.0.255
[DeviceD-ospf-1-area-0.0.0.0] quit
[DeviceD-ospf-1] quit
Configuring VSRP on Device A
1. Configure VSRP instance forvlan20 for backing up the address pool of VLAN 20.
# Create VSRP group fordhcppool and enter VSRP peer view. Specify the peer IP address as 10.1.2.2 and the local IP address as 10.1.1.2.
[DeviceA] vsrp peer fordhcppool
[DeviceA-vsrp-peer-fordhcppool] peer 10.1.2.2 local 10.1.1.2
[DeviceA-vsrp-peer-fordhcppool] quit
# Create VSRP instance forvlan20 and enter VSRP instance view. Associate the VSRP instance with VSRP group fordhcppool and set its backup ID to 1. Bind VSRP instance forvlan20 to VRRP group 20 on VLAN-interface 20.
[DeviceA] vsrp instance forvlan20
[DeviceA-vsrp-instance-forvlan20] backup id 1 peer fordhcppool
[DeviceA-vsrp-instance-forvlan20] bind vrrp vrid 20 interface Vlan-interface 20
[DeviceA-vsrp-instance-forvlan20] quit
[DeviceA] interface vlan-interface 20
[DeviceA-Vlan-interface20] dhcp vsrp forvlan20
[DeviceA-Vlan-interface20] quit
2. Configure VSRP instance forvlan30 for backing up the address pool of VLAN 30.
# Create VSRP instance forvlan30 and enter VSRP instance view. Associate the VSRP instance with VSRP group fordhcppool and set its backup ID to 2. Bind VSRP instance forvlan30 to VRRP group 30 on VLAN-interface 30.
[DeviceA] vsrp instance forvlan30
[DeviceA-vsrp-instance-forvlan30] backup id 2 peer fordhcppool
[DeviceA-vsrp-instance-forvlan30] bind vrrp vrid 30 interface Vlan-interface 30
[DeviceA-vsrp-instance-forvlan30] quit
[DeviceA] interface vlan-interface 30
[DeviceA-Vlan-interface30] dhcp vsrp forvlan30
[DeviceA-Vlan-interface30] quit
Configuring VSRP on Device B
1. Configure VSRP instance forvlan20 for backing up the address pool of VLAN 20.
# Create VSRP group fordhcppool and enter VSRP peer view. # Specify the peer IP address as 10.1.1.2 and the local IP address as 10.1.2.2.
[DeviceB] vsrp peer fordhcppool
[DeviceB-vsrp-peer-fordhcppool] peer 10.1.1.2 local 10.1.2.2
[DeviceB-vsrp-peer-fordhcppool] quit
# Create VSRP instance forvlan20 and enter VSRP instance view. Associate the VSRP instance with VSRP group fordhcppool and set its backup ID to 1. Bind VSRP instance forvlan20 to VRRP group 20 on VLAN-interface 20.
[DeviceB] vsrp instance forvlan20
[DeviceB-vsrp-instance-forvlan20] backup id 1 peer fordhcppool
[DeviceB-vsrp-instance-forvlan20] bind vrrp vrid 20 interface Vlan-interface 20
[DeviceB-vsrp-instance-forvlan20] quit
[DeviceB] interface vlan-interface 20
[DeviceB-Vlan-interface20] dhcp vsrp forvlan20
[DeviceB-Vlan-interface20] quit
2. Configure VSRP instance forvlan30 for backing up the address pool of VLAN 30.
# Create VSRP instance forvlan30 and enter VSRP instance view. Associate the VSRP instance with VSRP group fordhcppool and set its backup ID to 2. Bind VSRP instance forvlan30 to VRRP group 30 on VLAN-interface 30.
[DeviceB] vsrp instance forvlan30
[DeviceB-vsrp-instance-forvlan30] backup id 2 peer fordhcppool
[DeviceB-vsrp-instance-forvlan30] bind vrrp vrid 30 interface Vlan-interface 30
[DeviceB-vsrp-instance-forvlan30] quit
[DeviceB] interface vlan-interface 30
[DeviceB-Vlan-interface30] dhcp vsrp forvlan30
[DeviceB-Vlan-interface30] quit
Configuring DHCP address pools on Device A
1. Configure DHCP address pool 20 to allocate IP addresses for the devices in VLAN 20.
# Create DHCP address pool 20, and specify subnet 10.1.20.0/24 for address allocation, with assignable IP addresses 10.1.20.10 to 10.1.20.250 (the remaining IP addresses are reserved for the devices such as servers). Specify the gateway address as the virtual IP address 10.1.20.1 of VRRP group 20.
[DeviceA] dhcp server ip-pool 20
[DeviceA-dhcp-pool-20] network 10.1.20.0 mask 255.255.255.0
[DeviceA-dhcp-pool-20] address range 10.1.20.10 10.1.20.250
[DeviceA-dhcp-pool-20] expired day 30
[DeviceA-dhcp-pool-20] dns-list 10.1.20.1
[DeviceA-dhcp-pool-20] gateway-list 10.1.20.1
[DeviceA-dhcp-pool-20] vsrp-instance forvlan20
[DeviceA-dhcp-pool-20] quit
[DeviceA] interface vlan-interface 20
[DeviceA-Vlan-interface20] dhcp select server
[DeviceA-Vlan-interface20] quit
2. Configure DHCP address pool 30 to allocate IP addresses for the devices in VLAN 30.
# Create DHCP address pool 30, and specify subnet 10.1.30.0/24 for address allocation, with assignable IP addresses 10.1.30.10 to 10.1.30.250 (the remaining IP addresses are reserved for the devices such as servers). Specify the gateway address as the virtual IP address 10.1.30.1 of VRRP group 30.
[DeviceA] dhcp server ip-pool 30
[DeviceA-dhcp-pool-30] network 10.1.30.1 mask 255.255.255.0
[DeviceA-dhcp-pool-30] address range 10.1.30.10 10.1.30.250
[DeviceA-dhcp-pool-30] expired day 30
[DeviceA-dhcp-pool-30] dns-list 10.1.30.1
[DeviceA-dhcp-pool-30] gateway-list 10.1.30.1
[DeviceA-dhcp-pool-30] vsrp-instance forvlan30
[DeviceA-dhcp-pool-30] quit
[DeviceA] interface vlan-interface 30
[DeviceA-Vlan-interface30] dhcp select server
[DeviceA-Vlan-interface30] quit
3. Enable DHCP.
[DeviceA] dhcp enable
[DeviceA] dhcp server request-ip-address check
Configuring DHCP address pools on Device B
1. Configure DHCP address pool 20 to allocate IP addresses for the devices in VLAN 20.
# Create DHCP address pool 20, and specify subnet 10.1.20.0/24 for address allocation, with assignable IP addresses 10.1.20.10 to 10.1.20.250 (the remaining IP addresses are reserved for the devices such as servers). Specify the gateway address as the virtual IP address 10.1.20.1 of VRRP group 20.
[DeviceB] dhcp server ip-pool 20
[DeviceB-dhcp-pool-20] network 10.1.20.0 mask 255.255.255.0
[DeviceB-dhcp-pool-20] address range 10.1.20.10 10.1.20.250
[DeviceB-dhcp-pool-20] expired day 30
[DeviceB-dhcp-pool-20] dns-list 10.1.20.1
[DeviceB-dhcp-pool-20] gateway-list 10.1.20.1
[DeviceB-dhcp-pool-20] vsrp-instance forvlan20
[DeviceB-dhcp-pool-20] quit
[DeviceB] interface vlan-interface 20
[DeviceB-Vlan-interface20] dhcp select server
[DeviceB-Vlan-interface20] quit
2. Configure DHCP address pool 30 to allocate IP addresses for the devices in VLAN 30.
# Create DHCP address pool 30, and specify subnet 10.1.30.0/24 for address allocation, with assignable IP addresses 10.1.30.10 to 10.1.30.250 (the remaining IP addresses are reserved for the devices such as servers). Specify the gateway address as the virtual IP address 10.1.30.1 of VRRP group 30.
[DeviceB] dhcp server ip-pool 30
[DeviceB-dhcp-pool-30] network 10.1.30.1 mask 255.255.255.0
[DeviceB-dhcp-pool-30] address range 10.1.30.10 10.1.30.250
[DeviceB-dhcp-pool-30] expired day 30
[DeviceB-dhcp-pool-30] dns-list 10.1.30.1
[DeviceB-dhcp-pool-30] gateway-list 10.1.30.1
[DeviceB-dhcp-pool-30] vsrp-instance forvlan30
[DeviceB-dhcp-pool-30] quit
[DeviceB] interface vlan-interface 30
[DeviceB-Vlan-interface30] dhcp select server
[DeviceB-Vlan-interface30] quit
3. Enable DHCP.
[DeviceB] dhcp enable
[DeviceB] dhcp server request-ip-address check
Configure the hosts
1. Configure Host A to automatically obtain an IP address, and specify its default gateway address as 10.1.20.1. (Details not shown.)
2. Configure Host B to automatically obtain an IP address, and specify its default gateway address as 10.1.30.1. (Details not shown.)
Verifying the VRRP configuration
|
IMPORTANT: This configuration example involves multiple features. As a best practice, verify whether a feature is operating correctly after you configure it. If the feature fails to operate correctly, identify and resolve the issue first, and then configure the next feature. For example, after you configure VRRP, verify the VRRP configuration, and then configure and verify Layer 3 network access settings. |
1. Verify VRRP configuration on Device A:
Verify that Device A is the master in VRRP group 20 and backup in VRRP group 30.
[DeviceA] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
----------------------------------------------------------------------------
Vlan20 20 Master 120 100 Not supported 10.1.20.1
Vlan30 30 Backup 100 100 Not supported 10.1.30.1
2. Verify VRRP configuration on Device B:
Verify that Device B is the backup in VRRP group 20 and master in VRRP group 30.
[DeviceB] display vrrp
IPv4 Virtual Router Information:
Running mode : Standard
Total number of virtual routers : 2
Interface VRID State Running Adver Auth Virtual
Pri Timer Type IP
----------------------------------------------------------------------------
Vlan20 20 Backup 100 100 Not supported 10.1.20.1
Vlan30 30 Master 120 100 Not supported 10.1.30.1
Verifying the VSRP configuration
1. Verify that the TCP control channel state is Connected for all VSRP groups on Device A.
[DeviceA] display vsrp peer
VSRP peer name: fordhcppool
TCP status: Connected
Peer IP: 10.1.2.2
Local IP: 10.1.1.2
Port: 60032
[DeviceA] display vsrp instance
VSRP instance name: forvlan20
VSRP peer name: fordhcppool
Backup ID: 1
Bound VRID: VRRP VRID 20 interface Vlan-interface20
Instance status: Master
Local status: Master
Peer status: Backup
Backup mode: Hot
Traffic backup interval: 10(minutes)
Traffic backup threshold: 50(MB)
VSRP instance name: forvlan30
VSRP peer name: fordhcppool
Backup ID: 2
Bound VRID: VRRP VRID 30 interface Vlan-interface30
Instance status: Backup
Local status: Backup
Peer status: Master
Backup mode: Hot
Traffic backup interval: 10(minutes)
Traffic backup threshold: 50(MB)
2. Verify that the TCP control channel state is Connected for all VSRP groups on Device B.
[DeviceB] display vsrp peer
VSRP peer name: fordhcppool
TCP status: Connected
Peer IP: 10.1.1.2
Local IP: 10.1.2.2
Port: 60032
[DeviceB] display vsrp instance
VSRP instance name: forvlan20
VSRP peer name: fordhcppool
Backup ID: 1
Bound VRID: VRRP VRID 20 interface Vlan-interface20
Instance status: Backup
Local status: Backup
Peer status: Master
Backup mode: Hot
Traffic backup interval: 10(minutes)
Traffic backup threshold: 50(MB)
VSRP instance name: forvlan30
VSRP peer name: fordhcppool
Backup ID: 2
Bound VRID: VRRP VRID 30 interface Vlan-interface30
Instance status: Master
Local status: Master
Peer status: Backup
Backup mode: Hot
Traffic backup interval: 10(minutes)
Traffic backup threshold: 50(MB)
Verifying the DHCP address pool backup information
Disable the NIC on Host A, and then enable the NIC. Verify that Device A can allocate IP address 10.1.20.10 to Host A, and you can also view the information on Device B. View VSRP logs on Device A and Device B to verify that Device A has backed up DHCP address information to Device B.
[DeviceA] display dhcp server ip-in-use
IP address Client-identifier/ Lease expiration Type
Hardware address
10.1.20.10 0108-0027-0038-f1 Jun 29 17:09:10 2024 Auto(C)
[DeviceB] display dhcp server ip-in-use
IP address Client-identifier/ Lease expiration Type
Hardware address
10.1.20.10 0108-0027-0038-f1 Jun 29 17:08:38 2024 Auto(C)



