Forwarding method and device
By autonomously managing forwarding entries within the NCP, the forwarding error problem of cloud cluster switches during NCC failures is solved, achieving high-speed and efficient packet forwarding and meeting the needs of modern intelligent computing center networks.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-25
- Publication Date
- 2026-03-10
AI Technical Summary
When the existing cloud cluster switch fails, it cannot maintain the forwarding table entries, which makes it easy for NCF and NCP to make mistakes when forwarding service traffic.
By implementing autonomous forwarding table entry management within the NCP, after receiving the original message, the NCP obtains the forwarding table entry based on the destination IP address, stores it in the virtual output queue, and broadcasts the service message to multiple NCFs during the polling cycle. The main NCF then finds and forwards the message to the corresponding NCP.
It enables autonomous forwarding of cloud cluster switches in the event of NCC failure, avoids forwarding errors, supports high-speed and efficient packet forwarding, and is adapted to network traffic processing in modern intelligent computing center networks.
Smart Images

Figure CN118827539B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to a forwarding method and apparatus. Background Technology
[0002] A data center (DC) is a facility that centrally stores, processes, and distributes data. Data centers typically include servers, storage devices, network equipment, and other components used to provide various computing and storage services.
[0003] Data Center Interconnect (DCI) is a network infrastructure that connects multiple data centers. DCI aims to enable high-speed, reliable, and secure communication between data centers to meet the high bandwidth and low latency requirements of data and applications.
[0004] With the development of the Internet and cloud services, big data and AI technology, data centers (DCs) have evolved from the Internet era to the cloud era and now to AI intelligent computing centers (referred to as "intelligent computing centers"). The business traffic has grown rapidly, which has put enormous pressure on the network equipment within the DC.
[0005] To adapt to the business flow model of the AI intelligent computing center, cloud cluster switches are introduced into the DC. The original main control board, network board, and interface board are replaced by box switches (cloud cluster device controller NCC, cloud cluster forwarding device NCF, and network control protocol NCP). A distributed architecture is adopted, and the original backplane bus connection is replaced by a management network.
[0006] Currently, when cloud cluster switches forward service traffic, they appear as a single network device to the outside world. Therefore, all forwarding table entries are maintained by the NCC and distributed to the NCF and NCP. However, this also means that if the NCC fails, the cloud cluster switch cannot maintain and update the forwarding table entries, making it highly susceptible to forwarding errors during the forwarding of service traffic by the NCF and NCP. Summary of the Invention
[0007] In view of this, this application provides a forwarding method and apparatus to solve the problem that when existing meta-cluster switches implement service traffic forwarding, once the NCC fails, it is unable to maintain and update the forwarding table entries, which leads to forwarding errors easily occurring in the NCF and NCP during the forwarding of service traffic.
[0008] In a first aspect, this application provides a forwarding method, which is applied to a first NCP, the first NCP being located within a cloud cluster switch, the cloud cluster switch including multiple NCFs and a second NCP, a first server accessing the first NCP, and a second server accessing the second NCP, the method comprising:
[0009] Receive a first raw message sent by the first server, wherein the first raw message includes a first destination IP address;
[0010] Based on the first destination IP address, a first forwarding table entry matching the first destination IP address is obtained from the first forwarding table, the first forwarding table entry including the system interface identifier;
[0011] Based on the system interface identifier, a first virtual output queue list item matching the system interface identifier is obtained from the virtual output queue list. The first virtual output queue list item includes a first output interface, and the first interface indicated by the first output interface is a first virtual output queue identifier.
[0012] Store the first original message in the first virtual output queue indicated by the first virtual output queue identifier;
[0013] When the first virtual output queue is currently in a polling period, the first service message is broadcast to the plurality of NCFs through the first virtual output queue. The first service message includes the system interface identifier, so that the primary NCF among the plurality of NCFs can look up the second forwarding table according to the system interface identifier, and forward the first service message to the second NCP according to the second interface indicated by the second outgoing interface identifier included in the second forwarding table entry that matches the system interface identifier.
[0014] The first destination IP address indicates the second server.
[0015] Secondly, this application provides a forwarding device applied to a first NCP, the first NCP being located within a cloud cluster switch, the cloud cluster switch including multiple NCFs and a second NCP, a first server accessing the first NCP, and a second server accessing the second NCP, the device comprising:
[0016] A receiving unit is configured to receive a first original message sent by the first server, wherein the first original message includes a first destination IP address.
[0017] The first acquisition unit is configured to acquire a first forwarding table entry matching the first destination IP address from the first forwarding table, the first forwarding table entry including a system interface identifier;
[0018] The second acquisition unit is configured to acquire a first virtual output queue list item that matches the system interface identifier from the virtual output queue list according to the system interface identifier. The first virtual output queue list item includes a first output interface, and the first interface indicated by the first output interface is a first virtual output queue identifier.
[0019] A storage unit is configured to store the first original message into the first virtual output queue indicated by the first virtual output queue identifier;
[0020] The sending unit is configured to broadcast a first service message to the plurality of NCFs through the first virtual output queue when the first virtual output queue is currently in a polling period. The first service message includes the system interface identifier, so that the primary NCF among the plurality of NCFs can look up a second forwarding table according to the system interface identifier, and forward the first service message to the second NCP according to the second interface indicated by the second outgoing interface identifier included in the second forwarding table entry that matches the system interface identifier.
[0021] The first destination IP address indicates the second server.
[0022] Thirdly, this application provides a network device including a processor and a machine-readable storage medium storing machine-executable instructions that can be executed by the processor, which in turn cause the processor to perform the method provided in the first aspect of this application.
[0023] Therefore, by applying the forwarding method and apparatus provided in this application, the first NCP receives a first original message sent by the first server, the first original message including a first destination IP address; according to the first destination IP address, the first NCP obtains a first forwarding table entry matching the first destination IP address from the first forwarding table, the first forwarding table entry including a system interface identifier; according to the system interface identifier, the first NCP obtains a first virtual output queue list entry matching the system interface identifier from the virtual output queue list, the first virtual output queue list entry including a first outgoing interface, the first interface indicated by the first outgoing interface being a first virtual output queue identifier; the first NCP stores the first original message in the first virtual output queue indicated by the first virtual output queue identifier; when the first virtual output queue is currently in a polling cycle, the first NCP broadcasts a first service message to multiple NCFs through the first virtual output queue, the first service message including a system interface identifier, so that the primary NCF among the multiple NCFs looks up a second forwarding table according to the system interface identifier, and forwards the first service message to the second NCP according to the second interface indicated by the second outgoing interface identifier included in the second forwarding table entry matching the system interface identifier; wherein, the first destination IP address indicates the second server.
[0024] Thus, in cloud cluster switches, the forwarding tables within NCP and NCF no longer rely on the issuance and maintenance of NCC, achieving an integrated, loosely coupled forwarding solution. This solves the problem that existing meta-cluster switches, when forwarding service traffic, cannot maintain and update forwarding table entries if the NCC fails, leading to forwarding errors in NCF and NCP during service traffic forwarding. Simultaneously, it enables the cloud cluster switch's forwarding plane to achieve high-speed, efficient packet forwarding, supporting large-scale network traffic processing and management, and better adapting to modern intelligent computing center networks. Attached Figure Description
[0025] Figure 1 A flowchart of the forwarding method provided in the embodiments of this application;
[0026] Figure 2 This is a schematic diagram of the communication network topology of the cloud cluster switch provided in the embodiments of this application;
[0027] Figure 3 This is a schematic diagram of the tunnel type sub-attribute structure provided in an embodiment of this application;
[0028] Figure 4 This is a schematic diagram of the system interface identifier structure carried by the value field provided in the embodiments of this application;
[0029] Figure 5 This is a schematic diagram of message forwarding between NCPs provided in an embodiment of this application;
[0030] Figure 6 A structural diagram of the forwarding device provided in the embodiments of this application;
[0031] Figure 7 The network device hardware structure provided in the embodiments of this application. Detailed Implementation
[0032] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this application. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this application as detailed in the appended claims.
[0033] The terminology used in this application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. The singular forms “a,” “the,” and “the” used in this application and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the corresponding listed items.
[0034] It should be understood that although the terms first, second, third, etc., may be used in this application to describe various information, such information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, without departing from the scope of this application, first information may also be referred to as second information, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to determination."
[0035] The forwarding method provided in the embodiments of this application will be described in detail below. See also... Figure 1 , Figure 1 A flowchart illustrating a forwarding method provided in an embodiment of this application. This method is applied to a first NCP. The forwarding method provided in an embodiment of this application may include the following steps.
[0036] Step 110: Receive the first original message sent by the first server, wherein the first original message includes the first destination IP address;
[0037] Specifically, such as Figure 2 As shown, Figure 2 This is a schematic diagram of the communication network of a cloud cluster switch provided in an embodiment of this application. Figure 2 In a cloud cluster switch, there are Network Cloud Packet-Forwarder (NCP), Network Cloud Fabric (NCF), and Network Cloud Controller (NCC). Hosts and network devices connect to the NCP, and each NCP is fully connected to each NCF. The NCP, NCF, and NCC are physically connected via the Network Management Gateway (MGT, a Layer 3 switch that supports common routing protocols, multicast protocols, etc.).
[0038] The NCC is responsible for managing and controlling the operation of the entire cloud cluster switches and network. It is responsible for the allocation and monitoring of network resources to ensure the stability and security of the entire cloud cluster switches. The NCF is responsible for packet forwarding between NCPs. The NCP is responsible for connecting various hosts (servers, GPUs, etc.) and network devices (switches).
[0039] In this embodiment, a first NCP and a second NCP are used as examples for illustration. A first server connects to the first NCP, and a second server connects to the second NCP.
[0040] When the first server wants to send a service flow to the second server, the first server generates a first original message, which includes a first destination IP address, specifically indicating the IP address of the second server.
[0041] The first server sends the first raw message to the first NCP. After receiving the first raw message, the first NCP obtains the first destination IP address from it.
[0042] Step 120: Based on the first destination IP address, obtain a first forwarding table entry that matches the first destination IP address from the first forwarding table. The first forwarding table entry includes a system interface identifier.
[0043] Specifically, according to the description of step 110, after the first NCP obtains the first destination IP address, it retrieves the first forwarding table entry that matches the first destination IP address from the first forwarding table stored locally, and retrieves the system port identifier from the first forwarding table entry.
[0044] In this embodiment, the first forwarding table entry includes a prefix field, a system interface field, and a remote encapsulation index field. The prefix field stores an IP address, such as the IP address of a host (server, GPU) or the network segment address of the interface. The system interface field stores a system interface identifier, which indicates the NCP and the interface within the NCP used to access the host or network device. The remote encapsulation index field stores an index value (e.g., EnapIndexX), which indicates a storage unit containing encapsulation information for packet encapsulation (Layer 2 encapsulation).
[0045] In this embodiment, the system interface identifier includes an NCP identifier and an interface identifier. The NCP identifier is ModID, and the interface identifier is PortID. For example, Mod2Port1 refers to an NCP identified as Mod2, which includes an interface identified as Port1.
[0046] Understandably, if the first destination IP address matches the network segment address, the first NCP will still obtain the system interface identifier from the entry containing the matching network segment address.
[0047] Step 130: Based on the system interface identifier, obtain a first virtual output queue list item that matches the system interface identifier from the virtual output queue list. The first virtual output queue list item includes a first output interface, and the first interface indicated by the first output interface is a first virtual output queue identifier.
[0048] Specifically, according to the description of step 120, after the first NCP obtains the system interface identifier, it retrieves a first virtual output queue list entry that matches the system interface identifier from the locally stored virtual output queue (VoQ) table, and then retrieves the first output interface from the first virtual output queue list entry. The first interface indicated by this first output interface is represented by the first virtual output queue.
[0049] In this embodiment, the first virtual output queue list entry includes a system interface identifier field and an outgoing interface field. Specifically, the aforementioned virtual output queue refers to a virtual logical interface that can serve as an outgoing interface for packets. An NCP may include multiple virtual logical interfaces, each corresponding to a remote NCP. Each logical interface can be used to send packets to the corresponding remote NCP.
[0050] For example, the first virtual output queue is identified as VoQ1, which matches the system interface identifier Mod2Port1. That is, messages can be sent to interface 1 in the NCP indicated by Mod2Port1 through VoQ1.
[0051] Step 140: Store the first original message in the first virtual output queue indicated by the first virtual output queue identifier;
[0052] Specifically, according to the description of step 130, after the first NCP obtains the first virtual output queue identifier, it stores the first original message in the first virtual output queue indicated by the first virtual output queue identifier.
[0053] Optionally, in this embodiment of the application, after storing the first original message to the first virtual output queue, the first NCP will also perform the following steps.
[0054] Furthermore, the first virtual output queue has a corresponding token bucket containing a certain number of tokens. These tokens can be used to determine whether a message can be forwarded at any given time. If the number of tokens in the token bucket is sufficient to send the first original message, the first NCP slices the first original message according to a preset size, resulting in multiple cell slices that make up the first original message.
[0055] In the outer layer of each cell slice, a message header is encapsulated. The first NCP obtains multiple first service messages. Each first service message includes a message header and a cell slice. The message header includes a system interface identifier.
[0056] Understandably, when the size of the first original message exceeds the maximum transmission unit (MTU) size, the first NCP needs to slice the first original message to enable fragmented transmission. For example, the MTU size is 200 bytes (the preset size). If the first original message is 800 bytes, the first NCP divides it into four cell slices. The first NCP encapsulates a header on the outer layer of each cell slice, resulting in four first service messages.
[0057] Optionally, the above message header also includes a remote encapsulation index and a sequence number; the sequence number is used by the second NCP to reassemble the multiple first service messages after receiving them and obtain the first original message; the remote encapsulation index is used by the second NCP to update the first destination MAC address included in the first original message.
[0058] Step 150: When the first virtual output queue is currently in a polling period, the first service message is broadcast to the plurality of NCFs through the first virtual output queue. The first service message includes the system interface identifier, so that the primary NCF among the plurality of NCFs can look up the second forwarding table according to the system interface identifier, and forward the first service message to the second NCP according to the second interface indicated by the second outgoing interface identifier included in the second forwarding table entry that matches the system interface identifier.
[0059] Specifically, according to the description of step 140, after the first NCP obtains the first service message, when the first virtual output queue is currently in the polling period, it broadcasts the first service message to multiple NCFs through the first virtual output queue.
[0060] In this embodiment, the NCP includes a cell interface that faces the NCF. The NCP broadcasts a first service message through the cell interface. This cell interface is also a virtual logical interface, and there are multiple such interfaces.
[0061] After multiple NCFs receive the first service message, the primary NCF, acting as the main NCF, retrieves the system interface identifier from the message. Based on this identifier, the primary NCF searches its locally stored second forwarding table and obtains a matching entry. This entry includes a second outgoing interface identifier. Using the second outgoing interface indicated by the identifier, the primary NCF forwards the first service message to the second NCP.
[0062] In this embodiment, after obtaining the system interface identifier, the main NCF retrieves the NCP identifier, i.e., ModID, from the system interface identifier. The main NCF uses the NCP identifier to look up the second forwarding table. The aforementioned second forwarding table entry includes an NCP identifier field and an outgoing interface field.
[0063] Understandably, since the first NCP fragments the first original message before transmission, the primary NCF will also transmit multiple first service messages to the second NCP. After receiving the multiple first service messages, the second NCP will reassemble the multiple cell slices according to the sequence number included in each first service message to restore the first original message.
[0064] In this embodiment, the first original message includes a first destination MAC address, which is the MAC address of the interface of the first NCP used to connect to the first server. After the second NCP reconstructs the first original message, it cannot forward the first original message based on the first destination MAC address. At this time, the second NCP also obtains the remote encapsulation index from the first service message.
[0065] In one implementation, if the second NCP can obtain the stored encapsulation information (specifically, the MAC address of the second server) locally based on the remote encapsulation index, then the second NCP uses the encapsulation information to update the first destination MAC address, obtaining the updated service packet. That is, the second NCP updates the first destination MAC address to the MAC address of the second server.
[0066] Subsequently, the second NCP retrieves the matching MAC forwarding table entry from the local MAC forwarding table based on the updated first destination MAC address, and obtains the outgoing interface identifier from the MAC forwarding table entry.
[0067] The second NCP forwards the updated service message to the second server through the interface indicated by the outgoing interface identifier (which is the interface through which the second NCP connects to the second server).
[0068] In another implementation, if the remote encapsulation index is empty, the second NCP cannot obtain encapsulation information locally. In this case, the second NCP can search its local ARP table for an ARP entry that matches the first destination IP address.
[0069] If no ARP entry matching the first destination IP address exists in the local ARP table, the second NCP initiates an ARP probe. The second NCP broadcasts an ARP request message containing the first destination IP address. When it receives an ARP response message from the second server through its interface, it updates the first destination MAC address using the second server's MAC address included in the ARP response message, resulting in the updated service message. In other words, the second NCP updates the first destination MAC address to the second server's MAC address.
[0070] Subsequently, through the interface that receives ARP response messages, the second NCP forwards the updated service messages to the second server.
[0071] Understandably, the second NCP also generates ARP entries and host routes for the second server locally.
[0072] Therefore, by applying the forwarding method provided in this application, the first NCP receives a first original message sent by the first server, the first original message including a first destination IP address; based on the first destination IP address, the first NCP obtains a first forwarding table entry matching the first destination IP address from the first forwarding table, the first forwarding table entry including a system interface identifier; based on the system interface identifier, the first NCP obtains a first virtual output queue list entry matching the system interface identifier from the virtual output queue list, the first virtual output queue list entry including a first outgoing interface, the first interface indicated by the first outgoing interface being a first virtual output queue identifier; the first NCP stores the first original message in the first virtual output queue indicated by the first virtual output queue identifier; when the first virtual output queue is currently in a polling cycle, the first NCP broadcasts a first service message to multiple NCFs through the first virtual output queue, the first service message including a system interface identifier, so that the primary NCF among the multiple NCFs looks up a second forwarding table based on the system interface identifier, and forwards the first service message to the second NCP based on the second interface indicated by the second outgoing interface identifier included in the second forwarding table entry matching the system interface identifier; wherein, the first destination IP address indicates the second server.
[0073] Thus, in cloud cluster switches, the forwarding tables within NCP and NCF no longer rely on the issuance and maintenance of NCC, achieving an integrated, loosely coupled forwarding solution. This solves the problem that existing meta-cluster switches, when forwarding service traffic, cannot maintain and update forwarding table entries if the NCC fails, leading to forwarding errors in NCF and NCP during service traffic forwarding. Simultaneously, it enables the cloud cluster switch's forwarding plane to achieve high-speed, efficient packet forwarding, supporting large-scale network traffic processing and management, and better adapting to modern intelligent computing center networks.
[0074] Optionally, in this embodiment of the application, the first NCP can also serve as the second NCP to receive multiple service messages sent by the main NCF and forward the service messages to the access server.
[0075] Specifically, the second NCP executes steps 110-120 as described above and broadcasts multiple second service messages to multiple NCFs. Each second service message includes a remote encapsulation index, a sequence number, and a cell slice. The primary NCF among the multiple NCFs sends multiple second service messages to the first NCP. It is understood that the primary NCF also performs the aforementioned table lookup and forwarding process, which will not be repeated here.
[0076] After receiving multiple second service messages, the first NCP extracts a sequence number from each message. Based on these sequence numbers, the first NCP reassembles the multiple cell slices to obtain a second original message. This second original message includes a second destination MAC address.
[0077] In one implementation, if the first NCP can obtain the stored encapsulation information from the local machine based on the remote encapsulation index, then the first NCP uses the encapsulation information to update the second destination MAC address and obtain the third service message.
[0078] Based on the updated second destination MAC address, the first NCP retrieves a third forwarding table entry from the third forwarding table (MAC forwarding table) that matches the updated second destination MAC address. This third forwarding table entry includes a third outgoing interface identifier. Based on the third interface indicated by the third outgoing interface identifier, the first NCP forwards the third service packet to the third server indicated by the updated second destination MAC address.
[0079] Optionally, the second original message may also include a second destination IP address.
[0080] In another implementation, if the first NCP does not obtain encapsulation information locally according to the remote encapsulation index, the first NCP searches its local ARP table for an ARP entry that matches the second destination IP address.
[0081] If no ARP entry matching the second destination IP address exists in the local ARP table, the first NCP initiates an ARP probe. The first NCP broadcasts an ARP request message containing the second destination IP address. When it receives an ARP response message from the fourth server via the fourth interface, the first NCP updates the second destination MAC address based on the fourth server's MAC address included in the ARP response message, thus obtaining the fourth service message.
[0082] Through the fourth interface, the first NCP forwards the fourth service message to the fourth server.
[0083] It is understandable that the forwarding process of the first NCP to the second service message is the same as the forwarding process of the second NCP to the first service message, and will only be briefly explained here.
[0084] Optionally, in this embodiment of the application, the process of establishing BGP neighbors between NCPs and synchronizing ARP information with each other through BGP neighbors is also included.
[0085] Specifically, a virtual logical interface, specifically a CPU interface, is created within each NCP. This CPU interface faces multiple NCPs. Logically, each NCP's CPU interface is connected to the same Layer 2 network and is in the same broadcast domain. Each NCP's CPU interface is configured with an IP address in the same network segment. Simultaneously, a full-mesh BGP neighbor is created, using the CPU interface's IP address to establish a BGP peer.
[0086] After each NCP establishes a BGP Peer, it first triggers the ARP resolution process.
[0087] The following explanation uses the first NCP and the second NCP as examples. The first NCP also includes a first CPU interface with an IP address of 192.168.10.1 / 16, and the second NCP also includes a second CPU interface with an IP address of 192.168.10.2 / 16.
[0088] The first NCP and the second NCP create a BGP Peer using the IP addresses of their respective CPU interfaces.
[0089] The first NCP generates a first BGP protocol message, which includes the first NCP's ARP information (the first NCP's IP address and MAC address). The first NCP then sends this first BGP protocol message to the second CPU interface via the first CPU interface.
[0090] After receiving the first BGP protocol message, the second NCP obtains the ARP information of the first NCP from it. Based on the first NCP's ARP information, the second NCP generates a first ARP entry corresponding to the first NCP. This first ARP entry includes the first NCP's IP address, MAC address, and the interface identifier of the second CPU interface.
[0091] Understandably, the second NCP also sends a second BGP protocol message to the first CPU interface through the second CPU interface. This second BGP protocol message includes the second NCP's ARP information (the second NCP's IP address and MAC address).
[0092] Similarly, after the first CPU interface receives the second BGP protocol message, the first NCP obtains the ARP information of the second NCP from it. Based on the second NCP's ARP information, the first NCP generates a second ARP entry corresponding to the second NCP. This second ARP entry includes the second NCP's IP address, MAC address, and the interface identifier of the first CPU interface.
[0093] Optionally, before performing step 110, the first NCP also includes a process of synchronizing host routes and network segment routes between NCPs through BGP neighbors.
[0094] Specifically, in one implementation, after a host (server, GPU, etc.) connects to the second NCP, the second NCP learns the host's ARP entries and generates a first host route based on these entries. This first host route includes the host's IP address, system interface identifier (which includes the second NCP's identifier and the interface identifier through which the host connects to the second NCP), and a remote encapsulation index.
[0095] The second NCP includes a switching chip, an interface management module, an ARP module, and a BGP module. The switching chip includes a hardware driver. The hardware driver obtains the system interface identifier from the interface management module and reports it to the ARP module. The ARP module generates ARP entries through ARP learning and reports the ARP entries along with the system interface identifier to the BGP module. Based on the address information included in the ARP entries, the BGP module obtains a pre-configured remote encapsulation index (configured by administrators via command line) and generates a first host route. The BGP module carries this first host route within a third BGP protocol message.
[0096] The second NCP sends a third BGP protocol message to the first CPU interface through the second CPU interface.
[0097] After receiving a third BGP protocol message, the first NCP obtains the first host route from it. The first NCP generates an ARP entry for the host, a second host route, and a forwarding table entry corresponding to the second host route locally. The first NCP stores the forwarding table entries in the first forwarding table.
[0098] At the same time, the first NCP also generates a virtual output queue list item corresponding to the system interface identifier locally, and stores the virtual output queue list item in the virtual output queue list.
[0099] The first NCP includes a switching chip, an interface management module, a BGP module, an ARP module, and a FIB. The switching chip includes a hardware driver. After receiving a third BGP protocol message, the BGP module obtains the first host route from it. The BGP module needs to distribute the remotely synchronized host route to its local machine. The BGP module distributes the first host route to the ARP module via the ARP Rule channel. The ARP module generates ARP entries for the host and a second host route locally based on the first host route, and simultaneously distributes the second host route to the FIB and the hardware driver. The FIB generates corresponding forwarding table entries based on the second host route and stores these entries in the first forwarding table. The FIB also distributes the forwarding table entries to the hardware driver.
[0100] It is understandable that the process of the ARP module generating ARP entries for the host and the second host route is the same as the process of existing network devices receiving remote synchronization routes and distributing the synchronization routes to the local device, and will not be repeated here.
[0101] In one example, the forwarding entries are shown in Table 1.
[0102] Table 1 Forwarding Items
[0103] perfix System Interface Remote encapsulated index IP2 / 32 Mod2Port1 EnaplndexX
[0104] The forwarding table entries include the `perfix` field, the `system interface` field, and the `remote encapsulation index` field. The `perfix` field stores the host's IP address / subnet mask; the `system interface` field stores the system interface identifier; and the `remote encapsulation index` stores an index value. This index value indicates a storage unit that stores the encapsulation information (Layer 2 encapsulation) used to encapsulate the packet. For example, it could be the MAC address of the interface connected to the remote host.
[0105] The list of virtual output queues is shown in Table 2.
[0106] Table 2 Virtual Output Team List Items
[0107] System Interface Output interface Mod2Port1 VoQ1
[0108] In another implementation, after a host (server, GPU, etc.) connects to the second NCP via a network device (switch), the second NCP learns the host's ARP entry and generates a first network segment route for the network segment where the interface accessing the network device is located. This first network segment route includes the network segment address of the network segment where the interface is located and the system interface identifier.
[0109] The second NCP includes a switching chip, an interface management module, an ARP module, and a BGP module. The switching chip includes a hardware driver. The hardware driver obtains the system interface identifier from the interface management module and reports it to the ARP module. The ARP module generates ARP entries through ARP learning and reports these entries, along with the system interface identifier, to the BGP module. The BGP module generates a first network segment route based on the ARP entries and the system interface identifier. The BGP module then carries this first network segment route within a fourth BGP protocol message.
[0110] The second NCP sends a fourth BGP protocol message to the first CPU interface through the second CPU interface.
[0111] After receiving the fourth BGP protocol message, the first NCP obtains the first network segment route from it. Based on the first network segment route, the first NCP generates a second network segment route and a corresponding forwarding table entry locally. The first NCP stores the forwarding table entry in the first forwarding table.
[0112] At the same time, the first NCP also generates a virtual output queue list item corresponding to the system interface identifier locally, and stores the virtual output queue list item in the virtual output queue list.
[0113] The first NCP includes a switching chip, an interface management module, a BGP module, an ARP module, a FIB, and a RM. The switching chip includes a hardware driver. After receiving a fourth BGP protocol message, the BGP module obtains the first network segment route from it. The BGP module needs to distribute the remotely synchronized network segment route to its local machine; therefore, it distributes the first network segment route to the RM. The RM generates a second network segment route locally and distributes it to the FIB. The FIB generates a corresponding forwarding table entry based on the second network segment route and stores the forwarding table entry in the first forwarding table. The FIB also distributes the forwarding table entry to the hardware driver.
[0114] In one example, the forwarding entries are shown in Table 3.
[0115] Table 3 Forwarding Items
[0116] perfix System Interface Remote encapsulated index network address / 32 Mod2Port1
[0117] Among them, the remote encapsulation index in the forwarding table entry including the network segment address is empty (because the remote host does not directly connect to the remote NCP, but connects to the NCP through a switch). The virtual output queue list entries are shown in Table 2 above.
[0118] Optionally, in this embodiment of the application, there are also hosts or network devices accessing the first NCP. In this case, the first NCP also generates multiple BGP protocol messages as described above as the second NCP, and sends the BGP protocol messages to the BGP Peer.
[0119] Specifically, after learning the ARP information of the host connected to the first NCP, the first NCP generates a third host route for the host locally based on the ARP information. The third host route includes the host's IP address, system interface identifier, and remote encapsulation index.
[0120] The first NCP sends a fifth BGP protocol message to the second NCP, which includes the third host route; wherein, the system interface identifier includes the identifier of the first NCP and the interface identifier of the host accessing the first NCP.
[0121] When a host accesses the first NCP through a network device, the first NCP generates a third network segment route locally for the network segment where the interface accessing the network device is located. This third network segment route includes the network segment address of the network segment where the interface is located and the system interface identifier.
[0122] The first NCP sends a sixth BGP protocol message to the second NCP. This sixth BGP protocol message includes the route for the third network segment. The system interface identifier includes the identifier of the first NCP and the interface identifier of the interface.
[0123] It is understandable that after receiving the BGP protocol message sent by the first NCP, the second NCP also generates the above content according to the process by which the first NCP generates ARP entries, host routes, network segment routes, forwarding table entries, and virtual output queue list entries, which will not be repeated here.
[0124] During the multiple BGP protocol message exchanges between the first NCP and the second NCP, each NCP receives / sends BGP protocol messages through its respective CPU interface.
[0125] Optionally, in the embodiments of this application, the above-mentioned BGP protocol message includes an extended community attribute field, which includes a BGP tunnel encapsulation attribute, and the BGP tunnel encapsulation attribute includes a tunnel type sub-attribute.
[0126] like Figure 3 As shown, Figure 3This is a schematic diagram of the tunnel type sub-attribute structure provided in an embodiment of this application. The tunnel type sub-attribute is a TLV structure, which includes a Type field, a Length field, and a Value field. The Value field is used to carry the system interface identifier.
[0127] The type field and length field each occupy 16 bits, and the value field occupies 32 bits. The value of the type field is 60000, which is used to indicate the BGP cell interface encapsulation type, to carry interface-related content, and to support extensions.
[0128] like Figure 4 As shown, Figure 4 This is a schematic diagram of the system interface identifier structure carried by the value field provided in the embodiments of this application. The value field includes a type field, a length field, a reserved field, a Mod Index field, and an interface index field.
[0129] The type field and reserved field each occupy 8 bits, while the length field, Mod index field, and interface index field each occupy 16 bits. The length field may also carry the VLAN identifier to which the interface belongs.
[0130] Optionally, in this embodiment of the application, the BGP protocol message used to carry host routes includes a route type field, which includes two MPLS label subfields (MPLS label1 and MPLS label2). Among the two MPLS label fields, the MPLS label subfield (MPLS label2), whose sequence number is not the first, is used to carry the remote encapsulation index.
[0131] In this embodiment, the BGP protocol message is specifically an EVPN Type 2 route or an EVPN Type 5 route. Specifically, a BGP protocol message carrying a host route is an EVPN Type 2 route; a BGP protocol message carrying a network segment route is an EVPN Type 5 route.
[0132] It is understandable that other fields included in EVPN Type 2 routes and EVPN Type 5 routes are configured in accordance with the existing EVPN protocol specifications.
[0133] The forwarding method provided in the embodiments of this application will be described in detail below. See also... Figure 5 , Figure 5 This is a schematic diagram illustrating message forwarding between NCPs as provided in an embodiment of this application. Figure 5In this architecture, NCP1, NCP2, NCP3, and NCP4 each connect to a server, and each NCP is fully connected to NCF1 and NCF2. Each NCP establishes an IP forwarding domain with each server; each NCP establishes a cell forwarding domain with each NCF. NCC does not involve specific forwarding implementations and is therefore not shown.
[0134] After each server connects to the NCP, the NCP learns the server's ARP entries and generates host route 1 for the server based on these entries. Host route 1 includes the server's IP address, system interface identifier (which includes the NCP identifier and the interface identifier through which the server connects to the NCP), and remote encapsulation index.
[0135] NCP sends BGP protocol message 1 to BGP Peer through its CPU interface. Upon receiving BGP protocol message 1, BGP Peer retrieves host route 1 from it. BGP Peer then generates host route 2 locally and a corresponding forwarding table entry 1. BGP Peer stores forwarding table entry 1 in forwarding table 1. Simultaneously, BGP Peer also generates a virtual output queue list entry 1 locally, corresponding to the system interface identifier, and stores virtual output queue list entry 1 in the virtual output queue list.
[0136] The following explanation uses the forwarding table 1 and the virtual output team list generated by NCP1 as an example.
[0137] Table 4 Forwarding Table 1
[0138] perfix System Interface Remote encapsulated index IP1 / 32 Int1 N / A IP2 / 32 Mod2Port1 EnaplndexX IP3 / 32 Mod3Port1 EnaplndexY IP4 / 32 Mod4Port1 EnaplndexZ
[0139] IP1-IP4 correspond to the IP addresses of servers 1-4, respectively. Mod2Port1 represents interface 1 of NCP2; Mod3Port1 represents interface 1 of NCP3; Mod4Port1 represents interface 1 of NCP3.
[0140] Table 5 List of Virtual Output Teams
[0141] System Interface Output interface Mod2Port1 VoQ1 Mod3Port1 VoQ2 Mod4Port1 VoQ3
[0142] The following example illustrates the process of server 1 sending a message to server 4. Server 1 connects to interface 1 of NCP1, and server 4 connects to interface 1 of NCP4.
[0143] Server 1 generates original message 1, which includes a destination IP address, specifically indicating the IP address of server 4. Server 1 sends original message 1 to NCP1. After receiving original message 1, NCP1 obtains the destination IP address from it.
[0144] Based on the destination IP address, NCP1 obtains the forwarding table entry 4 that matches the destination IP address from forwarding table 1 (the table entry numbers in the forwarding table are sequentially increasing), and obtains the system interface identifier and remote encapsulation index from forwarding table entry 4, namely Mod4Port1 and EnaplndexZ.
[0145] Based on the system interface identifier Mod4Port1, NCP1 retrieves the virtual output queue list item 3 that matches the system interface identifier Mod4Port1 from the virtual output queue list (the item numbers in the virtual output queue list are sequentially increasing), and retrieves the output interface, namely VoQ3, from the virtual output queue list item 3.
[0146] NCP1 stores the original message 1 in the virtual output queue VoQ3. If the number of tokens in the token bucket corresponding to the virtual output queue VoQ3 is sufficient to send the original message 1, then NCP1 slices the original message 1 according to a preset size (200 bytes). In this embodiment, the size of the original message 1 is 800 bytes, and after NCP1 slices the original message 1, it obtains 4 cell slices that make up the original message 1.
[0147] By encapsulating a message header on the outer layer of each cell slice, NCP1 obtains four service messages. Each service message includes a message header and a cell slice. The message header includes the system interface identifier Mod4Port1, the remote encapsulation index EnaplndexZ, and the sequence number 1. For example... Figure 5 The business message is shown in Message 1.
[0148] When the virtual output queue VoQ3 is currently in a polling cycle, NCP1 broadcasts four service messages to NCF1 and NCF2 through the virtual output queue VoQ3.
[0149] After NCF1 and NCF2 receive four service packets, the primary NCF (NCF1), acting as the main operator, retrieves the system interface identifier Mod4Port1 from each service packet. Based on the NCP identifier (Mod4) included in the system interface identifier Mod4Port1, NCF1 searches forwarding table 2 and retrieves the matching forwarding table entry 4 from it. This forwarding table entry 4 includes the outgoing interface, i.e., interface 4. Through interface 4, NCF1 forwards the four service packets to NCP4.
[0150] In this embodiment, each NCF includes 4 interfaces, with 1 interface connected to 1 NCP. Forwarding table 2 is shown in Table 6 below.
[0151] Table 6 Forwarding Table 2
[0152] NCP logo Output interface Mod1 Interface 1 Mod2 Interface 2 Mod3 Interface 3 Mod4 Interface 4
[0153] After receiving four service packets, NCP4 will reassemble the four cell slices according to the sequence number included in each service packet to restore the original packet 1. The original packet 1 includes a destination MAC address, which is the MAC address of interface 1 of NCP1. Interface 1 is used to connect to server 1 (NCP1 acts as a gateway, and the destination MAC address in the original packet 1 generated by server 1 is filled with the MAC address of interface 1 of NCP1).
[0154] Based on the destination MAC address, NCP4 cannot forward original packet 1. At this point, NCP4 also retrieves the remote encapsulation index EnaplndexZ from each service packet.
[0155] If NCP4 can obtain the stored encapsulation information, i.e., the MAC address of server 4, from the remote encapsulation index EnaplndexZ, then NCP4 uses the encapsulation information to update the destination MAC address, thus obtaining service packet 2. In other words, NCP4 updates the destination MAC address to the MAC address of server 4.
[0156] Based on the updated destination MAC address, NCP4 retrieves the matching MAC forwarding table entry from the local MAC forwarding table and obtains the outgoing interface, namely interface 1, from the MAC forwarding table entry.
[0157] Through interface 1, NCP4 forwards service message 2 to server 4.
[0158] Based on the same inventive concept, embodiments of this application also provide a forwarding device corresponding to the forwarding method. See also Figure 6 , Figure 6 The forwarding device provided in this application embodiment is applied to a first NCP, which is located within a cloud cluster switch. The cloud cluster switch includes multiple NCFs and a second NCP. A first server accesses the first NCP, and a second server accesses the second NCP. The device includes:
[0159] The receiving unit 610 is configured to receive a first original message sent by the first server, wherein the first original message includes a first destination IP address.
[0160] The first acquisition unit 620 is configured to acquire a first forwarding table entry matching the first destination IP address from the first forwarding table, the first forwarding table entry including a system interface identifier;
[0161] The second acquisition unit 630 is used to acquire a first virtual output queue list item that matches the system interface identifier from the virtual output queue list according to the system interface identifier. The first virtual output queue list item includes a first output interface, and the first interface indicated by the first output interface is a first virtual output queue identifier.
[0162] Storage unit 640 is used to store the first original message into the first virtual output queue indicated by the first virtual output queue identifier;
[0163] The sending unit 650 is configured to broadcast a first service message to the plurality of NCFs through the first virtual output queue when the first virtual output queue is currently in a polling period. The first service message includes the system interface identifier, so that the primary NCF among the plurality of NCFs can look up a second forwarding table according to the system interface identifier, and forward the first service message to the second NCP according to the second interface indicated by the second outgoing interface identifier included in the second forwarding table entry that matches the system interface identifier.
[0164] The first destination IP address indicates the second server.
[0165] Optionally, the device further includes:
[0166] The slicing unit (not shown in the figure) is used to slice the first original message according to a preset size if the number of tokens in the token bucket corresponding to the first virtual output queue is available to send the first original message, thereby obtaining multiple cell slices that make up the first original message.
[0167] An encapsulation unit (not shown in the figure) is used to encapsulate a message header on the outer layer of each cell slice to obtain multiple first service messages. Each first service message includes the message header and a cell slice. The message header includes the system interface identifier.
[0168] Optionally, the message header may also include a remote encapsulation index and a sequence number;
[0169] The sequence number is used by the second NCP to reassemble multiple first service messages and obtain the first original message after receiving multiple first service messages;
[0170] The remote encapsulation index is used by the second NCP to update the first destination MAC address included in the first original message.
[0171] Optionally, the receiving unit 610 is further configured to receive a plurality of second service messages sent by the main NCF, each second service message including a remote encapsulation index, a sequence number, and a cell slice;
[0172] The device further includes: a reassembly unit (not shown in the figure), used to reassemble multiple cell slices according to multiple sequence numbers to obtain a second original message, the second original message including a second destination MAC address;
[0173] An update unit (not shown in the figure) is used to update the second destination MAC address using the encapsulation information if the stored encapsulation information is obtained according to the remote encapsulation index, so as to obtain a third service packet.
[0174] The third acquisition unit (not shown in the figure) is used to acquire a third forwarding table entry that matches the updated second destination MAC address from the third forwarding table, and the third forwarding table entry includes a third outgoing interface identifier.
[0175] The sending unit 650 is further configured to forward the third service message to the third server indicated by the updated second destination MAC address according to the third interface indicated by the third outgoing interface identifier.
[0176] Optionally, the second original message includes a second destination IP address, and the apparatus further includes:
[0177] The lookup unit (not shown in the figure) is used to search in the local ARP table for an ARP entry that matches the second destination IP address if the encapsulation information is not obtained according to the remote encapsulation index.
[0178] The sending unit 650 is further configured to, if it does not exist, broadcast an ARP request message, the ARP request message including the second destination IP address;
[0179] The update unit (not shown in the figure) is also used to update the second destination MAC address according to the MAC address of the fourth server included in the ARP response message when the ARP response message is received through the fourth interface, so as to obtain the fourth service message.
[0180] The sending unit 650 is further configured to forward the fourth service message to the fourth server through the fourth interface.
[0181] Optionally, the first NCP further includes a first CPU interface, and the second NCP further includes a second CPU interface;
[0182] The sending unit 650 is further configured to send a first BGP protocol message to the second CPU interface through the first CPU interface. The first BGP protocol message includes the ARP information of the first NCP, so that the second NCP generates a first ARP entry corresponding to the first NCP based on the ARP information of the first NCP. The first ARP entry includes the IP address and MAC address of the first NCP and the interface identifier of the second CPU interface.
[0183] The receiving unit 610 is further configured to receive a second BGP protocol message sent by the second NCP through the first CPU interface, wherein the second BGP protocol message includes the ARP information of the second NCP;
[0184] The device further includes: a first generation unit (not shown in the figure), configured to generate a second ARP entry corresponding to the second NCP based on the ARP information of the second NCP, wherein the second ARP entry includes the IP address, MAC address and interface identifier of the first CPU interface of the second NCP.
[0185] Optionally, the receiving unit 610 is further configured to receive a third BGP protocol message sent by the second NCP, the third BGP protocol message including a first host route of the host accessing the second NCP, the first host route including the host's IP address, system interface identifier and remote encapsulation index;
[0186] The device further includes: a second generation unit (not shown in the figure), configured to generate a second host route for the host and a forwarding table entry corresponding to the second host route locally, and store the forwarding table entry in the first forwarding table, wherein the forwarding table entry includes the host's IP address, system interface identifier, and remote encapsulation index;
[0187] The third generation unit (not shown in the figure) is used to generate a virtual output queue list item corresponding to the system interface identifier locally, and store the virtual output queue list item in the virtual output queue list. The virtual output queue list item includes the system interface identifier and the output interface, and the output interface is indicated as the virtual output queue identifier.
[0188] The system interface identifier includes the identifier of the second NCP and the interface identifier through which the host connects to the second NCP.
[0189] Optionally, the receiving unit 610 is further configured to receive a fourth BGP protocol message sent by the second NCP, the fourth BGP protocol message including a first network segment route of the network segment where the interface used by the second NCP to access the network device is located, the first network segment route including the network segment address and the system interface identifier.
[0190] The second generation unit (not shown in the figure) is further configured to generate a second network segment route for the network segment where the interface is located and a forwarding table entry corresponding to the second network segment route locally, and store the forwarding table entry in the first forwarding table, wherein the forwarding table entry includes the network segment address and the system interface identifier;
[0191] The third generation unit (not shown in the figure) is further configured to generate a virtual output queue list item corresponding to the system interface identifier locally, and store the virtual output queue list item in the virtual output queue list. The virtual output queue list item includes the system interface identifier and an output interface, and the output interface is indicated as a virtual output queue identifier.
[0192] The system interface identifier includes the identifier of the second NCP and the interface identifier of the interface.
[0193] Optionally, the second generation unit (not shown in the figure) is further configured to, after learning the ARP information of the host accessing the first NCP, generate a third host route for the host locally based on the ARP information, wherein the third host route includes the host's IP address, system interface identifier, and remote encapsulation index.
[0194] The sending unit 650 is further configured to send a fifth BGP protocol message to the second NCP, the fifth BGP protocol message including the third host route;
[0195] The system interface identifier includes the identifier of the first NCP and the interface identifier through which the host connects to the first NCP.
[0196] Optionally, the second generation unit (not shown in the figure) is further configured to, when the host accesses the first NCP through a network device, generate a third network segment route locally for the network segment where the interface for accessing the network device is located, the third network segment route including the network segment address and the system interface identifier;
[0197] The sending unit 650 is further configured to send a sixth BGP protocol message to the second NCP, the sixth BGP protocol message including the third network segment route;
[0198] The system interface identifier includes the identifier of the first NCP and the interface identifier of the interface.
[0199] Optionally, the BGP protocol message includes an extended community attribute field, which includes a BGP tunnel encapsulation attribute, and the BGP tunnel encapsulation attribute includes a tunnel type sub-attribute.
[0200] The tunnel type sub-attribute is a TLV structure, which includes a value field used to carry the system interface identifier.
[0201] Optionally, the BGP protocol message includes a route type field, which includes two MPLS label subfields. The MPLS label subfield whose sequence number is not the first one is used to carry the remote encapsulation index.
[0202] Therefore, by applying the forwarding device provided in this application, the first NCP receives a first original message sent by the first server, the first original message including a first destination IP address; according to the first destination IP address, the first NCP obtains a first forwarding table entry matching the first destination IP address from the first forwarding table, the first forwarding table entry including a system interface identifier; according to the system interface identifier, the first NCP obtains a first virtual output queue list entry matching the system interface identifier from the virtual output queue list, the first virtual output queue list entry including a first outgoing interface, the first interface indicated by the first outgoing interface being a first virtual output queue identifier; the first NCP stores the first original message in the first virtual output queue indicated by the first virtual output queue identifier; when the first virtual output queue is currently in a polling cycle, the first NCP broadcasts a first service message to multiple NCFs through the first virtual output queue, the first service message including a system interface identifier, so that the primary NCF among the multiple NCFs looks up a second forwarding table according to the system interface identifier, and forwards the first service message to the second NCP according to the second interface indicated by the second outgoing interface identifier included in the second forwarding table entry matching the system interface identifier; wherein, the first destination IP address indicates the second server.
[0203] Thus, in cloud cluster switches, the forwarding tables within NCP and NCF no longer rely on the issuance and maintenance of NCC, achieving an integrated, loosely coupled forwarding solution. This solves the problem that existing meta-cluster switches, when forwarding service traffic, cannot maintain and update forwarding table entries if the NCC fails, leading to forwarding errors in NCF and NCP during service traffic forwarding. Simultaneously, it enables the cloud cluster switch's forwarding plane to achieve high-speed, efficient packet forwarding, supporting large-scale network traffic processing and management, and better adapting to modern intelligent computing center networks.
[0204] Based on the same inventive concept, embodiments of this application also provide a network device, such as... Figure 7As shown, the system includes a processor 710, a transceiver 720, and a machine-readable storage medium 730. The machine-readable storage medium 730 stores machine-executable instructions that can be executed by the processor 710. The processor 710 is prompted by the machine-executable instructions to execute the forwarding method provided in the embodiments of this application. (The foregoing...) Figure 6 The relay device shown can be adopted as follows: Figure 7 The hardware structure of the network device shown is implemented.
[0205] The aforementioned computer-readable storage medium 730 may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the computer-readable storage medium 730 may also be at least one storage device located remotely from the aforementioned processor 710.
[0206] The processor 710 mentioned above can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field-programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0207] In this embodiment of the application, the processor 710 reads the machine-executable instructions stored in the machine-readable storage medium 730, and is prompted by the machine-executable instructions to enable the processor 710 itself and the transceiver 720 to execute the forwarding method described in the foregoing embodiment of the application.
[0208] In addition, this application provides a machine-readable storage medium 730 that stores machine-executable instructions. When called and executed by the processor 710, the machine-executable instructions cause the processor 710 itself and the transceiver 720 to execute the forwarding method described in the aforementioned application.
[0209] The specific implementation process of the functions and roles of each unit in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0210] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this application according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0211] For the forwarding device and machine-readable storage medium embodiments, since the methods involved are basically similar to those in the aforementioned method embodiments, the description is relatively simple, and relevant details can be found in the descriptions of the method embodiments.
[0212] The above description is merely a preferred embodiment of this application and is not intended to limit this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.
Claims
1. A forwarding method, characterized by, The method is applied to a first NCP in a cloud cluster switch, the cloud cluster switch comprising a plurality of NCFs and a second NCP, a first server accessing the first NCP, and a second server accessing the second NCP, and the method comprises: receiving a first original packet sent by the first server, the first original packet comprising a first destination IP address; obtaining, according to the first destination IP address, a first forwarding table entry matching the first destination IP address from a first forwarding table, the first forwarding table entry comprising a system interface identifier; obtaining, according to the system interface identifier, a first virtual output queue table entry matching the system interface identifier from a virtual output queue table, the first virtual output queue table entry comprising a first out interface, the first out interface indicating a first interface as a first virtual output queue identifier; storing the first original packet into a first virtual output queue indicated by the first virtual output queue identifier; when the first virtual output queue is currently in a polling period, broadcasting, through the first virtual output queue, a first service packet to the plurality of NCFs, the first service packet comprising the system interface identifier, so that a master NCF in the plurality of NCFs looks up a second forwarding table according to the system interface identifier, and forwards the first service packet to the second NCP according to a second interface indicated by a second out interface identifier comprised in a second forwarding table entry matching the system interface identifier; wherein the first destination IP address indicates the second server; after the first original packet is stored into the first virtual output queue indicated by the first virtual output queue identifier, the method further comprises: if a number of tokens existing in a token bucket corresponding to the first virtual output queue is used to send the first original packet, slicing the first original packet according to a preset size to obtain a plurality of cell slices constituting the first original packet; encapsulating a packet header outside each cell slice to obtain a plurality of first service packets, each first service packet comprising the packet header and one cell slice, and the packet header comprising the system interface identifier.
2. The method of claim 1, wherein, The packet header further comprises a remote encapsulation index and a sequence number; the sequence number is used for the second NCP to receive the plurality of first service packets, reassemble the plurality of first service packets, and obtain the first original packet; the remote encapsulation index is used for the second NCP to update a first destination MAC address comprised in the first original packet.
3. The method of claim 1, wherein, The method further comprises: receiving a plurality of second service packets sent by the master NCF, each second service packet comprising a remote encapsulation index, a sequence number, and a cell slice; reassembling the plurality of cell slices according to the plurality of sequence numbers to obtain a second original packet, the second original packet comprising a second destination MAC address; if encapsulation information stored according to the remote encapsulation index is obtained, updating the second destination MAC address using the encapsulation information to obtain a third service packet; obtaining a third forwarding table entry matching the updated second destination MAC address from a third forwarding table according to the updated second destination MAC address, the third forwarding table entry comprising a third out-interface identifier; forwarding the third service packet to a third server indicated by the updated second destination MAC address according to a third interface indicated by the third out-interface identifier.
4. The method of claim 3, wherein, The second original packet comprises a second destination IP address, and the method further comprises: if the encapsulation information is not obtained according to the remote encapsulation index, searching a local ARP table to determine whether an ARP table entry matching the second destination IP address exists; if the ARP table entry does not exist, broadcasting an ARP request packet, the ARP request packet comprising the second destination IP address; when an ARP response packet sent by a fourth server is received through a fourth interface, updating the second destination MAC address according to a MAC address of the fourth server comprised in the ARP response packet to obtain a fourth service packet; forwarding the fourth service packet to the fourth server through the fourth interface.
5. The method of claim 1, wherein, The first NCP further comprises a first CPU interface, and the second NCP further comprises a second CPU interface; the method further comprises: sending a first BGP protocol packet to the second CPU interface through the first CPU interface, the first BGP protocol packet comprising ARP information of the first NCP, so that the second NCP generates a first ARP table entry corresponding to the first NCP according to the ARP information of the first NCP, the first ARP table entry comprising an IP address and a MAC address of the first NCP and an interface identifier of the second CPU interface; receiving a second BGP protocol packet sent by the second NCP through the first CPU interface, the second BGP protocol packet comprising ARP information of the second NCP; generating a second ARP table entry corresponding to the second NCP according to the ARP information of the second NCP, the second ARP table entry comprising an IP address and a MAC address of the second NCP and an interface identifier of the first CPU interface.
6. The method of claim 1, wherein, Before the first server sends the first original packet is received, the method further comprises: receiving a third BGP protocol packet sent by the second NCP, the third BGP protocol packet comprising a first host route of a host accessing the second NCP, the first host route comprising an IP address, a system interface identifier and a remote encapsulation index of the host; locally generating a second host route of the host and a forwarding table entry corresponding to the second host route, and storing the forwarding table entry into the first forwarding table, the forwarding table entry comprising the IP address, the system interface identifier and the remote encapsulation index of the host; locally generating a virtual output queue list item corresponding to the system interface identifier, and storing the virtual output queue list item into the virtual output queue list, the virtual output queue list item comprising the system interface identifier and an out-interface, the out-interface indicating a virtual output queue identifier; wherein the system interface identifier comprises an identifier of the second NCP and an identifier of an interface of the host accessing the second NCP.
7. The method of claim 1, wherein, Before the receiving the first original packet sent by the first server, the method further comprises: receiving a fourth BGP protocol packet sent by the second NCP, the fourth BGP protocol packet comprising a first network segment route of a network segment where an interface for accessing a network device in the second NCP is located, the first network segment route comprising a network segment address and a system interface identifier; locally generating a second network segment route of the network segment where the interface is located and a forwarding table item corresponding to the second network segment route, and storing the forwarding table item into the first forwarding table, the forwarding table item comprising the network segment address and the system interface identifier; locally generating a virtual output queue list item corresponding to the system interface identifier, and storing the virtual output queue list item into the virtual output queue list, the virtual output queue list item comprising the system interface identifier and an out-interface, the out-interface indicating a virtual output queue identifier; wherein the system interface identifier comprises an identifier of the second NCP and an identifier of the interface.
8. The method of claim 1, wherein, The method further comprises: after learning ARP information of a host accessing the first NCP, locally generating a third host route of the host according to the ARP information, the third host route comprising an IP address of the host, a system interface identifier and a remote encapsulation index; sending a fifth BGP protocol packet to the second NCP, the fifth BGP protocol packet comprising the third host route; wherein the system interface identifier comprises an identifier of the first NCP and an identifier of an interface of the host accessing the first NCP.
9. The method of claim 1, wherein, The method further comprises: when a host accesses the first NCP through a network device, locally generating a third network segment route of a network segment where an interface for accessing the network device is located, the third network segment route comprising a network segment address and a system interface identifier; sending a sixth BGP protocol packet to the second NCP, the sixth BGP protocol packet comprising the third network segment route; wherein the system interface identifier comprises an identifier of the first NCP and an identifier of the interface.
10. The method according to any one of claims 6-9, characterized in that, The BGP protocol packet comprises an extended community attribute field, the extended community attribute field comprising a BGP tunnel encapsulation attribute, the BGP tunnel encapsulation attribute comprising a tunnel type sub-attribute; the tunnel type sub-attribute is a TLV structure, the TLV structure comprising a value field, the value field being used to carry a system interface identifier.
11. The method of any of claims 6 or 8, wherein, The BGP protocol packet comprises a route type field, the route type field comprising two MPLS label sub-fields, and a non-first MPLS label sub-field in the two MPLS label sub-fields is used to carry a remote encapsulation index.
12. A forwarding device, characterized by The device is applied to a first NCP in a cloud cluster switch, the cloud cluster switch comprising a plurality of NCFs and a second NCP, a first server accessing the first NCP, and a second server accessing the second NCP, and the device comprises: a receiving unit configured to receive a first original packet sent by the first server, the first original packet comprising a first destination IP address; a first obtaining unit configured to obtain, according to the first destination IP address, a first forwarding table item matching the first destination IP address from a first forwarding table, the first forwarding table item comprising a system interface identifier; a second obtaining unit configured to obtain, according to the system interface identifier, a first virtual output queue list item matching the system interface identifier from a virtual output queue list, the first virtual output queue list item comprising a first out interface, the first out interface indicating a first interface as a first virtual output queue identifier; a storage unit configured to store the first original packet into a first virtual output queue indicated by the first virtual output queue identifier; a sending unit configured to broadcast, when the first virtual output queue is currently in a polling period, a first service packet to the plurality of NCFs through the first virtual output queue, the first service packet comprising the system interface identifier, so that a master NCF in the plurality of NCFs looks up a second forwarding table according to the system interface identifier, and forwards the first service packet to the second NCP according to a second interface indicated by a second out interface identifier comprised in a second forwarding table item matching the system interface identifier; wherein the first destination IP address indicates the second server. The device further comprises: a slicing unit configured to slice the first original packet according to a preset size to obtain a plurality of cell slices constituting the first original packet, if a number of tokens existing in a token bucket corresponding to the first virtual output queue is used to send the first original packet; an encapsulating unit configured to encapsulate a packet header outside each cell slice to obtain a plurality of first service packets, each first service packet comprising the packet header and one cell slice, and the packet header comprising the system interface identifier.
Citation Information
Patent Citations
Message forwarding method and frame type switching equipment
CN113518046A
Message forwarding method and device
CN116074236A