CN108900406B - Flow forwarding method and device - Google Patents

Flow forwarding method and device Download PDF

Info

Publication number
CN108900406B
CN108900406B CN201810671602.8A CN201810671602A CN108900406B CN 108900406 B CN108900406 B CN 108900406B CN 201810671602 A CN201810671602 A CN 201810671602A CN 108900406 B CN108900406 B CN 108900406B
Authority
CN
China
Prior art keywords
aggregation
port
tunnel
ports
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201810671602.8A
Other languages
Chinese (zh)
Other versions
CN108900406A (en
Inventor
程剑锋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Information Technologies Co Ltd
Original Assignee
Hangzhou H3C Technologies Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hangzhou H3C Technologies Co Ltd filed Critical Hangzhou H3C Technologies Co Ltd
Priority to CN201810671602.8A priority Critical patent/CN108900406B/en
Publication of CN108900406A publication Critical patent/CN108900406A/en
Application granted granted Critical
Publication of CN108900406B publication Critical patent/CN108900406B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4633Interconnection of networks using encapsulation techniques, e.g. tunneling
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L12/00Data switching networks
    • H04L12/28Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
    • H04L12/46Interconnection of networks
    • H04L12/4641Virtual LANs, VLANs, e.g. virtual private networks [VPN]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • H04L45/745Address table lookup; Address filtering
    • H04L45/7453Address table lookup; Address filtering using hashing

Abstract

The invention provides a flow forwarding method and a device, wherein the method comprises the following steps: when at least one target tunnel port exists in an equivalent multi-route group pointed by a second-layer virtual next hop exit, updating member ports in the equivalent multi-route group according to the corresponding relation between the target tunnel port and an aggregation port; when the two-layer unicast traffic needs to be forwarded through the two-layer virtual next hop exit, selecting a target aggregation port from the updated equivalent multi-route group by using a hash algorithm, and selecting a target aggregation member port from the target aggregation ports by using the hash algorithm; and forwarding the two-layer unicast traffic through the target aggregation member port. The embodiment of the invention can improve the link balance and the utilization rate when the two-layer unicast flow is forwarded.

Description

Flow forwarding method and device
Technical Field
The present invention relates to the field of network communication technologies, and in particular, to a traffic forwarding method and apparatus.
Background
VXLAN (Virtual eXtensible Local Area Network) is a two-layer VPN (Virtual Private Network) technology based on an IP (Internet Protocol) Network and adopting an "MAC (Media Access Control) in UDP (User Datagram Protocol)" encapsulation form. VXLAN can provide two-layer interconnection for dispersed physical sites based on existing service provider or enterprise IP networks and can provide service isolation for different tenants.
In three-tier forwarding of VXLAN, a three-tier Hash (Hash) of the traffic can be implemented.
As shown in fig. 1, a VTEP (VXLAN Tunnel End Point ) device queries a three-layer forwarding entry according to a source IP address and a destination IP address of three-layer unicast traffic, and obtains an Equal-Cost Multi-path Routing (ECMP) Group (Group) 1 of a first level; ECMP Group1 includes two member ports: tunnel portal 1 and Tunnel portal 2; the VTEP device selects one virtual member port (assumed to be Tunnel port 1) by hashing (primary hashing); since the ECMP Group2 of the second stage pointed to by Tunnel Port1 includes two member ports: r1 and R2, the VTEP device may select one of the member ports (assumed to be R1) by hashing (two-level hashing); because R1 is an aggregation Port (a route aggregation Port or a Virtual Local Area Network (VLAN) Virtual interface configured on the aggregation Port), the VTEP device may select one of the physical interfaces (Port1 or Port2) to forward traffic again through a hash (three-level hash), thereby implementing a three-level hash function of traffic, and traffic is uniformly forwarded from each tunnel Port/each aggregation Port/each physical interface.
However, practice finds that, in the existing traffic forwarding scheme, for the two-layer unicast traffic, because the chip limits that the ECMP Group cannot be found through the virtual interface twice, the Tunnel port cannot point to the ECMP Group any more, that is, the exit of the Tunnel port cannot be multiple aggregation ports, that is, the two-layer unicast traffic cannot implement three-level hash, link balance and utilization rate are poor when the two-layer unicast traffic is forwarded, and when the traffic is large, networking stability is easily affected due to link congestion.
Disclosure of Invention
The invention provides a traffic forwarding method and a traffic forwarding device, which are used for solving the problem that a VTEP device in the existing VXLAN networking cannot realize three-level hash on two-layer unicast traffic.
According to a first aspect of the embodiments of the present invention, there is provided a traffic forwarding method, applied to a VTEP device, the method including:
when at least one target tunnel port exists in an equivalent multi-route group pointed by a second-layer virtual next hop exit, updating member ports in the equivalent multi-route group according to the corresponding relation between the target tunnel port and an aggregation port; the target tunnel portal points to a plurality of aggregation portals, the updated member ports in the equivalent multi-routing group are associated interfaces of the tunnel portal and the aggregation portals, and each member port points to the aggregation portal corresponding to each tunnel portal;
when the two-layer unicast traffic needs to be forwarded through the two-layer virtual next hop exit, selecting a target aggregation port from the updated equivalent multi-route group by using a hash algorithm, and selecting a target aggregation member port from the target aggregation ports by using the hash algorithm;
and forwarding the two-layer unicast traffic through the target aggregation member port.
According to a second aspect of the embodiments of the present invention, there is provided a traffic forwarding apparatus, applied to a VTEP device, the apparatus including:
the updating unit is used for updating member ports in the equivalent multi-path routing group according to the corresponding relation between the target tunnel port and the aggregation port when at least one target tunnel port exists in the equivalent multi-path routing group pointed by the second-layer virtual next hop exit; the target tunnel portal points to a plurality of aggregation portals, the updated member ports in the equivalent multi-routing group are associated interfaces of the tunnel portal and the aggregation portals, and each member port points to the aggregation portal corresponding to each tunnel portal;
a selecting unit, configured to select a target aggregation port from the updated equivalent multi-route group by using a hash algorithm when it is required to forward a two-layer unicast traffic through the two-layer virtual next hop exit, and select a target aggregation member port from the target aggregation port by using the hash algorithm;
and the forwarding unit is used for forwarding the two-layer unicast flow through the target aggregation member port.
By applying the embodiment of the invention, when the equivalent multi-route group pointed by the second-layer virtual next hop exit has the target tunnel ports pointed to a plurality of aggregation ports, the member ports in the equivalent multi-route group are updated according to the corresponding relation between the target tunnel ports and the aggregation ports, so that the equivalent multi-route group is updated to the associated interfaces between the tunnel ports and the corresponding aggregation ports from the tunnel ports, when the second-layer unicast traffic needs to be forwarded through the second-layer virtual next hop exit, the target aggregation ports are selected from the updated equivalent multi-route group by using a hash algorithm, then the target aggregation member ports are selected from the target aggregation ports by using the hash algorithm, and further, the second-layer unicast traffic is forwarded through the target aggregation member ports, so that the three-level hash of the second-layer unicast traffic is realized, the link balance and the utilization rate of the second-layer unicast traffic during forwarding are improved, and the stability of networking is further improved.
Drawings
FIG. 1 is a schematic diagram of a port mapping;
fig. 2 is a schematic flow chart of a traffic forwarding method according to an embodiment of the present invention;
fig. 3A is a schematic diagram of a port mapping according to an embodiment of the present invention;
fig. 3B is a schematic diagram of an updated port mapping corresponding to fig. 3A according to an embodiment of the present invention;
fig. 4A is a schematic diagram of a port mapping according to an embodiment of the present invention;
fig. 4B is a schematic diagram of an updated port mapping corresponding to fig. 4A according to an embodiment of the present invention;
fig. 5A is a schematic diagram of a port mapping according to an embodiment of the present invention;
fig. 5B is a schematic diagram of an updated port mapping corresponding to fig. 5A according to an embodiment of the present invention;
fig. 6 is a schematic structural diagram of a traffic forwarding apparatus according to an embodiment of the present invention.
Detailed Description
In order to make the technical solutions in the embodiments of the present invention better understood and make the above objects, features and advantages of the embodiments of the present invention more comprehensible, the technical solutions in the embodiments of the present invention are described in further detail below with reference to the accompanying drawings.
Referring to fig. 2, a schematic flow chart of a traffic forwarding method provided in an embodiment of the present invention is shown, where the traffic forwarding method may be applied to a VTEP device, and as shown in fig. 2, the traffic forwarding method may include the following steps:
it should be noted that, in the embodiment of the present invention, unless otherwise specified, all the tunnel ports mentioned refer to VXLAN tunnel ports, and the embodiment of the present invention is not repeated in the following.
Step 201, when at least one target tunnel portal exists in an equivalent multi-route group pointed by a two-layer virtual next hop exit, updating member ports in the equivalent multi-route group according to the corresponding relationship between the target tunnel portal and an aggregation portal; and the updated member ports in the equivalent multi-route group are associated interfaces of the tunnel ports and the aggregation ports, and each member port points to the aggregation port corresponding to each tunnel port.
In this embodiment of the present invention, for any Virtual next hop (VN) exit on the VTEP device, for example, a VN exit in any local two-layer forwarding table entry of the VTEP device, when at least one target tunnel portal exists in an equivalent multi-route Group (ECPM Group) to which the VN exit points, the VTEP device may associate each tunnel portal in the equivalent multi-route Group with its corresponding aggregation portal, and update an association interface between the tunnel portal and the aggregation portal to a member portal in the equivalent multi-route Group.
The target tunnel portal points to multiple aggregation portals, that is, the target tunnel portal is a tunnel portal pointing to multiple aggregation portals in the equivalent multipath routing group.
For example, assuming that the equivalent multi-route group pointed by the two-layer virtual next hop exit VN1 includes Tunnel ports Tunnel port1 and Tunnel port2, where Tunnel port1 points to aggregation ports int R1 and int R2, and Tunnel port2 points to aggregation ports int R3 and int R4, since the VN1 has target Tunnel ports (Tunnel port1 and Tunnel port2), the VTEP device may associate each Tunnel port in the equivalent multi-route group with its corresponding aggregation port, that is, Tunnel port1 is associated with int R1 and int R2, and Tunnel port2 is associated with int R3 and int R4, that is, the updated multi-route equivalent multi-route group includes member ports in the group: tunnel portal 1int R1, Tunnel portal 1int R2, Tunnel portal 2int R3, Tunnel portal 2int R4.
Step 202, when the two-layer unicast traffic needs to be forwarded through the two-layer virtual next hop exit, selecting a target aggregation port from the updated equivalent routing group by using a hash algorithm, and selecting a target aggregation member port from the target aggregation ports by using the hash algorithm.
In this embodiment of the present invention, when receiving a layer two unicast traffic, a VTEP device may query a local layer two forwarding table entry according to a destination MAC (Media Access Control) address and a VSI (Virtual Switch Instance) of the layer two unicast traffic, so as to determine a layer two Virtual next hop exit for forwarding the layer two unicast traffic.
When the VTEP device determines that it needs to pass through the layer two virtual next hop exit in step 201, the VTEP device may select an aggregation port (referred to as a target aggregation port herein) for traffic forwarding from the updated equivalent multiple routing group pointed to by the layer two virtual next hop exit by using a hash algorithm, and further select an aggregation member port (referred to as a target aggregation member port herein) for traffic forwarding from aggregation member ports included in the target aggregation port by using the hash algorithm.
Still taking the above example as an example, when the VTEP device determines that it needs to forward the layer two unicast traffic through the VN1, the VTEP device may first select a target aggregation port from the updated equivalent multi-route group, such as Tunnel port 1int R1, by using the hash algorithm, and then select a target aggregation member port from the target aggregation port, including the aggregation member port, by using the hash algorithm again.
In the embodiment of the present invention, because the member port in the updated equivalent multi-route group is the associated interface between the tunnel port and the aggregation port, when the VTEP device selects the target aggregation port from the updated equivalent route group by using the hash algorithm, two-stage hash is completed by using the one-time hash algorithm: the hash of the tunnel port and the hash of the aggregation port corresponding to the tunnel port are carried out, and then, the three-level hash of the two-layer unicast flow is realized through the two-time hash algorithm, and the two-layer unicast flow can be uniformly forwarded from each tunnel port/each aggregation port/each physical interface.
It should be noted that, in the embodiment of the present invention, in order to ensure uniform hash on a Tunnel portal, when a member port in an equivalent multi-route group is updated, it may be ensured that the number of associated interfaces corresponding to each Tunnel portal is the same, for example, the number of associated interfaces corresponding to Tunnel portal 1 and Tunnel portal 2in the previous example is 2, and the specific implementation thereof may be described below with reference to a specific example.
Step 203, forwarding the layer two unicast traffic through the target aggregation member port.
In the embodiment of the invention, after determining the target aggregation member port for forwarding the traffic, the VTEP device can forward the two-layer unicast traffic through the target aggregation member port.
As can be seen, in the method flow shown in fig. 2, when a target tunnel portal exists in an equivalent multi-route group pointed by a second-layer virtual next hop egress, a member port in the equivalent multi-route group is updated from the tunnel portal to an associated interface between the tunnel portal and an aggregation portal (an aggregation portal corresponding to the tunnel portal), and then, the VTEP device can implement a second-level hash through a first-level hash algorithm: the hash of the tunnel port and the hash of the aggregation port are carried out, and the hash of the aggregation member port is realized by using the hash algorithm again, so that the three-level hash of the two-layer unicast flow is realized, the link balance and the utilization rate of the two-layer unicast flow during forwarding are improved, and the networking stability is further improved.
In order to enable those skilled in the art to better understand the technical solutions provided by the embodiments of the present invention, the technical solutions provided by the embodiments of the present invention are described below with reference to specific examples.
Example one
Referring to fig. 3A, a port mapping schematic diagram corresponding to a two-layer virtual next hop egress provided by the embodiment of the present invention is shown in fig. 3A, in this embodiment, a two-layer virtual next hop egress VN points to an equivalent multiple routing group, member ports of the equivalent multiple routing group include Tunnel ports int 1 and Tunnel2, an egress of Tunnel port1 includes aggregation ports int R1 and int R2, and an egress of Tunnel port2 includes aggregation ports int R3 and int R4; the aggregate member ports of aggregate Port int R1 include Port1 and Port2, the aggregate member ports of aggregate Port int R2 include Port3 and Port4, the aggregate member ports of aggregate Port int R3 include Port5 and Port6, and the aggregate member ports of aggregate Port int R4 include Port7 and Port 8.
In this embodiment, the VTEP device may determine that there is a target tunnel portal in the equivalent multipath group pointed to by VN: because the number of the aggregation ports corresponding to each Tunnel port in the equivalent multi-routing group pointed by VN is the same, the VTEP device can associate each Tunnel port with its corresponding aggregation port respectively according to the correspondence between Tunnel port1 and aggregation port and the correspondence between Tunnel port2 and aggregation port, to obtain an association interface: tunnel portal 1int R1, Tunnel portal 1int R2, Tunnel portal 2int R3, Tunnel portal 2int R4.
The VTEP device may update the member ports in the equivalent multi-route group pointed by the VN to the obtained associated interfaces, where a port mapping diagram corresponding to the updated VN is shown in fig. 3B.
When the VTEP device needs to forward the layer two unicast traffic through the VN, the VTEP device may first select a member port (i.e., a target aggregation port) for traffic forwarding from the member ports in the updated equivalent multi-routing group corresponding to the VN by using a hash algorithm.
Assuming that the target aggregation Port in the selection of the VTEP device is Tunnel Port 1intR2, the VTEP device may further select an aggregation member Port (i.e., target aggregation member Port) for traffic forwarding from aggregation member ports (Port3 and Port4) of int R2 by using a hash algorithm.
Assuming that the target aggregation member Port selected by the VTEP device is Port3, the VTEP device may forward the layer two unicast traffic through Port 3.
Example two
Referring to fig. 4A, a port mapping schematic diagram corresponding to a two-layer virtual next hop egress provided by the embodiment of the present invention is shown in fig. 4A, in this embodiment, a two-layer virtual next hop egress VN points to an equivalent multiple routing group, member ports of the equivalent multiple routing group include Tunnel ports 1 and Tunnel2, where an egress of Tunnel port1 includes an aggregation port int R1, and an egress of Tunnel port2 includes aggregation ports int R3 and int R4; the aggregate member ports of aggregate Port int R1 include Port1 and Port2, the aggregate member ports of aggregate Port int R3 include Port5 and Port6, and the aggregate member ports of aggregate Port int R4 include Port7 and Port 8.
In this embodiment, the VTEP device may determine that there is a target tunnel portal in the equivalent multipath group pointed to by VN: tunnel port2, because the quantity that each Tunnel corresponds in the equivalent multiple routing group that VN points to is different in the aggregation mouth, and the quantity that Tunnel port2 corresponds the aggregation mouth is the integral multiple (2 times) of the quantity that Tunnel port1 corresponds, consequently, in order to guarantee the even hash of Tunnel port, VTEP equipment can duplicate the aggregation mouth that Tunnel port1 corresponds, make the quantity that Tunnel port1 corresponds the aggregation mouth the same with the quantity that Tunnel port2 corresponds, and associate each Tunnel port respectively with its corresponding aggregation mouth, obtain the associated interface: tunnel portal 1int R1, Tunnel portal 1int R1, Tunnel portal 2int R3, Tunnel portal 2int R4.
The VTEP device may update the member ports in the equivalent multi-route group pointed by the VN to the obtained associated interfaces, where a port mapping diagram corresponding to the updated VN is shown in fig. 4B.
When the VTEP device needs to forward the layer two unicast traffic through the VN, the VTEP device may first select a member port (i.e., a target aggregation port) for traffic forwarding from the member ports in the updated equivalent multi-routing group corresponding to the VN by using a hash algorithm.
Assuming that the target aggregation Port in the selection of the VTEP device is Tunnel Port 2intR3, the VTEP device may further select an aggregation member Port (i.e., target aggregation member Port) for traffic forwarding from aggregation member ports (Port5 and Port6) of int R3 by using a hash algorithm.
Assuming that the target aggregation member Port selected by the VTEP device is Port6, the VTEP device may forward the layer two unicast traffic through Port 6.
EXAMPLE III
Referring to fig. 5A, a port mapping schematic diagram corresponding to a two-layer virtual next hop egress provided in the embodiment of the present invention is shown in fig. 5A, in this embodiment, a two-layer virtual next hop egress VN points to an equivalent multiple routing group, member ports of the equivalent multiple routing group include Tunnel ports 1 and Tunnel2, where an egress of Tunnel port1 includes aggregation ports int R1 and int R2, and an egress of Tunnel port2 includes aggregation ports int R3, int R4, and int R5; the aggregate member ports of aggregate Port int R1 include Port1 and Port2, the aggregate member ports of aggregate Port int R2 include Port3 and Port4, the aggregate member ports of aggregate Port int R3 include Port5 and Port6, the aggregate member ports of aggregate Port int R4 include Port7 and Port8, and the aggregate member ports of aggregate Port int R5 include Port9 and Port 10.
In this embodiment, the VTEP device may determine that there is a target tunnel portal in the equivalent multipath group pointed to by VN: because the number of aggregation ports corresponding to each Tunnel in the equivalent multi-route group pointed by VN is different, and the number of aggregation ports corresponding to Tunnel port2 is not an integral multiple of the number of aggregation ports corresponding to Tunnel port1, therefore, in order to ensure uniform hash of Tunnel ports, the VTEP device may determine the minimum common multiple (6) of the number of aggregation ports corresponding to Tunnel port1 and the number of aggregation ports corresponding to Tunnel port2, and then the VTEP device may copy the aggregation ports corresponding to Tunnel port1 and Tunnel port2, so that the number of aggregation ports corresponding to Tunnel port1 and Tunnel port2 is the same, and associate each Tunnel port with its corresponding aggregation port, to obtain an association interface: tunnel portal 1int R1, Tunnel portal 1int R2, Tunnel portal 1int R1, Tunnel portal 1int R2, Tunnel portal 1int R1, Tunnel portal 1int R2, Tunnel portal 2int R3, Tunnel portal 2int R4, Tunnel portal 2int R5, Tunnel portal 2int R3, Tunnel portal 2int R4, Tunnel portal 2int R5.
The VTEP device may update the member ports in the equivalent multi-route group pointed by the VN to the obtained associated interfaces, where a port mapping diagram corresponding to the updated VN is shown in fig. 5B.
When the VTEP device needs to forward the layer two unicast traffic through the VN, the VTEP device may first select a member port (i.e., a target aggregation port) for traffic forwarding from the member ports in the updated equivalent multi-routing group corresponding to the VN by using a hash algorithm.
Assuming that the target aggregation Port in the selection of the VTEP device is Tunnel Port 2intR5, the VTEP device may further select an aggregation member Port (i.e., target aggregation member Port) for traffic forwarding from aggregation member ports (Port9 and Port10) of int R5 by using a hash algorithm.
Assuming that the target aggregation member Port selected by the VTEP device is Port9, the VTEP device may forward the layer two unicast traffic through Port 9.
It can be seen from the above description that, in the technical solution provided in the embodiment of the present invention, when there is a target tunnel port pointing to multiple aggregation ports in an equivalent multi-route group pointed by a two-layer virtual next-hop egress, a member port in the equivalent multi-route group is updated according to a corresponding relationship between the target tunnel port and the aggregation port, so that the equivalent multi-route group is updated from the tunnel port to an associated interface between the tunnel port and the corresponding aggregation port, when two-layer unicast traffic needs to be forwarded through the two-layer virtual next-hop egress, a hash algorithm is used to select a target aggregation port from the updated equivalent multi-route group, then a hash algorithm is used to select a target aggregation member port from the target aggregation port, and further, the two-layer unicast traffic is forwarded through the target aggregation member port, thereby implementing three-level hash of the two-layer unicast traffic, and improving link balance and utilization rate when the two-layer unicast traffic is forwarded, and then the stability of networking is improved.
Referring to fig. 6, a schematic structural diagram of a traffic forwarding apparatus according to an embodiment of the present invention is provided, where the apparatus may be applied to a target device in the foregoing method embodiment, and as shown in fig. 6, the apparatus may include:
an updating unit 610, configured to update member ports in an equivalent multi-route group pointed by a second-layer virtual next hop exit according to a correspondence between a target tunnel portal and an aggregation portal when at least one target tunnel portal exists in the equivalent multi-route group; the target tunnel portal points to a plurality of aggregation portals, the member ports in the updated equivalent multi-routing group are the association interfaces of the tunnel portal and the aggregation portal, and each member port points to the aggregation portal corresponding to each tunnel portal;
a selecting unit 620, configured to select a target aggregation port from the updated equivalent multi-route group by using a hash algorithm when it is required to forward a two-layer unicast traffic through the two-layer virtual next hop egress, and select a target aggregation member port from the target aggregation port by using the hash algorithm;
a forwarding unit 630, configured to forward the layer two unicast traffic through the target aggregation member port.
In an optional embodiment, the updating unit 610 is specifically configured to, when the number of aggregation ports corresponding to each tunnel port in the equivalent multi-route group is the same, associate each tunnel port with its corresponding aggregation port respectively, so as to obtain a member port in the updated equivalent route group.
In an optional embodiment, the updating unit 610 is specifically configured to, when the number of aggregation ports corresponding to each tunnel port in the equivalent routing group is not completely the same, make the number of aggregation ports corresponding to each tunnel port the same in an aggregation port duplication manner, and associate each tunnel port with its corresponding aggregation port respectively, so as to obtain a member port in the updated equivalent routing group.
In an optional embodiment, the updating unit 610 is specifically configured to, when the number of aggregation ports corresponding to the first target tunnel port is an integer multiple of the number of aggregation ports corresponding to any remaining tunnel ports, copy all aggregation ports corresponding to any remaining tunnel port, so that the number of aggregation ports corresponding to any remaining tunnel port is the same as the number of aggregation ports corresponding to the first target tunnel port; the first target tunnel portal is the target tunnel portal with the largest number of corresponding aggregation portals.
In an optional embodiment, the updating unit 610 is specifically configured to determine a least common multiple of the number of aggregation ports corresponding to each tunnel port when the number of aggregation ports corresponding to the first target tunnel port is not an integer multiple of the number of aggregation ports corresponding to the remaining at least one tunnel port; the first target tunnel portal is the target tunnel portal with the largest number of corresponding aggregation portals;
and for any tunnel portal, copying all the corresponding aggregation ports so as to enable the number of the aggregation ports corresponding to the tunnel portal to reach the least common multiple.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the invention. One of ordinary skill in the art can understand and implement it without inventive effort.
It can be seen from the above embodiments that, when there is a target tunnel port pointing to multiple aggregation ports in an equivalent multi-route group pointed to by a two-layer virtual next hop egress, a member port in the equivalent multi-route group is updated according to a corresponding relationship between the target tunnel port and the aggregation port, so that the equivalent multi-route group is updated from the tunnel port to an associated interface between the tunnel port and the corresponding aggregation port, when two-layer unicast traffic needs to be forwarded through the two-layer virtual next hop egress, a hash algorithm is used to select a target aggregation port from the updated equivalent multi-route group, and then a hash algorithm is used to select a target aggregation member port from the target aggregation port, so that the two-layer unicast traffic is forwarded through the target aggregation member port, thereby implementing three-level hash of the two-layer unicast traffic, improving link balance and utilization rate when the two-layer unicast traffic is forwarded, and further improving stability of networking.
Other embodiments of the invention will be apparent to those skilled in the art from consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the invention following, in general, the principles of the invention and including such departures from the present disclosure as come within known or customary practice within the art to which the invention pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the invention being indicated by the following claims.
It will be understood that the invention is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the invention is limited only by the appended claims.

Claims (10)

1. A traffic forwarding method is applied to a virtual local area network tunnel endpoint (VTEP) device, and is characterized by comprising the following steps:
when at least one target tunnel port exists in an equivalent multi-route group pointed by a second-layer virtual next hop exit, updating member ports in the equivalent multi-route group according to the corresponding relation between the target tunnel port and an aggregation port; the target tunnel portal points to a plurality of aggregation portals, the updated member ports in the equivalent multi-routing group are associated interfaces of the tunnel portal and the aggregation portals, and each member port points to the aggregation portal corresponding to each tunnel portal;
when the two-layer unicast traffic needs to be forwarded through the two-layer virtual next hop exit, selecting a target aggregation port from the updated equivalent multi-route group by using a hash algorithm, and selecting a target aggregation member port from the target aggregation ports by using the hash algorithm;
and forwarding the two-layer unicast traffic through the target aggregation member port.
2. The method according to claim 1, wherein said updating the member ports in the equivalent multi-route group according to the correspondence between the target tunnel port and the aggregation port comprises:
and when the number of the aggregation ports corresponding to each tunnel port in the equivalent multi-route group is the same, associating each tunnel port with the corresponding aggregation port to obtain the updated member port in the equivalent route group.
3. The method according to claim 1, wherein said updating the member ports in the equivalent multi-route group according to the correspondence between the target tunnel port and the aggregation port comprises:
and when the number of the aggregation ports corresponding to each tunnel port in the equivalent routing group is not completely the same, making the number of the aggregation ports corresponding to each tunnel port the same in an aggregation port replication mode, and associating each tunnel port with the corresponding aggregation port respectively to obtain the updated member port in the equivalent routing group.
4. The method according to claim 3, wherein the making of the same number of aggregation ports for each tunnel port by means of aggregation port replication comprises:
when the number of the aggregation ports corresponding to the first target tunnel port is an integral multiple of the number of the aggregation ports corresponding to any one of the rest tunnel ports, copying all the corresponding aggregation ports of any one of the rest tunnel ports so that the number of the aggregation ports corresponding to any one of the rest tunnel ports is the same as the number of the aggregation ports corresponding to the first target tunnel port; the first target tunnel portal is a target tunnel portal with the largest number of corresponding aggregation portals.
5. The method according to claim 3, wherein the making of the same number of aggregation ports for each tunnel port by means of aggregation port replication comprises:
when the number of the aggregation ports corresponding to the first target tunnel port is not an integral multiple of the number corresponding to the rest at least one tunnel port, determining the least common multiple of the number of the aggregation ports corresponding to each tunnel port; the first target tunnel portal is a target tunnel portal with the largest number of corresponding aggregation portals;
and for any tunnel portal, copying all the corresponding aggregation ports so as to enable the number of the aggregation ports corresponding to the tunnel portal to reach the least common multiple.
6. A traffic forwarding apparatus applied to a virtual local area network tunnel endpoint (VTEP) device capable of being expanded, the apparatus comprising:
the updating unit is used for updating member ports in the equivalent multi-path routing group according to the corresponding relation between the target tunnel port and the aggregation port when at least one target tunnel port exists in the equivalent multi-path routing group pointed by the second-layer virtual next hop exit; the target tunnel portal points to a plurality of aggregation portals, the updated member ports in the equivalent multi-routing group are associated interfaces of the tunnel portal and the aggregation portals, and each member port points to the aggregation portal corresponding to each tunnel portal;
a selecting unit, configured to select a target aggregation port from the updated equivalent multi-route group by using a hash algorithm when it is required to forward a two-layer unicast traffic through the two-layer virtual next hop exit, and select a target aggregation member port from the target aggregation port by using the hash algorithm;
and the forwarding unit is used for forwarding the two-layer unicast flow through the target aggregation member port.
7. The apparatus of claim 6,
the updating unit is specifically configured to associate each tunnel portal with its corresponding aggregation portal when the number of aggregation portals corresponding to each tunnel portal in the equivalent multi-route group is the same, so as to obtain an updated member port in the equivalent route group.
8. The apparatus of claim 6,
the updating unit is specifically configured to, when the number of aggregation ports corresponding to each tunnel port in the equivalent routing group is not completely the same, make the number of aggregation ports corresponding to each tunnel port the same in an aggregation port duplication manner, and associate each tunnel port with its corresponding aggregation port, so as to obtain a member port in the updated equivalent routing group.
9. The apparatus of claim 8,
the updating unit is specifically configured to, when the number of aggregation ports corresponding to the first target tunnel port is an integer multiple of the number of aggregation ports corresponding to any of the remaining tunnel ports, copy all the corresponding aggregation ports of any of the remaining tunnel ports, so that the number of aggregation ports corresponding to any of the remaining tunnel ports is the same as the number of aggregation ports corresponding to the first target tunnel port; the first target tunnel portal is a target tunnel portal with the largest number of corresponding aggregation portals.
10. The apparatus of claim 8,
the updating unit is specifically configured to determine a least common multiple of the number of aggregation ports corresponding to each tunnel portal when the number of aggregation ports corresponding to the first target tunnel portal is not an integer multiple of the number corresponding to the remaining at least one tunnel portal; the first target tunnel portal is a target tunnel portal with the largest number of corresponding aggregation portals;
and for any tunnel portal, copying all the corresponding aggregation ports so as to enable the number of the aggregation ports corresponding to the tunnel portal to reach the least common multiple.
CN201810671602.8A 2018-06-26 2018-06-26 Flow forwarding method and device Active CN108900406B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810671602.8A CN108900406B (en) 2018-06-26 2018-06-26 Flow forwarding method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810671602.8A CN108900406B (en) 2018-06-26 2018-06-26 Flow forwarding method and device

Publications (2)

Publication Number Publication Date
CN108900406A CN108900406A (en) 2018-11-27
CN108900406B true CN108900406B (en) 2021-05-28

Family

ID=64346347

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810671602.8A Active CN108900406B (en) 2018-06-26 2018-06-26 Flow forwarding method and device

Country Status (1)

Country Link
CN (1) CN108900406B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113542112B (en) * 2020-04-20 2023-11-21 华为技术有限公司 Message forwarding method and network equipment
CN115086106B (en) * 2022-06-22 2023-12-19 杭州云合智网技术有限公司 HASH method with VXLAN known group broadcasting port as tunnel

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075419A (en) * 2010-12-27 2011-05-25 杭州华三通信技术有限公司 Method for generating and transmitting three-layer virtual special network equative routing and edge router
CN102158398A (en) * 2011-02-25 2011-08-17 杭州华三通信技术有限公司 Method and device for forwarding messages
CN103414651A (en) * 2013-08-02 2013-11-27 杭州华三通信技术有限公司 Method and network device for adjusting equal-cost route balanced sharing
CN104378297A (en) * 2013-08-15 2015-02-25 杭州华三通信技术有限公司 Message forwarding method and device
CN104378296A (en) * 2013-08-15 2015-02-25 杭州华三通信技术有限公司 Message forwarding method and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9401818B2 (en) * 2013-03-15 2016-07-26 Brocade Communications Systems, Inc. Scalable gateways for a fabric switch

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102075419A (en) * 2010-12-27 2011-05-25 杭州华三通信技术有限公司 Method for generating and transmitting three-layer virtual special network equative routing and edge router
CN102158398A (en) * 2011-02-25 2011-08-17 杭州华三通信技术有限公司 Method and device for forwarding messages
CN103414651A (en) * 2013-08-02 2013-11-27 杭州华三通信技术有限公司 Method and network device for adjusting equal-cost route balanced sharing
CN104378297A (en) * 2013-08-15 2015-02-25 杭州华三通信技术有限公司 Message forwarding method and device
CN104378296A (en) * 2013-08-15 2015-02-25 杭州华三通信技术有限公司 Message forwarding method and device

Also Published As

Publication number Publication date
CN108900406A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
US11870755B2 (en) Dynamic intent-based firewall
US10277558B2 (en) Overlay management protocol for secure routing based on an overlay network
US10116556B2 (en) Techniques for routing and forwarding between multiple virtual routers implemented by a single device
EP3254417B1 (en) Method and system for supporting port ranging in a software-defined networking (sdn) system
EP3222012B1 (en) Method and system for virtualizing flow tables in a software-defined networking (sdn) system
US10673757B2 (en) System and method of a data processing pipeline with policy based routing
US9325609B2 (en) Segmented source routing in a network
US9537793B2 (en) Ensuring any-to-any reachability with opportunistic layer 3 forwarding in massive scale data center environments
US8085778B1 (en) Voltage regulator
US8804723B2 (en) Efficient control packet replication in data plane
US10205662B2 (en) Prefix distribution-based table performance optimization in SDN
US9178837B2 (en) System and method for layer-2 network routing
EP3054634B1 (en) Scheme for performing one-pass tunnel forwarding function on two-layer network structure
US10511518B2 (en) Mechanism and framework for finding optimal multicast tree roots without the knowledge of traffic sources and receivers for Fabricpath and TRILL
US10313154B2 (en) Packet forwarding
WO2017107814A1 (en) Method, apparatus and system for propagating qos policies
CN108900406B (en) Flow forwarding method and device
US10313274B2 (en) Packet forwarding
US20150012664A1 (en) Routing data based on a naming service
US10680931B2 (en) Ingress gateway selection for a shortest path bridging network to support inter domain multicast routing
CN107623640A (en) A kind of method and device for strengthening hash algorithm
WO2016138813A1 (en) Switch routing conflict processing method and apparatus
US9853891B2 (en) System and method for facilitating communication
EP3913871A1 (en) Bitmask route target in targeted distribution of information using a routing protocol
US11356368B2 (en) Pinning bi-directional network traffic to a service device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
TR01 Transfer of patent right
TR01 Transfer of patent right

Effective date of registration: 20230616

Address after: 310052 11th Floor, 466 Changhe Road, Binjiang District, Hangzhou City, Zhejiang Province

Patentee after: H3C INFORMATION TECHNOLOGY Co.,Ltd.

Address before: 310052 Changhe Road, Binjiang District, Hangzhou, Zhejiang Province, No. 466

Patentee before: NEW H3C TECHNOLOGIES Co.,Ltd.