A message transmission method and device of a DDC network
By using only a portion of the NCP devices as egress devices in the DDC network for mirrored packet forwarding, the problem of wasted port resources is solved, and the effectiveness and cost-effectiveness of DDC network traffic monitoring are achieved.
Patent Information
- Application Number
- CN202411729760.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-28
- Publication Date
- 2026-05-29
AI Technical Summary
In existing technologies, traffic monitoring for each server in a DDC network requires a large amount of port resources, leading to increased network costs.
By using only a portion of the NCP devices as egress devices in the DDC network, and utilizing these egress devices to forward mirrored packets with other NCPs, traffic monitoring of the entire DDC network can be achieved.
It reduces port resource usage, lowers network costs, and enables effective monitoring of traffic across servers in the DDC network.
Smart Images

Figure CN122120228A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the technical field of data transmission, and more particularly to a message transmission method and apparatus for a DDC network. Background Technology
[0002] A Distributed Disaggregate Chassis (DDC) is a network device system designed based on Application Specific Integrated Circuit (ASIC) chips. Typically, monitoring servers need to monitor the traffic of each server within a distributed disaggregate chassis.
[0003] Currently, each server corresponds to an NCP device, and the port of each NCP device is used as the exit point for mirrored traffic. This allows the monitoring server to obtain and monitor the traffic of each server in the distributed rack. However, this leads to the problem of occupying a large number of port resources and increasing network costs.
[0004] In summary, how to enable the monitoring server to obtain the traffic information of each server in the distributed rack while minimizing the use of port resources is a technical problem that urgently needs to be solved. Summary of the Invention
[0005] This invention provides a message transmission method and apparatus for a DDC network to solve the problem of occupying a large amount of port resources and increasing network costs in the prior art.
[0006] In a first aspect, embodiments of the present invention provide a message transmission method for a DDC network, comprising: a first network cloud message forwarding device (NCP) receiving a first encapsulated message forwarded by a network cloud switching device (NCF); the first encapsulated message is obtained by adding a first remote encapsulation entry to a mirror message sent by a first server by a second NCP; the first remote encapsulation entry includes a first encapsulation identifier and a first global port that have a corresponding relationship; the first NCP is configured as an egress device in the DDC network; the first NCP determines that the first global port, which serves as the egress port, is in a working state, and then encapsulates the first encapsulated message with header information according to the first encapsulation identifier to obtain a second encapsulated message, and sends the second encapsulated message through the first global port.
[0007] In the above technical solution, in the DDC network scenario, a small number of NCP devices are used as the first NCP, that is, the egress device, to forward mirrored packets with the second NCP, thereby reducing port resource costs and enabling traffic monitoring of the entire DDC network by using a small number of NCP devices as egress devices.
[0008] Optionally, before the first network cloud packet forwarding device (NCP) receives the first encapsulated packet forwarded by the network cloud switching device (NCF), the method further includes: the first NCP sending traffic monitoring session information to the second NCP, wherein the traffic monitoring session information includes the identifier of the first NCP and at least one remote encapsulation entry; the traffic monitoring session information is used by the second NCP to set an ingress policy for its own monitoring source port through the first NCP; the ingress policy is used to add remote encapsulation entries to the mirrored packets sent by the monitoring source port.
[0009] Optionally, before the first NCP sends traffic monitoring session information to the second NCP, the method further includes: the first NCP determining a forwarding table entry for the session identifier based on the destination address information of the monitoring server; the forwarding table entry includes the header information encapsulation content of each port as the outgoing port under the corresponding encapsulation identifier; and encapsulating the first encapsulated packet with header information according to the first encapsulation identifier, including: obtaining the header information encapsulation content corresponding to the first encapsulation identifier from the forwarding table entry; and encapsulating the first encapsulated packet with header information using the header information encapsulation content corresponding to the first encapsulation identifier.
[0010] Optionally, any header information encapsulation content may include ERSPAN header encapsulation entry information, GRE header encapsulation entry information, IP header encapsulation entry information, and Layer 2 header encapsulation entry information.
[0011] Optionally, any remote encapsulation entry may be a mapping between the ERSPAN header encapsulation identifier and a global port, or any remote encapsulation entry may be a mapping between the ERSPAN header encapsulation identifier, the Layer 2 header encapsulation identifier, and a global port.
[0012] Optionally, it further includes: if the first NCP determines that the first global port, which serves as the output port, is in a fault state, then it determines whether a second global port with the same session identifier as the first global port is in a working state; if the second global port is in a working state, then the first encapsulated message is encapsulated with header information according to the second encapsulation identifier in the second remote encapsulation table entry to which the second global port belongs, to obtain a third encapsulated message, and the third encapsulated message is sent through the second global port.
[0013] Optionally, it further includes: if the first global port does not have a second global port with the same session identifier, or if all second global ports with the same session identifier are in a fault state, then a third NCP with the same session identifier is determined; the first NCP replaces the first remote encapsulation table entry with any third remote encapsulation table entry in the third NCP and sends it to the third NCP.
[0014] Secondly, embodiments of the present invention provide a message transmission method for a DDC network, comprising: a second NCP receiving a mirror message sent by a first server; the second NCP determining a first encapsulated message based on the mirror message and a first remote encapsulation entry, and sending it to an NCF; the first remote encapsulation entry including a first encapsulation identifier and a first global port having a corresponding relationship; the NCF being used to send the first encapsulated message to a first NCP; and the first NCP being configured as an egress device in the DDC network.
[0015] Optionally, before the second NCP receives the mirrored packet sent by the first server, the method further includes: the second NCP receiving traffic monitoring session information sent by the first NCP, wherein the traffic monitoring session information includes the identifier of the first NCP and at least one remote encapsulation entry; the second NCP determining, based on the traffic monitoring session information, the ingress policy of the second NCP for its own monitoring source port through the first NCP; the ingress policy is used to add a remote encapsulation entry to the mirrored packet sent by the monitoring source interface port.
[0016] Thirdly, embodiments of the present invention provide a message transmission apparatus for a DDC network, comprising: a first acquisition unit, configured to receive a first encapsulated message forwarded by a network cloud switching device (NCF); the first encapsulated message is obtained by adding a first remote encapsulation entry to a mirror message sent by a first server through a second NCP; the first remote encapsulation entry includes a first encapsulation identifier and a first global port that have a corresponding relationship; the first NCP is configured as an egress device in the DDC network. A first processing unit, configured to determine that the first global port, as the egress port, is in a working state, then encapsulate the first encapsulated message with header information according to the first encapsulation identifier to obtain a second encapsulated message, and send the second encapsulated message through the first global port.
[0017] Optionally, the first acquisition unit is further configured to: send traffic monitoring session information to the second NCP, the traffic monitoring session information including the identifier of the first NCP and at least one remote encapsulation entry; the traffic monitoring session information is used by the second NCP to set an ingress policy for its own monitoring source port through the first NCP; the ingress policy is used to add remote encapsulation entries to the mirrored packets sent by the monitoring source port.
[0018] Optionally, the first acquisition unit is further configured to: the first NCP determine the forwarding table entry of the session identifier based on the destination address information of the monitoring server; the forwarding table entry includes the header information encapsulation content of each port as the outgoing port under the corresponding encapsulation identifier; and perform header information encapsulation on the first encapsulated packet according to the first encapsulation identifier, including: obtaining the header information encapsulation content corresponding to the first encapsulation identifier from the forwarding table entry; and performing header information encapsulation on the first encapsulated packet using the header information encapsulation content corresponding to the first encapsulation identifier.
[0019] Optionally, any header information encapsulation content may include ERSPAN header encapsulation entry information, GRE header encapsulation entry information, IP header encapsulation entry information, and Layer 2 header encapsulation entry information.
[0020] Optionally, any remote encapsulation entry may be a mapping between the ERSPAN header encapsulation identifier and a global port, or any remote encapsulation entry may be a mapping between the ERSPAN header encapsulation identifier, the Layer 2 header encapsulation identifier, and a global port.
[0021] Optionally, the first processing unit is further configured to: further include: if the first NCP determines that the first global port, which serves as the output port, is in a fault state, then determine whether a second global port with the same session identifier as the first global port is in a working state; if the second global port is in a working state, then encapsulate the first encapsulated message with header information according to the second encapsulation identifier in the second remote encapsulation table entry to which the second global port belongs, to obtain a third encapsulated message, and send the third encapsulated message through the second global port.
[0022] Optionally, the first processing unit is further configured to: if the first global port does not have a second global port with the same session identifier, or if all second global ports with the same session identifier are in a fault state, then determine a third NCP with the same session identifier; the first NCP replaces the first remote encapsulation table entry with any third remote encapsulation table entry in the third NCP and sends it to the third NCP.
[0023] Fourthly, embodiments of the present invention provide a message transmission apparatus for a DDC network, comprising: a second acquisition unit, configured to receive a mirrored message sent by a first server; and a second processing unit, configured to determine a first encapsulated message based on the mirrored message and a first remote encapsulation entry, and send it to an NCF; the first remote encapsulation entry includes a first encapsulation identifier and a first global port with a corresponding relationship; the NCF is configured to send the first encapsulated message to a first NCP; and the first NCP is configured as an egress device in the DDC network.
[0024] Optionally, the second acquisition unit is further configured to: receive traffic monitoring session information sent by the first NCP, the traffic monitoring session information including the identifier of the first NCP and at least one remote encapsulation entry; the traffic monitoring session information is used by the second NCP to set an ingress policy for its own monitoring source port through the first NCP; the ingress policy is used to add remote encapsulation entries to the mirrored packets sent by the monitoring source port.
[0025] Fifthly, embodiments of this application also provide a computing device, including: a memory for storing a program; and a processor for calling the program stored in the memory and executing a message transmission method for a DDC network as described in the first aspect according to the obtained program.
[0026] In a sixth aspect, embodiments of this application also provide a computer-readable non-volatile storage medium, including a computer-readable program, which, when read and executed by a computer, causes the computer to perform a message transmission method for a DDC network as described in the first aspect.
[0027] In a seventh aspect, embodiments of this application provide a computer program product, which includes a computer program stored on a computer-readable storage medium. The computer program includes program instructions, which, when executed by a computer device, cause the computer device to perform the steps of the message transmission method for a DDC network described in the first aspect. Attached Figure Description
[0028] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0029] Figure 1 A DDC network architecture diagram provided for an embodiment of the present invention;
[0030] Figure 2 A flowchart illustrating a message transmission method for a DDC network provided in an embodiment of the present invention;
[0031] Figure 3 A diagram illustrating the relationship between a first package identifier and a port, provided in an embodiment of the present invention;
[0032] Figure 4 Another diagram showing the relationship between a first package identifier and a port provided in an embodiment of the present invention;
[0033] Figure 5 This is a diagram illustrating the message transmission architecture of a DDC network, provided as an embodiment of the present invention.
[0034] Figure 6 A diagram showing the relationship between backup encapsulation entries and ports provided in an embodiment of the present invention;
[0035] Figure 7 Another diagram showing the relationship between backup encapsulation entries and ports provided in this embodiment of the invention;
[0036] Figure 8 A schematic diagram of an NLRI structure provided in an embodiment of the present invention;
[0037] Figure 9 This is a schematic diagram of a Tunnel Type structure provided in an embodiment of the present invention;
[0038] Figure 10 A schematic diagram of the structure of a message transmission device for a DDC network provided in an embodiment of the present invention;
[0039] Figure 11 A schematic diagram of the structure of a message transmission device for a DDC network provided in an embodiment of the present invention;
[0040] Figure 12 This is a schematic diagram of the structure of a computing device provided in an embodiment of the present invention. Detailed Implementation
[0041] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely some embodiments of this invention, and not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention.
[0042] DDC is a network device system based on ASIC chip design. It involves making the management board, Fabric card, and line cards physically independent devices on top of existing rack network equipment (such as switches or routers), removing the original rack switch chassis, and then connecting them via cables to form a logical rack switch. See also... Figure 1 The original Fabric card is replaced by a Network Cloud Fabric (NCF) device, and the original line card is replaced by a Network Cloud Packet Forwarder (NCP).
[0043] ERSPAN (Encapsulated Remote Switched Port Analyzer) is a network monitoring technology used for remotely capturing and analyzing network traffic. It extends the traditional SPAN (Switched Port Analyzer) by allowing mirrored traffic to be transmitted to remote locations over IP networks. ERSPAN can copy traffic from a specific port or VLAN and send it to a remote monitoring device. ERSPAN encapsulates the mirrored traffic in GRE (Generic Routing Encapsulation) packets, enabling transmission over IP networks. The implementation principle of ERSPAN is to mirror the inbound and outbound packets of the port to be monitored, encapsulate them with ERSPAN headers, GRE headers, IP headers, and Layer 2 header information according to the parameters configured in the ESPAN session, and then send them to the remote monitoring device through the corresponding egress point. The various header encapsulations of the original packets are processed on the egress chip.
[0044] In a DDC (Distributed Disaggregate Chassis) network, to perform ERSPAN on traffic from service ports on an NCP device, currently the only way is to use a port on the same NCP as the egress point for mirrored traffic. For example, if the DDC network includes NCP1, NCP2, NCP3, and NCP4, see [link to relevant documentation]. Figure 1 In order to forward mirrored traffic to the monitoring server and thus realize traffic monitoring in the DDC network, this requires each NCP to use a port as the exit of ERSPAN, which will result in a large amount of port resources being occupied, wasting port resources and increasing network costs.
[0045] Therefore, embodiments of the present invention provide a message transmission method for a DDC network to solve the aforementioned problem of wasted port resources.
[0046] like Figure 2 The diagram shows a flowchart of a message transmission method for a DDC network according to an embodiment of the present invention. The method includes the following steps:
[0047] Step 201: The first network cloud packet forwarding device NCP receives the first encapsulated packet forwarded by the network cloud switching device NCF.
[0048] In this embodiment of the invention, for example, the DDC network includes four NCPs, namely NCP1, NCP2, NCP3 and NCP4. NCP1 and NCP2 are the second NCPs, and NCP3 and NCP4 are the first NCPs and also the egress devices. It can be seen that only NCP3 and NCP4 are egress devices in the DDC network, thereby reducing the port resources occupied and reducing network costs.
[0049] To enable the second NCP to also send mirrored packets to the monitoring server for DDC network traffic monitoring, the second NCP needs to forward the mirrored packets to the first NCP via NCF, and then the first NCP sends the mirrored packets to the monitoring server. Therefore, the first NCP receives the first encapsulated packet forwarded by the NCF, which is obtained by adding a first remote encapsulation entry to the mirrored packet sent by the first server by the second NCP.
[0050] Step 202: If the first NCP determines that the first global port, which is the output port, is in working state, then it encapsulates the first encapsulated message with header information according to the first encapsulation identifier to obtain the second encapsulated message, and sends the second encapsulated message through the first global port.
[0051] In this embodiment of the invention, the first NCP determines that the first global port, which serves as the outgoing port, is in working state. Then, it encapsulates the first encapsulated message with header information according to the first encapsulation identifier to obtain the second encapsulated message. The second encapsulated message is then sent to the monitoring server through the first global port, thereby realizing traffic monitoring of the DDC network.
[0052] As can be seen from steps 201 to 202 above, in the DDC network scenario, by using a small number of NCP devices as the first NCP, i.e. the egress devices, and forwarding mirrored packets between them and the second NCP, the port resource cost is reduced, and the traffic monitoring of the entire DDC network can be achieved by using a small number of NCP devices as egress devices.
[0053] In this embodiment of the invention, within a DDC network, some NCPs (Network Providers) serve as egress devices, thereby enabling traffic monitoring of the entire DDC network. For example, in a DDC network with four NCPs (Network Providers): NCP1, NCP2, NCP3, and NCP4, NCP3 and NCP4 act as egress devices. NCP1 and NCP2 forward mirrored packets received from servers to their respective egress devices, thus achieving traffic monitoring of the entire DDC network while reducing the number of egress devices. To enable data transmission between NCP1 or NCP2 and their corresponding egress devices, the egress devices, as well as NCP1 and NCP2, need to be pre-configured.
[0054] Optionally, the first NCP is configured with traffic monitoring session information, which includes the identifier of the first NCP, at least one remote encapsulation entry, and a session identifier.
[0055] Optionally, the first NCP determines the forwarding table entry for the session identifier based on the address information of the monitoring server. The forwarding table entry includes the header information encapsulated under the corresponding encapsulation identifier for each port that serves as the outgoing port. Any of these header information encapsulation entries includes ERSPAN header encapsulation entry information, GRE header encapsulation entry information, IP header encapsulation entry information, and Layer 2 header encapsulation entry information. It should be noted that the first NCP concatenates and installs each encapsulation entry into the chip.
[0056] Optionally, the second NCP configuration includes remote traffic monitoring session information, which includes the source port to be monitored, filtering policy, sampling policy, and session identifier. The filtering policy can be matching a specific server address or other filtering policies; this is not limited here. The sampling policy can be sampling one packet out of every 1000 packets, sampling one packet out of every 2000 packets, or other sampling policies; this is not limited here.
[0057] Optionally, the first NCP sends traffic monitoring session information to the second NCP. The second NCP determines the monitoring source port that the traffic monitoring session information needs to monitor based on the session identifier in the traffic monitoring session information. Then, the second NCP sets the ingress policy for the monitoring source port through the first NCP based on the traffic monitoring session information. The ingress policy is used to add remote encapsulation entries to the mirrored packets sent by the monitoring source port.
[0058] For example, if the first NCPs are NCP3 and NCP4, and the second NCPs are NCP1 and NCP2, NCP3 will send traffic monitoring session information to NCP1, NCP2, and NCP4, and NCP4 will send traffic monitoring session information to NCP1, NCP2, and NCP3. It's important to note that if the session identifiers of the traffic monitoring session information from different egress devices are the same, it means that the corresponding forwarding monitoring server is the same. Therefore, if the session identifiers of the traffic monitoring session information sent by NCP3 and NCP4 are both Session 1, both NCP3 and NCP4 can forward the mirrored packets of NCP1 to the monitoring server. In this case, NCP1 will receive the traffic monitoring session information from both NCP3 and NCP4. NCP1 can then preferentially choose NCP3 as the primary egress device and NCP4 as the alternative egress device.
[0059] In one possible scenario, if NCP3 is the second NCP and NCP1 is the first NCP, NCP3 sends traffic monitoring session information to NCP1. This traffic monitoring session information includes a first remote encapsulation entry, which includes a first encapsulation identifier and a first global port that have a corresponding relationship. NCP1 then generates a first encapsulated packet based on the first remote encapsulation entry and the mirrored packet, and sends the first encapsulated packet to NCP3. NCP3 retrieves the header information encapsulation content corresponding to the first encapsulation identifier from the forwarding table entry based on the first encapsulation packet, and then encapsulates the first encapsulated packet with the header information encapsulation content corresponding to the first encapsulation identifier to obtain a second encapsulated packet. Finally, the second encapsulated packet is sent to the monitoring server through the first global port, thereby realizing traffic monitoring of the DDC network.
[0060] As can be seen, the first encapsulation identifier in NCP3 is used to obtain the corresponding header information encapsulation content from the forwarding table entries. Any of these header information encapsulation contents includes ERSPAN header encapsulation entry information, GRE header encapsulation entry information, IP header encapsulation entry information, and Layer 2 header encapsulation entry information.
[0061] In one possible scenario, if NCP3 has two global ports, port 1 and port 2, the header content for the first encapsulated message will differ depending on which port NCP3 selects as the output port. Therefore, there is a correspondence between the first encapsulation identifier and the port, and the global port used as the output port can be determined based on the first encapsulation identifier. The following describes how to determine the first encapsulation identifier.
[0062] In one possible scenario, if the NCP3 has multiple ports, the ERSPAN header encapsulation entry information, GRE header encapsulation entry information, and IP header encapsulation entry information of any global port under the traffic monitoring session information with session identifier 1 are all identical, while the Layer 2 header encapsulation entry information is different. If the NCP3 also copies multiple copies of the ERSPAN header, GRE header, and IP header encapsulation entries to the chip based on multiple path exits, it ensures that all other complete GRE header, IP header, and Layer 2 encapsulation header information can be found from the ERSPAN header encapsulation entry. Therefore, the first encapsulation identifier of the NCP3 is the ERSPAN header encapsulation entry identifier, and the first remote encapsulation identifier is the correspondence between the ERSPAN header encapsulation identifier and the global port. For example, if the first encapsulation identifier of the NCP3 is ID1, the corresponding first global port is global port 1. Another example is if the first encapsulation identifier of the NCP3 is ID5, and the corresponding first global port is global port 2. See [reference needed]. Figure 3 .
[0063] In another possible scenario, NCP3 installs the hardware in series according to the ERSPAN header encapsulation entry information, GRE header encapsulation entry information, and IP header encapsulation entry information, and then installs two copies of the Layer 2 header encapsulation entry information and global ports accordingly. The first encapsulation identifier of NCP3 is the ERSPAN header encapsulation entry information identifier and the Layer 2 header encapsulation entry identifier. The first remote encapsulation identifier corresponds to the ERSPAN header encapsulation identifier, the Layer 2 header encapsulation identifier, and the global port. For example, if the first encapsulation identifier of NCP3 is ID1 and ID4, the corresponding first global port is port 1. As another example, if the first encapsulation identifier of NCP3 is ID1 and ID5, the corresponding first global port is port 2. See [reference needed]. Figure 4 .
[0064] Optional, see below Figure 5 When the first NCP sends the traffic monitoring session information to the second NCP, the second NCP receives the original packet from the first server. In addition to performing normal forwarding processing based on the original packet, it also mirrors the original packet to obtain a mirror packet. Based on the mirror packet, the first encapsulation identifier in the first remote encapsulation table, and the first global port, it generates a first encapsulated packet and forwards it to the monitoring server.
[0065] Optionally, the first NCP sends the first encapsulated message to the NCF, and the NCF sends the first encapsulated message to the corresponding second NCP according to the first global port in the first encapsulated message.
[0066] In one possible scenario, if the DDC network includes four NCPs (Network Providers): NCP1, NCP2, NCP3, and NCP4, where NCP1 and NCP2 are the second NCPs and NCP3 and NCP4 are the first NCPs, NCP1 receives traffic monitoring session information from NCP3 and NCP4. Since both NCP3 and NCP4 send traffic monitoring session information with session identifier 1, NCP1 can perform hash balancing based on the five-tuple of the original packet and select one of the egress devices for forwarding. For example, if NCP3 is selected as the egress device, NCP1 generates a first encapsulated packet based on the first remote encapsulation entry and mirror packet in the traffic monitoring session information sent by NCP3 and sends it to the NCF (Network Container Registry), which then forwards it to NCP3.
[0067] In another possible scenario, if multiple egress devices exist for the same session identifier, the second NCP balances the egress devices based on the monitoring source port to be monitored. If NCP1 includes monitoring source port 1 and monitoring source port 2, and NCP1 receives traffic monitoring session information from NCP3 and NCP4, where both NCP3 and NCP4 send traffic monitoring session information with session identifier 1, then monitoring source port 1 is associated with NCP3, and monitoring source port 2 is associated with NCP4. In this case, mirrored packets from monitoring source port 1 will be forwarded via NCF to NCP3 for header encapsulation, and then forwarded by NCP3 to the monitoring server. Mirrored packets from monitoring source port 2 will be forwarded via NCF to NCP4 for header encapsulation, and then forwarded by NCP4 to the monitoring server.
[0068] Optionally, the first NCP receives the first encapsulated message from the NCF, and then, based on the first encapsulation identifier in the first encapsulation message, obtains the header information encapsulation content corresponding to the first encapsulation identifier from the forwarding table entry. Using the header information encapsulation content corresponding to the first encapsulation identifier, the first encapsulated message is encapsulated with header information to obtain the second encapsulated message. Then, the first NCP sends the second encapsulated message to the monitoring server through the first global port in the first remote encapsulation table entry.
[0069] In one possible scenario, the first encapsulation identifier is the ERSPAN header encapsulation identifier. The first NCP retrieves the corresponding ERSPAN header encapsulation entry, GRE header encapsulation entry, IP header encapsulation entry, and Layer 2 header encapsulation entry from the forwarding table based on the first encapsulation identifier. Then, based on the ERSPAN header encapsulation entry, GRE header encapsulation entry, IP header encapsulation entry, and Layer 2 header encapsulation entry, it encapsulates the header information corresponding to the first encapsulated message to obtain the second encapsulated message.
[0070] In another possible scenario, the first encapsulation identifier is an ERSPAN header encapsulation identifier and a Layer 2 header encapsulation identifier. The first NCP retrieves the corresponding ERSPAN header encapsulation entry, GRE header encapsulation entry, and IP header encapsulation entry from the forwarding table based on the ERSPAN header encapsulation identifier in the first encapsulation identifier. Then, based on these three header encapsulation entries, the first NCP encapsulates the corresponding header information of the first encapsulated message. Next, the first NCP retrieves the corresponding Layer 2 header encapsulation entry from the forwarding table based on the Layer 2 header encapsulation identifier in the first encapsulation identifier and encapsulates the Layer 2 header information of the first encapsulated message accordingly, resulting in the second encapsulated message.
[0071] Optionally, to avoid the first NCP being unable to send the second sub-encapsulated message to the monitoring server due to the first global port being in a fault state, the first NCP will determine the remote encapsulation table entry belonging to other global ports that have the same session identifier as any global port as the backup encapsulation table entry belonging to the remote encapsulation table entry of that global port.
[0072] Optionally, if the first NCP determines that the first global port, which is the output port, is in a fault state, then it determines whether the second global port, which has the same session identifier as the first global port, is in a working state. If the second global port is in a working state, then the first encapsulated message is encapsulated with header information according to the second encapsulation identifier in the second remote encapsulation table entry to which the second global port belongs, to obtain the third encapsulated message, and the third encapsulated message is sent through the second global port.
[0073] In one possible scenario, the remote encapsulation entry for any global port in the first NCP represents the mapping between the ERSPAN header encapsulation identifier and the global port. For example, if NCP3 is the first NCP and has three global ports: port 1, port 2, and port 3, where the session identifier for ports 1, 2, and 3 is session 1, then the remote encapsulation entries for port 2 and port 3 can be used as backup encapsulation entries for the remote encapsulation entry of port 1. Similarly, the remote encapsulation entries for port 1 and port 3 can be used as backup encapsulation entries for the remote encapsulation entry of port 2. For details on using the remote encapsulation entries for port 1 and port 2 as backup encapsulation entries for the remote encapsulation entry of port 3, please refer to [link to documentation]. Figure 6 .
[0074] For example, if NCP3 determines that port 1, which is the output port, is in a fault state, it determines whether port 2 or port 3 is in a working state. If port 2 is in a working state, it encapsulates the header information of the first encapsulated message according to the remote encapsulation table entry to which port 2 belongs, and obtains the third encapsulated message.
[0075] Optionally, since the first NCP corresponds to at least one global port, in one possible case, if the first NCP is NCP3, NCP3 has two global ports, namely port 1 and port 2, if NCP3 determines that port 1, which is the outgoing port, is in a fault state, it determines whether port 2, which has the same session identifier as port 1 and belongs to the same NCP, is in a working state. If global port 2 is in a working state, the first encapsulated message is encapsulated with header information according to the remote encapsulation table entry to which port 2 belongs, to obtain the third encapsulated message.
[0076] In another possible scenario, the remote encapsulation entry for any global port in the first NCP corresponds to the ERSPAN header encapsulation identifier, the Layer 2 header encapsulation identifier, and the global port. For example, if NCP3 is the first NCP and has two global ports, global port 1 and global port 2, where both global port 1 and global port 2 correspond to session 1, then the Layer 2 header encapsulation identifier and the global port in the remote encapsulation entry for global port 2 can be used as a backup encapsulation entry for the remote encapsulation entry of global port 1. Similarly, the Layer 2 header encapsulation identifier and the global port in the remote encapsulation entry for global port 1 can be used as a backup encapsulation entry for the remote encapsulation entry of global port 2. (See [link to relevant documentation]). Figure 7 .
[0077] For example, if the outgoing port in NCP3 is global port 1, during the encapsulation of the first encapsulated message, NCP3 encapsulates the ERSPAN header encapsulation entry information, GRE header encapsulation entry information, and IP header encapsulation entry information according to the ERSPAN header encapsulation identifier in the remote encapsulation entry to which global port 1 belongs. After encapsulation, it encapsulates the Layer 2 header encapsulation entry information according to the Layer 2 header encapsulation identifier in the remote encapsulation entry to which global port 1 belongs. If the Layer 2 header encapsulation entry outgoing fault occurs, it determines whether global port 2, which has the same session identifier as global port 1, is in working state. If global port 2 is in working state, it encapsulates the header information of the first encapsulated message according to the Layer 2 header encapsulation identifier in the remote encapsulation entry to which global port 2 belongs, to obtain the third encapsulated message.
[0078] In one possible scenario, if NCP3 determines that port 1, the outgoing port, is in a fault state, and also determines that port 2, which shares the same session identifier as port 1 and belongs to the same NCP, is not in a working state, then the remote encapsulation table entry belonging to port 2 cannot be used as a backup encapsulation table entry for port 1 to encapsulate the header information of the first encapsulated message. To solve this problem, this solution provides a backup priority method. The backup priority method is described below.
[0079] Optionally, if there is no second global port with the same session identifier for the first global port, or if all second global ports with the same session identifier are in a fault state, then a third NCP with the same session identifier is determined; the first NCP replaces the first remote encapsulation table entry with any third remote encapsulation table entry in the third NCP and sends it to the third NCP.
[0080] For example, if the first NCP is NCP3, and the output port of NCP3 is port 1, other global ports with the same session identifier as port 1 can be divided into two types: one is ports with the same session identifier as port 1 and both ports belong to NCP3; the other is ports with the same session identifier as port 1 but belong to different NCPs.
[0081] When port 1 of NCP3 is in a fault state, a backup encapsulation entry needs to replace the remote encapsulation entry belonging to port 1 to encapsulate the first encapsulated packet. The remote encapsulation entry belonging to a port that shares the same session identifier as port 1 and belongs to the same NCP3 as port 1 is designated as the backup encapsulation entry for port 1. The remote encapsulation entry belonging to a port that shares the same session identifier as port 1 but belongs to a different NCP than port 1 is designated as the remote backup encapsulation entry for port 1 and sent to the corresponding NCP. The backup encapsulation entry has a higher priority than the remote backup encapsulation entry.
[0082] For example, the first NCP includes NCP3 and NCP4. NCP3's output port is port 1, and its session identifier is session 1. NCP3 also has a global port, port 2, with the same session identifier. NCP4 has a global port, port 3, with the same session identifier. If NCP3 sends the first encapsulated message to the monitoring server via its output port, and port 1 of NCP3 is in a fault state, then according to backup priority, it is first determined whether port 2 of NCP3 is in a working state. If so, the remote encapsulation table entry for port 1 is replaced with the remote encapsulation table entry for port 2. Then, the first encapsulated message is encapsulated with header information according to the encapsulation identifier in the remote encapsulation table entry for port 2 to obtain the third encapsulated message. If not, determine whether port 3 of NCP4 is in working state. If so, replace the remote encapsulation table entry belonging to port 1 in the first encapsulated message with the remote encapsulation table entry belonging to port 3, and then send the replaced first encapsulated message to NCP4. The encapsulation identifier in the remote encapsulation table entry belonging to port 3 of NCP4 encapsulates the header information of the first encapsulated message to obtain the third encapsulated message.
[0083] Optionally, the first NCP sends traffic monitoring session information to the second NCP. In this implementation example, EVPN is used for extension, adding a new EVPN routing type (session EVPN routing), whose NLRI structure is as follows: Figure 8As shown, RD stands for Route Distinguisher, indicating the route distinguisher. Session type: can be used to represent different session types; ERSPAN is only one session type, and its value in this example is 1. Session ID: represents the session identifier of ERSPAN, globally unique within the DDC network. Router ID: the identifier of the first NCP, used to uniquely identify a device in the DDC network. The Router field is not the Key field for session EVPN routes.
[0084] Optionally, a new Tunnel Type can be added to the existing BGP Tunnel Encapsulation attribute to transmit DDC network-related encapsulation information. This type contains one or more TLV structures, such as... Figure 9 As shown, TunnelType: A new Tunnel type has been added. Length: The length of the Tunnel Encapsulation property. TLV Length: The length of the subsequent TLV Value field. Global Port Number: The identifier of the first global port used as the outgoing port. Encapsulation ID: The first encapsulation identifier.
[0085] Based on the same technical concept, embodiments of this application provide a message transmission device for a DDC network, which can be seen in [reference needed]. Figure 10 The device 1000 includes: a first acquisition unit 1001, configured to receive a first encapsulated message forwarded by the network cloud switching network device NCF; the first encapsulated message is obtained by adding a first remote encapsulation entry to a mirror message sent by the first server through the second NCP; the first remote encapsulation entry includes a first encapsulation identifier and a first global port that have a corresponding relationship; the first NCP is configured as an egress device in the DDC network;
[0086] The first processing unit 1002 is configured to determine that the first global port, which serves as the output port, is in a working state, and then encapsulate the first encapsulated message with header information according to the first encapsulation identifier to obtain a second encapsulated message, and send the second encapsulated message through the first global port.
[0087] Optionally, the first acquisition unit 1001 is further configured to: send traffic monitoring session information to the second NCP, the traffic monitoring session information including the identifier of the first NCP and at least one remote encapsulation entry; the traffic monitoring session information is used by the second NCP to set an ingress policy for its own monitoring source port through the first NCP; the ingress policy is used to add remote encapsulation entries to the mirrored packets sent by the monitoring source port.
[0088] Optionally, the first acquisition unit 1001 is further configured to: determine the forwarding table entry of the session identifier based on the destination address information of the monitoring server; the forwarding table entry includes the header information encapsulation content of each port as the outgoing port under the corresponding encapsulation identifier; and encapsulate the header information of the first encapsulated packet according to the first encapsulation identifier, including: obtaining the header information encapsulation content corresponding to the first encapsulation identifier from the forwarding table entry; and encapsulating the header information of the first encapsulated packet using the header information encapsulation content corresponding to the first encapsulation identifier.
[0089] Optionally, any header information encapsulation content may include ERSPAN header encapsulation entry information, GRE header encapsulation entry information, IP header encapsulation entry information, and Layer 2 header encapsulation entry information.
[0090] Optionally, any remote encapsulation entry may be a mapping between the ERSPAN header encapsulation identifier and a global port, or any remote encapsulation entry may be a mapping between the ERSPAN header encapsulation identifier, the Layer 2 header encapsulation identifier, and a global port.
[0091] Optionally, the first processing unit 1002 is further configured to: further include: if the first NCP determines that the first global port, which serves as the output port, is in a fault state, then determine whether a second global port with the same session identifier as the first global port is in a working state; if the second global port is in a working state, then encapsulate the first encapsulated message with header information according to the second encapsulation identifier in the second remote encapsulation table entry to which the second global port belongs, to obtain a third encapsulated message, and send the third encapsulated message through the second global port.
[0092] Optionally, the first processing unit 1002 is further configured to: if the first global port does not have a second global port with the same session identifier, or if all second global ports with the same session identifier are in a fault state, then determine a third NCP with the same session identifier; the first NCP replaces the first remote encapsulation table entry with any third remote encapsulation table entry in the third NCP and sends it to the third NCP.
[0093] Based on the same technical concept, embodiments of this application provide a message transmission device for a DDC network, which can be seen in [reference needed]. Figure 11 The apparatus 1100 includes: a second acquisition unit 1101, configured to receive a mirrored packet sent by a first server; and a second processing unit 1102, configured to determine a first encapsulated packet based on the mirrored packet and a first remote encapsulation entry, and send it to the NCF; the first remote encapsulation entry includes a first encapsulation identifier and a first global port that have a corresponding relationship; the NCF is configured to send the first encapsulated packet to a first NCP; the first NCP is configured as an egress device in the DDC network.
[0094] Optionally, the second acquisition unit 1101 is further configured to: receive traffic monitoring session information sent by the first NCP, the traffic monitoring session information including the identifier of the first NCP and at least one remote encapsulation entry; the traffic monitoring session information is used by the second NCP to set an ingress policy for its own monitoring source port through the first NCP; the ingress policy is used to add remote encapsulation entries to the mirrored packets sent by the monitoring source port.
[0095] Based on the same technical concept, embodiments of this application provide a computing device 1200, such as... Figure 12 As shown, it includes at least one processor 1201 and a memory 1202 connected to at least one processor. In this embodiment, the specific connection medium between the processor 1201 and the memory 1202 is not limited. Figure 12 Taking the connection between processor 1201 and memory 1202 via a bus as an example, the bus can be divided into address bus, data bus, control bus, etc.
[0096] In this embodiment of the application, the memory 1202 stores instructions that can be executed by at least one processor 1201. By executing the instructions stored in the memory 1202, at least one processor 1201 can perform the steps of the message transmission method of the DDC network described above.
[0097] The processor 1201 is the control center of the computing device. It can connect to various parts of the computing device through various interfaces and lines. By running or executing instructions stored in the memory 1202 and calling data stored in the memory 1202, it can process the message transmission method of the DDC network.
[0098] Optionally, processor 1201 may include one or more processing units. Processor 1201 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user interface, and applications, and the modem processor mainly handles wireless communication. It is understood that the modem processor described above can also be integrated into processor 1201. In some embodiments, processor 1201 and memory 1202 can be implemented on the same chip; in some embodiments, they can also be implemented separately on independent chips.
[0099] Processor 1201 can be a general-purpose processor, such as a central processing unit (CPU), digital signal processor, application-specific integrated circuit (ASIC), field-programmable gate array (FPGA), or other programmable logic device, discrete gate or transistor logic device, or discrete hardware component, capable of implementing or executing the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware processor, or executed by a combination of hardware and software modules within the processor.
[0100] Memory 1202, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. Memory 1202 may include at least one type of storage medium, such as flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic storage, magnetic disk, optical disk, etc. Memory 1202 can be any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer device, but is not limited thereto. In the embodiments of this application, memory 1202 may also be a circuit or any other device capable of implementing storage functions for storing program instructions and / or data.
[0101] Based on the same inventive concept, embodiments of this application provide a computer-readable storage medium storing a computer program executable by a computer device, which, when run on the computer device, causes the computer device to perform the steps of the message transmission method of the DDC network described above.
[0102] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0103] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to this application. It should be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0104] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0105] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0106] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A message transmission method for a distributed rack-mount (DDC) network, characterized in that, include: The first network cloud message forwarding device NCP receives the first encapsulated message forwarded by the network cloud switching device NCF. The first encapsulated message is obtained by adding a first remote encapsulation entry to the mirror message sent by the first server by the second NCP; the first remote encapsulation entry includes a first encapsulation identifier and a first global port that have a corresponding relationship; the first NCP is configured as an egress device in the DDC network. If the first NCP determines that the first global port, which serves as the output port, is in working state, then it encapsulates the first encapsulated message with header information according to the first encapsulation identifier to obtain a second encapsulated message, and sends the second encapsulated message through the first global port.
2. The method as described in claim 1, characterized in that, Before the first network cloud packet forwarding device NCP receives the first encapsulated packet forwarded by the network cloud switching device NCF, it also includes: The first NCP sends traffic monitoring session information to the second NCP. The traffic monitoring session information includes the identifier of the first NCP and at least one remote encapsulation entry. The traffic monitoring session information is used by the second NCP to set an ingress policy for its own monitoring source port through the first NCP. The ingress policy is used to add remote encapsulation entries to the mirrored packets sent by the monitoring source port.
3. The method as described in claim 2, characterized in that, Before the first NCP sends traffic monitoring session information to the second NCP, it also includes: The first NCP determines the forwarding table entry of the session identifier based on the destination address information of the monitoring server; the forwarding table entry includes the header information encapsulation content of each port as the outgoing port under the corresponding encapsulation identifier; The first encapsulated message is encapsulated with header information according to the first encapsulation identifier, including: Obtain the header information encapsulation content corresponding to the first encapsulation identifier from the forwarding table entry; The first encapsulated message is encapsulated using the header information encapsulation content corresponding to the first encapsulation identifier.
4. The method as described in claim 3, characterized in that, The encapsulation content of any header includes ERSPAN header encapsulation table information, GRE header encapsulation table information, IP header encapsulation table information, and Layer 2 header encapsulation table information; Any remote package entry represents the mapping between the ERSPAN header package identifier and the global port, or... Any remote encapsulation entry represents the correspondence between the ERSPAN header encapsulation identifier, the second-level header encapsulation identifier, and the global port.
5. The method according to any one of claims 1 to 4, characterized in that, Also includes: If the first NCP determines that the first global port, which serves as the output port, is in a fault state, then it determines whether the second global port, which has the same session identifier as the first global port, is in a working state. If the second global port is in working state, the first encapsulated message is encapsulated with header information according to the second encapsulation identifier in the second remote encapsulation table entry to which the second global port belongs, to obtain a third encapsulated message, and the third encapsulated message is sent through the second global port.
6. The method as described in claim 5, characterized in that, Also includes: If there is no second global port with the same session identifier for the first global port, or if all second global ports with the same session identifier are in a fault state, then a third NCP with the same session identifier is determined. The first NCP replaces the first remote encapsulation entry with any third remote encapsulation entry in the third NCP and then sends it to the third NCP.
7. A message transmission method for a DDC network, characterized in that, include: The second NCP receives the mirror message sent by the first server; The second NCP determines the first encapsulated message based on the mirrored message and the first remote encapsulation entry, and sends it to the NCF; the first remote encapsulation entry includes a first encapsulation identifier and a first global port that have a corresponding relationship; the NCF is used to send the first encapsulated message to the first NCP; the first NCP is configured as an egress device in the DDC network.
8. A message transmission device for a DDC network, characterized in that, include: The first acquisition unit is used to receive the first encapsulated message forwarded by the NCF of the network cloud switching network device; The first encapsulated message is obtained by adding a first remote encapsulation entry to the mirror message sent by the first server by the second NCP; the first remote encapsulation entry includes a first encapsulation identifier and a first global port that have a corresponding relationship; the first NCP is configured as an egress device in the DDC network. The first processing unit is configured to determine that the first global port, which serves as the output port, is in a working state, and then encapsulate the first encapsulated message with header information according to the first encapsulation identifier to obtain a second encapsulated message, and send the second encapsulated message through the first global port.
9. A message transmission device for a DDC network, characterized in that, include: The second acquisition unit is used to receive the mirror message sent by the first server; The second processing unit is used to determine the first encapsulated message based on the mirrored message and the first remote encapsulation entry, and send it to the NCF; the first remote encapsulation entry includes a first encapsulation identifier and a first global port that have a corresponding relationship; the NCF is used to send the first encapsulated message to the first NCP; the first NCP is configured as an egress device in the DDC network.
10. A computer device, characterized in that, include: Memory, used to store computer programs; A processor is configured to invoke a computer program stored in the memory and execute the steps of the method as described in any one of claims 1 to 6 according to the obtained program.
