Packet forwarding method and block switch
By configuring load balancing links and indicator tags, the congestion problem caused by forwarding different data stream packets in the chassis switch was solved, achieving a more efficient packet transmission rate.
Patent Information
- Application Number
- CN202411338390.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-24
- Publication Date
- 2025-11-25
- Estimated Expiration
- 2044-09-24
AI Technical Summary
In a chassis switch, data stream packets with different data characteristics are easily forwarded through the same line card and the same network board, leading to internal congestion and affecting the transmission rate.
By configuring load balancing links (LBN) and indicator tags, different data stream packets can be sent to the target network board through different uplink HG links, avoiding forwarding on the same line card and the same network board, and alleviating internal congestion within the switch.
It effectively alleviates uplink and downlink congestion within the chassis switch and improves message transmission rate.
Smart Images

Figure CN119172315B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of communication technology, and in particular to methods for message forwarding and chassis switches. Background Technology
[0002] In recent years, chassis-based switches have been widely used due to their flexibility and scalability.
[0003] When a chassis switch's line cards receive a packet, they assign a network board to the packet based on the data characteristics of the data stream it belongs to, so that the packet can be forwarded to the destination line card through the assigned network board. However, the number of network boards is limited, and this method cannot prevent packets with different data characteristics from being sent to the same network board through the same line card and then forwarded to the same destination network board. This can cause congestion inside the chassis switch, thus affecting the packet transmission rate. Summary of the Invention
[0004] In view of this, embodiments of this application provide a message forwarding method and a chassis switch to reduce congestion inside the chassis switch and improve the message transmission rate inside the chassis switch.
[0005] This application provides a message forwarding method, which is applied to a first line card in a chassis switch. The first line card can be any line card in the chassis switch. The method includes:
[0006] After receiving a packet through the local first user port, the configured forwarding information database (FIB) is queried to determine the destination line card of the packet.
[0007] If the target line card is a second line card different from the first line card, then when the load balancing LBN value set by the first user port is not set with an indicator tag, the target uplink HG link that has a mapping relationship with the LBN value is found from the uplink HG links that the first line card is connected to each network board respectively. When the LBN value is set with an indicator tag, the uplink HG link indicated by the indicator tag is determined as the target uplink HG link.
[0008] The message is sent to the target network board corresponding to the target uplink HG link, so that the message is forwarded to the second line card through the target network board;
[0009] The indicator tag of the first user port is set after receiving a notification from the target network board. The notification is issued by the target network board when it determines that the data stream containing the packet received by the first user port is experiencing forwarding congestion. The uplink HG link indicated by the indicator tag is determined by the first line card after receiving the notification. The uplink HG link corresponding to the indicator tag is different from the target uplink HG link that has a mapping relationship with the LBN value.
[0010] This application embodiment also provides a packet forwarding method, which is applied to a first network board in a chassis switch, wherein the first network board is any network board in the chassis switch, and the method includes:
[0011] When a packet is received from the uplink HG link between the first network board and the first line card, the packet is sent to the second line card; the first line card is any line card in the chassis switch, the second line card is the destination line card of the packet, and is determined by the first line card by querying the locally configured forwarding information base (FIB); the second line card is different from the first line card.
[0012] Calculate the forwarding delay of the data stream containing the packets forwarded by the first network board;
[0013] If forwarding congestion is determined in the target data stream based on the statistical analysis of the forwarding delay of each data stream, a notification is sent to the target line card from which the target data stream originates. The target line card includes the first line card. This allows the target line card to set an indication tag for the LBN value set on its local second user port based on the notification and to determine the uplink HG link indicated by the indication tag. The second user port refers to the user port on the target line card that receives packets belonging to the target data stream. The uplink HG link indicated by the indication tag is different from the uplink HG link between the target line card and the first network board.
[0014] This application also provides a chassis switch, including multiple line cards and multiple network boards:
[0015] Any line card in the chassis switch is used to perform the steps in the first method above;
[0016] Any network board in the chassis switch is used to perform the steps in the second method described above.
[0017] As can be seen from the above technical solutions, in this embodiment, by setting the LBN, a mapping relationship is formed between the first user port of the first line card (i.e., any user port in the first line card) and the uplink HG link between the line card and the corresponding target network board. When the first user port receives a packet, if the LBN value is not set with an indicator tag, it is sent to the target network board through the corresponding target uplink HG link. This allows packets of different data streams received by different user ports of the line card to be sent to the target network board through different destination uplink HG links, thereby avoiding the situation where packets of different data streams are sent to the same network board through the same line card. This can alleviate uplink congestion inside the chassis switch.
[0018] Furthermore, in this embodiment, when the target network board determines that the data stream containing the packet received by the first user port of the first line card is experiencing forwarding congestion at the target network board, it sends a notification to the first user port of the first line card. The first line card sets an indicator tag for the LBN value of the first user port and determines the uplink HG link indicated by the indicator tag. This allows packets received by the first line card at the first user port after the LBN value is set with the indicator tag to be forwarded to the target network board according to the uplink HG link corresponding to the indicator tag. This method, by monitoring the data streams experiencing forwarding congestion on each network board and notifying the first line card from which the congested data stream originates, so that the first line card sets an indicator tag for the first user port and sets the uplink HG link indicated by the indicator tag, achieves the purpose of reselecting forwarding links for packets of data streams experiencing downlink forwarding congestion, thereby alleviating downlink congestion within the chassis switch. This can further reduce congestion within the chassis switch and improve the packet transmission rate within the chassis switch. Attached Figure Description
[0019] Figure 1 This is a network architecture diagram of a chassis switch provided in an embodiment of this application;
[0020] Figure 2 A flowchart illustrating the method provided in the embodiments of this application;
[0021] Figure 3-1 A network architecture diagram of another chassis switch provided in this application embodiment;
[0022] Figure 3-2 A network architecture diagram of another chassis switch provided in this application embodiment;
[0023] Figure 3-3 A network architecture diagram of another chassis switch provided in this application embodiment;
[0024] Figure 4A schematic diagram of the process for obtaining the uplink HG link corresponding to the indication tag of the first user port, provided in an embodiment of this application;
[0025] Figure 5 A flowchart illustrating another method provided in an embodiment of this application;
[0026] Figure 6 This is a schematic diagram of a forwarding congestion scenario provided in an embodiment of this application. Detailed Implementation
[0027] To enable those skilled in the art to better understand the technical solutions provided in the embodiments of this application, and to make the above-mentioned objectives, features and advantages of the embodiments of this application more apparent and understandable, the technical solutions in the embodiments of this application will be further described in detail below with reference to the accompanying drawings.
[0028] To facilitate understanding of this method, the network architecture of the chassis switch provided in the embodiments of this application will be described first before describing the method itself:
[0029] See Figure 1 , Figure 1 The network architecture diagram of the chassis switch provided in this application is shown. Figure 1 As shown, this chassis switch has multiple line cards and multiple network boards. There is at least one high-gain (HG) link between each line card and each network board. This HG link is bidirectional; the direction of packet forwarding from the line card to the network board is the uplink HG link, and the direction of packet forwarding from the network board to the line card is the downlink HG link. In practical applications, each line card and each network board cooperate according to the method provided in the following embodiments to realize packet forwarding within the chassis switch.
[0030] It should be noted that, for ease of description, the methods provided in the embodiments of this application are described using terms such as "first line card" (which can be any line card in the aforementioned chassis switch) and "first network board" (which can be any network board in the aforementioned chassis switch). The descriptions such as "first" and "second" are merely for ease of description and do not constitute specific limitations.
[0031] The following is combined Figure 1 Based on the network architecture shown, the method provided in this application embodiment will first be described from the line card side:
[0032] See Figure 2 , Figure 2 This is a schematic diagram of the method flow provided in an embodiment of this application. In this embodiment, the method is executed by a first line card. Figure 2 As shown, the process may include the following steps:
[0033] S201: After receiving a message through the local first user port, query the configured forwarding information database (FIB) to determine the destination line card of the message.
[0034] S202, if the destination line card is a second line card different from the first line card, when the load balancing LBN value set by the first user port is not set with an indicator tag, the target uplink HG link that has a mapping relationship with the LBN value is found from the uplink HG links that are connected to each network board from the first line card. When the LBN value is set with an indicator tag, the uplink HG link indicated by the indicator tag is determined as the target uplink HG link.
[0035] It should be noted that before executing step S201 above, the method further includes: determining that the function of the first line card in querying the uplink HG link using message information is disabled. That is, step S201 is executed on the premise that the first line card is configured to prohibit the use of message information to query the target uplink HG link. Here, message information can refer to five-tuple information (i.e., source terminal IP address, destination terminal IP address, source terminal port number, destination terminal port number, and protocol type). Thus, when the first line card receives a message, it parses the message to obtain the five-tuple information, queries the routing path of the destination terminal IP address from the FIB, and thereby determines the destination line card corresponding to the next hop for message forwarding. When it is determined that the destination line card of the message is a second line card different from the first line card, the first line card will not use the five-tuple information to query the target uplink HG link. Instead, it determines the target uplink HG link by the LBN value set on the first user port of the first line card receiving the message and whether an indicator tag is set.
[0036] In this embodiment, the indicator tag of the first user port is set after receiving a notification from the target network board. The notification is issued by the target network board when it determines that the data stream containing the packet received by the first user port is experiencing forwarding congestion. The uplink HG link indicated by the indicator tag is determined by the first line card after receiving the notification, and the uplink HG link corresponding to the indicator tag is different from the target uplink HG link that has a mapping relationship with the LBN value. How the target network board determines forwarding congestion and issues the notification will be explained on the network board side, and will not be elaborated here.
[0037] In this embodiment, the specific setting method of the LBN value of each user port, and the specific implementation method of finding the target uplink HG link based on the LBN value when the LBN value set by the first user port is not set with an indicator tag, will be described later and will not be repeated here.
[0038] In this embodiment, the specific method of obtaining the uplink HG link indicated by the indicator tag of the first user port will be described later, and will not be repeated here.
[0039] S203, send a message to the target network board corresponding to the target uplink HG link, so that the message can be forwarded to the second line card through the target network board.
[0040] In this embodiment, the specific implementation method of the target network board forwarding the packet to the second line card will be described on the network board side, and will not be repeated here.
[0041] This concludes the process. Figure 2 The process is shown below.
[0042] pass Figure 2 As can be seen from the flowchart, in this embodiment, by setting the LBN, a mapping relationship is formed between the first user port of the first line card and the uplink HG link between the line card and the corresponding target network board. When the first user port receives a packet, if the LBN value is not set with an indicator tag, it is sent to the target network board through the corresponding target uplink HG link. This allows packets of different data streams received by different user ports of the line card to be sent to the target network board through different destination uplink HG links, thereby avoiding the situation where packets of different data streams are sent to the same network board through the same line card. This can alleviate uplink congestion inside the chassis switch.
[0043] Furthermore, in this embodiment, when the target network board determines that the data stream containing the packet received by the first user port of the first line card is experiencing forwarding congestion at the target network board, it sends a notification to the first user port of the first line card. The first line card sets an indicator tag for the LBN value of the first user port and determines the uplink HG link indicated by the indicator tag. This allows packets received by the first line card at the first user port after the LBN value is set with the indicator tag to be forwarded to the target network board according to the uplink HG link corresponding to the indicator tag. This method, by monitoring the data streams experiencing forwarding congestion on each network board and notifying the first line card from which the congested data stream originates, so that the first line card sets an indicator tag for the first user port and sets the uplink HG link indicated by the indicator tag, achieves the purpose of reselecting forwarding links for packets of data streams experiencing downlink forwarding congestion, thereby alleviating downlink congestion within the chassis switch. This can further reduce congestion within the chassis switch and improve the packet transmission rate within the chassis switch.
[0044] The following section provides a detailed explanation of how to set the LBN values for each of the aforementioned user ports:
[0045] The first line card connects to each network board via multiple uplink ports. All user ports on the first line card have the same transmission rate, and all uplink ports on the first line card used to connect to each network board have the same transmission rate.
[0046] As an example, if the transmission rates of each user port and each uplink port of the first line card are the same, then for each user port, a mapping relationship is established between the LBN value of the user port and the uplink HG link to which the target uplink port belongs; wherein, different user ports correspond to different target uplink ports.
[0047] For example, combining Figure 3-1 As shown, this line card has 9 user ports and 9 uplink ports. The transmission rates of the user ports are the same as those of the uplink ports. Each of the 9 user ports corresponds to one of the 9 uplink ports, with a one-to-one correspondence. There is one uplink HG link between this line card and each network board. The LBN values of the user ports are set to 1-9, and each user port with an LBN value of 1-9 corresponds to one of the 9 uplink ports' respective uplink HG links.
[0048] Combination Figure 3-2 As shown, this line card has 18 user ports and 18 uplink ports. The transmission rates of the user ports are the same as those of the uplink ports. Each of the 18 user ports corresponds to one of the 18 uplink ports, with a one-to-one correspondence. There are two uplink HG links between this line card and each network board. The LBN values of the user ports are set to 1-18, and each user port with an LBN value of 1-18 corresponds to one of the 18 uplink ports on its respective uplink HG link.
[0049] As another embodiment, if the transmission rate of each user port of the first line card is less than the transmission rate of each uplink port, then every N user ports form a user port group. For each user port group, the LBN value of the N user ports in the user port group and the mapping relationship between them and the uplink HG link to which the target uplink port belongs are established. The target uplink port corresponding to different user port groups is different. N depends on the transmission rate of any user port and the transmission rate of any uplink port of the first line card.
[0050] For example, combining Figure 3-3 As shown, this line card has 18 user ports and 9 uplink ports. The transmission rate of the user ports is half the transmission rate of the uplink ports. The 18 user ports correspond to the 9 uplink ports, with two user ports corresponding to one uplink port. There is one uplink HG link between this line card and each network board. The LBN values of the user ports range from 1 to 18. For example, user ports 1 and 2 have an LBN value of 1, user ports 3 and 4 have an LBN value of 2, and so on, with user ports 17 and 18 having an LBN value of 9. The LBN values of the two user ports are mapped to the HG uplink link belonging to one uplink port of this line card.
[0051] The above provides a detailed explanation of how to set the LBN value for each user port.
[0052] The following section elaborates on how to locate the target uplink HG link based on the LBN value when the LBN value set on the first user port is not assigned an indicator tag:
[0053] It should be noted that, in accordance with the above method (i.e. Figure 3-1 , 3-2 After setting the LBN value of each user port (as shown in 3-3), it can be ensured that the set LBN value of the user port is hashed to obtain a hash value, and the hash value is moduloed by the total number of user ports of the line card. The different remainders obtained correspond to the uplink HG links to which different target uplink ports belong.
[0054] Accordingly, the specific implementation of finding the target uplink HG link based on the LBN value can be as follows: perform a hash operation on the set LBN value of the user port to obtain a hash value, perform a remainder operation on the hash value and the total number of user ports of the line card, and determine the HG link corresponding to the remainder as the target HG link.
[0055] The above provides a detailed explanation of how to find the target uplink HG link based on the LBN value.
[0056] The following section provides a detailed explanation of the uplink HG link indicated by the indicator tag of the first user port:
[0057] See Figure 4 , Figure 4 This is a schematic diagram illustrating the process of obtaining the uplink HG link indicated by the indication tag of the first user port, as provided in an embodiment of this application. Figure 4 As shown, the process includes the following steps:
[0058] S401, Obtain the path quality table configured on the first line card; the path quality table includes the current transmission rate and current buffer depth of each downlink port connected to each line card in the chassis switch where the first line card is located, as well as the quality scores of multiple forwarding paths corresponding to the first line card; any forwarding path corresponding to the first line card consists of an uplink HG link from the first line card to any network board, and a downlink HG link from that network board to any other line card different from the first line card; the quality score of any forwarding path is determined based on the current transmission rate and current buffer depth of the downlink port corresponding to the downlink HG link in that forwarding path.
[0059] In this embodiment, the first line card periodically receives from each network board the latest transmission rate and buffer depth values of each downlink port of each downlink HG link connected to that network board. Furthermore, the current transmission rate and current buffer depth values in the path quality table are updated periodically based on the transmission rate and buffer depth values of each downlink port obtained from each network board.
[0060] In this embodiment, the lower the transmission rate of the HG downlink and the larger the buffer depth, the lower the quality score of the HG downlink; conversely, the higher the transmission rate of any HG downlink and the smaller the buffer depth, the higher the quality score of the HG downlink.
[0061] S402: Based on the path quality table, obtain the quality scores corresponding to each of the multiple forwarding paths between the first line card and the second line card, and select the forwarding path with the highest quality score as the target forwarding path.
[0062] S403, the uplink HG link in the target forwarding path is identified as the uplink HG link corresponding to this indication label.
[0063] The above provides a detailed explanation of the uplink HG link corresponding to the indicator tag of the first user port.
[0064] In one embodiment, after step S403 above, the method further includes: determining the downlink HG link in the target forwarding path as the downlink HG link corresponding to the indication tag, so that each network board can use it when forwarding the received packets to the destination line card.
[0065] The methods provided in this application embodiment have been described in detail above from the perspective of the line card. The methods provided in the embodiment below are described from the perspective of the network board:
[0066] See Figure 5 , Figure 5 This is a flowchart illustrating another method provided in an embodiment of this application. In this embodiment, the method is executed by a first stencil. Figure 5 As shown, the process may include the following steps:
[0067] S501: When a packet is received from the uplink HG link between the first network board and the first line card, the packet is sent to the second line card. The first line card is any line card in the chassis switch, and the second line card is the destination line card of the packet, which is determined by the first line card by querying the locally configured forwarding information database (FIB). The second line card is different from the first line card.
[0068] In this embodiment, when the first network board receives a message, it can obtain information indicating that the destination line card identified by the message at the first line card is the second line card by analyzing the message.
[0069] In this embodiment, the specific implementation method of sending the message to the second line card will be described in detail later with specific embodiments, and will not be repeated here.
[0070] S502, the forwarding delay of the data stream containing the packets forwarded by the first network board.
[0071] In this embodiment, the forwarding delay of any data stream is specifically implemented as follows: when the first network board receives the packet of the data stream, the forwarding delay of the data stream is determined based on the time when the packet enters the first network board and the time when it is forwarded from the first network board.
[0072] In this embodiment, the first network board distinguishes data streams based on the five-tuple information of the received message. When a message of a data stream is received (that is, the five-tuple information corresponding to the data stream is detected), the forwarding delay is determined by the time difference between the time when the message enters the first network board and the time when it is forwarded from the first network board.
[0073] S503, if it is determined that there is forwarding congestion in the target data stream based on the forwarding delay of each data stream, a notification is sent to the target line card from which the target data stream originates. The target line card includes the first line card. The target line card sets an indication tag on the LBN value set on the local second user port based on the notification and determines the uplink HG link indicated by the indication tag. The second user port refers to the user port on the target line card that receives the packet belonging to the target data stream. The uplink HG link indicated by the indication tag is different from the uplink HG link between the target line card and the first network board.
[0074] In this embodiment, if it is determined that one data stream is experiencing forwarding congestion based on the statistical analysis of the forwarding delays of each data stream, then that data stream is designated as the target data stream. If it is determined that multiple data streams are experiencing forwarding congestion based on the statistical analysis of the forwarding delays of each data stream, then the data stream with the largest bandwidth usage among the multiple congested data streams is designated as the target data stream.
[0075] As an example, the IPFIX chip on the first network board enables a congestion and high latency detection mechanism. When the forwarding latency of any data stream exceeds the set forwarding latency threshold of the downlink port of the first network board, it is considered that the data stream is congested and is reported to the control plane of the chassis switch (which can be the CPU of the chassis switch). If the control panel receives information about forwarding congestion for only one data stream, it takes that data stream as the target data stream. If the control panel receives information about forwarding congestion for multiple data streams at the same time, it takes the data stream with the largest bandwidth usage among the congested data streams as the target data stream.
[0076] The following example illustrates the situation of forwarding congestion. For example, such as... Figure 6 As shown, if the destination line card of both line card LC1 and line card LC8 is line card LC2, and through... Figure 2 The steps shown all require forwarding through network board SFC1. At this point, there is only one downlink path between network board SFC1 and line card LC2. Therefore, the data stream containing packets sent from line card LC1 to line card LC2 (referred to as the data stream from line card LC1 to line card LC2) and the data stream containing packets sent from line card LC81 to line card LC2 (referred to as the data stream from line card LC8 to line card LC2) will experience forwarding congestion at network board SFC1. In this case, the statistics from network board SFC1 will show that at least one of these two data streams, namely the data stream from line card LC1 to line card LC2 and the data stream from line card LC8 to line card LC2, has a forwarding delay exceeding the set delay threshold.
[0077] If the forwarding delay of the data stream sent from line card LC1 to line card LC2 exceeds a set delay threshold, it is identified as the target data stream, and a notification is sent to line card LC1. This causes line card LC1 to set an indication tag based on the LBN value set on its user port 1 and determine the uplink HG link indicated by the indication tag (it is known that both line cards LC1 and LC8 receive packets through their respective user ports 1). Furthermore, while determining the uplink HG link indicated by the indication tag, the downlink HG link indicated by the indication tag is also determined (for details on how the downlink HG link is determined, see...). Figure 4 The relevant descriptions in the illustrated embodiment will not be repeated here. Thus, packets from line card LC1 are sent to line card LC2 via the uplink HG link and downlink HG link indicated by the indicator tag, no longer needing to be forwarded through network board SFC1 to line card LC2. This alleviates the forwarding congestion between network board SFC1 and line card LC2. In other words, this method can effectively alleviate downlink congestion in chassis switches.
[0078] If the forwarding delays of both the data streams sent from line card LC1 to line card LC2 and the data streams sent from line card LC8 to line card LC2 exceed the set delay threshold, then the data stream with the larger bandwidth usage is selected as the target data stream. A notification is then sent to the line card from which the target data stream originates. This notification enables the line card to set an indication tag for the configured LBN value of the port receiving the packet, and to determine the uplink HG link and downlink HG link indicated by the indication tag. For details, please refer to [link to details]. Figure 4 The relevant descriptions in the illustrated embodiments will not be repeated here.
[0079] In this embodiment, the aforementioned method promptly detects target data flows experiencing forwarding congestion and sends a notification to the target line card from which the data flow originates. This allows the target line card to set an indication tag based on the LBN value set on its local second user port and determine the uplink HG link indicated by the indication tag. This enables timely notification of the line card from which the target data flow originates when forwarding congestion is detected at the first network board, allowing the line card to find a new forwarding path for the packet, thereby alleviating forwarding congestion and improving packet forwarding efficiency within the chassis switch.
[0080] As a further embodiment, after sending a notification to the target line card from which the target data stream originates, the method further includes: calculating the forwarding delay of the data stream containing the packets forwarded by the first network board at set suppression time intervals. If it is determined that the target data stream is congested based on the calculated forwarding delay of each data stream, then the notification continues to be sent to the target line card from which the target data stream originates, until it is determined that there is no data stream forwarding congestion based on the calculated forwarding delay of each data stream.
[0081] By setting the suppression time period, time can be reserved for the target line card from which the target data stream originates to set the indicator label, as well as the uplink HG link and downlink HG link indicated by the indicator label. In other words, time can be reserved for the target line card to adjust the new forwarding path, so as to avoid frequent duplicate notifications to the target line card, which would cause the target line card to frequently adjust the path and thus cause performance degradation.
[0082] The following is a detailed explanation of the above-mentioned message forwarding to the second-line card:
[0083] As an example, see the attached document. Figure 3-1 and 3-3 As shown, if there is a downlink HG link between the target network board and the second line card, the message will be forwarded to the second line card through the downlink HG link.
[0084] In another embodiment, if there are M downlink HG links between the first network board and the second line card, where M is greater than 1, then when it is determined, based on the information of the path the packet has already traversed, that the user port on the first line card receiving the packet has not set an indicator tag, the target downlink HG link with a mapping relationship to the LBN value of the user port carried in the packet is found from the M downlink HG links. When it is determined, based on the information of the path the packet has already traversed, that the target user port on the first line card receiving the packet has set an indicator tag, the downlink HG link indicated by the indicator tag is determined as the target downlink HG link; the downlink HG link indicated by the indicator tag of the target user port is determined when the first line card determines the uplink HG link indicated by the indicator tag. The packet is forwarded to the second line card through the target downlink HG link.
[0085] In this embodiment, the first network board can determine that the packet was received by the user port (referred to as the first user port for ease of description) on the first line card by analyzing the information of the path the packet has traversed. It can also determine whether the first user port has an indicator tag set, and if so, determine the downlink HG link indicated by that indicator tag. (For the specific method of determining the downlink HG link indicated by the indicator tag, please refer to...) Figure 4 (Description of the illustrated embodiments)
[0086] If the first network board determines that the first user port has an indicator label set, it will send the message to the second line card through the downlink HG link indicated by the indicator label.
[0087] If the first network board determines that the first user port has not set an indicator tag, it will find the target downlink HG link with a mapping relationship with the LBN value of the user port from the M downlink HG links based on the LBN value carried in the message, and send the message to the second line card through the target downlink HG link.
[0088] It should be noted that the mapping relationship between the LBN value of each user port and the M downlink HG links is determined based on the relationship between the total number of user ports K and M in any line card. Generally, M is less than K, meaning that the mapping relationship between the LBN value of each user port and the M downlink HG links is not a one-to-one correspondence. In this case, a hash operation is performed on the LBN value of the first user port from which the packet originates. The hash value is divided by M and the remainder is P. The Pth downlink HG link among the M downlink HG links is then identified as the target downlink HG link.
[0089] For example, such as Figure 3-2 As shown, packets from user ports 1 and 2 of the LC1 line card need to be forwarded to the LC2 line card via the SFC1 network board after confirmation. There are two downlink HG links between the SFC1 and LC2 line cards. The LBN values of user ports 1 and 2 are different, and the remainders after hash operation will definitely be different. This means that the packets from user ports 1 and 2 are forwarded to the LC2 line card according to their respective downlink HG links.
[0090] The above provides a detailed explanation of how the target network board forwards messages to the second line card.
[0091] The methods provided in the embodiments of this application have been described above.
[0092] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.
Claims
1. A message forwarding method, characterized in that, This method is applied to a first line card in a chassis switch, wherein the first line card is any line card in the chassis switch, and the method includes: After receiving a packet through the local first user port, the configured forwarding information database (FIB) is queried to determine the destination line card of the packet. If the target line card is a second line card different from the first line card, then when the load balancing LBN value set by the first user port is not set with an indicator tag, the target uplink HG link that has a mapping relationship with the LBN value is found from the uplink HG links that the first line card is connected to each network board respectively. When the LBN value is set with an indicator tag, the uplink HG link indicated by the indicator tag is determined as the target uplink HG link. The message is sent to the target network board corresponding to the target uplink HG link, so that the message is forwarded to the second line card through the target network board; The indicator tag of the first user port is set after receiving a notification from the target network board. The notification is issued by the target network board when it determines that the data stream containing the packet received by the first user port is experiencing forwarding congestion. The uplink HG link indicated by the indicator tag is determined by the first line card after receiving the notification. The uplink HG link corresponding to the indicator tag is different from the target uplink HG link that has a mapping relationship with the LBN value.
2. The method according to claim 1, characterized in that, Before querying the configured Forwarding Information Base (FIB) to determine the destination line card of the packet, the method further includes: It was determined that the function of the first line card to query the uplink HG link using message information was disabled.
3. The method according to claim 1, characterized in that, The first line card is connected to each network board through multiple uplink ports; The method further includes: If the transmission rates of each user port and each uplink port of the first line card are the same, then for each user port, a mapping relationship is established between the LBN value of the user port and the uplink HG link to which the target uplink port belongs; wherein, different user ports correspond to different target uplink ports. If the transmission rate of each user port of the first line card is less than the transmission rate of each uplink port, then every N user ports form a user port group. For each user port group, a mapping relationship is established between the LBN values of the N user ports in the user port group and the uplink HG link to which the target uplink port belongs. The target uplink port is different for different user port groups. N depends on the transmission rate of any user port and the transmission rate of any uplink port of the first line card.
4. The method according to claim 1, characterized in that, The uplink HG link indicated by the indicator label of the first user port is obtained through the following steps: Obtain the path quality table configured on the first line card; the path quality table includes the current transmission rate and current buffer depth of each downlink port connected to each line card in the chassis switch where the first line card is located, as well as the quality scores of multiple forwarding paths corresponding to the first line card; any forwarding path corresponding to the first line card consists of an uplink HG link from the first line card to any network board, and a downlink HG link from that network board to any other line card different from the first line card; the quality score of any forwarding path is determined based on the current transmission rate and current buffer depth of the downlink port corresponding to the downlink HG link in the forwarding path. Based on the path quality table, the quality scores corresponding to each of the multiple forwarding paths between the first line card and the second line card are obtained, and the forwarding path with the highest quality score is selected as the target forwarding path. The uplink HG link in the target forwarding path is identified as the uplink HG link corresponding to the indicator tag.
5. A message forwarding method, characterized in that, This method is applied to a first network board in a chassis switch, wherein the first network board is any network board in the chassis switch, and the method includes: When a packet is received from the uplink HG link between the first network board and the first line card, the packet is sent to the second line card; the first line card is any line card in the chassis switch, the second line card is the destination line card of the packet, and is determined by the first line card by querying the locally configured forwarding information base (FIB); the second line card is different from the first line card. Calculate the forwarding delay of the data stream containing the packets forwarded by the first network board; If forwarding congestion is determined in the target data stream based on the statistical analysis of the forwarding delay of each data stream, a notification is sent to the target line card from which the target data stream originates. The target line card includes the first line card. This allows the target line card to set an indication tag for the LBN value set on its local second user port based on the notification and to determine the uplink HG link indicated by the indication tag. The second user port refers to the user port on the target line card that receives packets belonging to the target data stream. The uplink HG link indicated by the indication tag is different from the uplink HG link between the target line card and the first network board.
6. The method according to claim 5, characterized in that, The forwarding delay of any data stream is obtained through the following steps: When the first network board receives the data stream packet, it determines the forwarding delay of the data stream based on the time the packet enters the first network board and the time it is forwarded from the first network board.
7. The method according to claim 5, characterized in that, The determination of the target data stream based on the statistically calculated forwarding delay of each data stream includes: If, based on the statistical analysis of the forwarding delay of each data stream, it is determined that one data stream is experiencing forwarding congestion, then that data stream is designated as the target data stream. If it is determined that multiple data streams are experiencing forwarding congestion based on the statistical analysis of their forwarding delays, then the data stream with the largest bandwidth usage among the multiple data streams experiencing forwarding congestion will be selected as the target data stream.
8. The method according to claim 6, characterized in that, After sending the notification to the target line card from which the target data stream originates, the method further includes: Set a suppression time period at each interval, and calculate the forwarding delay of the data stream containing the packets forwarded by the first network board; If the forwarding delay of each data stream is statistically determined to be congested, then a notification will continue to be sent to the target line card from which the target data stream originates, until it is determined that there is no data stream forwarding congestion based on the forwarding delay of each data stream.
9. The method according to claim 5, characterized in that, Sending the message to the second line card includes: If there is a downlink HG link between the first network board and the second line card, the message is forwarded to the second line card through the downlink HG link; If there are M downlink HG links between the first network board and the second line card, where M is greater than 1, then when it is determined that the user port receiving the message on the first line card has not set an indicator tag based on the information of the path that the message has already traversed, the target downlink HG link that has a mapping relationship with the LBN value is found from the M downlink HG links based on the LBN value of the user port carried in the message. When determining the target user port setting an indicator tag on the first line card to receive the message based on the information of the path the message has already traversed, the downlink HG link indicated by the indicator tag is determined as the target downlink HG link; the downlink HG link indicated by the indicator tag of the target user port is determined when the first line card determines the uplink HG link indicated by the indicator tag. The message is forwarded to the second line card via the target downlink HG link.
10. A chassis switch, characterized in that, Includes multiple line cards and multiple network boards: Any line card in the chassis switch is used to perform the steps of the method as described in any one of claims 1 to 4; Any network board in the chassis switch is used to perform the steps of the method as described in any one of claims 5 to 9.
Citation Information
Patent Citations
Message transmission method and device, storage medium and electronic device
CN117978738A
Packet processing method and related apparatus
WO2024093778A1