Layer 2 networking configuration method and system of full internet

By issuing specific broadcast rules in forwarding devices across the Internet network, controlling the forwarding paths of broadcast messages and multicast messages, the problem of forwarding loops in the Internet network is solved, and efficient network communication and link utilization is achieved.

CN120017503AActive Publication Date: 2025-05-16NAT UNIV OF DEFENSE TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510488226.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-18
Publication Date
2025-05-16
Estimated Expiration
2045-04-18

AI Technical Summary

Technical Problem

How to effectively reduce the generation of forwarding loops in the layer two network of the entire Internet network and make full use of its high-density links.

Method used

By issuing specific broadcast rules in the forwarding device, including the first broadcast rules, the second broadcast rules, the third broadcast rules and optional fourth broadcast rules, the forwarding paths of broadcast messages, multicast messages and unicast messages are controlled to avoid the generation of loops. These rules utilize the default broadcast mechanism, layer 2 forwarding table and Mac learning mechanism, combined with the SDN match-action mechanism to ensure that the packet can be effectively broadcast to all access terminals without creating loops.

Benefits of technology

The layer two-layer networking of the entire Internet network is realized, effectively reducing the generation of forwarding loops, and making full use of high-density links in the network, improving the communication efficiency and link utilization of the network.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120017503A_ABST
    Figure CN120017503A_ABST
Patent Text Reader

Abstract

The invention provides a full internet two-layer networking configuration method and system, and the method comprises the steps: issuing a first broadcast rule, a second broadcast rule and a third broadcast rule, and after a broadcast message, a multicast message and an unknown unicast message enter a first hop forwarding device, matching the first broadcast rule, and executing a default broadcast mechanism; when the broadcast message and the multicast message enter the second-hop forwarding device, the broadcast message and the multicast message are matched and execute a second broadcast rule with a higher priority, so that the broadcast message and the multicast message are broadcasted to an access port of the second-hop forwarding device, and the message can be prevented from being continuously sent to other forwarding devices; when the unicast message enters the second-hop forwarding equipment, if the second-layer forwarding table fails to be searched, the third broadcast rule with the higher priority is matched and executed, so that the unknown unicast message is broadcasted to the access port of the second-hop forwarding equipment, and the message can be prevented from being continuously sent to other forwarding equipment. According to the invention, the generation of the forwarding loop in the two-layer networking of the full internet can be effectively reduced, and the high-density link of the full internet can be fully utilized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of computer network technology, and in particular to a method and system for configuring a layer 2 network of a fully interconnected network. Background Art

[0002] A Full Mesh Network refers to a network topology in which all forwarding devices in the network are directly connected to each other. A Full Mesh Network has a very high link density and a very short network radius, which can meet high bandwidth and low latency requirements. The network scale is generally not large. For a Full Mesh Network, three-layer networking technology is currently used, which can meet the needs of network interoperability and can make full use of high-density links. However, the three-layer networking technology is relatively complex, and is subject to the shortcomings of the three-layer network, so the applications and services that can be supported are limited.

[0003] Compared with the three-layer networking technology, the implementation of the two-layer networking technology is simpler. The two-layer networking based on the two-layer forwarding table and Mac learning mechanism can meet the network interoperability requirements, but the two-layer forwarding table and Mac learning mechanism do not provide anti-loop functions. There must be no loops in the network topology. The STP protocol (Spanning Tree Protocol, Minimum Spanning Tree Protocol) needs to be introduced to eliminate loops before it can be applied to the fully interconnected network, which will cause a huge waste of links.

[0004] Therefore, how to effectively reduce the generation of forwarding loops in the Layer 2 networking of the fully interconnected network and make full use of its high-density links is a technical problem that needs to be urgently solved by those skilled in the art. Summary of the invention

[0005] To solve the above technical problems, the present application provides a method for configuring a fully interconnected layer 2 network, which can effectively reduce the generation of forwarding loops in the fully interconnected layer 2 network and make full use of its high-density links. The present application also provides a system for configuring a fully interconnected layer 2 network, which has the same technical effect.

[0006] The first objective of the present application is to provide a method for configuring a layer 2 network of a fully interconnected network.

[0007] The above-mentioned application objective 1 of the present application is achieved through the following technical solutions: A method for configuring a layer 2 network of a fully interconnected network, applied to a forwarding chip, comprising: issuing a first broadcast rule, wherein the first broadcast rule is configured in a forwarding device of the fully interconnected network, and executes a default broadcast mechanism for broadcast messages, multicast messages, and unknown unicast messages; issuing a second broadcast rule, wherein the second broadcast rule is configured to match broadcast messages and multicast messages received by each interconnection port in the forwarding device, and broadcast the matched messages to all access ports of the forwarding device, the interconnection port is a port where the forwarding device is interconnected with other forwarding devices, and the access port is a port where the forwarding device is connected to an access terminal, and the priority of the second broadcast rule is higher than that of the first broadcast rule; A third broadcast rule is issued, wherein the third broadcast rule is configured to match, for each of the interconnected ports in the forwarding device, unicast messages received by the interconnected port and for which no corresponding entry is found in the layer-2 forwarding table, and broadcast the matched messages to the access port of the forwarding device, wherein the priority of the third broadcast rule is higher than that of the first broadcast rule.

[0008] Preferably, the layer 2 networking configuration method of the fully interconnected network further includes: In the forwarding device, the Mac learning function is enabled and the STP protocol is not enabled.

[0009] Preferably, the layer 2 networking configuration method of the fully interconnected network further includes: A fourth broadcast rule is issued, wherein the fourth broadcast rule is configured to match, for each of the interconnection ports in the forwarding device, unicast messages received by the interconnection port and whose table entry value found in the layer-2 forwarding table is the interconnection port, and discard the matched messages, and the priority of the fourth broadcast rule is higher than the forwarding processing of known unicast messages by the layer-2 forwarding table.

[0010] Preferably, in the layer 2 networking configuration method of the fully interconnected network, the second broadcast rule, the third broadcast rule and the fourth broadcast rule adopt SDN broadcast rules.

[0011] The second objective of the present application is to provide a layer 2 networking configuration system for a fully interconnected network.

[0012] The second application objective of the present application is achieved through the following technical solutions: A fully interconnected layer 2 networking configuration system, applied to a forwarding chip, includes: A first configuration unit, configured to issue a first broadcast rule, wherein the first broadcast rule is configured in a forwarding device of a fully interconnected network, and executes a default broadcast mechanism for broadcast messages, multicast messages, and unknown unicast messages; A second configuration unit is used to issue a second broadcast rule, wherein the second broadcast rule is configured to match the broadcast message and multicast message received by each interconnection port in the forwarding device, and broadcast the matched message to all access ports of the forwarding device, the interconnection port is a port where the forwarding device is interconnected with other forwarding devices, and the access port is a port where the forwarding device is connected to an access terminal, and the priority of the second broadcast rule is higher than that of the first broadcast rule; A third configuration unit is used to issue a third broadcast rule, wherein the third broadcast rule is configured to match, for each of the interconnection ports in the forwarding device, unicast messages received by the interconnection port and for which no corresponding entry is found in the layer-2 forwarding table, and broadcast the matching messages to the access port of the forwarding device, and the priority of the third broadcast rule is higher than that of the first broadcast rule.

[0013] Preferably, the layer 2 networking configuration system of the fully interconnected network further includes: The fourth configuration unit is used to enable the Mac learning function in the forwarding device and not enable the STP protocol.

[0014] Preferably, the layer 2 networking configuration system of the fully interconnected network further includes: The fifth configuration unit is used to issue a fourth broadcast rule, wherein the fourth broadcast rule is configured to match, for each of the interconnection ports in the forwarding device, unicast messages received by the interconnection port and whose table entry value found in the second-layer forwarding table is the interconnection port, and discard the matched messages, and the priority of the fourth broadcast rule is higher than the forwarding processing of the known unicast messages by the second-layer forwarding table.

[0015] Preferably, in the layer 2 networking configuration system of the fully interconnected network, the second broadcast rule, the third broadcast rule and the fourth broadcast rule adopt SDN broadcast rules.

[0016] The above technical solution utilizes the default broadcast mechanism and layer 2 forwarding table commonly present in forwarding chips to provide fast and sensitive network response capabilities; through the above configuration, after the broadcast message, multicast message and unknown unicast message enter the first-hop forwarding device, the first broadcast rule is matched to execute the default broadcast mechanism; when the broadcast message and multicast message enter the second-hop forwarding device, the second broadcast rule with a higher priority will be matched and executed to broadcast the broadcast message and multicast message to the access port of the second-hop forwarding device, which can prevent the broadcast message and multicast message from continuing to be sent to other forwarding devices, ensure that the broadcast message and multicast message can be broadcast to all access terminals and avoid loops in the forwarding process; when the unicast message enters the second-hop forwarding device, if the layer 2 forwarding table search fails, the third broadcast rule with a higher priority will be matched and executed to broadcast the unknown unicast message to the access port of the second-hop forwarding device, which can prevent the unknown unicast message from continuing to be sent to other forwarding devices, ensure that the unknown unicast message can be broadcast to all access terminals and avoid loops in the forwarding process. In summary, the above technical solution utilizes the characteristics of the fully interconnected network to limit the broadcast range of broadcast messages, multicast messages and unknown unicast messages, and can realize the second-layer networking of the fully interconnected network, utilize each link in the fully interconnected network, and effectively reduce the generation of forwarding loops in the second-layer networking of the fully interconnected network. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0018] Figure 1 A schematic diagram of a flow chart of a method for configuring a layer 2 network of a fully interconnected network in an embodiment of the present application; Figure 2 This is a schematic diagram of the fully interconnected network topology structure in the embodiment of the present application; Figure 3 A schematic diagram of the process of forwarding broadcast messages and multicast messages in an embodiment of the present application; Figure 4 A schematic diagram of the process of forwarding a unicast message in an embodiment of the present application; Figure 5 This is a structural diagram of a layer 2 networking configuration system for a fully interconnected network in an embodiment of the present application. DETAILED DESCRIPTION

[0019] In order to enable those skilled in the art to better understand the technical solutions in this application, the technical solutions in the embodiments of this application will be clearly and completely described below. Obviously, the described embodiments are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0020] In the embodiments provided in the present application, it should be understood that the disclosed methods and systems can be implemented in other ways. The system embodiments described below are merely schematic. For example, the division of units and modules is only a logical function division. There may be other division methods in actual implementation, such as: multiple units or modules can be combined, or can be integrated into another system, or some features can be ignored, or not executed. In addition, the coupling, direct coupling, or communication connection between the components shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or modules, which can be electrical, mechanical or other forms.

[0021] In addition, all functional units in the embodiments of the present application may be integrated into one processor, or each unit may be a separate device, or two or more units may be integrated into one device; each functional unit in the embodiments of the present application may be implemented in the form of hardware or in the form of hardware plus software functional units.

[0022] A person skilled in the art can understand that all or part of the steps of the following method embodiments can be completed by program instructions and related hardware. The aforementioned program instructions can be stored in a computer-readable storage medium. When the program instructions are executed, the steps of the following method embodiments are executed; and the aforementioned storage medium includes: a mobile storage device, a read-only memory (ROM), a magnetic disk or an optical disk, and other media that can store program codes.

[0023] It should be understood that the use of "system", "device", "unit" and / or "module" in this application is only a method for distinguishing different components, elements, parts, parts or assemblies at different levels. However, if other words can achieve the same purpose, the word can be replaced by other expressions.

[0024] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "multiple" and "several" mean two or more, unless otherwise clearly and specifically defined.

[0025] If a flow chart is used in the present application, the flow chart is used to illustrate the operations performed by the system according to the embodiment of the present application. It should be understood that the preceding or following operations are not necessarily performed accurately in order. On the contrary, each step can be processed in reverse order or simultaneously. At the same time, other operations can also be added to these processes, or a certain step or several steps of operations can be removed from these processes.

[0026] It should also be noted that, in this article, terms such as "comprises", "includes" or any other variations thereof are intended to cover non-exclusive inclusion, so that an article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such articles or devices. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the article or device including the above elements.

[0027] The embodiments of the present application are written in a progressive manner.

[0028] Layer 2 networking uses the destination MAC address of a message to determine how to forward the message. The network formed is called a Layer 2 network. The main technologies for implementing Layer 2 networking include: default broadcast mechanism, Layer 2 forwarding table, Mac learning, and STP protocol.

[0029] (1) Network forwarding message types and default broadcast mechanism: From the perspective of network device forwarding messages, messages can be divided into four categories: broadcast messages, multicast messages, known unicast messages, and unknown unicast messages. In Layer 2 networking: broadcast messages refer to messages with all 1s in the destination Mac address, that is, messages with a destination Mac address of ff:ff:ff:ff:ff:ff. Multicast messages refer to non-broadcast messages with the lowest bit of the high byte of the destination Mac address as 1. Messages other than broadcast and multicast messages are unicast messages, and their destination Mac addresses are called unicast Mac addresses. When a unicast message arrives at a forwarding device, if the Layer 2 forwarding table contains an entry corresponding to the destination Mac address of the message, the message is called a known unicast message; if the Layer 2 forwarding table does not contain an entry corresponding to the destination Mac address of the message, the message is called an unknown unicast message. If the Layer 2 forwarding table of the forwarding device is empty, or there is no Layer 2 forwarding table, all unicast messages are unknown unicast messages. For broadcast messages, multicast messages, and unknown unicast messages, the forwarding device uses the default broadcast mechanism to forward the messages. The processing method is to send each received message from all ports except the inbound port (broadcast out). The forwarding device can complete the Layer 2 networking by using only the default broadcast mechanism, but there will be a large number of broadcast messages in the network, the network communication efficiency is low, and there must be no loops in the network topology.

[0030] (2) Layer 2 forwarding table and Mac learning mechanism: The Layer 2 forwarding table consists of multiple entries, each of which contains a Mac address and an egress port number. The Mac address is the key of the entry, which is used to find the entry; the egress port number is the value of the entry, which is the result to be found and is used to determine the egress port for message forwarding. In order for the Layer 2 forwarding table to work, a method for filling in the Layer 2 forwarding table entries needs to be introduced. Currently, the most important method is the Mac learning mechanism. The Mac learning mechanism is a technology in which the forwarding device uses the received message and its ingress port information to fill in the Layer 2 forwarding table entries. After receiving the message, the device first extracts the message source Mac address, destination Mac address and ingress port number. The extracted message source Mac address is the port Mac address of the terminal device that sent the message, which must be a unicast Mac address. Then, the forwarding device enters the learning phase, uses the extracted message source Mac address as the Mac address of the Layer 2 forwarding table entry, and uses the extracted ingress port number as the egress port number of the Layer 2 forwarding table entry, and adds a Layer 2 forwarding table entry. Finally, when the forwarding device performs the message forwarding phase, it extracts the destination Mac address of the message and determines the message type. If it is a unicast message, it uses the extracted destination Mac address of the message to find the corresponding table entry in the Layer 2 forwarding table, and determines which port the message is forwarded from based on the outbound port number in the table entry. Introducing the Layer 2 forwarding table and Mac learning mechanism in the forwarding device can greatly reduce the broadcast of unicast messages in the network and greatly improve network efficiency. The Layer 2 forwarding table and Mac learning mechanism are simple in principle and easy to implement in hardware. They are implemented in current mainstream forwarding devices (switches) and are implemented in hardware. However, the Layer 2 forwarding table and Mac learning mechanism do not provide anti-loop function, and loops cannot exist in the network topology.

[0031] (3) STP protocol: The STP protocol checks for loops in the network and blocks the ports of redundant links, thereby blocking the redundant links that cause loops and converting the network topology with loops into a loop-free network in operation. When there are few redundant links in the network and the link density is low, the STP protocol is very practical and effective. It can avoid network failures caused by incorrectly connected loops and allow access to redundant links as backup. When the network link density is very high, the STP protocol will block all redundant links, causing a large number of links to be wasted, seriously reducing link utilization, and leading to low network communication efficiency.

[0032] The three-layer network uses the three-layer routing protocol to detect the network topology and network status, calculate the network path, and then send the three-layer forwarding table. The forwarding device looks up the three-layer forwarding table entry according to the destination IP address and determines the forwarding direction of the message. The network formed in this way is called a three-layer network.

[0033] A three-layer network is generally composed of multiple two-layer networks. The destination Mac address is used within the two-layer network to forward the message to the designated terminal or forwarding device, and the message content remains unchanged during the forwarding process. The destination IP address is used between two-layer networks to forward the message to the designated terminal or forwarding device. During the forwarding process, the forwarding device will modify the source Mac address of the message to the Mac address of the current device and the destination Mac address to the Mac address of the next-hop device. The three-layer network uses the routing protocol to obtain global information and calculate the path mechanism, which can well avoid forwarding loops. The longest IP match mechanism can support a very large network scale. However, the routing protocol mechanism is complex and needs to run in the CPU. The forwarding table configuration path is longer. In a small-scale network, it is not as fast and sensitive as the pure hardware Mac learning in the two-layer network. In addition, it is difficult to achieve IP address drift in a three-layer network, that is, if the terminal device is originally connected to a forwarding device in a three-layer network, and then changes to another forwarding device at another location in the three-layer network, it will not be able to use the original IP address, but needs to be replaced with another IP address that matches the new location and the new forwarding device. In addition, the messages forwarded in the three-layer network must have an IP address, and the Mac address in the message will be modified during the forwarding process, which is not suitable for some applications that tend to be at the bottom layer of the network.

