CN105634942B - Method and switch for forwarding message - Google Patents

Method and switch for forwarding message Download PDF

Info

Publication number
CN105634942B
CN105634942B CN201410606795.0A CN201410606795A CN105634942B CN 105634942 B CN105634942 B CN 105634942B CN 201410606795 A CN201410606795 A CN 201410606795A CN 105634942 B CN105634942 B CN 105634942B
Authority
CN
China
Prior art keywords
path
forwarding
message
node
vxlan
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
CN201410606795.0A
Other languages
Chinese (zh)
Other versions
CN105634942A (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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201410606795.0A priority Critical patent/CN105634942B/en
Publication of CN105634942A publication Critical patent/CN105634942A/en
Application granted granted Critical
Publication of CN105634942B publication Critical patent/CN105634942B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention provides a method for forwarding a message and a switch. The method for forwarding the message comprises the following steps: a first node acquires a message; when the message needs to be forwarded through the designated path, the first node determines the forwarding path of the message; the first node determines at least one outgoing interface according to the forwarding path; the first node forwards the message to the second node through one of the at least one egress interface. The method and the switch for forwarding the message in the embodiment of the invention can realize the specified path forwarding of the message in the DCN Fabric by determining the forwarding path of the message when determining that the message needs to be forwarded through the specified path, determining the interface according to the forwarding path, and then forwarding the message through the outgoing interface.

Description

Method and switch for forwarding message
Technical Field
The present invention relates to the field of communications, and in particular, to a method and a switch for forwarding a packet.
Background
At present, a Data Center Network (DCN) is mainly constructed by using a flat and non-blocking networking manner, and in the DCN, each leaf switch can be connected to other leaf switches through a backbone switch (spine). In order to meet the requirements of cloud computing and data center virtualization, a data center network needs to support multiple tenants, and each tenant is required to access only its own dedicated network and cannot access the networks of other tenants. The Virtual Extensible Local Area Network (VXLAN) technology is a technology proposed by the Internet Engineering Task Force (english), and distinguishes traffic of different tenants by defining a new VXLAN message header (header).
When the DCN Fabric adopts the VXLAN technology, VXLAN Tunnel End nodes (VTEPs) learn and maintain Media Access Control (MAC) addresses or Internet Protocol (IP) addresses of all Virtual Machines (VM) connected to the VTEP, generate a binding relationship between a VTEP IP (i.e., an IP address of the VTEP) and an IP address or a MAC address of the virtual machine, and diffuse the binding relationship in the DCN Fabric, so that each VTEP can obtain a binding relationship between a global VTEP and a MAC address or an IP address of a virtual machine connected to the VTEP. Wherein, the function of VTEP is realized by leaf exchanger in DCNFabric. After a data message enters the edge of a VXLAN network, a VTEP can search a destination MAC address of the data message or a VTEP IP corresponding to the destination IP address, the searched VTEP IP is used as an outer layer destination IP address to package the data message into the VXLAN message, and the VXLAN message is forwarded by the VTEP based on the outer layer IP address of the VXLAN message. And the backbone switch in DCNFabric directly forwards the VXLAN message according to the outer layer IP address of the VXLAN message.
That is, when the DCN Fabric uses VXLAN as the service bearer technology, both the leaf switch and the spine switch directly implement ECMP forwarding based on the destination address in the outer IP header of the VXLAN packet, and cannot implement the specified path forwarding of the packet in the DCN Fabric.
Disclosure of Invention
The invention provides a method and a switch for forwarding a message, which can realize the specified path forwarding of the message in DCN Fabric.
In a first aspect, a method for forwarding a packet is provided, where the method is applied to a data center network DCN Fabric supporting a virtual extensible local area network VXLAN technology, and the method includes: a first node acquires a message; when the message needs to be forwarded through a designated path, the first node determines the forwarding path of the message; the first node determines at least one outgoing interface according to the forwarding path; and the first node forwards the message to a second node through one of the at least one outgoing interface.
With reference to the first aspect, in a first possible implementation manner, the packet is a packed VXLAN packet, an outer IP header of the VXLAN packet includes a specified path forwarding flag and a path identifier, and the specified path forwarding flag is used to indicate whether the VXLAN packet needs to be forwarded through a specified path; after the first node obtains the VXLAN packet, the method further comprises: the first node determines whether the VXLAN message needs to be forwarded through a designated path according to the designated path forwarding flag bit; wherein the determining, by the first node, the forwarding path of the packet includes: and the first node determines a forwarding path of the VXLAN message according to the path identifier and a preset forwarding table.
With reference to the first aspect, in a second possible implementation manner, the packet is an original packet, and the acquiring, by the first node, the packet includes: the first node receives the original message sent by the VM; the method further comprises the following steps: the first node acquires a matching index according to the original message; the first node searches a matching table according to the matching index, wherein the matching table is used for determining whether the original message needs to be forwarded by a specified path or not; when the matching table has the table entry comprising the matching index, the first node determines that the original message needs to be forwarded through a specified path; wherein the determining, by the first node, the forwarding path of the packet includes: the first node determines a forwarding path of the original message according to the matching index; the first node forwards the packet to a second node through one of the at least one egress interface, including: the first node performs VXLAN encapsulation on the original message to obtain a VXLAN message, wherein an outer layer IP head of the VXLAN message comprises a specified path forwarding enabling bit and a path identifier; the first node forwards the VXLAN message to the second node through one of the at least one egress interface.
With reference to the second possible implementation manner, in a third possible implementation manner, the matching index includes at least one of an access physical port of the original packet, a virtual local area network VLAN identifier of the original packet, or five-tuple information of the packet.
With reference to the first, second, or third possible implementation manner, in a fourth possible implementation manner, the specified path forwarding flag bit and the path identifier are carried in a reserved flag bit in the outer IP header service type TOS field.
With reference to the first aspect or any one possible implementation manner of the first to the fourth possible implementation manners, in a fifth possible implementation manner, when the first node determines multiple egress interfaces according to the forwarding path, the forwarding, by the first node, the packet to the second node through one egress interface of the at least one egress interface specifically includes: and the first node forwards the message to the second node through one of the plurality of outgoing interfaces by adopting an equal-cost multi-path ECMP mode.
In a second aspect, a switch is provided, where the switch is used in a data center network DCN Fabric supporting virtual extensible local network VXLAN technology, and the switch includes: the acquisition module is used for acquiring the message; a determination module to: when the message needs to be forwarded through a designated path, determining a forwarding path of the message, and determining at least one output interface according to the forwarding path; and the forwarding module is used for forwarding the message to the second node through one of the at least one outgoing interface.
With reference to the second aspect, in a first possible implementation manner of the second aspect, the packet is a packed VXLAN packet, an outer IP header of the VXLAN packet includes a specified path forwarding flag bit and a path identifier, and the specified path forwarding flag bit is used to indicate whether the VXLAN packet needs to be forwarded through a specified path; the determining module is specifically configured to: and after the acquisition module acquires the message, determining whether the VXLAN message needs to be forwarded through a specified path according to the specified path forwarding flag bit, and when the VXLAN message needs to be forwarded through the specified path, determining a forwarding path of the VXLAN message according to the path identifier and a preset forwarding table.
With reference to the second aspect, in a second possible implementation manner of the second aspect, the message is an original message, and the obtaining module is specifically configured to receive the original message sent by the virtual machine VM; the acquisition module is also used for acquiring a matching index according to the original message; the switch further comprises: the searching module is used for searching a matching table according to the matching index, wherein the matching table is used for determining whether the original message needs to be forwarded by a specified path or not; the determining module is specifically configured to: when the matching table has the table entry comprising the matching index, determining that the original message needs to be forwarded through a specified path, and determining a forwarding path of the original message according to the matching index; the forwarding module is specifically configured to: carrying out VXLAN packaging on the original message to obtain a VXLAN message, wherein an outer layer IP head of the VXLAN message comprises a specified path forwarding enabling bit and a path identifier; forwarding the VXLAN message to the second node through one of the at least one egress interface.
With reference to the second possible implementation manner of the second aspect, in a third possible implementation manner of the second aspect, the matching index includes at least one of an access physical port of the original packet, a virtual local area network VLAN identifier of the original packet, or five-tuple information of the packet.
With reference to the first, second, or third possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the specified path forwarding flag bit and the path identifier are carried in a reserved flag bit in the outer IP header service type TOS field.
With reference to the second aspect or any possible implementation manner of the first to fourth possible implementation manners of the second aspect, in a fifth possible implementation manner of the second aspect, the forwarding module is specifically configured to, when the determining module determines a plurality of egress interfaces according to a forwarding path, forward the packet to the second node through one of the egress interfaces in an ECMP manner.
According to the technical scheme, when the message is determined to be forwarded through the designated path, the forwarding path of the message is determined, the at least one outgoing interface is determined according to the forwarding path, and then the message is forwarded through one outgoing interface of the at least one outgoing interface, so that the designated path forwarding of the message in the DCN Fabric can be realized.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments of the present invention will be briefly described below, and it is obvious that the drawings described below are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart of a method for forwarding a packet according to an embodiment of the present invention.
Fig. 2 is a schematic flow chart of a method of forwarding a packet according to another embodiment of the present invention.
Fig. 3 is a schematic diagram of an outer IP header service type field of a VXLAN message according to an embodiment of the invention.
Fig. 4 is a schematic architecture diagram of an application scenario of a method for forwarding a packet according to an embodiment of the present invention.
Fig. 5 is a schematic block diagram of a switch according to an embodiment of the present invention.
Fig. 6 is a schematic block diagram of a switch according to another embodiment of the present invention.
Fig. 7 is a schematic block diagram of a switch according to another embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be obtained by a person skilled in the art without any inventive step based on the embodiments of the present invention, shall fall within the scope of protection of the present invention.
Fig. 1 is a schematic flow chart of a method 100 for forwarding a packet according to an embodiment of the present invention. The method 100 is applied to DNC Fabric that supports VXLAN technology. As shown in fig. 1, the method 100 may include the following steps.
110. The first node obtains a message.
The first node may be a leaf switch or a spine switch in the DNC Fabric. The first node can directly receive an original message sent by the virtual machine VM, and can also receive a VXLAN message sent by other nodes after an outer header is encapsulated.
120. And when the message needs to be forwarded through the appointed path, the first node determines the forwarding path of the message.
The forwarding path may be represented by a Port Group (PG for short). Different physical ports on one device may be bound to the same PG, and different physical ports on the same device may also be bound to different PGs. By configuring physical ports on different leaf switches and spine switches to the same PG, the end-to-end designated path in the VXLAN Fabric can be planned in advance. At this time, the path identifier is used to indicate a PG, and one PG indicated by the path identifier may include multiple forwarding paths.
130. And the first node determines at least one outgoing interface according to the forwarding path.
When the forwarding path is represented by a PG, at least one egress interface bound by the PG may be determined according to the PG.
140. And the first node forwards the message to a second node through one of the at least one outgoing interface.
Different outgoing interfaces of the first node correspond to different second nodes, the first node can forward different messages to the different second nodes through the different outgoing interfaces, and load sharing among the different second nodes can be achieved. The second node is a node in the network which has a connection relation with the first node.
In the embodiment of the invention, when the message needs to be forwarded through the designated path, the forwarding path of the message is determined, at least one outgoing interface is determined according to the forwarding path, and then the message is forwarded through one outgoing interface of the at least one outgoing interface, so that the designated path forwarding of the message in the DCN Fabric can be realized.
It should be noted that, in the embodiment of the present invention, when it is determined that the packet does not need to be forwarded through the specified path, the packet is directly forwarded by using the ECMP technique according to the destination IP address in the outer IP header.
In another embodiment of the present invention, when the first node determines a plurality of outgoing interfaces according to the forwarding path in step 130, then in step 140, the first node selects one of the plurality of outgoing interfaces in an ECMP manner to forward the packet to the second node.
Specifically, in an embodiment of the present invention, when the packet is an encapsulated VXLAN packet, an outer IP header of the VXLAN packet includes a designated path forwarding flag and a path identifier. The designated path forwarding flag bit is used for indicating whether the VXLAN message needs to be forwarded through a designated path. In a specific embodiment, when the value of the designated path forwarding flag is 1, it indicates that the VXLAN packet needs to be forwarded through a designated path. The path identifier is used for indicating a path.
As shown in fig. 2, the step 120 may specifically include: 121. determining whether the VXLAN message needs to be forwarded through a specified path according to the specified path forwarding flag bit of the VXLAN message; 122. and when the VXLAN message needs to be forwarded through a specified path, determining a forwarding path of the VXLAN message according to the path identifier and a preset forwarding table. The forwarding table comprises a plurality of forwarding table entries, wherein each forwarding table entry comprises a path identifier and a corresponding relation of a forwarding path. The steps 121 and 122 may be performed by a leaf switch or a spine switch.
Optionally, in another embodiment of the present invention, when the first node is a leaf switch and the packet is an original packet, the step 110 specifically includes: and the first node receives an original message sent by the virtual machine VM. The method 100 further comprises: the first node acquires a matching index according to the original message; searching a matching table according to the matching index, wherein the matching table is used for determining whether the original message needs to be forwarded by a specified path; and when the matching table has the table entry comprising the matching index, the first node determines that the original message needs to be forwarded through a specified path. Correspondingly, step 120 specifically includes: and the first node determines the forwarding path of the original message according to the matching index. Step 140 specifically includes: the first node performs VXLAN packaging on the original message to obtain a VXLAN message, wherein an outer layer IP head of the VXLAN message comprises a designated path forwarding flag bit and a path identifier; the first node forwards the VXLAN message to the second node through one of the at least one egress interface.
And performing VXLAN encapsulation on the original message, specifically including adding the path identifier of the forwarding path and the forwarding flag bit of the specified path in the outer layer IP header of the VXLAN message. And determining a forwarding path of the original message according to the matching index, specifically, searching a forwarding table according to the matching index, and determining the forwarding path of the original message.
The matching table is used for determining whether the original message needs to be forwarded by a specified path. In one embodiment, the entries of the matching table include a matching index. The matching table has an entry comprising a matching index of an original message, which indicates that the original message needs to be forwarded through a specified path. The forwarding table is used for guiding message forwarding, and the forwarding table may include multiple forwarding table entries, where each table entry of the forwarding table includes a matching index, a path identifier, and a corresponding relationship of a forwarding path.
Specifically, the matching index of the original packet may include at least one of an access physical port of the original packet, a virtual local area network VLAN identifier of the original packet, or five-tuple information of the original packet.
Wherein, the access physical port of the original packet refers to a physical port at which the first node receives the original packet, and at least one of the five-tuple information of the original packet may be: protocol number, source IP address, source port, destination IP address, or destination port.
It should be understood that the matching index may further include other information, and correspondingly, the first node may also determine to search the matching table according to the other information, determine a forwarding path of the original packet according to the matching index when an entry including the other information exists in the matching table, and encapsulate the original packet into a VXLAN packet according to the forwarding path.
The matching index and the forwarding path may correspond to each other, or a plurality of matching indexes may correspond to one forwarding path, or one matching index may correspond to a plurality of forwarding paths. In summary, the corresponding relationship between the matching index and the forwarding path may be specifically configured according to service needs, and this is not limited in the embodiment of the present invention.
In the embodiment of the invention, a network administrator can pre-configure the forwarding table and the matching table on the switch according to service requirements, and when the forwarding path or the matching index changes, the administrator can flexibly modify the configuration of the forwarding path or the matching index.
It should be noted that when a forwarding path is represented by a port group PG, each entry of the forwarding table includes a correspondence of a matching index, a path identification, and the PG. A PG indicated by a path identifier corresponding to a matching index may include multiple forwarding paths, or multiple forwarding paths corresponding to the same matching index may belong to the same PG.
It should be noted that, in the step 110, VXLAN encapsulation may be performed on the original message after the original message sent by the virtual machine VM is received. And when the original message is determined to need to be forwarded through the designated path and the forwarding path of the original message is determined, setting a designated path forwarding flag bit and a path identifier in the outer IP header to obtain the VXLAN message.
Preferably, as shown in fig. 3, the specified path forwarding flag bit and the path identifier may be carried in a reserved flag bit of an outer layer IP header Service Type (TOS) field of the VXLAN packet. In the figure, E (Enable) represents a designated path forwarding flag bit, and P (Path) represents a path identifier. The value of the E flag can default to 0, which means that the VXLAN message does not need to be forwarded through the designated path. When the E flag value is 1, it indicates that the VXLAN packet needs to be forwarded through the designated path, and at this time, the corresponding P flag values respectively indicate corresponding different forwarding paths, for example, the P flag value 0 indicates that the forwarding path of the VXLAN packet is PG1, and the P flag value 1 indicates that the forwarding path of the VXLAN packet is PG 2. The embodiment of the invention directly uses the TOS reserved field in the outer IP header of the VXLAN, so that the forwarding path of the message can be appointed without additionally increasing the message load length, and the forwarding efficiency can be improved.
In addition, because the D/T/R marking bits in the TOS field are less used, in the DNC Fabric, the three marking bits can be multiplexed for path identification, so that 4 marking bits in the TOS field are used as path identification, 16 forwarding paths can be supported in total, and the requirement of planning more designated forwarding paths can be met.
In the embodiment of the method of the present invention, the sequence number of each step does not mean the execution sequence, and the execution sequence of each step should be determined by the function and the internal logic of the step, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
In addition, after the second node receives the VXLAN message forwarded by the first node, the second node directly determines whether the VXLAN message needs to be forwarded through the specified path according to the specified path forwarding flag bit of the TOS field in the outer IP header of the VXLAN, and when the E tag value is 1, the VXLAN message is forwarded according to the forwarding path indicated by the P tag value. Or when the value of the E mark is 0, directly adopting the ECMP to forward the VXLAN message according to the destination IP address in the outer IP header of the VXLAN. The second node may be a leaf switch or a spine switch located in the forwarding path of the VXLAN packet.
A method 100 for forwarding packets according to an embodiment of the present invention is described below with reference to fig. 4.
Fig. 4 is a schematic architecture diagram of an application scenario of the method 100 for forwarding a packet according to an embodiment of the present invention. In FIG. 4, nodes 401 to 406 are leaf switches, where node 401 is an entry leaf switch and nodes 411 to 416 are spine switches. The specific path forwarding flow is described in detail below.
(1) The ingress leaf switch 401 encapsulates the original message: after receiving the original packet sent by the VM, the ingress leaf switch 401 obtains a matching index according to the original packet, such as at least one of an access physical port of the original packet, a VLAN identifier of the original packet, or quintuple information of the original packet. The leaf switch 401 searches a matching table according to the matching index, the matching table has an entry including the matching index, and the leaf switch 401 determines that the original packet needs to be forwarded through the specified path. The leaf switch 401 further searches the forwarding table to obtain the port group corresponding to the matching index. Then, the leaf switch 401 performs VXLAN encapsulation on the original message to obtain a VXLAN message. In the VXLAN encapsulation process, the marker value of a designated path forwarding marker bit E is set to be 1 at two reserved marker bits in an outer layer IP header TOS field, and a corresponding P marker value is set according to the port group. If the P flag value is 1, when the leaf switch 401 binds an outgoing interface in the port group, the encapsulated packet is forwarded to the next spine switch 411 through the outgoing interface. When the leaf switch 401 binds multiple outgoing interfaces in the port group, the VXLAN packet is forwarded to the spine switch 411 through one of the multiple outgoing interfaces in the ECMP manner. When the P-tag value is 0, it is forwarded to spine node 412 through the corresponding outgoing interface, as shown in fig. 4.
(2) Intermediate switch forwarding: after receiving the VXLAN message, a leaf switch or a spine switch positioned in the middle of the forwarding path checks an E mark value in an outer layer IP header TOS field of the VXLAN message, wherein the E mark value is 1, which indicates that the VXLAN message needs to be forwarded through the designated path, and the leaf switch or the spine switch directly determines a corresponding output interface according to a P mark value in the outer layer IP header. For example, as shown in fig. 4, when the P flag value is 1, the spine switch 411 determines, according to the forwarding table, the outgoing interface bound to the port group indicated by the P flag value 1. When the port group is bound with an outgoing interface, the VXLAN packet is forwarded to the spine switch 415 through the outgoing interface. When the port group binds a plurality of egress interfaces, the VXLAN packet is forwarded to the spine switch 415 through one of the egress interfaces in an ECMP manner. The execution process of other spine switches is similar to that of spine switch 411, and is not described herein again.
(3) And (3) decapsulating the outlet switch: after receiving the VXLAN message, the egress leaf switch (e.g., leaf switch 404 and leaf switch 405 shown in fig. 4) directly decapsulates the VXLAN outer header to obtain an original message, and forwards the original message to the corresponding destination VM according to the original message MAC/IP header.
In the embodiment of the invention, when the message needs to be forwarded through the designated path, the forwarding path of the message is determined, at least one outgoing interface is determined according to the forwarding path, and then the message is forwarded through one outgoing interface of the at least one outgoing interface, so that the designated path forwarding of the message in the DCN Fabric can be realized.
The method for forwarding a packet according to the embodiment of the present invention is described in detail above with reference to fig. 1 to 4, and the switch according to the embodiment of the present invention is described in detail below with reference to fig. 5 to 7.
Fig. 5 is a schematic block diagram of a switch 500 according to an embodiment of the present invention. The switch 500 is used in a data center network DCN Fabric that supports virtual extended local network VXLAN technology. As shown in fig. 5, the switch 500 includes: an acquisition module 510, a determination module 520, and a forwarding module 530.
The obtaining module 510 is configured to obtain a message. The determination module 520 is configured to: when the message needs to be forwarded through a designated path, determining a forwarding path of the message; and determining at least one outgoing interface according to the forwarding path. The forwarding module 530 is configured to forward the packet to the second node through one of the at least one egress interface.
The forwarding path may be represented by a port group PG. Different physical ports on one device may be bound to the same PG, and different physical ports on the same device may also be bound to different PGs. By configuring physical ports on different leaf switches and spine switches to the same PG, the end-to-end designated path in the VXLAN Fabric can be planned in advance. At this time, the path identifier is used to indicate a PG, and one PG indicated by the path identifier may include multiple forwarding paths.
Switch 500 may also be a leaf switch or a spine switch.
The switch of the embodiment of the invention determines the forwarding path of the message when the message needs to be forwarded through the designated path, determines at least one outgoing interface according to the forwarding path, and forwards the message through one outgoing interface of the at least one outgoing interface, thereby realizing the designated path forwarding of the message in the DCN Fabric.
In another embodiment of the present invention, the forwarding module 530 is specifically configured to, when the determining module 520 determines a plurality of egress interfaces according to the forwarding path, select one of the egress interfaces in an ECMP manner to forward the packet to the second node.
In another embodiment of the present invention, the packet is an encapsulated VXLAN packet, and an outer IP header of the VXLAN packet includes a designated path forwarding flag and a path identifier, where the designated path forwarding flag is used to indicate whether the VXLAN packet needs to be forwarded through a designated path. In a specific embodiment, when the value of the designated path forwarding flag is 1, it indicates that the VXLAN packet needs to be forwarded through a designated path. The path identifier is used for indicating a path.
Correspondingly, the determining module 520 is specifically configured to, after the obtaining module 510 obtains the packet, determine whether the VXLAN packet needs to be forwarded through a specified path according to the specified path forwarding flag, and when the VXLAN packet needs to be forwarded through the specified path, determine a forwarding path of the VXLAN packet according to the path identifier and a preset forwarding table.
Optionally, in another embodiment of the present invention, the message is an original message, the obtaining module 510 is specifically configured to receive the original message sent by the virtual machine VM, and the obtaining module 510 is further configured to obtain the matching index according to the original message. As shown in fig. 6, the switch 500 further includes: a searching module 540, configured to search a matching table according to the matching index, where the matching table is used to determine whether the original packet needs to be forwarded through a specified path. Correspondingly, the determining module 520 is specifically configured to, when the matching table includes the table entry including the matching index, determine that the original packet needs to be forwarded through an assigned path, and determine a forwarding path of the original packet according to the matching index. The forwarding module 530 is specifically configured to: carrying out VXLAN packaging on the original message to obtain a VXLAN message, wherein an outer layer IP head of the VXLAN message comprises a specified path forwarding enabling bit and a path identifier; forwarding the VXLAN message to the second node through one of the at least one egress interface.
The forwarding module 530 is specifically configured to add the path identifier of the forwarding path and a forwarding flag bit of the specified path to the outer IP header of the VXLAN packet. The determining module 520 may be specifically configured to search a forwarding table according to the matching index, and determine the forwarding path.
The matching table is used for determining whether the original message needs to be forwarded by the appointed path. In one embodiment, the entries of the matching table include a matching index. The matching table has an entry comprising a matching index of an original message, which indicates that the original message needs to be forwarded through a specified path. The forwarding table is used for guiding message forwarding, and the forwarding table may include multiple forwarding table entries, where each table entry of the forwarding table includes a matching index, a path identifier, and a corresponding relationship of a forwarding path.
Specifically, the matching index of the original packet may include at least one of an access physical port of the original packet, a virtual local area network VLAN identifier of the original packet, or five-tuple information of the packet.
Wherein, the access physical port of the original packet refers to a physical port at which the first node receives the original packet, and at least one of the five-tuple information of the original packet may be: protocol number, source IP address, source port, destination IP address, or destination port.
It should be noted that when a forwarding path is represented by a port group PG, each entry of the forwarding table includes a correspondence of a matching index, a path identification, and the PG. A PG indicated by a path identifier corresponding to a matching index may include multiple forwarding paths, or multiple forwarding paths corresponding to the same matching index may belong to the same PG.
Preferably, the specified path forwarding flag bit and the path identifier may be carried in a reserved flag bit of an outer IP header service type TOS field of the VXLAN message.
In addition, because the D/T/R marking bits in the TOS field are less used, in the DNC Fabric, the three marking bits can be multiplexed for path identification, so that 4 marking bits in the TOS field are used as path identification, 16 forwarding paths can be supported in total, and the requirement of planning more designated forwarding paths can be met.
It should be understood that the switch 500 according to the embodiment of the present invention may correspond to the first node in the method for forwarding a packet according to the embodiment of the present invention, and the above and other operations and/or functions of each module in the switch 500 are respectively for implementing corresponding flows of each method in fig. 1 to fig. 4, and are not described herein again for brevity.
The switch of the embodiment of the invention determines the forwarding path of the message when the message needs to be forwarded through the designated path, determines at least one outgoing interface according to the forwarding path, and forwards the message through one outgoing interface of the at least one outgoing interface, thereby realizing the designated path forwarding of the message in the DCN Fabric.
Fig. 7 is a schematic block diagram of a switch 700 according to another embodiment of the present invention, the switch 700 being used in a data center network DCN Fabric supporting extended local network VXLAN technology. As shown in fig. 7, the switch 700 includes: a processor 710, a memory 720, a bus system 730, and a transceiver 740. Processor 710, memory 720 and transceiver 740 are coupled via bus system 730, memory 720 for storing instructions, and processor 710 for executing instructions stored in memory 720.
The transceiver 740 is used to obtain messages. The processor 710 is configured to: when the message needs to be forwarded through a designated path, determining a forwarding path of the message; and determining at least one outgoing interface according to the forwarding path. The transceiver 740 is configured to forward the packet to the second node through one of the at least one egress interface.
The switch of the embodiment of the invention determines the forwarding path of the message when the message needs to be forwarded through the designated path, determines at least one outgoing interface according to the forwarding path, and forwards the message through one outgoing interface of the at least one outgoing interface, thereby realizing the designated path forwarding of the message in the DCN Fabric.
It should be understood that, in the embodiment of the present invention, the processor 710 may be a Central Processing Unit (CPU), and the processor 710 may also be other general processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 720 may include both read-only memory and random-access memory, and provides instructions and data to the processor 710. A portion of memory 720 may also include non-volatile random access memory. For example, memory 720 may also store device type information.
The bus system 730 may include a power bus, a control bus, a status signal bus, and the like, in addition to a data bus. For clarity of illustration, however, the various buses are designated in the figure as the bus system 730.
In implementation, the steps of the above method may be performed by integrated logic circuits of hardware or instructions in the form of software in the processor 710. The steps of a method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware processor, or may be implemented by a combination of hardware and software modules in the processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 720, and the processor 710 reads the information in the memory 720 and performs the steps of the above method in combination with the hardware thereof. To avoid repetition, it is not described in detail here.
In another embodiment of the present invention, the transceiver 740 is specifically configured to select one of the multiple egress interfaces in an ECMP manner to forward the packet to the second node when the processor 710 determines the multiple egress interfaces according to the forwarding path.
In another embodiment of the present invention, the packet is an encapsulated VXLAN packet, and an outer IP header of the VXLAN packet includes a designated path forwarding flag and a path identifier, where the designated path forwarding flag is used to indicate whether the VXLAN packet needs to be forwarded through a designated path. In a specific embodiment, when the value of the designated path forwarding flag is 1, it indicates that the VXLAN packet needs to be forwarded through a designated path. The path identifier is used for indicating a path.
The processor 710 is specifically configured to, after the transceiver 740 obtains the packet, determine whether the VXLAN packet needs to be forwarded through a specified path according to the specified path forwarding flag; and when the VXLAN message needs to be forwarded through a specified path, determining a forwarding path of the VXLAN message according to the path identifier and a preset forwarding table.
Optionally, in another embodiment of the present invention, the packet is an original packet. The transceiver 740 is specifically configured to receive the original packet sent by the virtual machine VM. Processor 710 is specifically configured to: acquiring a matching index according to the original message; searching a matching table according to the matching index, wherein the matching table is used for determining whether the original message needs to be forwarded by a specified path; when the matching table has the table entry comprising the matching index, determining that the original message needs to be forwarded through a specified path; determining a forwarding path of the original message according to the matching index; and carrying out VXLAN packaging on the original message according to the forwarding path to obtain the VXLAN message.
Wherein, the processor 710 may be specifically configured to: and adding the path identifier of the forwarding path and the appointed path forwarding flag bit in the outer layer IP header of the VXLAN message. Processor 710 may be further specifically configured to: and searching a forwarding table according to the matching index, and determining the forwarding path.
The matching table is used for determining whether the original message needs to be forwarded by the appointed path. In one embodiment, the entries of the matching table include a matching index. The matching table has an entry comprising a matching index of an original message, which indicates that the original message needs to be forwarded through a specified path. The forwarding table is used for guiding message forwarding, and the forwarding table may include multiple forwarding table entries, where each table entry of the forwarding table includes a matching index, a path identifier, and a corresponding relationship of a forwarding path.
Specifically, the matching index of the original packet may include at least one of an access physical port of the original packet, a VLAN id of the original packet, or five-tuple information of the original packet.
Preferably, the designated path forwarding flag bit and the path identifier may be carried in a reserved flag bit of an outer IP header service type TOS field of the VXLAN packet.
It should be understood that the switch 700 according to the embodiment of the present invention may correspond to the first node and the switch 500 in the method for forwarding a packet according to the embodiment of the present invention, and the above and other operations and/or functions of each module in the switch 700 are respectively for implementing corresponding flows of each method in fig. 1 to fig. 4, and are not described herein again for brevity.
The switch of the embodiment of the invention determines the forwarding path of the message when the message needs to be forwarded through the designated path, determines at least one outgoing interface according to the forwarding path, and forwards the message through one outgoing interface of the at least one outgoing interface, thereby realizing the designated path forwarding of the message in the DCN Fabric.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection through some interfaces, devices or units, and may be in an electrical, mechanical or other form.
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 units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: a U disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk or an optical disk, and other various media capable of storing program codes.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.

Claims (12)

1. A method for forwarding a message is applied to a data center network DCN Fabric supporting a virtual extensible local area network VXLAN technology, and the method comprises the following steps:
a first node acquires a message, when the message is a packaged VXLAN message, an outer layer IP header of the VXLAN message comprises a designated path forwarding flag bit and a path identifier, and the designated path forwarding flag bit is used for indicating whether the VXLAN message needs to be forwarded through a designated path or not;
when the message needs to be forwarded through a designated path, the first node determines the forwarding path of the message;
the first node determines at least one outgoing interface according to the forwarding path;
and the first node forwards the message to a second node through one of the at least one outgoing interface.
2. The method of claim 1,
after the first node obtains the VXLAN packet, the method further comprises:
the first node determines whether the VXLAN message needs to be forwarded through a designated path according to the designated path forwarding flag bit;
wherein the determining, by the first node, the forwarding path of the packet includes:
and the first node determines a forwarding path of the VXLAN message according to the path identifier and a preset forwarding table.
3. The method of claim 1, wherein when the packet is an original packet, the obtaining, by the first node, a packet comprises: the first node receives the original message sent by the VM,
the method further comprises the following steps:
the first node acquires a matching index according to the original message;
the first node searches a matching table according to the matching index, wherein the matching table is used for determining whether the original message needs to be forwarded by a specified path or not;
when the matching table has the table entry comprising the matching index, the first node determines that the original message needs to be forwarded through a specified path;
wherein the determining, by the first node, the forwarding path of the packet includes: the first node determines a forwarding path of the original message according to the matching index;
the first node forwards the packet to a second node through one of the at least one egress interface, including: the first node performs VXLAN packaging on the original message to obtain a VXLAN message, wherein an outer layer IP head of the VXLAN message comprises a designated path forwarding flag bit and a path identifier; the first node forwards the VXLAN message to the second node through one of the at least one egress interface.
4. The method of claim 3, wherein the matching index comprises at least one of an access physical port of the original packet, a VLAN identifier of the original packet, or quintuple information of the original packet.
5. The method according to any of claims 2 to 4, wherein the specified path forwarding flag bit and the path identifier are carried in a reserved flag bit in the outer IP header type of service (TOS) field.
6. The method according to any one of claims 1 to 4, wherein when the first node determines a plurality of egress interfaces according to the forwarding path, the forwarding, by the first node, the packet to the second node through one of the at least one egress interface specifically comprises:
and the first node forwards the message to the second node through one of the plurality of outgoing interfaces by adopting an equal-cost multi-path ECMP mode.
7. A switch for use in a data center network DCN Fabric supporting virtual extensible local network VXLAN technology, the switch comprising:
the device comprises an acquisition module, a routing module and a routing module, wherein the acquisition module is used for acquiring a message, when the message is a packaged VXLAN message, an outer layer IP header of the VXLAN message comprises a designated path forwarding flag bit and a path identifier, and the designated path forwarding flag bit is used for indicating whether the VXLAN message needs to be forwarded through a designated path or not;
a determination module to: when the message needs to be forwarded through a designated path, determining a forwarding path of the message, and determining at least one output interface according to the forwarding path;
and the forwarding module is used for forwarding the message to the second node through one of the at least one outgoing interface.
8. The switch according to claim 7,
the determining module is specifically configured to: after the acquisition module acquires the message, determining whether the VXLAN message needs to be forwarded through a specified path according to the specified path forwarding flag bit; and when the VXLAN message needs to be forwarded through a specified path, determining a forwarding path of the VXLAN message according to the path identifier and a preset forwarding table.
9. The switch according to claim 7, wherein when the packet is an original packet, the obtaining module is specifically configured to receive the original packet sent by a virtual machine VM;
the acquisition module is also used for acquiring a matching index according to the original message;
the switch further comprises: the searching module is used for searching a matching table according to the matching index, wherein the matching table is used for determining whether the original message needs to be forwarded by a specified path or not;
the determining module is specifically configured to: when the matching table has the table entry comprising the matching index, determining that the original message needs to be forwarded through a specified path; determining a forwarding path of the original message according to the matching index;
the forwarding module is specifically configured to: carrying out VXLAN packaging on the original message to obtain a VXLAN message, wherein an outer layer IP head of the VXLAN message comprises a designated path forwarding flag bit and a path identifier; forwarding the VXLAN message to the second node through one of the at least one egress interface.
10. The switch of claim 9, wherein the matching index comprises at least one of an access physical port of the original packet, a Virtual Local Area Network (VLAN) identifier of the original packet, or quintuple information of the original packet.
11. The switch according to any of claims 8 to 10, wherein the specified path forwarding flag bit and the path identifier are carried in a reserved flag bit in the outer IP header type of service (TOS) field.
12. The switch according to any one of claims 7 to 10, wherein the forwarding module is specifically configured to, when the determining module determines multiple egress interfaces according to the forwarding path, forward the packet to the second node through one of the multiple egress interfaces in an equal-cost multi-path ECMP manner.
CN201410606795.0A 2014-10-31 2014-10-31 Method and switch for forwarding message Active CN105634942B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201410606795.0A CN105634942B (en) 2014-10-31 2014-10-31 Method and switch for forwarding message

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201410606795.0A CN105634942B (en) 2014-10-31 2014-10-31 Method and switch for forwarding message

Publications (2)

Publication Number Publication Date
CN105634942A CN105634942A (en) 2016-06-01
CN105634942B true CN105634942B (en) 2020-01-03

Family

ID=56049467

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201410606795.0A Active CN105634942B (en) 2014-10-31 2014-10-31 Method and switch for forwarding message

Country Status (1)

Country Link
CN (1) CN105634942B (en)

Families Citing this family (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106230749B (en) * 2016-08-30 2019-07-23 锐捷网络股份有限公司 A kind of method to E-Packet in virtual expansible local area network and convergence switch
CN106850388B (en) * 2017-02-27 2020-04-03 迈普通信技术股份有限公司 Method and device for forwarding message by VPLS network
CN107086930B (en) * 2017-04-24 2020-07-28 北京汽车集团越野车有限公司 Vehicle configuration method and device and automobile
CN109412922B (en) * 2017-08-15 2021-07-20 华为技术有限公司 Method, forwarding device, controller and system for transmitting message
CN107612827A (en) * 2017-10-11 2018-01-19 郑州云海信息技术有限公司 A kind of method and apparatus for improving strange land data center vxlan network qualities
CN110034993B (en) 2018-01-11 2020-12-25 华为技术有限公司 Method, equipment and network system for transmitting data
CN108768817B (en) * 2018-05-22 2020-07-28 腾讯科技(深圳)有限公司 Virtual network networking system and data packet sending method
CN111600797B (en) 2019-02-21 2022-12-30 华为技术有限公司 Data transmission method, node and system
CN111628921B (en) 2019-02-27 2021-07-20 华为技术有限公司 Message processing method, message forwarding device and message processing device
CN111010344B (en) * 2019-12-31 2021-08-24 杭州迪普科技股份有限公司 Message forwarding method and device, electronic equipment and machine-readable storage medium
CN113992564B (en) * 2021-09-17 2023-03-31 新华三信息安全技术有限公司 Message processing method and device
CN117527684A (en) * 2022-07-30 2024-02-06 华为技术有限公司 Message transmission method and device

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2523405A1 (en) * 2010-01-08 2012-11-14 Nec Corporation Communication system, forwarding nodes, path management server and communication method
CN103814554A (en) * 2013-12-11 2014-05-21 华为技术有限公司 Communication method, device and system of virtual extensible local area network
CN103841028A (en) * 2014-03-24 2014-06-04 杭州华三通信技术有限公司 Method and device for forwarding messages
CN103957160A (en) * 2014-05-12 2014-07-30 华为技术有限公司 Message sending method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101605103B (en) * 2009-07-16 2012-01-04 杭州华三通信技术有限公司 Method and apparatus for static forwarding multicast data
CN103684882B (en) * 2013-12-30 2017-05-10 华为技术有限公司 Message transmission method, system and device based on TRUNK technology

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP2523405A1 (en) * 2010-01-08 2012-11-14 Nec Corporation Communication system, forwarding nodes, path management server and communication method
CN103814554A (en) * 2013-12-11 2014-05-21 华为技术有限公司 Communication method, device and system of virtual extensible local area network
CN103841028A (en) * 2014-03-24 2014-06-04 杭州华三通信技术有限公司 Method and device for forwarding messages
CN103957160A (en) * 2014-05-12 2014-07-30 华为技术有限公司 Message sending method and device

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《一种基于VXLAN的虚拟网络访问控制方法》;卢志刚,姜政伟等;《计算机工程》;20140815;正文第86-90页 *

Also Published As

Publication number Publication date
CN105634942A (en) 2016-06-01

Similar Documents

Publication Publication Date Title
CN105634942B (en) Method and switch for forwarding message
US10320664B2 (en) Cloud overlay for operations administration and management
CN109873760B (en) Method and device for processing route, and method and device for data transmission
EP3304815B1 (en) Operations, administration and management (oam) in overlay data center environments
EP3720063A1 (en) Packet processing method, network node, and system
JP5991424B2 (en) Packet rewriting device, control device, communication system, packet transmission method and program
JP6426879B2 (en) Data packet transfer
CN112087386B (en) Message processing method, device and system
CN111092801B (en) Data transmission method and device
CN112019433B (en) Message forwarding method and device
CN107181663A (en) A kind of message processing method, relevant device and computer-readable recording medium
CN104954288B (en) Method for sending information, device and communication system
JP6488426B2 (en) Multicast data packet forwarding
US20180123828A1 (en) Packet forwarding
CN112583711A (en) Message processing method and device
JP2018515052A (en) Multicast data packet forwarding
CN108667709B (en) Message forwarding method and device
EP2880550A1 (en) Connection mesh in mirroring asymmetric clustered multiprocessor systems
CN112822097A (en) Message forwarding method, first network device and first device group
EP3292660B1 (en) Packet forwarding in a vxlan switch
CN104780090A (en) VPN multicast transmission method and device PE equipment
US10205661B1 (en) Control messages for scalable satellite device clustering control in a campus network
US10177935B2 (en) Data transfer system, data transfer server, data transfer method, and program recording medium
US11611508B2 (en) Packet forwarding method and network device
CN107995084B (en) Tunnel selection method and device

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant