In general cases, reliability of networks is typically provided by way of link backup, i.e., there are a plurality of links between two devices, where one of the links is taken as a main link, and other links are taken as backup links. In normal cases, packets between those two devices are transferred using the main link. When the main link's failure occurs, the service data flow will be switched to one of the backup links to ensure normal operation of services.
With development of Ethernet technologies and increase of network traffic, there are more and more cases in which a Wide Area Network (WAN) uses Ethernet links. In order to increase reliability and stability of networks, an Ethernet link aggregation technology is proposed. Ethernet link aggregation is named as Link Aggregation (LA) for short, by which a plurality of Ethernet physical links are bundled into one logical link so as to increase link bandwidth. Meanwhile, those links bundle together may effectively improve link reliability by dynamic backup between each other. Using the technology of LA to aggregate a plurality of Ethernet links between two devices into one logical link may not only improve bandwidth utilization by load sharing among the plurality of Ethernet links, but also ensure convergence reliability after a single link fails.
Here, the WAN is used to realize interconnections among Local Area Networks (LANs) or Metropolitan Area Networks (MANs) in different areas. Devices in the WAN may include transmission devices such as a router and etc.
For simplicity and illustrative purposes, the present disclosure is described by referring to examples. In the following description, numerous specific details are set forth in order to provide a thorough understanding of the present disclosure. It will be readily apparent however, that the present disclosure may be practiced without limitation to these specific details. In other instances, some methods and structures have not been described in detail so as not to unnecessarily obscure the present disclosure. As used throughout the present disclosure, the term “includes” means includes but not limited to, the term “including” means including but not limited to. The term “based on” means based at least in part on. In addition, the terms “a” and “an” are intended to denote at least one of a particular element.
As shown in
In Block S302, at least two Ethernet sub-interfaces may be established on a first Ethernet interface of the first device, at least two Ethernet sub-interfaces may be established on a second Ethernet interface of the first device, and each Ethernet sub-interface is assigned to a Virtual Local Area Network (VLAN), where Ethernet sub-interfaces on the same Ethernet interface are assigned to different VLANs.
In one example, a routing device may act as an aggregation device. For each Ethernet interface of the routing device, a plurality of Ethernet sub-interfaces may be established on the Ethernet interface, and each Ethernet sub-interface is assigned to a VLAN.
In Block S304, an Ethernet sub-interface of the first Ethernet interface and an Ethernet sub-interface of the second Ethernet interface which belong to the same VLAN may be added into a link-aggregation group to establish an aggregated link with a second device.
For example, the second device may be an access device, or an aggregation device, or other devices, which is not limited in the present disclosure.
Through Block S304, the Ethernet sub-interfaces corresponding to the same VLAN on a plurality of Ethernet interfaces may be added to one link-aggregation group, where the Ethernet sub-interfaces added into the link-aggregation group are respectively located on different Ethernet interfaces.
Assuming that there are S Ethernet interfaces on the device, one Ethernet sub-interface corresponding to VLAN M may be established on each Ethernet interfaces, Ethernet sub-interfaces corresponding to VLAN M of S Ethernet interfaces may be added into one link-aggregation group, or Ethernet sub-interfaces corresponding to VLAN M of X (X<S) Ethernet interfaces may be added into one link-aggregation group. Here, Ethernet sub-interfaces may be established on all or a part of the Ethernet interfaces.
An aggregated link may be established for the Ethernet sub-interfaces on different Ethernet interfaces in the same link-aggregation group with the same peer device which is a device other than the local device, and is located at the opposite end of the aggregated link. For instance in the example above the first device is the local device and the second device is a peer device of the first device. Likewise, aggregated links may be established for one Ethernet interface with a plurality of peer devices through different Ethernet sub-interfaces in different link-aggregation groups. It is possible to establish an aggregated link across transmission devices between the local device and a peer device.
By the technical solution provided in the above example , a plurality of Ethernet sub-interfaces may be established on an Ethernet interface, and each Ethernet sub-interface is assigned to a VLAN, and the Ethernet sub-interfaces on a plurality of Ethernet interfaces which belong to the same VLAN may be added to one link-aggregation group. Because a plurality of Ethernet sub-interfaces may be established on the Ethernet interface while each Ethernet sub-interface may be added into one link-aggregation group, more link-aggregation groups may be established using a smaller number of Ethernet interfaces, so that by way of dynamic link aggregation, it is possible to use a smaller number of Ethernet interfaces on the device to establish aggregated links with more peer devices.
In Block S304, the process of adding the Ethernet sub-interface of the first Ethernet interface and the Ethernet sub-interface of the second Ethernet interface which belong to the same VLAN into the link-aggregation group to establish the aggregated link with the second device may be as shown in
In Block 11, it is determined whether the Ethernet sub-interface is in an UP state (i.e., in an usable state). If it is in the UP state, Block 12 is to be performed, and otherwise, Block 14 is to be performed.
In Block 12, the state of the Ethernet sub-interface is set as an INACTIVE state, a heartbeat packet is transmitted to a second device periodically through the Ethernet sub-interface at each pre-determined time interval, and it is determined periodically whether a heartbeat packet transmitted by the second device is received through the Ethernet sub-interface at each pre-determined time interval.
The heartbeat packet transmitted by one Ethernet sub-interface may carry a VLAN ID of the VLAN corresponding to the Ethernet sub-interface.
In Block 13, when the Ethernet sub-interface is in an INACTIVE state, if the first device has received the heartbeat packet transmitted by the second device through the Ethernet sub-interface for N successive times, the state of the Ethernet sub-interface is set as an ACTIVE state, and otherwise, the Ethernet sub-interface is kept in the INACTIVE state. Herein, N is a pre-determined value.
Subsequently, when the state of the Ethernet sub-interface is in the ACTIVE state, if the first device has not received the heartbeat packet transmitted by the second device through the Ethernet sub-interface for N successive times, the state of the Ethernet sub-interface is set as the INACTIVE state, and otherwise the Ethernet sub-interface is kept in the ACTIVE state; and when the Ethernet sub-interface is in the INACTIVE state, if the local device has received the heartbeat packet transmitted by the second device through the Ethernet sub-interface for N successive times, the state of the Ethernet sub-interface is set as the ACTIVE state, and otherwise the Ethernet sub-interface is kept in the INACTIVE state.
In practical implementation, when the way of dynamic aggregation is adopted, in one example, link detection may be made for links using a Link Aggregation Control Protocol (LACP) packet as the heartbeat packet. For one link, both the local device and the peer device may periodically transmit to the counterpart a LACP packet (referred to as the heartbeat packet) for link detection, and may periodically detect whether the heartbeat packet transmitted by the counterpart is received, so that they may determine whether a link failure occurs based on detection results.
In Block 14, the state of the Ethernet sub-interface is set as a DOWN state (i.e., an unusable state).
An Ethernet sub-interface may have three states: the DOWN state, the ACTIVE state and the INACTIVE state. An Ethernet sub-interface in the ACTIVE state is able to forward data packets, such as service packets or etc., while an Ethernet sub-interface in the INACTIVE state only transmits and receives LACP packets, and an Ethernet sub-interface in the DOWN state does not transmit or receive any packets.
By the heartbeat packets, it may keep alive of heartbeat and detect link failure for each Ethernet sub-interface in the link-aggregation group so that it may normally converge when a link fails.
Furthermore, when a data packet is transmitted to the second device, dependent on relevant information in a packet header of the data packet and using a pre-determined aggregation algorithm, the first device will select one Ethernet sub-interface from the Ethernet sub-interfaces in the ACTIVE state in the link-aggregation group to transmit the data packet, where the data packet may be a service packet or etc.
The aforementioned relevant information may be at least one of a source Media Access Control (MAC) address, a target MAC address, a source IP address, a target IP address and etc. In particular, Hash computation is made for the aforementioned relevant information to obtain one value (denoted as KEY). If the total number of the Ethernet sub-interfaces in the ACTIVE state in the link-aggregation group is equal to M, the value of KEY%M (denoted as S) is calculated, where S ranges from 0,1, . . . , (M-1), so that based on the value of S, it can be determined which one is the Ethernet sub-interface to be selected. For example, when S=0, the selected Ethernet sub-interface is the one which is the first to be in the ACTIVE state in the link-aggregation group; when S=1, the selected Ethernet sub-interface is the one which is the second to be in ACTIVE state in the link-aggregation group, and so on. In other words, based on the value of S, the relative location in the link-aggregation group for the Ethernet sub-interface to be selected may be determined.
In one example, as shown in
In Block S402, two Ethernet sub-interfaces Interface11 and Interface12 are established on the first Ethernet interface Interface1. The corresponding VLAN for Ethernet sub-interface Interface11 is set as VLAN1, and the corresponding VLAN for Ethernet sub-interface Interface12 is set as VLAN2. Likewise, two Ethernet sub-interfaces are established on Ethernet interface Interface2, i.e., Interface21 and Interface22, and the corresponding VLAN for Ethernet sub-interface Interface21 is set as VLAN1, and the corresponding VLAN for Ethernet sub-interface Interface22 is set as VLAN2.
In Block S404, as shown in
Thus, as shown in
In Block S406, aggregated links are established for link-aggregation group 1 with a second device and link-aggregation group 2 with a third device. The second and third devices may be referred to as peer devices of the first device. In one example the second and third devices may be access layer devices.
In one example, as shown in
In Block S502, for each Ethernet sub-interface in the link-aggregation group, it is determined whether the Ethernet sub-interface is in the UP state. If it is in the UP state, Block S506 is to be performed; and otherwise, Block S504 is to be performed.
In Block S504, the state of the Ethernet sub-interface is set as the DOWN state.
In Block S506, the state of the Ethernet sub-interface is set as the INACTIVE state, and with a period of T, the local device periodically transmits a heartbeat packet to a second device through the Ethernet sub-interface, and at the same time with the period of T, periodically determines whether a heartbeat packet transmitted by the second device is received through the Ethernet sub-interface. In one example, the local device sets value N of a keepalive-counter to be 3.
In Block S508, it is determined whether the heartbeat packet is received within a time interval T. If yes, Block S510 is to be performed; and otherwise, Block S516 is to be performed.
In Block S510, the value of the keepalive-counter is decreased by 1, and Block S512 is to be performed.
In Block S512, it is determined whether the value of the keepalive-counter is equal to 0. If yes, Block S514 is to be performed; and otherwise, Block S508 is to be performed.
In Block S514, the state of the Ethernet sub-interface is set as the ACTIVE state, and Block S508 is to be performed.
The Ethernet sub-interface in the ACTIVE state is able to transmit and receive service packets;
In Block S516, it is determined whether the value of the keepalive-counter is less than 3. If yes, Block S518 is to be performed; and otherwise, Block S508 is to be performed.
In Block S518, the value of the keepalive-counter is increased by 1, and Block S520 is to be performed.
In Block S520, it is determined whether the value of the keepalive-counter is equal to 3. If yes, Block S522 is to be performed; and otherwise, Block S508 is to be performed.
In Block S522, the state of the Ethernet sub-interface is set as the INACTIVE state, and Block S508 is to be performed.
The Ethernet sub-interface in the INACTIVE state does not transmit and receive service packets, but it transmits and receives heartbeat packets.
In one example, an apparatus of dynamic link aggregation is provided.
As shown in
The sub-interface establishment and setting module 10 may be to establish at least two Ethernet sub-interfaces on a first Ethernet interface of the first device and at least two Ethernet sub-interfaces on a second Ethernet interface of the first device, assign each Ethernet sub-interface to a VLAN, where Ethernet sub-interfaces on the same Ethernet interface are assigned to different VLANs.
The link-aggregation group adding module 20 may be to add an Ethernet sub-interface of the first Ethernet interface and an Ethernet sub-interface of the second Ethernet interface which belong to the same VLAN into a link-aggregation group to establish an aggregated link with a second device.
The link-aggregation group adding module 20 may include a determination unit, a transmit-receive unit and a state setting unit.
The determination unit may be to, for each Ethernet sub-interface added into the link-aggregation group, determine whether the Ethernet sub-interface is in the UP state.
The transmit-receive unit may be to, if the determination unit determines that the Ethernet sub-interface is in the UP state, transmit a heartbeat packet to a second device periodically through the Ethernet sub-interface at each pre-determined time interval, and periodically determine at each pre-determined time interval whether a heartbeat packet transmitted by the second device is received through the Ethernet sub-interface.
The state setting unit may be to, if the determination unit determines that the Ethernet sub-interface is in the UP state, set the state of the Ethernet sub-interface as the INACTIVE state; and if the determination unit determines that the Ethernet sub-interface is not in the UP state, set the state of the Ethernet sub-interface as the DOWN state; and when the Ethernet sub-interface is in the INACTIVE state, if the transmit-receive unit has received the heartbeat packet transmitted by the second device through the Ethernet sub-interface for N successive times, set the state of the Ethernet sub-interface as the ACTIVE state, where N is a pre-determined value.
In addition, the state setting unit may be further to, if the Ethernet sub-interface is in the ACTIVE state, if the transmit-receive unit has not received the heartbeat packet transmitted by the second device through the Ethernet sub-interface for N successive times, set the state of the Ethernet sub-interface as the INACTIVE state, and otherwise keep the state of the Ethernet sub-interface in the ACTIVE state, where the heartbeat packet is an LACP packet.
The apparatus as shown in
In addition, as shown in
The Ethernet sub-interfaces added into the link-aggregation group may be the Ethernet sub-interfaces with the same VLAN of partial or all of the at least two Ethernet interfaces.
The aggregated link may be established through transmission devices between the local device and the second device.
The apparatus as shown in
To sum up, the above examples of the present disclosure may achieve the following effects:
A plurality of Ethernet sub-interfaces are established on an Ethernet interface, and each Ethernet sub-interface is assigned to a VLAN, and the Ethernet sub-interfaces on a plurality of Ethernet interfaces which belong to the same VLAN are added to one link-aggregation group. Because multiple Ethernet sub-interfaces may be established on the Ethernet interface, and each Ethernet sub-interface may be added into one link-aggregation group, more link-aggregation groups may be established using a smaller number of Ethernet interfaces, so that when the way of dynamic aggregation is adopted, it is possible to use a smaller number of Ethernet interfaces on one device to establish aggregated links with more peer devices, thereby reducing the device's cost.
The above-mentioned are only examples of the present disclosure and are not intended to limit the present application. Any modifications, equivalents, variations and etc., of the present disclosure should be included in the scope protected by the present application.
Number | Date | Country | Kind |
---|---|---|---|
201310452895.8 | Sep 2013 | CN | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/CN2014/087646 | 9/28/2014 | WO | 00 |