[0034] SDN (Software-Defined Networking) networking: It can not only determine the packet forwarding outlet by matching IP addresses and Mac addresses, but also match more information such as packet type and inbound port at the same time. In addition to forwarding to a specific port, SDN can also perform more actions on matched packets, such as discarding, forwarding to multiple specified interfaces, and modifying specific content in the packet. The above characteristics of SDN are called the Match-Action mechanism: Add flow entries to the flow table, including matching requirements and forwarding actions. The matching requirements include the characteristics of the message to be processed by the current flow entry, such as requiring the destination Mac of the message to be 0:1:0:3:4:5 and requiring the inbound port number to be 5. The forwarding action includes the processing to be performed on the message, such as changing the destination Mac of the message to 0:1:0:3:4:6 and sending it from port 7. When the forwarding device forwards data, it searches for the flow entry that satisfies its matching requirements, selects the flow entry with the highest priority, and executes the forwarding action specified in the flow entry. SDN generally uses topology discovery protocols to obtain network-wide topology information and uses centralized controllers to issue flow table entries. SDN has extremely high flexibility and programmability and can be used to implement a variety of complex and specific networking requirements. However, SDN networking control is more complex than the three-layer routing protocol, and the control response path is longer. It generally requires the deployment of a dedicated controller outside the forwarding device, and is prone to single point failure problems.

[0035] A fully interconnected network refers to a network topology in which all forwarding devices in the network are directly interconnected with all other forwarding devices. A fully interconnected network has a very high link density and a very short network radius, which can meet high bandwidth and low latency requirements. The network scale is generally not large. For a fully interconnected network, three-layer networking technology is currently mainly used, which can meet the needs of network interoperability and can make full use of high-density links. However, three-layer networking technology is relatively complex, and is subject to the shortcomings of three-layer networks, so the applications and services that can be supported are limited.

[0036] Compared with the three-layer networking technology, the implementation of the two-layer networking technology is simpler. The two-layer networking based on the two-layer forwarding table and Mac learning mechanism can meet the network interoperability requirements, but the two-layer forwarding table and Mac learning mechanism do not provide anti-loop function. There must be no loops in the network topology. The STP protocol needs to be introduced to eliminate loops before it can be applied to the fully interconnected network, which will cause great link waste.

[0037] like Figure 1 As shown, the embodiment of the present application provides a method for configuring a layer 2 network of a fully interconnected network, which is applied to a forwarding chip, including: S101. Issue the first broadcast rule, wherein the first broadcast rule is configured in the forwarding device of the fully interconnected network, and executes the default broadcast mechanism for broadcast messages, multicast messages and unknown unicast messages; In S101, specifically, Figure 2 Taking the fully interconnected network topology shown as an example, the fully interconnected network includes a total of three forwarding devices s1, s2 and s3. Each forwarding device includes four ports p1, p2, p3 and p4. The forwarding devices are interconnected in pairs. The two-to-two interconnection links occupy two ports p1 and p2 of each forwarding device. These ports used to interconnect the forwarding device with other forwarding devices are called interconnection ports. Each forwarding device is connected to two access terminals, occupying two ports p3 and p4. These ports used to connect the forwarding device with the access terminals are called access ports.

[0038] Among them, the first broadcast rule is sent to the forwarding chip, and the specific number of rule entries can be fixed to 1. The first broadcast rule is configured in the forwarding device of the fully interconnected network, and the default broadcast mechanism is executed for broadcast messages, multicast messages and unknown unicast messages, that is, broadcast to all other ports except the inbound port. Through the first broadcast rule, the broadcast message, multicast message and unknown unicast message sent by any access terminal can be broadcast from the first-hop forwarding device connected to the access terminal to all other forwarding devices, that is, each second-hop forwarding device, and broadcast to all access terminals connected to the first-hop forwarding device; then broadcast to all access terminals connected to it in each second-hop forwarding device; finally, the broadcast message, multicast message and unknown unicast message are broadcast to all access terminals in the entire network except the inbound port after passing through the two-hop forwarding device. The first broadcast rule cannot prevent the message from being repeatedly sent to other forwarding devices after reaching the second-hop forwarding device, and cannot avoid the generation of forwarding loops. The configuration of the first broadcast rule is consistent with the configuration of the current mainstream device.

[0039] S102. Issue a second broadcast rule, wherein the second broadcast rule is configured to match broadcast messages and multicast messages received by the interconnection port for each interconnection port in the forwarding device, and broadcast the matching message to all access ports of the forwarding device, the interconnection port is the port where the forwarding device is interconnected with other forwarding devices, and the access port is the port where the forwarding device is connected to the access terminal, and the second broadcast rule has a higher priority than the first broadcast rule; In S102, specifically, in the forwarding device of the fully interconnected network, the port used for interconnecting the forwarding device with other forwarding devices can be recorded as the interconnection port, and the port used for connecting the forwarding device with the access terminal can be recorded as the access port; the second broadcast rule is configured to match all broadcast messages and multicast messages received by the interconnection port for each interconnection port in the forwarding device, and perform a broadcast action on the matched messages, broadcasting to all access ports of the forwarding device. The priority of the second broadcast rule is higher than the first broadcast rule. If the message enters the forwarding device and matches the second broadcast rule and the first broadcast rule at the same time, only the second broadcast rule needs to be executed.

