Configuring an E-Trunk for Backup in a Link Aggregation Group
Enhanced Trunk (E-Trunk) implements inter-device link aggregation, ensuring device-level reliability.
Usage Scenario
Eth-Trunk implements link reliability between single devices. However, if a device fails, Eth-Trunk ceases to take effect.
To improve network reliability, carriers introduced the device redundancy method that requires master and backup devices. If the master device or primary link fails, the backup device can take over user services. In this situation, another device must be dual-homed to the master and backup devices, and inter-device link reliability must be ensured.
In dual-homing networking, Virtual Router Redundancy Protocol (VRRP) can be used to ensure device-level reliability, and Eth-Trunk can be used to ensure link reliability. In some cases, however, traffic cannot be switched to the backup device and secondary link simultaneously if the master device or primary link fails. As a result, traffic is interrupted. To address this issue, use Enhanced Trunk (E-Trunk) to implement both device-level and link reliability.
On the network shown in Figure 4-7, you can create an E-Trunk between PE1 and PE2 to implement backup in the E-Trunk link aggregation group, which improves network reliability.
Pre-configuration Tasks
Before Configuring an E-Trunk for Backup in a Link Aggregation Group, complete the following task:
Add Eth-Trunk interfaces working in manual load balancing mode to an E-Trunk.
- Configuring an Eth-Trunk Interface to Work in Manual Load Balancing Mode on the PEs.
- Configure Ethernet operation, administration and maintenance (OAM) on the CE and PEs to improve link reliability.
Add Eth-Trunk interfaces working in static LACP mode to an E-Trunk.
- Configuring an Eth-Trunk Interface to Work in Static LACP Mode on the CE and PEs.
- Before manually create a BFD session and bind it to an E-Trunk, Enabling BFD Globally and Establishing a BFD Session on the PEs.
- Before enable a device to automatically create a BFD session and bind the session to an E-Trunk, Enabling BFD Globally on the PEs.
Add a global VE interface to an E-Trunk.
- Create a global VE interface and configure it as an L2VE interface on the PEs.
- Enabling BFD Globally and Establishing a BFD Session on the PEs.
- Creating an E-Trunk
- Adding an Interface to an E-Trunk
- (Optional) Configuring E-Trunk Parameters
- (Optional) Configuring a Working Mode for an E-Trunk Member Interface
- (Optional) Binding an E-Trunk to BFD
- (Optional) Configuring an E-Trunk to Determine the Master/Backup Status of Devices Based on the Number of Available Eth-Trunk Member Linksor the Available Eth-Trunk Bandwidth
- Verifying the E-Trunk Configuration
Creating an E-Trunk
Eth-Trunk interfaces can be added only to a created E-Trunk. E-Trunk provides device-level reliability.
Procedure
- Run system-view
The system view is displayed.
- Run e-trunk e-trunk-id
An E-Trunk is created.
- Run either of the following commands to configure local
and peer IP addresses for the E-Trunk:
For an IPv4 network, run the peer-address peer-ip-address source-address source-ip-address [ vpn-instance vpn-instance-name ] command.
- For an IPv6 network, run the peer-ipv6 peer-ipv6-address source-ipv6 source-ipv6-address [ vpn-instance vpn-instance-name ] command.
The two IP addresses are peers for each other. For example, if an E-Trunk is created between Device A with IP address IP1 and Device B with IP address IP2, the peer IP address of Device A is IP2, and the peer IP address of Device B is IP1.
Change the local and peer IP addresses, neither or both. Otherwise, E-Trunk packets are discarded.
It is recommended that you configure the IP addresses for the local and peer devices in an E-Trunk as loopback interface addresses.
- Run commit
The configuration is committed.
Adding an Interface to an E-Trunk
An E-Trunk forwards packets through its member interfaces, which can be Eth-Trunk interfaces or global VE interfaces.
Context
Two E-Trunk-enabled devices must have the same E-Trunk ID, whereas the E-Trunk member interfaces can have different IDs. If two interfaces to be added to an E-Trunk have different IDs, the ID of the remote E-Trunk member interface must be specified when the local interface is added to an E-Trunk as a member interface.
Procedure
- Add an Eth-Trunk interface to an E-Trunk.
Run system-view
The system view is displayed.
Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Only Eth-Trunk interfaces in static LACP mode or manual load balancing mode can be added to E-Trunks.
If an Eth-Trunk interface in static LACP mode is added to an E-Trunk, do not configure the maximum number of active links for the Eth-Trunk interface on each of the dual-homing E-Trunk-enabled devices for user access. Otherwise, LACP cannot select correct interfaces as active interfaces for service forwarding.
(Optional) Run port ignore-lacp-state enable
The Eth-Trunk interface is configured to ignore its member interfaces' LACP negotiation status and make determinations based only on its member interfaces' physical status. This configuration improves service switchover performance and minimizes packet loss.
This configuration applies only to Eth-Trunk interfaces in static LACP mode.
Run e-trunk e-trunk-id [ remote-eth-trunk eth-trunk-id ]
The Eth-Trunk interface is added to the specified E-Trunk.
An Eth-Trunk interface can be added only to one E-Trunk.
If you want to add the Eth-Trunk interfaces with different IDs to the same E-Trunk, specify remote-eth-trunk in the command to ensure that the E-Trunk works properly.
- Add a global VE interface to an E-Trunk.
Run system-view
The system view is displayed.
Run interface global-ve ve-number
A global VE interface is created, and its view is displayed.
Run ve-group ve-group-id l2-terminate
The global VE interface is configured as an L2VE interface.
Run e-trunk e-trunk-id [ remote-global-ve global-ve-id ]
The global VE interface is added to the specified E-Trunk.
A global VE interface can be added only to one E-Trunk. If you want to add it to another E-Trunk, first remove it from the existing E-Trunk. In addition, one E-Trunk allows only one global VE interface to be added to it.
(Optional) Configuring E-Trunk Parameters
To ensure reliable E-Trunk communication, configure proper E-Trunk parameters.
Context
For an Eth-Trunk interface that is a member interface of an E-Trunk, the link aggregation control protocol (LACP) system priority and LACP system ID are referred to as the LACP E-Trunk system priority and LACP E-Trunk system ID, respectively.
When an E-Trunk consists of Eth-Trunk interfaces working in static LACP mode, each member Eth-Trunk interface and the connected peer Eth-Trunk interface use LACP E-Trunk system priorities to determine the priority of the device at either end of the Eth-Trunk link. The device with the higher priority functions as the LACP Actor and determines which member interfaces in its Eth-Trunk interface are active based on the interface priorities. The other device selects the member interfaces connected to the active member interfaces on the Actor as active member interfaces.
If the LACP E-Trunk system priority and LACP system priority are both configured, after an Eth-Trunk interface working in static LACP mode is added to an E-Trunk, only the LACP E-Trunk system priority takes effect for the Eth-Trunk interface.
If two devices have the same LACP E-Trunk system priority, the LACP E-Trunk system IDs are used to determine the devices' priorities. A smaller LACP E-Trunk system ID indicates a higher priority.
Procedure
- Configure E-Trunk parameters in the system view.
Run system-view
The system view is displayed.
Perform one or more operations in Table 4-10 to set the desired E-Trunk parameters.
Table 4-10 E-Trunk ParametersE-Trunk Parameter
Command
Description
LACP E-Trunk system ID
lacp e-trunk system-id mac-address
Two devices in an E-Trunk must have the same LACP E-Trunk system ID.
The step takes effect only for Eth-Trunk interfaces in static LACP mode that are added to an E-Trunk.
LACP E-Trunk system priority
lacp e-trunk priority priority
Two devices in an E-Trunk must have the same LACP E-Trunk system priority.
The step takes effect only for Eth-Trunk interfaces in static LACP mode that are added to an E-Trunk.
UDP/UDP6 port number used to send and receive E-Trunk packets
e-trunk port port-number
e-trunk ipv6 port port-number
The port-number value is in the range of 1025 to 65535. If the UDP port number in this range is used by another protocol, the port number cannot be used to send or receive E-Trunk packets.
E-Trunk is Huawei-specific. The default UDP/UDP6 port number used to send and receive E-Trunk packets may conflict with the UDP/UDP6 port number used by another protocol. To ensure the forwarding of E-Trunk packets, change the UDP/UDP6 port number used to send and receive E-Trunk packets.
The two devices in an E-Trunk must have the same UDP/UDP6 port number. If you change the UDP/UDP6 port number when E-Trunk is running, complete the change before E-Trunk negotiation times out.
If you change the UDP/UDP6 port number when E-Trunk is running, the two devices in the E-Trunk may not be able to communicate. If E-Trunk negotiation times out, both devices in the E-Trunk may become master devices.
Run commit
The configuration is committed.
- Configure E-Trunk parameters in the E-Trunk view.
Run system-view
The system view is displayed.
Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Perform one or more operations in Table 4-11 to set the desired E-Trunk parameters.
Table 4-11 E-Trunk ParametersE-Trunk Parameter
Command
Description
E-Trunk priority
priority priority
The priority values of the two devices are used to determine their master and backup status. The smaller the value, the higher the priority. The device with a higher E-Trunk priority functions as the master device. If the two devices have the same E-Trunk priority, the device with the smaller system ID functions as the master device.
E-Trunk authentication and encryption mode
authentication-mode { hmac-sha1 | hmac-sha256 | enhanced-hmac-sha256 }
To improve system security, configure the E-Trunk authentication and encryption mode.
Two devices in an E-Trunk must have the same E-Trunk authentication and encryption mode.
Configure the password for encrypting packets
security-key { simple simple-key | cipher { cipher-key1 | cipher-key2 | cipher-key3 } }
This enhances system security. The passwords for encrypting packets on the two ends in an E-Trunk must be the same. By default, the simple password is 00E0FC0000000000.
You can store the password in plain text or cipher text mode.When the password is stored in plain text mode, the password is displayed in plain text in the configuration file.
When the password is encrypted in cipher text mode, the password is displayed as garbled characters in the configuration file but not the real password.
- cipher-key1: If the password is entered in ciphertext, the value is a string of 32 to 432 characters.
- cipher-key2: A 24-character ciphertext password configured in an earlier version is also supported in this version.
- cipher-key3: If the password is entered in simple text, the value is a string of 1 to 255 case-sensitive characters, spaces not supported.
NOTICE:If the simple parameter is configured, the password is saved in the configuration file as plain text. Users at a lower level can easily obtain the password by viewing the configuration file. This threatens network security. Therefore, using the cipher parameter to save the password is recommended.
Configure the internal at which Hello packets are send
timer hello hello-value
If the peer device is the backup and does not receive Hello packets sent by the local device within the timeout period, the peer device becomes the master after timeout. The timeout period referred to in this case is contained in the Hello packet sent by the peer device rather than the local device.
If the Hello packet from the peer device does not contain the timeout period, the timeout period of the local device is used.
NOTE:Timeout period = Interval at which Hello packets are sent x Time multiplier for detecting Hello packets. You are recommended to set the Timeout period to larger than 5 minutes.
Configure the time multiplier for detecting Hello packets
timer hold-on-failure multiplier multiplier
The peer end checks the timeout period contained in received packets to check whether the local device times out. If the peer device is in the backup state and does not receive any Hello packets from the local end within the timeout period, the device enters the master state.
Configure the switchback delay time
timer revert delay delay-value
After the E-Trunk switchover delay is configured, the local member Eth-Trunk interface of the E-Trunk becomes master only when the switchback delay timer expires. This delays switching traffic on the member Eth-Trunk interface back to the master device, and therefore preventing service interruption.
NOTE:When a master device in an E-Trunk restores from a fault, run the revert disable command to enable the non-revertive function on the E-Trunk to prevent traffic loss caused by the traffic switchback.
The configured E-Trunk switchback delay must be the same on the upstream and downstream devices; otherwise, service traffic may be lost.
Configure the description for an E-Trunk
description description
The description command can be used to configure a description for an E-Trunk configured on a device. The description can contain the name of the remote device. This is convenient for maintenance.
Run commit
The configuration is committed.
(Optional) Configuring a Working Mode for an E-Trunk Member Interface
To enable proper traffic transmission, configure a working mode for an E-Trunk member interface. An E-Trunk member interface can work in automatic, forcible master, or forcible backup mode.
Context
If the local E-Trunk works in master mode, the local member interface also works in master mode.
If the local E-Trunk works in backup mode and the peer member interface fails, the local member interface works in master mode. If the local member interface receives a recovery message from the peer member interface, the local member interface enters the backup mode.
When E-Trunk member interfaces work in automatic mode, a change in the interval at which Hello packets are exchanged or the timeout period will result in master/backup status flapping. Therefore, configure the member interfaces to work in forcible master/backup mode before changing the interval at which Hello packets are exchanged. After master/backup status negotiation is complete, restore the member interfaces to the automatic mode.
Procedure
- Configure a working mode for a member Eth-Trunk interface
of an E-Trunk.
Run system-view
The system view is displayed.
Run interface eth-trunk trunk-id
The Eth-Trunk interface view is displayed.
Only Eth-Trunk interfaces in static LACP mode or manual load balancing mode can be added to E-Trunks.
If an Eth-Trunk interface in static LACP mode is added to an E-Trunk, do not configure the maximum number of active links for the Eth-Trunk interface on each of the dual-homing E-Trunk-enabled devices for user access. Otherwise, LACP cannot select correct interfaces as active interfaces for service forwarding.
Run e-trunk mode { auto | force-master | force-backup }
A working mode is configured for the Eth-Trunk interface that is added to the E-Trunk.
- Configure a working mode for a member global VE
interface of an E-Trunk.
Run system-view
The system view is displayed.
Run interface global-ve ve-number
A global VE interface is created, and its view is displayed.
Run e-trunk mode { auto | force-master | force-backup }
A working mode is configured for the global VE interface that is added to the E-Trunk.
(Optional) Binding an E-Trunk to BFD
If the master device in an E-Trunk fails, to ensure that the backup device promptly detects the failure and takes over traffic, bind the E-Trunk to a Bidirectional Forwarding Detection (BFD) session for fast failure detection.
Context
Manually create a BFD session and bind it to an E-Trunk.
- Manually create a BFD session, which is also called a static BFD session. The type of the BFD session must be BFD for IP.
- Manually bind the BFD session to an E-Trunk.
Enable a device to automatically create a BFD session and bind the session to an E-Trunk.
After a device is enabled to create a dynamic BFD session, the device automatically creates a BFD session and binds it to an E-Trunk.
Procedure
- Manually create a BFD session and bind it to an E-Trunk.
Run system-view
The system view is displayed.
Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Run e-trunk track bfd-session session-name bfd-session-name
A BFD session is bound to the E-Trunk.
Run commit
The configuration is committed.
- Enable a device to automatically create a BFD session and bind the session to an E-Trunk.
Run system-view
The system view is displayed.
Run e-trunk e-trunk-id
The E-Trunk view is displayed.
Run e-trunk bfd enable [ track interface interface-type interface-name ]
The device is enabled to create a dynamic BFD session. The device automatically creates a BFD session and binds it to an E-Trunk.
For example, an E-Trunk is deployed on PE1 and PE2. To enable a dynamic BFD session to rapidly detect the changes in the user-side interface on a PE, run the e-trunk bfd enable track interface interface-type interface-number command to associate the dynamic BFD session with the interface.
(Optional) Run e-trunk bfd { detect-multiplier multiplier | min-rx-interval interval | min-tx-interval interval }*
The local detection multiplier, minimum interval between receiving BFD packets, and minimum interval between sending BFD packets are set for the dynamic BFD session.
You can set proper BFD session parameters as required.
If a device does not receive BFD packets from its peer within a specified detection period, the device considers the link faulty and sets the BFD session to Down. To reduce system resource consumption, the device automatically changes the local receive interval to a random value greater than 1000 ms after detecting that the BFD session goes Down. When the BFD session goes Up again, the device restores the configured receive interval.
- Interval between sending BFD packets = max (Local minimum interval between sending BFD packets, Peer minimum interval between receiving BFD packets)
- Interval between receiving BFD packets = max (Peer minimum interval between sending BFD packets, Local minimum interval between receiving BFD packets)
- Detection period = Peer detection multiplier x max (Peer minimum interval between sending BFD packets, Local minimum interval between receiving BFD packets)
Run commit
The configuration is committed.
(Optional) Configuring an E-Trunk to Determine the Master/Backup Status of Devices Based on the Number of Available Eth-Trunk Member Links or the Available Eth-Trunk Bandwidth
When devices added to an E-Trunk greatly differ in their available Eth-Trunk member links, to maximize link bandwidth utilization, you can configure the E-Trunk to determine the master/backup status of the devices based on the number of available Eth-Trunk member links. You can also configure the E-Trunk to determine the master/backup status of the devices based on the available Eth-Trunk bandwidth.
Prerequisites
- The Eth-Trunk interfaces added to the E-Trunk have been configured to work in static LACP mode using the mode lacp-static command in the Eth-Trunk interface view.
- The Eth-Trunk interfaces added to the E-Trunk have been configured to work in automatic mode using the e-trunk mode auto command in the Eth-Trunk interface view.
Context
When E-Trunk member interfaces work in automatic mode, the E-Trunk determines the master/backup status of devices based on their E-Trunk priorities. If the E-Trunk priorities are the same, the E-Trunk determines the master/backup status of devices based on their system IDs. When devices added to an E-Trunk greatly differ in their available Eth-Trunk member links, to maximize link bandwidth utilization, you can configure the E-Trunk to determine the master/backup status of the devices based on the number of available Eth-Trunk member links. The device with a larger number of available Eth-Trunk member links is determined as the master, and the other device is then determined as the backup. You can also configure the E-Trunk to determine the master/backup status of the devices based on the available Eth-Trunk bandwidth. The device with a higher available Eth-Trunk bandwidth is determined as the master, and the other device is then determined as the backup.
Procedure
- Run system-view
The system view is displayed.
- Run e-trunk e-trunk-id
The E-Trunk view is displayed.
- Run e-trunk select { link-number | bandwidth }
The E-Trunk is configured to determine the master/backup status of the devices based on the number of available Eth-Trunk member links or the available Eth-Trunk bandwidth.
- Run commit
The configuration is committed.
Verifying the E-Trunk Configuration
After configuring an E-Trunk, verify the configuration, including the E-Trunk priority, system ID, source IP address, peer IP address, revertive switching delay, master/backup status, dynamic BFD session parameters, and E-Trunk description.
Procedure
- Run the display e-trunk etrunk-id command to check information about the E-Trunk.
- Run the display e-trunk bfd session command to check the binding between the dynamic BFD session and E-Trunk.
- Add an Eth-Trunk interface in static LACP mode to the E-Trunk and run the display lacp brief command to check brief LACP information.
- Creating an E-Trunk
- Adding an Interface to an E-Trunk
- (Optional) Configuring E-Trunk Parameters
- (Optional) Configuring a Working Mode for an E-Trunk Member Interface
- (Optional) Binding an E-Trunk to BFD
- (Optional) Configuring an E-Trunk to Determine the Master/Backup Status of Devices Based on the Number of Available Eth-Trunk Member Linksor the Available Eth-Trunk Bandwidth
- Verifying the E-Trunk Configuration