[0040] by Figure 2Taking the fully interconnected network topology shown as an example, for each port p among all interconnected ports {p1, p2}, a configuration is issued. For the message matching the inbound port as p, the destination Mac address as 01:00:00:00:00:00:00, and the mask as 01:00:00:00:00:00:00, the action is performed: forward to all access ports {p3, p4}. The mask of 01:00:00:00:00:00:00 means that only the lowest bit of the high byte of the destination Mac address is matched, and the remaining bits are ignored. Among them, the specific number of rule entries of the second broadcast rule is equal to the number of interconnected ports, which is 2 in this example. After the broadcast message and multicast message enter the first-hop forwarding device, they do not match the second broadcast rule because they do not meet the conditions for being received by the interconnected port, and then adopt the first broadcast rule to execute the default broadcast mechanism; after the broadcast message and multicast message enter the second-hop forwarding device, they match both the second broadcast rule and the first broadcast rule. At this time, the broadcast action is executed according to the second broadcast rule with a higher priority, and the broadcast message and multicast message are broadcast to all access ports {p3, p4} of the second-hop forwarding device, that is, broadcast to all access terminals connected to the second-hop forwarding device, which can effectively prevent the broadcast message and multicast message from continuing to be sent to other forwarding devices. In this step, by introducing the second broadcast rule, it can be ensured that the broadcast message and multicast message can be broadcast to all access terminals in the entire network, and the message can avoid loops during the forwarding process.

[0041] S103. Issue a third broadcast rule, wherein the third broadcast rule is configured to match, for each interconnected port in the forwarding device, unicast messages received by the interconnected port and for which no corresponding entry is found in the Layer 2 forwarding table, and broadcast the matched messages to the access port of the forwarding device, and the priority of the third broadcast rule is higher than the first broadcast rule.

[0042] In S103, specifically, the third broadcast rule is configured to match the unicast message received by the interconnection port and not finding the corresponding table entry in the Layer 2 forwarding table for each interconnection port in the forwarding device, that is, to match the unicast message received by the interconnection port and not finding the table entry corresponding to the destination Mac address of the message in the Layer 2 forwarding table of the forwarding device where the interconnection port is located, and perform a broadcast action on the matched message, broadcasting to all access ports of the forwarding device. The priority of the third broadcast rule is higher than the first broadcast rule. If the message enters the forwarding device and matches the third broadcast rule and the first broadcast rule at the same time, only the third broadcast rule needs to be executed.

[0043] by Figure 2Taking the fully interconnected network topology shown as an example, for each port p of all interconnected ports {p1, p2}, a configuration is issued. For packets that match the inbound port p, fail to find the Layer 2 forwarding table, and have a destination Mac address of 00:00:00:00:00:00:00, and a mask of 01:00:00:00:00:00:00, perform the action: forward to the two ports {p3, p4}. The mask of 01:00:00:00:00:00:00 means that only the lowest bit of the high byte of the destination Mac address is matched, and the remaining bits are ignored. Among them, the specific number of rule entries of the third broadcast rule is equal to the number of interconnected ports, which is 2 in this example. The priority of the third broadcast rule is higher than that of the first broadcast rule. Similar to the second broadcast rule, when a unicast message is an unknown unicast message to all forwarding devices, the third broadcast rule does not affect the message broadcast of the first broadcast rule in the first-hop forwarding device, but replaces the first broadcast rule in the second-hop forwarding device, broadcasting the unknown unicast message to all access terminals connected to the second-hop forwarding device, preventing the unknown unicast message from continuing to be sent to other forwarding devices, thereby ensuring that the unknown unicast message can be broadcast to all access terminals in the entire network and avoiding loops in the message forwarding process. After the configuration of this step is completed, the second-layer networking of the fully interconnected network can be realized, each link in the fully interconnected network can be utilized, and the generation of forwarding loops can be effectively reduced.

[0044] The above-mentioned embodiment utilizes the default broadcast mechanism and the second-layer forwarding table commonly present in the forwarding chip to provide a fast and sensitive network response capability; through the above-mentioned configuration, after the broadcast message, the multicast message and the unknown unicast message enter the first-hop forwarding device, the first broadcast rule is matched to execute the default broadcast mechanism; when the broadcast message and the multicast message enter the second-hop forwarding device, the second broadcast rule with a higher priority will be matched and executed to broadcast the broadcast message and the multicast message to the access port of the second-hop forwarding device, which can prevent the broadcast message and the multicast message from continuing to be sent to other forwarding devices, ensure that the broadcast message and the multicast message can be broadcast to all access terminals and avoid the message from generating a loop during the forwarding process; when the unicast message enters the second-hop forwarding device, if the second-layer forwarding table search fails, the third broadcast rule with a higher priority will be matched and executed to broadcast the unknown unicast message to the access port of the second-hop forwarding device, which can prevent the unknown unicast message from continuing to be sent to other forwarding devices, ensure that the unknown unicast message can be broadcast to all access terminals and avoid the message from generating a loop during the forwarding process. In summary, the above embodiments utilize the characteristics of a fully interconnected network to limit the broadcast range of broadcast messages, multicast messages, and unknown unicast messages, thereby realizing Layer 2 networking of a fully interconnected network, utilizing each link in the fully interconnected network, and effectively reducing the generation of forwarding loops in Layer 2 networking of a fully interconnected network.

[0045] Considering that in the above embodiment, all unicast messages will be regarded as unknown unicast messages by the forwarding device and broadcast to all ports except the ingress port, the network link will be filled with a large number of unnecessary message broadcasts, resulting in a waste of link bandwidth and low network communication efficiency.

[0046] In other embodiments of the present application, the above-mentioned Layer 2 networking configuration method for a fully interconnected network further includes: S201. In the forwarding device, enable the Mac learning function and do not enable the STP protocol; In S201, specifically, the Mac learning function, i.e., the Mac learning mechanism described above, is enabled in each forwarding device in the fully interconnected network, and the STP protocol is not enabled. The difference between this step and the traditional layer 2 networking is that the STP protocol must be enabled when the Mac learning function is enabled in the fully interconnected (loop-existing) network in the traditional layer 2 networking. After this step is configured, the broadcast of unicast messages in the network can be greatly reduced by using the layer 2 forwarding table and the Mac learning function, but in special cases, a unicast message forwarding loop may be caused.

[0047] S202. Issue a fourth broadcast rule, wherein the fourth broadcast rule is configured to match, for each interconnected port in the forwarding device, unicast messages received by the interconnected port and whose entry value found in the layer-2 forwarding table is the interconnected port, and discard the matched messages. The priority of the fourth broadcast rule is higher than the forwarding processing of known unicast messages by the layer-2 forwarding table.

[0048] In S202, specifically, the fourth broadcast rule is configured to match, for each interconnection port in the forwarding device, a unicast message received by the interconnection port and whose entry value found in the layer 2 forwarding table is the interconnection port, that is, to match a unicast message received by the interconnection port and whose entry value (egress port) found in the layer 2 forwarding table of the forwarding device where the interconnection port is located is the interconnection port, and to discard the matched message. The priority of the fourth broadcast rule is higher than the forwarding processing of the known unicast message by the layer 2 forwarding table.

[0049] by Figure 2Taking the fully interconnected network topology shown in the figure as an example, for each port p among all interconnected ports {p1, p2}, a configuration is issued for each port q among other interconnected ports. For packets whose matching inbound port is p and whose Layer 2 forwarding table search result value (outbound port) is q, the action is: discard. Among them, the specific number of rule entries of the fourth broadcast rule is equal to the number of interconnected ports × (number of interconnected ports - 1), which is 2 × (2-1) = 2 in this example. The priority of the fourth broadcast rule is higher than the packet forwarding of the Layer 2 forwarding table. When a unicast packet is forwarded to other forwarding devices (second hop) as an unknown unicast packet in the first-hop forwarding device, if the Layer 2 forwarding table of the second-hop forwarding device is hit and the outbound port found is the interconnection port (that is, the third hop is a forwarding device), the fourth broadcast rule takes effect and discards the packet to prevent the packet from continuing to be sent to the third-hop forwarding device and avoid loop generation. The correct second-hop forwarding device will correctly deliver the packet to the access port and finally reach the destination access terminal. This step fills the unicast message forwarding loop loop that may appear in the configuration of the previous steps, and can further reduce the generation of forwarding loops in the Layer 2 networking of the fully interconnected network.

[0050] The second broadcast rule, the third broadcast rule and the fourth broadcast rule adopt SDN broadcast rules, which can be implemented based on the flexible matching-action mechanism of SDN.

[0051] The above embodiment, for the second layer networking of the fully interconnected network, uses the default broadcast mechanism, second layer forwarding table and Mac learning mechanism commonly found in forwarding chips to provide fast and sensitive network response capabilities. By using the characteristics of the fully interconnected network and the flexible matching-action mechanism of SDN to limit the broadcast range of broadcast, multicast and unknown unicast messages, it can effectively avoid the generation of forwarding loops and make full use of the large number of links in the fully interconnected network to avoid link waste. It does not require an additional centralized controller, and the networking is simple, and a unified second layer network can be provided to meet the needs of various special applications.

[0052] In a specific embodiment, Figure 2 As an example, assume that the Layer 2 networking configuration of the fully interconnected network has been completed, and the access terminal h11 sends broadcast and multicast messages to the outside, such as Figure 3 As shown in the figure, the forwarding process of broadcast messages and multicast messages includes: S31 message sent from the access terminal h11; In S31, specifically, the message is a broadcast message and a multicast message sent outward by the access terminal h11. After being sent out, the message will arrive at the forwarding device S1, and the inbound port is p3.

[0053] S32. The forwarding device S1 receives the message, matches the first broadcast rule, and sends the message to all ports except the ingress port; In S32, specifically, after the p3 port of the forwarding device S1 receives the message sent by the access terminal h11, it matches the first broadcast rule and executes the forwarding action of the default broadcast mechanism: sending to all ports except the ingress port, specifically: the message is divided into three messages, which are sent from the ports p1, p4, and p2 of the forwarding device S1 respectively. The message forwarding process is divided into three parallel sub-processes S321, S322, and S323.

[0054] S321. The forwarding device S3 receives the message, matches the second broadcast rule, and sends the message to the access port; In S321, specifically, the p2 port (interconnection port) in the forwarding device S3 receives the message sent by the p1 port in the forwarding device S1, and at this time, the second broadcast rule is matched, and the action is executed: send to all access ports, specifically: the message is divided into 2 messages and sent from the ports p3 and p4 in the forwarding device S3 respectively. The forwarding message forwarding process is divided into 2 parallel sub-processes S3211 and S3212.

[0055] S3211. Access terminal h31 receives the message; In S3211, specifically, after the access terminal h31 receives the message sent by the port p3 in the forwarding device S3, the process ends.

[0056] S3212. Access terminal h32 receives the message; In S3212, specifically, after the access terminal h32 receives the message sent by the port p4 in the forwarding device S3, the process ends.

[0057] S322. Access terminal h12 receives the message; In S322, specifically, after the access terminal h12 receives the message sent by the port p4 in the forwarding device S1, the process ends.

[0058] S323. The forwarding device S2 receives the message, matches the second broadcast rule, and sends the message to the access port; In S323, specifically, the p1 port (interconnection port) in the forwarding device S2 receives the message sent by the p2 port in the forwarding device S1, matches the second broadcast rule, and performs the action: send to all access ports, specifically: the message is divided into two messages and sent from the ports p3 and p4 in the forwarding device S2 respectively. The message forwarding process is divided into two parallel sub-processes S3231 and S3232.

[0059] S3231. Access terminal h21 receives the message; In S3231, specifically, after the access terminal h21 receives the message sent by the port p3 in the forwarding device S2, the process ends.

[0060] S3232. Access terminal h22 receives the message.

[0061] In S3231, specifically, after the access terminal h22 receives the message sent by the port p4 in the forwarding device S2, the process ends.

[0062] It can be seen from the above specific embodiments that when broadcast messages and multicast messages enter the second-hop forwarding device, a second broadcast rule with a higher priority will be matched and executed to broadcast the broadcast messages and multicast messages to the access port of the second-hop forwarding device, which can prevent the broadcast messages and multicast messages from continuing to be sent to other forwarding devices, ensure that the broadcast messages and multicast messages can be broadcast to all access terminals and avoid loops in the message forwarding process.

[0063] In another specific embodiment, Figure 2 As an example, assume that the Layer 2 networking configuration of the fully interconnected network has been completed, and the access terminal h11 wants to send a unicast message to the access terminal h22. The Mac address of the access terminal h22 is Mac22. Figure 4 As shown in the figure, the unicast message forwarding process specifically includes: S41 message sent from access terminal h11; In S41, specifically, the message is a unicast message that the access terminal h11 wants to send to the access terminal h22. After being sent, the message will arrive at the forwarding device S1, and the inbound port is p3.

[0064] S42. The forwarding device S1 receives the message and determines whether it hits the Layer 2 forwarding table. If it does not hit, go to S43; if it hits, go to S433; In S42, specifically, if no entry corresponding to the destination Mac address of the message is found in the layer 2 forwarding table of the forwarding device S1, the process goes to S43, otherwise, the process goes to S433.

[0065] S43. Matching the first broadcast rule, the forwarding device S1 sends the message to all ports except the ingress port; In S43, specifically, the unicast message does not hit the Layer 2 forwarding table, and is regarded as an unknown unicast message, matching the first broadcast rule, and executing the forwarding action of the default broadcast mechanism: sending to all ports except the ingress port, specifically: the message is divided into three messages, which are sent from ports p1, p4, and p2 of the forwarding device S1 respectively. The message forwarding process is divided into three parallel sub-processes S431, S432, and S433.

[0066] S431. The forwarding device S3 receives the message and determines whether it hits the Layer 2 forwarding table. If it hits, it goes to S4311; if it does not hit, it goes to S4312; In S431, specifically, in the layer 2 forwarding table of the forwarding device S3, if the entry corresponding to the destination Mac address of the message is found, the process goes to S4311, otherwise, the process goes to S4312.

[0067] S4311. Match the fourth broadcast rule and discard the message; In S4311, the unicast message hits the Layer 2 forwarding table. At this time, the input port is p2 (interconnection port) and the output port is p1 (another interconnection port). The fourth broadcast rule is matched, and its priority is higher than the forwarding processing of the known unicast message by the Layer 2 forwarding table. The forwarding action of the fourth broadcast rule is executed: discard the message, and the process ends.

[0068] S4312. Match the third broadcast rule and send the message to the access port; In S4312, specifically, the unicast message does not hit the Layer 2 forwarding table, the input port is p2 (interconnection port), the third broadcast rule is matched, and the forwarding action of the third broadcast rule is executed: send to all access ports, specifically: the message is divided into two messages and sent from ports p3 and p4 of the forwarding device S3 respectively. The message forwarding process is divided into two parallel sub-processes S43121 and S43122.

[0069] S43121. Access terminal h31 receives the message; In S43121, specifically, after the access terminal h31 receives the message sent by the port p3 in the forwarding device S3, the process ends.

[0070] S43122. Access terminal h32 receives the message; In S43122, specifically, after the access terminal h32 receives the message sent by the port p4 in the forwarding device S3, the process ends.

[0071] S432. Access terminal h12 receives the message; In S432, specifically, after the access terminal h12 receives the message sent by the port p4 in the forwarding device S1, the process ends.

[0072] S433. The forwarding device S2 receives the message and determines whether it hits the Layer 2 forwarding table. If it does not hit, go to S4331; if it hits, go to S43312; In S433, specifically, in the layer 2 forwarding table of the forwarding device S2, if the entry corresponding to the destination Mac address of the message is found, then the process goes to S43312; otherwise, the process goes to S4331.

[0073] S4331. Match the third broadcast rule and send the message to the access port; In S4331, specifically, the unicast message does not hit the Layer 2 forwarding table, the input port is p1 (interconnection port), the third broadcast rule is matched, and the forwarding action of the third broadcast rule is executed: send to all access ports, specifically: the message is divided into two messages and sent from ports p3 and p4 of the forwarding device S2 respectively. The message forwarding process is divided into two parallel sub-processes S43311 and S43312.

[0074] S43311. Access terminal h21 receives the message; In S43311, specifically, after the access terminal h21 receives the message sent by the port p3 in the forwarding device S2, the process ends.

[0075] S43312. Access terminal h22 receives the message; In S43312, specifically, after the access terminal h22 receives the message sent by the port p4 in the forwarding device S2, the process ends.

[0076] Through the above specific embodiments, it can be known that when a unicast message enters the second-hop forwarding device, if the second-layer forwarding table search fails, the third broadcast rule with a higher priority will be matched and executed to broadcast the unknown unicast message to the access port of the second-hop forwarding device, which can prevent the unknown unicast message from continuing to be sent to other forwarding devices, ensure that the unknown unicast message can be broadcast to all access terminals and avoid the message from generating a loop during the forwarding process. After the unicast message is forwarded to other forwarding devices (second hop) as an unknown unicast message in the first-hop forwarding device, if the second-layer forwarding table of the second-hop forwarding device is hit, and the output port found is an interconnection port (that is, the third hop is a forwarding device), the fourth broadcast rule takes effect and the message is discarded, which can prevent the message from continuing to be sent to the third-hop forwarding device and avoid the generation of a loop.

[0077] like Figure 5 As shown, in another embodiment of the present application, a layer 2 networking configuration system for a fully interconnected network is provided, which is applied to a forwarding chip, including: The first configuration unit 10 is used to issue a first broadcast rule, wherein the first broadcast rule is configured in a forwarding device of the fully interconnected network, and a default broadcast mechanism is executed for broadcast messages, multicast messages, and unknown unicast messages; The second configuration unit 11 is used to issue a second broadcast rule, wherein the second broadcast rule is configured to match the broadcast message and multicast message received by the interconnection port for each interconnection port in the forwarding device, and broadcast the matched message to all access ports of the forwarding device, the interconnection port is a port where the forwarding device is interconnected with other forwarding devices, and the access port is a port where the forwarding device is connected to the access terminal, and the priority of the second broadcast rule is higher than the first broadcast rule; The third configuration unit 12 is used to issue a third broadcast rule, wherein the third broadcast rule is configured to match, for each interconnected port in the forwarding device, unicast messages received by the interconnected port and for which no corresponding entry is found in the layer-2 forwarding table, and broadcast the matched messages to the access port of the forwarding device, and the priority of the third broadcast rule is higher than the first broadcast rule.

[0078] In other embodiments of the present application, the above-mentioned fully interconnected network layer 2 networking configuration system further includes: The fourth configuration unit is used to enable the Mac learning function in the forwarding device and not enable the STP protocol.

[0079] In other embodiments of the present application, the above-mentioned fully interconnected network layer 2 networking configuration system further includes: The fifth configuration unit is used to issue a fourth broadcast rule, wherein the fourth broadcast rule is configured to match, for each interconnected port in the forwarding device, unicast messages received by the interconnected port and whose table entry value found in the second-layer forwarding table is the interconnected port, and discard the matched messages. The priority of the fourth broadcast rule is higher than the forwarding processing of the known unicast messages by the second-layer forwarding table.

[0080] In other embodiments of the present application, in the above-mentioned layer 2 networking configuration system of the fully interconnected network, the second broadcast rule, the third broadcast rule and the fourth broadcast rule adopt SDN broadcast rules.

[0081] The above description of the disclosed embodiments enables those skilled in the art to implement or use the present application. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for configuring a fully interconnected layer 2 network, characterized in that: Applied to forwarding chips, including: issuing a first broadcast rule, wherein the first broadcast rule is configured in a forwarding device of the fully interconnected network, and executes a default broadcast mechanism for broadcast messages, multicast messages, and unknown unicast messages; issuing a second broadcast rule, wherein the second broadcast rule is configured to match broadcast messages and multicast messages received by each interconnection port in the forwarding device, and broadcast the matched messages to all access ports of the forwarding device, the interconnection port is a port where the forwarding device is interconnected with other forwarding devices, and the access port is a port where the forwarding device is connected to an access terminal, and the priority of the second broadcast rule is higher than that of the first broadcast rule; A third broadcast rule is issued, wherein the third broadcast rule is configured to match, for each of the interconnected ports in the forwarding device, unicast messages received by the interconnected port and for which no corresponding entry is found in the layer-2 forwarding table, and broadcast the matched messages to the access port of the forwarding device, wherein the priority of the third broadcast rule is higher than that of the first broadcast rule.

2. The method according to claim 1, characterized in that Also includes: In the forwarding device, the Mac learning function is enabled and the STP protocol is not enabled.

3. The method as claimed in claim 2, characterized in that Also includes: A fourth broadcast rule is issued, wherein the fourth broadcast rule is configured to match, for each of the interconnection ports in the forwarding device, unicast messages received by the interconnection port and whose table entry value found in the layer-2 forwarding table is the interconnection port, and discard the matched messages, and the priority of the fourth broadcast rule is higher than the forwarding processing of known unicast messages by the layer-2 forwarding table.

4. The method as claimed in claim 3, characterized in that The second broadcast rule, the third broadcast rule and the fourth broadcast rule adopt SDN broadcast rules.

5. A fully interconnected layer 2 networking configuration system, characterized in that: Applied to forwarding chips, including: A first configuration unit, configured to issue a first broadcast rule, wherein the first broadcast rule is configured in a forwarding device of a fully interconnected network, and executes a default broadcast mechanism for broadcast messages, multicast messages, and unknown unicast messages; A second configuration unit is used to issue a second broadcast rule, wherein the second broadcast rule is configured to match the broadcast message and multicast message received by each interconnection port in the forwarding device, and broadcast the matched message to all access ports of the forwarding device, the interconnection port is a port where the forwarding device is interconnected with other forwarding devices, and the access port is a port where the forwarding device is connected to an access terminal, and the priority of the second broadcast rule is higher than that of the first broadcast rule; A third configuration unit is used to issue a third broadcast rule, wherein the third broadcast rule is configured to match, for each of the interconnection ports in the forwarding device, unicast messages received by the interconnection port and for which no corresponding entry is found in the layer-2 forwarding table, and broadcast the matching messages to the access port of the forwarding device, and the priority of the third broadcast rule is higher than that of the first broadcast rule.

6. The system as claimed in claim 5, characterized in that Also includes: The fourth configuration unit is used to enable the Mac learning function in the forwarding device and not enable the STP protocol.

7. The system as claimed in claim 6, characterized in that Also includes: The fifth configuration unit is used to issue a fourth broadcast rule, wherein the fourth broadcast rule is configured to match, for each of the interconnection ports in the forwarding device, unicast messages received by the interconnection port and whose table entry value found in the second-layer forwarding table is the interconnection port, and discard the matched messages, and the priority of the fourth broadcast rule is higher than the forwarding processing of the known unicast messages by the second-layer forwarding table.

8. The system as claimed in claim 7, characterized in that The second broadcast rule, the third broadcast rule and the fourth broadcast rule adopt SDN broadcast rules.

Citation Information

Patent Citations

  • Unknown single broadcast message forwarding method and routing bridge

    CN103346962A

  • Method and device for realizing ring protection in VPLS

    CN107171952A

  • Method and device for implementing broadcast and multicast in software defined network, storage medium

    CN108880968A

  • Method and processor for suppressing network storm

    WO2012167697A1