WO2021121003A1 - Message processing method, module, detection method, switching device and storage medium - Google Patents
Message processing method, module, detection method, switching device and storage medium Download PDFInfo
- Publication number
- WO2021121003A1 WO2021121003A1 PCT/CN2020/131806 CN2020131806W WO2021121003A1 WO 2021121003 A1 WO2021121003 A1 WO 2021121003A1 CN 2020131806 W CN2020131806 W CN 2020131806W WO 2021121003 A1 WO2021121003 A1 WO 2021121003A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- vlan identifier
- message
- port
- identifier
- processing method
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Ceased
Links
Images
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/46—Interconnection of networks
- H04L12/4641—Virtual LANs, VLANs, e.g. virtual private networks [VPN]
- H04L12/4645—Details on frame tagging
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L43/00—Arrangements for monitoring or testing data switching networks
- H04L43/08—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters
- H04L43/0805—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability
- H04L43/0811—Monitoring or testing based on specific metrics, e.g. QoS, energy consumption or environmental parameters by checking availability by checking connectivity
Definitions
- the present disclosure relates to the field of communication technology, in particular, to a message processing method, a message processing module that executes the message processing method, a detection method, a switching device, a multi-frame routing device, a A computer-readable storage medium.
- the optical fibers between the frames may be damaged due to various reasons and need to be replaced; in addition, in actual applications, in order to meet the needs of equipment testing and other requirements, the plugging and unplugging operations of the optical fibers between the frames must be allowed.
- the frames in the routing system have the ability to generate independent master masters, when a separate frame is reinserted into the optical fiber access routing system, it may cause a series of engineering problems such as dual master conflicts.
- the port that reinserts the fiber is usually set to a blocked state.
- a specific message such as a detection message used to detect a dual-master conflict needs to be forwarded from the blocked port, the existing method is complicated and the maintenance cost is high. Therefore, a simplified method for message processing and forwarding is urgently needed.
- the present disclosure provides a message processing method, a message processing module for executing the message processing method, a detection method, a switching device, and a Multi-frame routing equipment, a computer-readable storage medium.
- a message processing method including: configuring a new VLAN identifier for a predetermined port, where the new VLAN identifier is different from the default VLAN identifier of the predetermined port;
- the port state corresponding to the newly added VLAN identifier is set to the forwarding state, where the port state is a type of configuration information of the predetermined port; the VLAN identifier of the message to be sent is modified to the newly added VLAN identifier.
- a detection method includes: constructing a detection message, the Ethernet type of the detection message is a predetermined type; detecting whether a predetermined port is physically connected; In the case of physical connectivity, the foregoing message processing method is executed to send the detection message.
- a message processing module including: a VLAN identifier configuration unit configured to configure a new VLAN identifier for a predetermined port, and the new VLAN identifier is different from the predetermined port.
- the default VLAN identifier of the port the port configuration unit is configured to set the port state corresponding to the newly added VLAN identifier to the forwarding state, wherein the port state is a type of configuration information of the predetermined port;
- the message configuration unit is configured to modify the VLAN identifier of the message to be sent to the newly added VLAN identifier.
- a switching device including: a storage module on which an executable program is stored; one or more processors, when the executable program is used by the one or more When the processor is executed, the one or more processors are allowed to implement the foregoing message processing method.
- a computer-readable storage medium is provided, and an executable program is stored on the computer-readable storage medium, and the executable program can implement the foregoing message processing method or the foregoing The detection method.
- a multi-frame routing device includes: a storage module on which an executable program is stored; one or more processors, when the When the execution program is executed by the one or more processors, the one or more processors implement the foregoing message processing method or the foregoing detection method.
- FIG. 1 is a flowchart of an implementation manner of a message processing method provided by the present disclosure
- FIG. 2 is a flowchart of another implementation manner of the message processing method provided by the present disclosure.
- FIG. 3 is a flowchart of another implementation manner of the message processing method provided by the present disclosure.
- FIG. 5 is a flowchart of still another implementation manner of the message processing method provided by the present disclosure.
- FIG. 6 is a flowchart of still another implementation manner of the message processing method provided by the present disclosure.
- FIG. 7 is a schematic diagram of a message processing module provided by the present disclosure.
- Figure 8 is a schematic diagram of a multi-frame connection of an existing cluster router.
- the inventors of the present disclosure discovered that in order to make the entire system have only one active master, when the optical fiber between the frames is inserted, it is necessary to first detect the respective system states of the two interconnected frames and decide the master master. Before deciding on the master and master, in order to avoid dual master conflicts, it is necessary to limit the normal control plane communication message forwarding between the frames. Therefore, the state of the optical fiber port that reinserts the optical fiber is set to the block state by default. As shown in Figure 8, suppose that frame 100 is connected to frame 300 by reinserting optical fibers on ports P1 and P3. Frame 100, frame 200, and frame 300 form a multi-frame routing device. Frame 100 has main control board 11 and frame 200.
- the states of the port P1 and the port P3 are block.
- the two states of the switch chip port are explained here.
- the switch chip port When the switch chip port is set to the forward state, the port can send and receive messages; when the switch chip port is set to the block state, the port will not be able to perform normal Sending and receiving of messages. Therefore, when the states of the port P1 and the port P3 are block, the message cannot be sent from the chip 31 to the chip 35 through the port P1 and the port P3.
- BPDU Bridge Protocol Data Unit
- Bridge Protocol Data Unit Bridge Protocol Data Unit
- BPDU messages are mainly used between end-to-end, not the Layer 2 forwarding of the chip hardware itself. Each step of its forwarding requires the participation of the CPU, or it needs to be directed to different orders.
- the different ports of the board are configured accordingly. For example, as shown in Figure 8, when using a BPDU message to detect a dual-master conflict, the BPDU message needs to start from the CPU 21 in the box 100, go through the chip 31, the chip 32, the chip 35, the chip 34, the chip 33, and finally reach the box 200.
- the CPU 22, in block 300 may also require the participation of the CPU 31.
- BPDU messages are forwarded through multiple chips to detect dual-master conflicts, the maintenance complexity and cost will be greatly increased.
- the message processing method includes:
- a newly-added virtual local area network VLAN identifier is configured for a predetermined port, and the newly-added VLAN identifier is different from the default VLAN identifier of the predetermined port;
- step S120 the port state corresponding to the newly added VLAN identifier is set to a forwarding state, where the port state is a type of configuration information of the predetermined port;
- step S130 the VLAN identifier of the message to be sent is modified to the newly added VLAN identifier.
- the predetermined port may be any port on the network module.
- the specific type of the network module is not specifically limited.
- the network module may be a switching chip.
- the predetermined port is an optical fiber port of a network module that reinserts an optical fiber.
- step S110 "newly added" is only used to indicate that the newly added VLAN identifier is different from the default VLAN identifier of the predetermined port.
- VLAN Virtual Local Area Network
- VLAN identifier Packets in the network are encapsulated with VLAN identifiers, and packets can be forwarded in the same VLAN as its VLAN identifier; at the same time, different VLANs are logically incompatible with each other , That is to say, the message will not be sent to the VLAN whose VLAN identifier is different.
- each port of the network module is configured with a default VLAN identifier, and the network module encapsulates the default VLAN identifier for packets entering the network module. Therefore, the packets encapsulated with the default VLAN identifier can pass through
- the port configured with the default VLAN identifier is forwarded.
- whether a message can be forwarded through a certain port of the network module also depends on the status of the port. Specifically, suppose that the default VLAN identifier is 1, and port a is a port on the network module with VLAN identifier 1. When the status of port a is forwarding, packets with VLAN identifier 1 can be sent and received through port a ; When the status of port a is blocked, packets with VLAN identifier 1 cannot be forwarded through port a.
- the predetermined port of the network module is configured with a newly added VLAN identifier, and the newly added VLAN identifier is different from the default VLAN identifier of the predetermined port. It should be emphasized that when a new VLAN identifier is configured for the predetermined port of the network module in step S110, the predetermined port still retains the default VLAN identifier. For example, configure the newly added VLAN identifier for port a to 2.
- port a is configured with two VLAN identifiers 1 and 2, that is, port a is added with VLAN identifier 1 and VLAN identifier at the same time Two VLANs for 2. At this time, both the packet with the VLAN identifier of 1 and the packet with the VLAN identifier of 2 can be forwarded through port a.
- step S120 In order to enable the message whose VLAN identifier is the newly added VLAN identifier to be forwarded from the reserved port, in step S120, The port state corresponding to the newly added VLAN identifier in the configuration information of the predetermined port is set to a forwarding state. It should be noted that in step S120, the port status corresponding to the default VLAN identifier in the configuration information of the predetermined port is not modified.
- the port status corresponding to VLAN identifier 2 is set to forwarding, so that packets with VLAN identifier 2 can be forwarded through port a; and in the configuration information of port a, The status of the port corresponding to character 1 is still blocked, and the packet with VLAN identifier 1 cannot be forwarded through port a.
- the VLAN identifier of a specific message (for example, a detection message used to detect whether a dual-master conflict exists in a multi-frame routing device) is modified to the newly added VLAN identifier, and the VLAN identifier of a common message
- the default VLAN identifier is still the default VLAN identifier, so that a specific message can be forwarded from the VLAN identifier set in the forwarding state in step S120 to the predetermined port of the newly added VLAN identifier, while ordinary messages cannot be forwarded from the VLAN identifier.
- the predetermined port is forwarded. Therefore, correspondingly, in step S130, the VLAN identifier of the message to be sent is modified to the newly added VLAN identifier, and the specific message and the ordinary message are differentiated, so as to realize the specific message Differentiated forwarding from ordinary messages.
- the message processing method provided in the present disclosure configures a new VLAN identifier for a specific port of a network module, enables the specific port to join different VLANs at the same time, and configures different ports in different VLANs for the specific port State, and through differentiated processing of specific messages and ordinary messages, only the VLAN identifier of the specific message to be sent is modified, so that when the port status of the specific port in the default VLAN is the blocking state, the specific message It can also be forwarded from the specific port, and only specific messages can be forwarded from the specific port, thereby realizing differentiated forwarding of specific messages and ordinary messages.
- the configuration of the port VLAN identifier, the configuration of the port status, and the configuration of the message VLAN identifier are all performed in the network module, which avoids multiple BPDU messages.
- the configuration of the port VLAN identifier, the configuration of the port status, and the configuration of the message VLAN identifier are all performed in the network module, which avoids multiple BPDU messages.
- the VLAN identifier described in the present disclosure is specifically a VLAN ID.
- the redundant network topology eliminates the problem of network terminals caused by a single point of failure.
- loops are easily formed in the redundant network topology, which in turn leads to problems such as broadcast storms, repeated frames, and instability of the MAC address table.
- STP Spanning Tree Protocol
- STG Spanning Tree Group
- STP Group Spanning Tree Group
- the VLAN with the VLAN ID of 2 is bound to the STG with the STG identifier of 2, and the port a with the VLAN ID of 2 is also configured with the STG identifier 2.
- STP also defines different port states to control the forwarding of port messages. For example, when the STP state of the spanning tree group with the STG identifier of 2 is in the forwarding state, port a is also in the forwarding state, and the packet with the VLAN ID of 2 can be forwarded through port a.
- the port status in the configuration information of the predetermined port can be set by configuring the STG identifier for the predetermined port and modifying the STP status of the corresponding spanning tree group.
- step S120 specifically includes:
- a new spanning tree group identifier is configured for the predetermined port configured with the new VLAN identifier, and the newly added spanning tree group identifier is different from the default spanning tree group identifier of the predetermined port symbol;
- step S122 the Spanning Tree Protocol STP state corresponding to the newly added spanning tree group identifier is set to a forwarding state, where the STP state is one of the configuration information of the predetermined port.
- filter conditions can also be set to control the messages to be sent on a predetermined port.
- the message is filtered, and only specific messages that meet the filtering conditions are processed and forwarded through the predetermined port, thereby realizing differentiated processing and forwarding of specific messages and ordinary messages.
- the message processing method provided by the present disclosure includes step S110 to step S130, as shown in FIG. 3, before step S130, it also includes:
- step S140 it is detected whether the Ethernet type of the message to be sent is a predetermined type; if the Ethernet type of the message to be sent is the predetermined type, step S130 is executed.
- EtherType is a field in the Ethernet frame used to specify the protocol applied to the frame data field.
- the EtherType field is a limit space, that is, the allocation of EtherType values is limited.
- Some well-known protocols have been assigned a fixed EtherType value, for example, 0x0806 corresponds to the address resolution protocol, 0x0800 corresponds to the Internet protocol, etc.
- EtherType field of the specific message can be set to an unassigned value, such as 0x88FF, when constructing a specific message such as a detection message for detecting whether there is a dual-master conflict in a multi-frame routing device.
- the EtherType field of the message to be sent is 0x88FF, it is determined that the message to be sent meets the preset condition, and step S130 is executed to forward the message to be sent.
- Step S120 may be executed first and then step S140 may be executed, or step S140 may be executed first and then step S120 may be executed.
- Step S140 is executed at the same time as S120, as long as it is ensured that step S140 is executed before step S130.
- Fig. 3 only exemplarily shows the execution of step S140 in step S120.
- an access control list (ACL, Access Control List) rule may be set to detect whether the Ethernet type of the message to be sent is the predetermined type.
- ACL is an access control technology based on packet filtering. It can filter data packets on a port according to set conditions to decide whether to allow them to pass or discard. Access control lists have many functions, such as restricting network traffic, improving network performance, controlling communication traffic, providing network security access, and determining which type of communication traffic is forwarded or blocked at router ports.
- the ACL rule is to filter out specific messages by Ethernet type. For example, when the EtherType field of the message to be sent is 0x88FF, it is determined that the message to be sent satisfies a preset condition, and step S130 is executed. The message to be sent is forwarded.
- the message processing method provided by the present disclosure is mainly used for differential processing and forwarding of specific messages and ordinary messages when the state of the predetermined port is in the blocking state.
- the specific message Both and ordinary messages can be forwarded through the predetermined port, indicating that there is no dual-master conflict in the current routing system or the only master master has been decided, and the predetermined port no longer needs to send and receive specific messages.
- the port status corresponding to the default VLAN identifier in the configuration information of the predetermined port is detected, and when the port status changes from block to forward, the transmission and reception of the specific message is stopped.
- the message processing method provided by the present disclosure as shown in FIG. 4, before step S130, further includes:
- step S150 the port status corresponding to the default VLAN identifier is detected, wherein the port status corresponding to the default VLAN identifier is one of the configuration information of the predetermined port;
- the execution of step S130 is stopped.
- the STP status of the STG group can be detected to determine the port status of the predetermined port. For example, when the STP status of the spanning tree group with the STG identifier of 1 is forward, the status of port a corresponding to the port with VLAN ID of 1 is forward. At this time, stop sending and receiving specific messages such as detection messages used to detect dual-master conflicts.
- VLAN composed of ports whose VLAN identifier is the default VLAN identifier
- VLAN composed of ports whose VLAN identifier is the newly added VLAN identifier
- each port of the same network module is configured with the same default VLAN ID, and the network module encapsulates the default VLAN ID for the packets entering the network module. Therefore, the packets with the default VLAN ID are encapsulated.
- the text can be forwarded through the port configured with the default VLAN ID.
- a new VLAN ID is configured for a predetermined port, and the predetermined port can either send a message with the VLAN ID of the newly added VLAN ID or receive a message with the VLAN ID of the newly added VLAN ID.
- ports other than the predetermined port are not configured with the newly added VLAN ID, so the packet with the VLAN ID of the newly added VLAN ID cannot be forwarded through other ports other than the predetermined port.
- the VLAN identifier that is the newly added VLAN identifier can only be forwarded in the second VLAN, but cannot be forwarded in the first VLAN.
- some messages (for example, detection messages) need to be forwarded between various network modules to detect whether each network module is normal. For network devices that have performed optical fiber insertion and removal operations between certain pairs of ports, the detection message needs to be performed between the port configured with the newly added VLAN identifier and the port where the newly added VLAN identifier is not configured. Forward.
- the message may only be forwarded between ports configured with a new VLAN identifier (that is, it can only be forwarded in the second VLAN).
- the ports with the default VLAN identifier are forwarded (that is, cannot be forwarded in the first VLAN), so that the purpose of detecting each network module cannot be achieved.
- a network module when a network module receives a message whose VLAN ID is the newly added VLAN ID, and needs to remove the received message from other parts of the network module that have not configured the newly added VLAN ID
- the VLAN ID of the message needs to be changed from the newly added VLAN ID to the default VLAN ID, so that the message can be transmitted between switch chips, between switch chips and CPUs, and in multiple frames.
- the frame and frame of the routing device continue to forward, thereby completing specific functions such as dual-master conflict detection.
- VLAN ID configured for port P1, port P2, port P3, port P4, port P5, port P6, port P7, etc. are all 1 (that is, all are the default VLAN IDs).
- packets with VLAN ID 1 can be forwarded between each chip and each CPU. For example, it may start from the CPU 21 of the block 100, pass through the chip 31, the chip 32, the chip 35, the chip 34, and the chip 33 in sequence, and finally reach the CPU 22 of the block 200. Assuming that ports P1 and P3 are re-inserted into optical fibers, the state of ports P1 and P3 in the VLAN with VLAN ID 1 is defaulted to block.
- the VLAN ID of the ports P1 and P3 is configured as 2 (that is, the newly added VLAN ID is configured), and the status of the port P1 and the port P3 in the second VLAN is set to forward.
- port P1 can either send a packet with VLAN ID 2 to port P3, or receive a packet with VLAN ID 2 sent by port P3.
- ports such as port P2, port P4, port P5, port P6, and port P7 are only added to the first VLAN. After a packet with VLAN ID 2 is received or sent through port P1 or port P3, it cannot pass through port P2 and port P4. , Port P5, Port P6, Port P7, etc. continue forwarding.
- port P1 When port P1 receives a message with VLAN ID 2, as long as the VLAN ID of the message is changed to 1, the message can be sent to chip 31 and CPU21 through port P6, etc.; when port P3 receives VLAN ID When it is a message of 2, as long as the VLAN ID of the message is changed to 1, the message can be sent to CPU23, chip 34, chip 33, CPU22 through ports P2, P4, P5, P7, etc. Wait.
- the received packets whose VLAN identifiers are the newly added VLAN identifiers are also filtered, and only the detection packets are processed and forwarded.
- the message processing method provided by the present disclosure as shown in FIG. 5, after step S120, further includes:
- step S160 when the VLAN identifier of the received message is the newly added VLAN identifier, it is detected whether the received message is a detection message;
- step S170 if the received message is a detection message, the VLAN identifier of the received message is modified to the default VLAN identifier.
- step S160 and step S170 the detection message whose VLAN identifier is modified to the default VLAN identifier can be forwarded between ports whose VLAN identifier is the default VLAN identifier and whose port status is the forwarding state.
- the detection message in step S160 is a message that meets a predetermined condition. Specifically, it can be judged whether the Ethernet type of the received message is a predetermined type to detect whether the received message is a detection message, for example, when constructing a detection message, the EtherType field of the detection message is set to 0x88FF, Therefore, when the Ethernet type of the received message is 0x88FF, it is determined that the received message is a detection message, and step S170 is executed to modify the VLAN identifier of the message to the default VLAN identifier. You can also set ACL rules to detect whether the Ethernet type of the received packet is a predetermined type.
- the message processing method provided by the present disclosure configures a new VLAN identifier for a specific port of a network module, enables the specific port to join different VLANs at the same time, and configures different ports in different VLANs for the specific port State, and through differentiated processing of specific messages and ordinary messages, only the VLAN identifier of the specific message to be sent is modified, so that when the port status of the specific port in the default VLAN is the blocking state, the specific message It can also be forwarded from the specific port, and only specific messages can be forwarded from the specific port, thereby realizing differentiated forwarding of specific messages and ordinary messages.
- the configuration of the port VLAN identifier, the configuration of the port status, and the configuration of the message VLAN identifier are all performed in the network module, which avoids multiple BPDU messages.
- the configuration of the port VLAN identifier, the configuration of the port status, and the configuration of the message VLAN identifier are all performed in the network module, which avoids multiple BPDU messages.
- the detection method includes:
- step S210 a detection message is constructed, and the Ethernet type of the detection message is a predetermined type
- step S220 it is detected whether the predetermined port is physically connected
- step S230 when the predetermined port is physically connected, the foregoing message processing method is executed to send the detection message.
- the physical connection of the predetermined port in step S220 means that the predetermined port is connected to the opposite port through an optical fiber. Specifically, it is possible to determine whether the predetermined port is physically connected by detecting the physical state of the predetermined port. When the physical state of the predetermined port becomes UP, it is physically connected.
- the present disclosure does not specifically limit the specific use of the detection method.
- it can be used to detect dual-master conflicts in multi-frame routing equipment.
- the dual-master conflict is because after the fiber is unplugged, the separated frame may be converted to an independent device and generate an independent master master.
- the fiber is reinserted to communicate again, it will be detected that both frames in a system are There is a conflict caused by the master master.
- the main control board CPU of the multi-frame routing device constructs a detection message, and the detection message includes information such as the master/standby status of the current master and the physical location of the current master; Step S230 configures VLAN, STG, ACL rules, etc. on the board switch chip and the central switch board switch chip; the central switch board CPU detects whether there is a dual-master conflict according to the detection message; the main control board CPU and the central switch board CPU pass the set The socket is used to send and receive messages.
- the detection method mainly initiates the detection of the dual-master conflict when the optical fiber is reinserted to communicate again. Therefore, in this embodiment, it also includes a periodic scan of the physical state of the port (for example, the port is an optical port). When detecting that the physical status of the port changes to UP, it starts sending and receiving detection packets.
- the detection method provided in the present disclosure performs differentiated processing and forwarding of detection messages according to the message processing method provided in the present disclosure, so that the detection messages can still pass through the switching chip hardware itself to comply with the two rules even when the ports between the frames are blocked.
- Layer forwarding is used for forwarding, which simplifies the procedure of dual-master conflict detection for multi-frame routing equipment, and reduces maintenance costs and complexity.
- a message processing module 400 including:
- the VLAN identifier configuration unit 410 is configured to configure a newly-added VLAN identifier for a predetermined port, where the newly-added VLAN identifier is different from the default VLAN identifier of the predetermined port;
- the port configuration unit 420 is configured to set the port state corresponding to the newly added VLAN identifier to the forwarding state, where the port state is a type of configuration information of the predetermined port;
- the message configuration unit 430 is configured to modify the VLAN identifier of the message to be sent to the newly added VLAN identifier.
- the message processing module provided in the present disclosure is used to execute the message processing method provided in the present disclosure.
- the working principle and beneficial effects of the message processing method have been described in detail above, and will not be repeated here.
- a switching device including:
- a storage module stores an executable program
- One or more processors when the executable program is executed by the one or more processors, enable the one or more processors to implement the foregoing message processing method.
- the switching device provided by the present disclosure also includes a plurality of network modules. By executing the message processing method provided by the present disclosure, VLAN identifier, spanning tree group identifier, ACL rule and other configurations are performed on the network module. .
- the switching device provided in the present disclosure can implement the message processing method provided in the present disclosure.
- the working principle and beneficial effects of the message processing method have been described in detail above, and will not be repeated here.
- a computer-readable storage medium is provided, and an executable program is stored on the computer-readable storage medium, and the executable program can implement the foregoing message processing method or the foregoing The detection method.
- the computer-readable storage medium includes volatile and non-volatile, removable and The media cannot be removed.
- Computer-readable storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage media, Or any other medium that can be used to store desired information and that can be accessed by a computer.
- a multi-frame routing device includes:
- a storage module stores an executable program
- One or more processors when the executable program is executed by the one or more processors, enable the one or more processors to implement the foregoing message processing method or the foregoing detection method.
- the multi-frame routing device also includes a plurality of center frames, each center frame includes a plurality of center frame main control boards and a plurality of center switching boards; the center frame main control board includes a plurality of switching chips for Connect all other functional boards in this frame to communicate in the control plane of the entire system; the central switch board includes a CPU and multiple switching chips, used to connect the main control boards of each frame, and to connect the entire multi-frame routing device control plane communication.
- the multi-frame routing device also includes a plurality of line card frames, each line card frame includes a line card frame main control board and a line card board, the line card frame main control board is used to connect all the line card boards in the frame in the entire system Communication within the control plane.
- the multi-frame routing device processes and forwards messages according to the message processing method provided by the present disclosure, so that when the port status of the specific port in the default VLAN is blocked, the specific message can also be sent from all sources.
- the specific port is forwarded, and only specific messages can be forwarded from the specific port, thereby realizing differentiated forwarding of specific messages and ordinary messages, and reducing maintenance costs and complexity.
- the message processing method and module, detection method, switching device, and storage medium provided by the present disclosure simplifies the message processing procedure, realizes differentiated processing and forwarding of messages, and reduces maintenance complexity and maintenance costs.
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Computer Security & Cryptography (AREA)
- Environmental & Geological Engineering (AREA)
- Data Exchanges In Wide-Area Networks (AREA)
Abstract
Description
相关申请的交叉引用Cross-references to related applications
本申请基于申请号为201911303617.X、申请日为2019年12月17日的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本申请作为参考。This application is based on a Chinese patent application with an application number of 201911303617.X and an application date of December 17, 2019, and claims the priority of the Chinese patent application. The entire content of the Chinese patent application is hereby incorporated into this application by reference.
本公开涉及通信技术领域,具体地,涉及一种报文处理方法、一种执行该报文处理方法的报文处理模块、一种检测方法、一种交换设备、一种多框路由设备、一种计算机可读存储介质。The present disclosure relates to the field of communication technology, in particular, to a message processing method, a message processing module that executes the message processing method, a detection method, a switching device, a multi-frame routing device, a A computer-readable storage medium.
随着5G时代的到来,对通信网络设备的各项性能提出了更高的需求,网络设备的集群化规模化愈发明显。现有的高端分布式路由设备经常是由多框组成,各框间通过外显的光纤连接进行通信。With the advent of the 5G era, higher requirements have been put forward for the performance of communication network equipment, and the clustering and scale of network equipment has become more and more obvious. Existing high-end distributed routing equipment is often composed of multiple frames, and each frame communicates through an external optical fiber connection.
框间的光纤由于其外显的特性,可能因为各种原因损坏而需要更换;此外,在实际应用中,为了适应设备测试等需要,必须允许框间光纤的拔插操作。但是,由于路由系统中的框具备产生独立的主用主控的能力,当某一个分离的框重新插入光纤接入路由系统中时,就可能导致双主冲突等一系列工程问题。Due to its apparent characteristics, the optical fibers between the frames may be damaged due to various reasons and need to be replaced; in addition, in actual applications, in order to meet the needs of equipment testing and other requirements, the plugging and unplugging operations of the optical fibers between the frames must be allowed. However, because the frames in the routing system have the ability to generate independent master masters, when a separate frame is reinserted into the optical fiber access routing system, it may cause a series of engineering problems such as dual master conflicts.
为避免上述工程问题,通常会将重新插入光纤的端口设置为阻塞状态。但是当需要从该阻塞状态的端口转发用于检测双主冲突的检测报文等特定报文时,现有的方法程序复杂、维护成本高。因此亟需一种简化的报文处理及转发方法。In order to avoid the above-mentioned engineering problems, the port that reinserts the fiber is usually set to a blocked state. However, when a specific message such as a detection message used to detect a dual-master conflict needs to be forwarded from the blocked port, the existing method is complicated and the maintenance cost is high. Therefore, a simplified method for message processing and forwarding is urgently needed.
发明内容Summary of the invention
为在至少一定程度上解决上述问题的至少一个方面,本公开提供一种报文处理方法、一种执行该报文处理方法的报文处理模块、一种检测方法、一种交换设备、一种多框路由设备、一种计算机可读存储介质。In order to solve at least one aspect of the above-mentioned problems to at least a certain extent, the present disclosure provides a message processing method, a message processing module for executing the message processing method, a detection method, a switching device, and a Multi-frame routing equipment, a computer-readable storage medium.
作为本公开的第一个方面,提供一种报文处理方法,包括:为预定端口配置新增VLAN标识符,所述新增VLAN标识符不同于所述预定端口的默认VLAN标识符;将与所述新增VLAN标识符对应的端口状态设置为转发状态,其中,所述端口状态为所述预定端口的配置信息的一种;将待发送的报文的VLAN标识符 修改为所述新增VLAN标识符。As a first aspect of the present disclosure, a message processing method is provided, including: configuring a new VLAN identifier for a predetermined port, where the new VLAN identifier is different from the default VLAN identifier of the predetermined port; The port state corresponding to the newly added VLAN identifier is set to the forwarding state, where the port state is a type of configuration information of the predetermined port; the VLAN identifier of the message to be sent is modified to the newly added VLAN identifier.
作为本公开的第二个方面,提供一种检测方法,所述检测方法包括:构造检测报文,所述检测报文的以太类型为预定类型;检测预定端口是否物理连通;在所述预定端口物理连通的情况下,执行上述的报文处理方法,以发送所述检测报文。As a second aspect of the present disclosure, a detection method is provided. The detection method includes: constructing a detection message, the Ethernet type of the detection message is a predetermined type; detecting whether a predetermined port is physically connected; In the case of physical connectivity, the foregoing message processing method is executed to send the detection message.
作为本公开的第三个方面,提供一种报文处理模块,包括:VLAN标识符配置单元,被配置为为预定端口配置新增VLAN标识符,所述新增VLAN标识符不同于所述预定端口的默认VLAN标识符;端口配置单元,被配置为将与所述新增VLAN标识符对应的端口状态设置为转发状态,其中,所述端口状态为所述预定端口的配置信息的一种;报文配置单元,被配置为将待发送的报文的VLAN标识符修改为所述新增VLAN标识符。As a third aspect of the present disclosure, a message processing module is provided, including: a VLAN identifier configuration unit configured to configure a new VLAN identifier for a predetermined port, and the new VLAN identifier is different from the predetermined port. The default VLAN identifier of the port; the port configuration unit is configured to set the port state corresponding to the newly added VLAN identifier to the forwarding state, wherein the port state is a type of configuration information of the predetermined port; The message configuration unit is configured to modify the VLAN identifier of the message to be sent to the newly added VLAN identifier.
作为本公开的四个方面,提供一种交换设备,包括:存储模块,所述存储模块上存储有可执行程序;一个或多个处理器,当所述可执行程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现上述的报文处理方法。As four aspects of the present disclosure, a switching device is provided, including: a storage module on which an executable program is stored; one or more processors, when the executable program is used by the one or more When the processor is executed, the one or more processors are allowed to implement the foregoing message processing method.
作为本公开的第五个方面,提供一种计算机可读存储介质,所述计算机可读存储介质上存储有可执行程序,所述可执行程序被执行时能够实现上述的报文处理方法或上述的检测方法。As a fifth aspect of the present disclosure, a computer-readable storage medium is provided, and an executable program is stored on the computer-readable storage medium, and the executable program can implement the foregoing message processing method or the foregoing The detection method.
作为本公开的第六个方面,提供一种多框路由设备,所述多框路由设备包括:存储模块,所述存储模块上存储有可执行程序;一个或多个处理器,当所述可执行程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现上述的报文处理方法或上述的检测方法。As a sixth aspect of the present disclosure, a multi-frame routing device is provided. The multi-frame routing device includes: a storage module on which an executable program is stored; one or more processors, when the When the execution program is executed by the one or more processors, the one or more processors implement the foregoing message processing method or the foregoing detection method.
附图是用来提供对本公开的进一步理解,并且构成说明书的一部分,与下面的具体实施方式一起用于解释本公开,但并不构成对本公开的限制。在附图中:The accompanying drawings are used to provide a further understanding of the present disclosure and constitute a part of the specification. Together with the following specific embodiments, they are used to explain the present disclosure, but do not constitute a limitation to the present disclosure. In the attached picture:
图1是本公开提供的报文处理方法的一种实施方式的流程图;FIG. 1 is a flowchart of an implementation manner of a message processing method provided by the present disclosure;
图2是本公开提供的报文处理方法的另一种实施方式的流程图;FIG. 2 is a flowchart of another implementation manner of the message processing method provided by the present disclosure;
图3是本公开提供的报文处理方法的又一种实施方式的流程图;FIG. 3 is a flowchart of another implementation manner of the message processing method provided by the present disclosure;
图4是本公开提供的报文处理方法的再一种实施方式的流程图;4 is a flowchart of still another implementation manner of the message processing method provided by the present disclosure;
图5是本公开提供的报文处理方法的再一种实施方式的流程图;FIG. 5 is a flowchart of still another implementation manner of the message processing method provided by the present disclosure;
图6是本公开提供的报文处理方法的再一种实施方式的流程图;FIG. 6 is a flowchart of still another implementation manner of the message processing method provided by the present disclosure;
图7是本公开提供的报文处理模块的模块示意图;FIG. 7 is a schematic diagram of a message processing module provided by the present disclosure;
图8是现有集群路由器多框连接示意图。Figure 8 is a schematic diagram of a multi-frame connection of an existing cluster router.
以下结合附图对本公开的具体实施方式进行详细说明。应当理解的是,此处所描述的具体实施方式仅用于说明和解释本公开,并不用于限制本公开。The specific embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are only used to illustrate and explain the present disclosure, and are not used to limit the present disclosure.
经本公开的发明人研究发现,为了使整个系统只有一个主用主控,当框间光纤插入时,需要首先探测两个互联框各自系统状态并决策出主用主控。在决策出主用主用前,为了避免双主冲突需要限制框间正常的控制面通信报文转发,因此该重新插入光纤的光纤端口的状态默认设置成阻塞(block)状态。如图8所示,假设框100通过在端口P1和端口P3上重新插入光纤与框300连接,框100、框200和框300组成多框路由设备,框100上有主控板11,框200上有主控板12,框300上有中心交换板13,为避免双主冲突,此时,端口P1和端口P3的状态为block。这里对交换芯片端口的两种状态进行解释,当交换芯片的端口设置为转发(forward)状态时,端口可以对报文进行收发;当交换芯片的端口设置为block状态时,端口将无法进行普通报文的收发。因此,端口P1和端口P3的状态为block时,报文将无法通过端口P1和端口P3从芯片31发送到芯片35。当需要检测双主冲突时,在一些情形下,可以将网桥协议数据单元(BPDU,Bridge Protocol Data Unit)报文作为检测报文。但是,但是BPDU的转发方式存在一定的限制,BPDU报文主要应用在端到端之间,并不是芯片硬件本身的二层转发,它的每一步转发或者需要CPU的参与,或者需要针对不同单板的不同端口进行相应的配置。例如,如图8所示,使用BPDU报文检测双主冲突时,BPDU报文需要从框100的CPU21开始,依次经过芯片31、芯片32、芯片35、芯片34、芯片33,最后到达框200的CPU22,在框300中,可能还需要CPU31的参与。但是,当BPDU报文通过多块芯片进行转发来检测双主冲突时,其维护复杂度和成本将会极大提高。The inventors of the present disclosure discovered that in order to make the entire system have only one active master, when the optical fiber between the frames is inserted, it is necessary to first detect the respective system states of the two interconnected frames and decide the master master. Before deciding on the master and master, in order to avoid dual master conflicts, it is necessary to limit the normal control plane communication message forwarding between the frames. Therefore, the state of the optical fiber port that reinserts the optical fiber is set to the block state by default. As shown in Figure 8, suppose that frame 100 is connected to frame 300 by reinserting optical fibers on ports P1 and P3. Frame 100, frame 200, and frame 300 form a multi-frame routing device. Frame 100 has main control board 11 and frame 200. There is a main control board 12 on it, and a central switch board 13 on the frame 300. In order to avoid dual-master conflicts, at this time, the states of the port P1 and the port P3 are block. The two states of the switch chip port are explained here. When the switch chip port is set to the forward state, the port can send and receive messages; when the switch chip port is set to the block state, the port will not be able to perform normal Sending and receiving of messages. Therefore, when the states of the port P1 and the port P3 are block, the message cannot be sent from the chip 31 to the chip 35 through the port P1 and the port P3. When it is necessary to detect a dual-master conflict, in some cases, a Bridge Protocol Data Unit (BPDU, Bridge Protocol Data Unit) message can be used as a detection message. However, there are certain limitations in the way BPDUs are forwarded. BPDU messages are mainly used between end-to-end, not the Layer 2 forwarding of the chip hardware itself. Each step of its forwarding requires the participation of the CPU, or it needs to be directed to different orders. The different ports of the board are configured accordingly. For example, as shown in Figure 8, when using a BPDU message to detect a dual-master conflict, the BPDU message needs to start from the CPU 21 in the box 100, go through the chip 31, the chip 32, the chip 35, the chip 34, the chip 33, and finally reach the box 200. The CPU 22, in block 300, may also require the participation of the CPU 31. However, when BPDU messages are forwarded through multiple chips to detect dual-master conflicts, the maintenance complexity and cost will be greatly increased.
有鉴于此,作为本公开的第一个方面,提供一种报文处理方法,如图1所示,所述报文处理方法包括:In view of this, as the first aspect of the present disclosure, a message processing method is provided. As shown in FIG. 1, the message processing method includes:
在步骤S110中,为预定端口配置新增虚拟局域网VLAN标识符,所述新增VLAN标识符不同于所述预定端口的默认VLAN标识符;In step S110, a newly-added virtual local area network VLAN identifier is configured for a predetermined port, and the newly-added VLAN identifier is different from the default VLAN identifier of the predetermined port;
在步骤S120中,将与所述新增VLAN标识符对应的端口状态设置为转发状态,其中,所述端口状态为所述预定端口的配置信息的一种;In step S120, the port state corresponding to the newly added VLAN identifier is set to a forwarding state, where the port state is a type of configuration information of the predetermined port;
在步骤S130中,将待发送的报文的VLAN标识符修改为所述新增VLAN标识符。In step S130, the VLAN identifier of the message to be sent is modified to the newly added VLAN identifier.
需要说明的是,所述预定端口可以是网络模块上的任意一个端口,在本公开中,对所述网络模块的具体类型不做特殊限定。所述网络模块可以为交换芯片。在光纤插拔的情况下,所述预定端口为重新插入光纤的网络模块的光纤端口。在步骤S110中,“新增”仅用于表示所述新增VLAN标识符与所述预定端口的默认VLAN标识符不同。It should be noted that the predetermined port may be any port on the network module. In the present disclosure, the specific type of the network module is not specifically limited. The network module may be a switching chip. In the case of optical fiber plugging and unplugging, the predetermined port is an optical fiber port of a network module that reinserts an optical fiber. In step S110, "newly added" is only used to indicate that the newly added VLAN identifier is different from the default VLAN identifier of the predetermined port.
虚拟局域网(VLAN,Virtual Local Area Network)是建立在物理网络上的逻辑子网。不同的VLAN通过VLAN标识符进行区分,网络中的报文都封装有VLAN标识符,报文能够在与其VLAN标识符相同的VLAN中进行转发;同时,不同的VLAN在逻辑上是互不相通的,也就是说,报文不会发送到与其VLAN标识符不相同的VLAN中。A virtual local area network (VLAN, Virtual Local Area Network) is a logical subnet established on a physical network. Different VLANs are distinguished by VLAN identifiers. Packets in the network are encapsulated with VLAN identifiers, and packets can be forwarded in the same VLAN as its VLAN identifier; at the same time, different VLANs are logically incompatible with each other , That is to say, the message will not be sent to the VLAN whose VLAN identifier is different.
在本公开中,网络模块的各个端口配置有默认VLAN标识符,并且网络模块会为进入该网络模块的报文封装该默认VLAN标识符,因此,封装了该默认VLAN标识符的报文能够通过配置有该默认VLAN标识符的端口进行转发。如前文所述,报文能否通过网络模块的某一个端口进行转发,还取决于该端口的状态。具体地,假设该默认VLAN标识符为1,端口a为网络模块上一个VLAN标识符为1的端口,当端口a的状态为转发时,VLAN标识符为1的报文能够通过端口a进行收发;当端口a的状态为阻塞时,VLAN标识符为1的报文将无法通过端口a进行转发。In the present disclosure, each port of the network module is configured with a default VLAN identifier, and the network module encapsulates the default VLAN identifier for packets entering the network module. Therefore, the packets encapsulated with the default VLAN identifier can pass through The port configured with the default VLAN identifier is forwarded. As mentioned earlier, whether a message can be forwarded through a certain port of the network module also depends on the status of the port. Specifically, suppose that the default VLAN identifier is 1, and port a is a port on the network module with VLAN identifier 1. When the status of port a is forwarding, packets with VLAN identifier 1 can be sent and received through port a ; When the status of port a is blocked, packets with VLAN identifier 1 cannot be forwarded through port a.
为了在网络模块的端口状态为阻塞时仍能通过该端口对特定报文(例如用于检测多框路由设备是否存在双主冲突的检测报文)进行转发,在本公开的步骤S110中,为网络模块的预定端口配置新增VLAN标识符,所述新增VLAN标识符不同于所述预定端口的默认VLAN标识符。需要强调的是,在步骤S110中为网络模块的预定端口配置新增VLAN标识符时,所述预定端口仍然保留默认VLAN标识符。例如,为端口a配置新增的VLAN标识符为2,此时端口a上同时配置有1和2两个VLAN标识符,也就是说,端口a同时加入了VLAN标识符为1和VLAN标识符为2的两个VLAN。此时,VLAN标识符为1的报文和VLAN标识符为2的报文都可以通过端口a进行转发。In order to forward a specific message (for example, a detection message used to detect whether there is a dual-master conflict in a multi-frame routing device) through the port when the port status of the network module is blocked, in step S110 of the present disclosure, The predetermined port of the network module is configured with a newly added VLAN identifier, and the newly added VLAN identifier is different from the default VLAN identifier of the predetermined port. It should be emphasized that when a new VLAN identifier is configured for the predetermined port of the network module in step S110, the predetermined port still retains the default VLAN identifier. For example, configure the newly added VLAN identifier for port a to 2. At this time, port a is configured with two VLAN identifiers 1 and 2, that is, port a is added with VLAN identifier 1 and VLAN identifier at the same time Two VLANs for 2. At this time, both the packet with the VLAN identifier of 1 and the packet with the VLAN identifier of 2 can be forwarded through port a.
由前文可知,报文能否通过网络模块的端口转发还取决于端口状态,因此,为了使VLAN标识符为所述新增VLAN标识符的报文能从预订端口转发,在步骤S120中,将所述预定端口的配置信息中对应于所述新增VLAN标识符的端口状态设置为转发状态。需要说明的是,在步骤S120中,并未对所述预定端口的配置信息中对应于所述默认VLAN标识符的端口状态做任何修改。例如,将端口a的配 置信息中,与VLAN标识符2对应的端口状态设置为转发,使得VLAN标识符为2的报文可以通过端口a进行转发;而端口a的配置信息中,与VLAN标识符1对应的端口状态仍为阻塞,VLAN标识符为1的报文无法通过端口a进行转发。It can be seen from the foregoing that whether the message can be forwarded through the port of the network module also depends on the port status. Therefore, in order to enable the message whose VLAN identifier is the newly added VLAN identifier to be forwarded from the reserved port, in step S120, The port state corresponding to the newly added VLAN identifier in the configuration information of the predetermined port is set to a forwarding state. It should be noted that in step S120, the port status corresponding to the default VLAN identifier in the configuration information of the predetermined port is not modified. For example, in the configuration information of port a, the port status corresponding to VLAN identifier 2 is set to forwarding, so that packets with VLAN identifier 2 can be forwarded through port a; and in the configuration information of port a, The status of the port corresponding to character 1 is still blocked, and the packet with VLAN identifier 1 cannot be forwarded through port a.
在本公开中,将特定报文(例如用于检测多框路由设备是否存在双主冲突的检测报文)的VLAN标识符修改为所述新增VLAN标识符,而普通报文的VLAN标识符仍为所述默认VLAN标识符,从而使特定报文能够从步骤S120中设定为转发状态的VLAN标识符为所述新增VLAN标识符的预定端口转发出去,而普通报文则无法从该预定端口进行转发。因此,相应地,在步骤S130中,将待发送的报文的VLAN标识符修改为所述新增VLAN标识符,对特定报文和普通报文进行差异化处理,从而实现了对特定报文和普通报文的差异化转发。In the present disclosure, the VLAN identifier of a specific message (for example, a detection message used to detect whether a dual-master conflict exists in a multi-frame routing device) is modified to the newly added VLAN identifier, and the VLAN identifier of a common message The default VLAN identifier is still the default VLAN identifier, so that a specific message can be forwarded from the VLAN identifier set in the forwarding state in step S120 to the predetermined port of the newly added VLAN identifier, while ordinary messages cannot be forwarded from the VLAN identifier. The predetermined port is forwarded. Therefore, correspondingly, in step S130, the VLAN identifier of the message to be sent is modified to the newly added VLAN identifier, and the specific message and the ordinary message are differentiated, so as to realize the specific message Differentiated forwarding from ordinary messages.
本公开提供的报文处理方法,为网络模块的特定端口配置了新增VLAN标识符,使所述特定端口同时加入不同的VLAN,并为所述特定端口在不同的VLAN中配置了不同的端口状态,并通过对特定报文和普通报文进行差异化处理,只修改特定待发送报文的VLAN标识符,使得当所述特定端口在默认VLAN中的端口状态为阻塞状态时,特定报文也能够从所述特定端口转发出去,并且只有特定报文能够从所述特定端口转发出去,从而实现了对特定报文和普通报文的差异化转发。此外,在本公开提供的报文处理方法中,对端口VLAN标识符的配置、端口状态的配置以及报文VLAN标识符的配置都是在网络模块中进行的,避免了通过BPDU报文对多框路由设备是否存在双主冲突进行检测时或者需要CPU的参与、或者需要针对不同板卡的不同端口进行相应的配置等问题,在特定端口为阻塞状态时,实现了通过网络模块硬件本身对检测报文进行二层转发,简化了报文处理程序,降低了多框路由设备双主冲突检测的复杂度;而且在实际应用中不需要增加硬件设备,降低了硬件成本以及维护成本。The message processing method provided in the present disclosure configures a new VLAN identifier for a specific port of a network module, enables the specific port to join different VLANs at the same time, and configures different ports in different VLANs for the specific port State, and through differentiated processing of specific messages and ordinary messages, only the VLAN identifier of the specific message to be sent is modified, so that when the port status of the specific port in the default VLAN is the blocking state, the specific message It can also be forwarded from the specific port, and only specific messages can be forwarded from the specific port, thereby realizing differentiated forwarding of specific messages and ordinary messages. In addition, in the message processing method provided by the present disclosure, the configuration of the port VLAN identifier, the configuration of the port status, and the configuration of the message VLAN identifier are all performed in the network module, which avoids multiple BPDU messages. When detecting whether there is a dual-master conflict in the frame routing device, it requires the participation of the CPU or the corresponding configuration for different ports of different boards. When a specific port is blocked, the detection is realized by the hardware of the network module itself. The message is forwarded at the second layer, which simplifies the message processing procedure and reduces the complexity of dual-master conflict detection of multi-frame routing equipment; and in practical applications, there is no need to add hardware equipment, which reduces hardware costs and maintenance costs.
作为本公开的一种可替换的实施方式,本公开所述VLAN标识符具体为VLAN ID。As an alternative implementation manner of the present disclosure, the VLAN identifier described in the present disclosure is specifically a VLAN ID.
在实际应用中,冗余网络拓扑消除了单点故障导致网络终端的问题,但由于冗余网络拓扑中易形成环路,进而导致广播风暴、重复帧和MAC地址表不稳定等问题。为解决上述问题,主要采用生成树协议(STP,Spanning Tree Protocol)构建树形逻辑网络拓扑,通过阻塞冗余链路来消除冗余网络拓扑中可能存在的环路,从而避免报文在环路网络中的增生和无限循环。在启用STP的交换机上,每个VLAN都与一个生成树组(STG,STP Group)绑定,不同STG通过STG标识符 进行区分。例如,VLAN ID为2的VLAN与STG标识符为2的STG绑定,VLAN ID为2的端口a也配置有STG标识符2。此外,STP还定义了不同的端口状态,以对端口报文的转发进行控制。例如,当STG标识符为2的生成树组的STP状态为转发状态时,端口a也为转发状态,此时VLAN ID为2的报文可以通过端口a进行转发。In practical applications, the redundant network topology eliminates the problem of network terminals caused by a single point of failure. However, loops are easily formed in the redundant network topology, which in turn leads to problems such as broadcast storms, repeated frames, and instability of the MAC address table. In order to solve the above problems, Spanning Tree Protocol (STP) is mainly used to construct a tree-shaped logical network topology, and redundant links are blocked to eliminate possible loops in the redundant network topology, thereby avoiding packets in loops. Proliferation and infinite loops in the network. On STP-enabled switches, each VLAN is bound to a Spanning Tree Group (STG, STP Group), and different STGs are distinguished by STG identifiers. For example, the VLAN with the VLAN ID of 2 is bound to the STG with the STG identifier of 2, and the port a with the VLAN ID of 2 is also configured with the STG identifier 2. In addition, STP also defines different port states to control the forwarding of port messages. For example, when the STP state of the spanning tree group with the STG identifier of 2 is in the forwarding state, port a is also in the forwarding state, and the packet with the VLAN ID of 2 can be forwarded through port a.
因此,在本公开中,可以通过为预定端口配置STG标识并修改对应生成树组的STP状态,对所述预定端口的配置信息中的端口状态进行设置。相应地,如图2所示,步骤S120具体包括:Therefore, in the present disclosure, the port status in the configuration information of the predetermined port can be set by configuring the STG identifier for the predetermined port and modifying the STP status of the corresponding spanning tree group. Correspondingly, as shown in FIG. 2, step S120 specifically includes:
在步骤S121中,为配置了所述新增VLAN标识符的所述预定端口配置新增生成树组标识符,所述新增生成树组标识符不同于所述预定端口的默认生成树组标识符;In step S121, a new spanning tree group identifier is configured for the predetermined port configured with the new VLAN identifier, and the newly added spanning tree group identifier is different from the default spanning tree group identifier of the predetermined port symbol;
在步骤S122中,将与所述新增生成树组标识符对应的生成树协议STP状态设置为转发状态,其中,所述STP状态为所述预定端口的配置信息中的一种。In step S122, the Spanning Tree Protocol STP state corresponding to the newly added spanning tree group identifier is set to a forwarding state, where the STP state is one of the configuration information of the predetermined port.
上文所述的报文处理方法的实施方式中,提供了在端口状态为block时对特定报文进行转发的路径,在本公开中,还可以设置过滤条件,对在预定端口的待发送报文进行过滤,只对满足过滤条件的特定报文进行处理,并通过所述预定端口进行转发,从而实现了对特定报文和普通报文的差异化处理和转发。在本公开中,对如何设置过滤条件对报文进行过滤不做特殊限定。在实际应用中,可以根据报文本身的特征或报文用途等设定相应的预设条件。作为一种可替换的实施方式,可以通过检测所述待发送报文的以太类型是否为预定类型判断待发送报文是否满足预设条件;当所述待发送报文的以太类型为所述预定类型时,判定所述待发送报文满足预设条件。相应地,本公开提供的报文处理方法除了包括步骤S110至步骤S130以外,如图3所示,在步骤S130之前,还包括:In the embodiment of the message processing method described above, a path for forwarding a specific message when the port status is block is provided. In the present disclosure, filter conditions can also be set to control the messages to be sent on a predetermined port. The message is filtered, and only specific messages that meet the filtering conditions are processed and forwarded through the predetermined port, thereby realizing differentiated processing and forwarding of specific messages and ordinary messages. In the present disclosure, there are no special restrictions on how to set filter conditions to filter messages. In practical applications, corresponding preset conditions can be set according to the characteristics of the message itself or the purpose of the message. As an alternative implementation manner, it can be determined whether the packet to be sent meets a preset condition by detecting whether the Ethernet type of the packet to be sent is the predetermined type; when the Ethernet type of the packet to be sent is the predetermined type; In case of the type, it is determined that the message to be sent meets the preset condition. Correspondingly, the message processing method provided by the present disclosure includes step S110 to step S130, as shown in FIG. 3, before step S130, it also includes:
在步骤S140中,检测所述待发送报文的以太类型是否为预定类型;在所述待发送报文的以太类型为所述预定类型的情况下,执行步骤S130。In step S140, it is detected whether the Ethernet type of the message to be sent is a predetermined type; if the Ethernet type of the message to be sent is the predetermined type, step S130 is executed.
以太类型(EtherType)是以太帧里的一个字段,用来指明应用于帧数据字段的协议。EtherType字段是一个极限空间,即EtherType值的分配是有限的。部分知名协议已经分配了固定的EtherType值,例如,0x0806对应地址解析协议、0x0800对应网际协议等。此外,还有部分EtherType值未被分配。因此,在本公开中,可以在构造用于检测多框路由设备是否存在双主冲突的检测报文等特定报文时,将特定报文的EtherType字段设定为未被分配的值,例如0x88FF,当待发送报文的 EtherType字段为0x88FF时,判定所述待发送报文满足预设条件,并执行步骤S130对该待发送报文进行转发。EtherType (EtherType) is a field in the Ethernet frame used to specify the protocol applied to the frame data field. The EtherType field is a limit space, that is, the allocation of EtherType values is limited. Some well-known protocols have been assigned a fixed EtherType value, for example, 0x0806 corresponds to the address resolution protocol, 0x0800 corresponds to the Internet protocol, etc. In addition, there are some EtherType values that have not been assigned. Therefore, in the present disclosure, the EtherType field of the specific message can be set to an unassigned value, such as 0x88FF, when constructing a specific message such as a detection message for detecting whether there is a dual-master conflict in a multi-frame routing device. When the EtherType field of the message to be sent is 0x88FF, it is determined that the message to be sent meets the preset condition, and step S130 is executed to forward the message to be sent.
需要说明的是,本公开对步骤S140和步骤S120的先后顺序不做特殊限定,可以是先执行步骤S120再执行步骤S140,也可以是先执行步骤S140再执行步骤S120,还可以是在执行步骤S120的同时执行步骤S140,只要保证步骤S140是在步骤S130之前执行即可。图3仅示例性的画出步骤S140在步骤S120执行的情况。It should be noted that the present disclosure does not specifically limit the sequence of step S140 and step S120. Step S120 may be executed first and then step S140 may be executed, or step S140 may be executed first and then step S120 may be executed. Step S140 is executed at the same time as S120, as long as it is ensured that step S140 is executed before step S130. Fig. 3 only exemplarily shows the execution of step S140 in step S120.
在执行步骤S140时,可以设置访问控制列表(ACL,Access Control List)规则对所述待发送报文的以太类型是否为所述预定类型进行检测。When step S140 is performed, an access control list (ACL, Access Control List) rule may be set to detect whether the Ethernet type of the message to be sent is the predetermined type.
ACL是一种基于包过滤的访问控制技术,它可以根据设定的条件对端口上的数据包进行过滤,以决定允许其通过或丢弃。访问控制列表具有许多作用,如限制网络流量、提高网络性能、对通信流量进行控制、提供网络安全访问、在路由器端口处决定哪种类型的通信流量被转发或被阻塞等。在本公开中,所述ACL规则为通过以太类型过滤出特定报文,例如,当待发送报文的EtherType字段为0x88FF时,判定所述待发送报文满足预设条件,并执行步骤S130对该待发送报文进行转发。ACL is an access control technology based on packet filtering. It can filter data packets on a port according to set conditions to decide whether to allow them to pass or discard. Access control lists have many functions, such as restricting network traffic, improving network performance, controlling communication traffic, providing network security access, and determining which type of communication traffic is forwarded or blocked at router ports. In the present disclosure, the ACL rule is to filter out specific messages by Ethernet type. For example, when the EtherType field of the message to be sent is 0x88FF, it is determined that the message to be sent satisfies a preset condition, and step S130 is executed. The message to be sent is forwarded.
本公开提供的报文处理方法主要用于预定端口状态为阻塞状态时对特定报文与普通报文进行差异化处理和转发,当预定端口的状态由阻塞状态变为转发状态时,特定报文与普通报文都可以通过该预定端口进行转发,表明当前路由系统中不存在双主冲突或已决策出唯一的主用主控,预定端口不再需要收发特定报文。在本实施方式中,对预定端口的配置信息中对应于默认VLAN标识符的端口状态进行检测,当该端口状态由block变为forward时,停止收发所述特定报文。本公开提供的报文处理方法除了包括上述步骤S110至步骤S130以外,如图4所示,在步骤S130之前,还包括:The message processing method provided by the present disclosure is mainly used for differential processing and forwarding of specific messages and ordinary messages when the state of the predetermined port is in the blocking state. When the state of the predetermined port changes from the blocking state to the forwarding state, the specific message Both and ordinary messages can be forwarded through the predetermined port, indicating that there is no dual-master conflict in the current routing system or the only master master has been decided, and the predetermined port no longer needs to send and receive specific messages. In this embodiment, the port status corresponding to the default VLAN identifier in the configuration information of the predetermined port is detected, and when the port status changes from block to forward, the transmission and reception of the specific message is stopped. In addition to the above-mentioned steps S110 to S130, the message processing method provided by the present disclosure, as shown in FIG. 4, before step S130, further includes:
在步骤S150中,检测与所述默认VLAN标识符对应的端口状态,其中,所述默认VLAN标识符对应的端口状态为所述预定端口的配置信息中的一种;当与所述默认VLAN标识符对应的端口状态为转发状态时,停止执行步骤S130。In step S150, the port status corresponding to the default VLAN identifier is detected, wherein the port status corresponding to the default VLAN identifier is one of the configuration information of the predetermined port; When the status of the port corresponding to the symbol is the forwarding status, the execution of step S130 is stopped.
具体地,可以检测STG组的STP状判断预定端口的端口状态,例如,当STG标识符为1的生成树组的STP状态为forward时,端口a对应于VLAN ID为1的端口状态为forward,此时停止收发用于检测双主冲突的检测报文等特定报文。Specifically, the STP status of the STG group can be detected to determine the port status of the predetermined port. For example, when the STP status of the spanning tree group with the STG identifier of 1 is forward, the status of port a corresponding to the port with VLAN ID of 1 is forward. At this time, stop sending and receiving specific messages such as detection messages used to detect dual-master conflicts.
此处,为了便于描述,将VLAN标识符为所述默认VLAN标识符的端口组成的VLAN命名为第一VLAN,将VLAN标识符为所述新增VLAN标识符的端口组 成的VLAN命名为第二VLAN。Here, for ease of description, the VLAN composed of ports whose VLAN identifier is the default VLAN identifier is named the first VLAN, and the VLAN composed of ports whose VLAN identifier is the newly added VLAN identifier is named the second VLAN. VLAN.
如前文所述,同一个网络模块的各个端口配置有相同的默认VLAN ID,并且所述网络模块会为进入该网络模块的报文封装该默认VLAN ID,因此,封装了该默认VLAN ID的报文能够通过配置有该默认VLAN ID的端口进行转发。通过前述步骤S110至步骤S130,为预定端口配置了新增VLAN ID,该预定端口既可以发送VLAN ID为新增VLAN ID的报文,也可以接收VLAN ID为新增VLAN ID的报文。但是,此时预定端口以外的其他端口并未配置所述新增VLAN ID,因此VLAN ID为新增VLAN ID的报文无法通过预定端口以外的其他端口进行转发。也就是说,VLAN标识符为所述新增VLAN标识符的只能在第二VLAN中转发,无法在第一VLAN中转发。而有些报文(例如,检测报文)需要在各个网络模块之间进行转发,以检测各个网络模块是否正常。对于某几对端口之间进行过光纤插拔操作的网络设备而言,检测报文需要在配置有所述新增VLAN标识符的端口与未配置所述新增VLAN标识符的端口之间进行转发。如果不对该报文进行处理的话,有可能会导致报文只能在配置有新增VLAN标识符的端口之间进行转发(即,只能在所述第二VLAN中转发),无法在只配置有默认VLAN标识符的端口之间进行转发(即,无法在所述第一VLAN中转发),从而无法起到对每一个网络模块均进行检测的目的。As mentioned above, each port of the same network module is configured with the same default VLAN ID, and the network module encapsulates the default VLAN ID for the packets entering the network module. Therefore, the packets with the default VLAN ID are encapsulated. The text can be forwarded through the port configured with the default VLAN ID. Through the foregoing steps S110 to S130, a new VLAN ID is configured for a predetermined port, and the predetermined port can either send a message with the VLAN ID of the newly added VLAN ID or receive a message with the VLAN ID of the newly added VLAN ID. However, at this time, ports other than the predetermined port are not configured with the newly added VLAN ID, so the packet with the VLAN ID of the newly added VLAN ID cannot be forwarded through other ports other than the predetermined port. In other words, the VLAN identifier that is the newly added VLAN identifier can only be forwarded in the second VLAN, but cannot be forwarded in the first VLAN. And some messages (for example, detection messages) need to be forwarded between various network modules to detect whether each network module is normal. For network devices that have performed optical fiber insertion and removal operations between certain pairs of ports, the detection message needs to be performed between the port configured with the newly added VLAN identifier and the port where the newly added VLAN identifier is not configured. Forward. If the message is not processed, the message may only be forwarded between ports configured with a new VLAN identifier (that is, it can only be forwarded in the second VLAN). The ports with the default VLAN identifier are forwarded (that is, cannot be forwarded in the first VLAN), so that the purpose of detecting each network module cannot be achieved.
有鉴于此,在本公开中,当网络模块接收到VLAN ID为所述新增VLAN ID的报文、且需要将该接收到的报文从该网络模块的其他未配置所述新增VLAN ID的端口进行转发时,需要将该报文的VLAN ID从所述新增VLAN ID修改为所述默认VLAN ID,从而使该报文可以在交换芯片之间、交换芯片与CPU之间、多框路由设备的框与框之间等继续进行转发,进而完成双主冲突检测等特定功能。In view of this, in the present disclosure, when a network module receives a message whose VLAN ID is the newly added VLAN ID, and needs to remove the received message from other parts of the network module that have not configured the newly added VLAN ID When forwarding, the VLAN ID of the message needs to be changed from the newly added VLAN ID to the default VLAN ID, so that the message can be transmitted between switch chips, between switch chips and CPUs, and in multiple frames. The frame and frame of the routing device continue to forward, thereby completing specific functions such as dual-master conflict detection.
下面结合图8做进一步说明。在图8中,假设端口P1、端口P2、端口P3、端口P4、端口P5、端口P6、端口P7等配置的VLAN ID都为1(即,都为默认VLAN ID),当上述各个端口的状态为forward时,VLAN ID为1的报文可以在各芯片、各CPU之间进行转发。例如,可以从框100的CPU21开始,依次经过芯片31、芯片32、芯片35、芯片34、芯片33,最后到达框200的CPU22。假设端口P1和端口P3重新插入光纤,端口P1和端口P3在VLAN ID为1的VLAN中的状态默认为block。通过步骤S110为端口P1和P3配置VLAN ID为2(即,配置新增VLAN ID),并将端口P1和端口P3在第二VLAN中的状态设置为forward。此时,端口P1既可以将VLAN ID为2的报文发送到端口P3,也可以接收到端口 P3发送的VLAN ID为2的报文。但是,端口P2、端口P4、端口P5、端口P6、端口P7等端口只加入了第一VLAN,VLAN ID为2的报文通过端口P1或端口P3接收或发送之后,无法通过端口P2、端口P4、端口P5、端口P6、端口P7等进行继续转发。当端口P1接收到VLAN ID为2的报文时,只要将该报文的VLAN ID修改为1,该报文就可以经过端口P6等,发送到芯片31和CPU21;当端口P3接收到VLAN ID为2的报文时,只要将该报文的VLAN ID修改为1,该报文就可以经过端口P2、端口P4、端口P5、端口P7等端口,发送到CPU23、芯片34、芯片33、CPU22等。A further description will be given below in conjunction with FIG. 8. In Figure 8, it is assumed that the VLAN ID configured for port P1, port P2, port P3, port P4, port P5, port P6, port P7, etc. are all 1 (that is, all are the default VLAN IDs). When the status of each port is When it is forward, packets with VLAN ID 1 can be forwarded between each chip and each CPU. For example, it may start from the CPU 21 of the block 100, pass through the chip 31, the chip 32, the chip 35, the chip 34, and the chip 33 in sequence, and finally reach the CPU 22 of the block 200. Assuming that ports P1 and P3 are re-inserted into optical fibers, the state of ports P1 and P3 in the VLAN with VLAN ID 1 is defaulted to block. Through step S110, the VLAN ID of the ports P1 and P3 is configured as 2 (that is, the newly added VLAN ID is configured), and the status of the port P1 and the port P3 in the second VLAN is set to forward. At this time, port P1 can either send a packet with VLAN ID 2 to port P3, or receive a packet with VLAN ID 2 sent by port P3. However, ports such as port P2, port P4, port P5, port P6, and port P7 are only added to the first VLAN. After a packet with VLAN ID 2 is received or sent through port P1 or port P3, it cannot pass through port P2 and port P4. , Port P5, Port P6, Port P7, etc. continue forwarding. When port P1 receives a message with VLAN ID 2, as long as the VLAN ID of the message is changed to 1, the message can be sent to chip 31 and CPU21 through port P6, etc.; when port P3 receives VLAN ID When it is a message of 2, as long as the VLAN ID of the message is changed to 1, the message can be sent to CPU23, chip 34, chip 33, CPU22 through ports P2, P4, P5, P7, etc. Wait.
此外,在本公开中,还对接收到的VLAN标识符为所述新增VLAN标识符的报文进行过滤,只对检测报文进行处理和转发。相应地,本公开提供的报文处理方法除了包括上述步骤S110至步骤S130以外,如图5所示,在步骤S120之后,还包括:In addition, in the present disclosure, the received packets whose VLAN identifiers are the newly added VLAN identifiers are also filtered, and only the detection packets are processed and forwarded. Correspondingly, in addition to the above-mentioned steps S110 to S130, the message processing method provided by the present disclosure, as shown in FIG. 5, after step S120, further includes:
在步骤S160中,当接收的报文的VLAN标识符为所述新增VLAN标识符时,检测接收到的报文是否为检测报文;In step S160, when the VLAN identifier of the received message is the newly added VLAN identifier, it is detected whether the received message is a detection message;
在步骤S170中,在所述接收到的报文为检测报文的情况下,将所述接收到的报文的VLAN标识符修改为所述默认VLAN标识符。In step S170, if the received message is a detection message, the VLAN identifier of the received message is modified to the default VLAN identifier.
通过执行步骤S160和步骤S170,使得VLAN标识符修改为所述默认VLAN标识符的检测报文能够在VLAN标识符为所述默认VLAN标识符、且端口状态为转发状态的端口之间转发。By performing step S160 and step S170, the detection message whose VLAN identifier is modified to the default VLAN identifier can be forwarded between ports whose VLAN identifier is the default VLAN identifier and whose port status is the forwarding state.
需要说明的是,步骤S160中所述的检测报文是满足预定条件的报文。具体地,可以判断接收到的报文的以太类型是否为预定类型来检测接收到的报文是否为检测报文,例如,在构造检测报文时,将检测报文的EtherType字段设置为0x88FF,因此,当接收到的报文的以太类型为0x88FF时,判定接收到的报文为检测报文,并执行步骤S170将该报文的VLAN标识符修改为所述默认VLAN标识符。还可以设置ACL规则对接收到的报文的以太类型是否为预定类型进行检测。It should be noted that the detection message in step S160 is a message that meets a predetermined condition. Specifically, it can be judged whether the Ethernet type of the received message is a predetermined type to detect whether the received message is a detection message, for example, when constructing a detection message, the EtherType field of the detection message is set to 0x88FF, Therefore, when the Ethernet type of the received message is 0x88FF, it is determined that the received message is a detection message, and step S170 is executed to modify the VLAN identifier of the message to the default VLAN identifier. You can also set ACL rules to detect whether the Ethernet type of the received packet is a predetermined type.
需要进一步说明的是,在实际应用中,可以对本公开实施例中提供的各报文处理方法中的不同步骤进行组合,以得到新的技术方案,该新的技术方案也应属于本公开的保护范围。It needs to be further explained that in practical applications, different steps in the message processing methods provided in the embodiments of the present disclosure can be combined to obtain a new technical solution, which should also belong to the protection of the present disclosure. range.
本公开提供的报文处理方法,为网络模块的特定端口配置了新增VLAN标识符,使所述特定端口同时加入不同的VLAN,并为所述特定端口在不同的VLAN中配置了不同的端口状态,并通过对特定报文和普通报文进行差异化处理,只修 改特定待发送报文的VLAN标识符,使得当所述特定端口在默认VLAN中的端口状态为阻塞状态时,特定报文也能够从所述特定端口转发出去,并且只有特定报文能够从所述特定端口转发出去,从而实现了对特定报文和普通报文的差异化转发。此外,在本公开提供的报文处理方法中,对端口VLAN标识符的配置、端口状态的配置以及报文VLAN标识符的配置都是在网络模块中进行的,避免了通过BPDU报文对多框路由设备是否存在双主冲突进行检测时或者需要CPU的参与、或者需要针对不同板卡的不同端口进行相应的配置等问题,在特定端口为阻塞状态时,实现了通过网络模块硬件本身对检测报文进行二层转发,简化了报文处理程序,降低了多框路由设备双主冲突检测的复杂度;而且在实际应用中不需要增加硬件设备,降低了硬件成本以及维护成本。The message processing method provided by the present disclosure configures a new VLAN identifier for a specific port of a network module, enables the specific port to join different VLANs at the same time, and configures different ports in different VLANs for the specific port State, and through differentiated processing of specific messages and ordinary messages, only the VLAN identifier of the specific message to be sent is modified, so that when the port status of the specific port in the default VLAN is the blocking state, the specific message It can also be forwarded from the specific port, and only specific messages can be forwarded from the specific port, thereby realizing differentiated forwarding of specific messages and ordinary messages. In addition, in the message processing method provided by the present disclosure, the configuration of the port VLAN identifier, the configuration of the port status, and the configuration of the message VLAN identifier are all performed in the network module, which avoids multiple BPDU messages. When detecting whether there is a dual-master conflict in the frame routing device, it requires the participation of the CPU or the corresponding configuration for different ports of different boards. When a specific port is blocked, the detection is realized by the hardware of the network module itself. The message is forwarded at the second layer, which simplifies the message processing procedure and reduces the complexity of dual-master conflict detection of multi-frame routing equipment; and in practical applications, there is no need to add hardware equipment, which reduces hardware costs and maintenance costs.
作为本公开的第二个方面,提供一种检测方法,如图6所示,所述检测方法包括:As a second aspect of the present disclosure, a detection method is provided. As shown in FIG. 6, the detection method includes:
在步骤S210中,构造检测报文,所述检测报文的以太类型为预定类型;In step S210, a detection message is constructed, and the Ethernet type of the detection message is a predetermined type;
在步骤S220中,检测预定端口是否物理连通;In step S220, it is detected whether the predetermined port is physically connected;
在步骤S230中,在所述预定端口物理连通的情况下,执行上述的报文处理方法,以发送所述检测报文。In step S230, when the predetermined port is physically connected, the foregoing message processing method is executed to send the detection message.
需要说明的是,步骤S220中所述的预定端口物理连通是指该预定端口通过光纤与对端端口连接。具体地,可以通过检测预定端口的物理状态判断预定端口是否物理连通,当预定端口的物理状态变为UP时,即为物理连通。It should be noted that the physical connection of the predetermined port in step S220 means that the predetermined port is connected to the opposite port through an optical fiber. Specifically, it is possible to determine whether the predetermined port is physically connected by detecting the physical state of the predetermined port. When the physical state of the predetermined port becomes UP, it is physically connected.
本公开对所述检测方法的具体用途不做特殊限定。例如,可以用于检测多框路由设备中的双主冲突。双主冲突是由于光纤拔掉后,分离出去的框可能转为独立的设备并产生独立的主用主控,当重新插入光纤再次通信时,就会探测到在一个系统中的两个框都产生了主用主控从而导致的冲突。The present disclosure does not specifically limit the specific use of the detection method. For example, it can be used to detect dual-master conflicts in multi-frame routing equipment. The dual-master conflict is because after the fiber is unplugged, the separated frame may be converted to an independent device and generate an independent master master. When the fiber is reinserted to communicate again, it will be detected that both frames in a system are There is a conflict caused by the master master.
在一种可替换的实施方式中,由多框路由设备的主控板CPU构造检测报文,检测报文包括当前主控的主备状态、当前主控所在的物理位置等信息;在主控板交换芯片和中心交换板交换芯片上通过步骤S230配置VLAN、STG、ACL规则等;中心交换板CPU根据检测报文对是否存在双主冲突进行检测;主控板CPU、中心交换板CPU通过套口(socket)进行报文收发。此外,所述检测方法主要在当重新插入光纤再次通信时发起对双主冲突的检测,因此,在本实施方式中,还包括定时扫描端口(例如,该端口为光口)的物理状态,当检测到端口物理状态变为UP时,开始进行检测报文的收发。In an alternative implementation manner, the main control board CPU of the multi-frame routing device constructs a detection message, and the detection message includes information such as the master/standby status of the current master and the physical location of the current master; Step S230 configures VLAN, STG, ACL rules, etc. on the board switch chip and the central switch board switch chip; the central switch board CPU detects whether there is a dual-master conflict according to the detection message; the main control board CPU and the central switch board CPU pass the set The socket is used to send and receive messages. In addition, the detection method mainly initiates the detection of the dual-master conflict when the optical fiber is reinserted to communicate again. Therefore, in this embodiment, it also includes a periodic scan of the physical state of the port (for example, the port is an optical port). When detecting that the physical status of the port changes to UP, it starts sending and receiving detection packets.
本公开提供的检测方法,按照本公开提供的报文处理方法对检测报文进行差异化处理和转发,使检测报文即使在框间的端口为阻塞状态时依然能通过交换芯片硬件本身遵循二层转发的方式进行转发,从而简化了多框路由设备双主冲突检测的程序,降低了维护成本和复杂度。The detection method provided in the present disclosure performs differentiated processing and forwarding of detection messages according to the message processing method provided in the present disclosure, so that the detection messages can still pass through the switching chip hardware itself to comply with the two rules even when the ports between the frames are blocked. Layer forwarding is used for forwarding, which simplifies the procedure of dual-master conflict detection for multi-frame routing equipment, and reduces maintenance costs and complexity.
作为本公开的第三个方面,如图7所示,提供一种报文处理模块400,包括:As a third aspect of the present disclosure, as shown in FIG. 7, a
VLAN标识符配置单元410,被配置为为预定端口配置新增VLAN标识符,所述新增VLAN标识符不同于所述预定端口的默认VLAN标识符;The VLAN
端口配置单元420,被配置为将与所述新增VLAN标识符对应的端口状态设置为转发状态,其中,所述端口状态为所述预定端口的配置信息的一种;The port configuration unit 420 is configured to set the port state corresponding to the newly added VLAN identifier to the forwarding state, where the port state is a type of configuration information of the predetermined port;
报文配置单元430,被配置为将待发送的报文的VLAN标识符修改为所述新增VLAN标识符。The
本公开提供的报文处理模块用于执行本公开提供的报文处理方法,上文已经对所述报文处理方法的工作原理和有益效果进行了详细的描述,此处不再赘述。The message processing module provided in the present disclosure is used to execute the message processing method provided in the present disclosure. The working principle and beneficial effects of the message processing method have been described in detail above, and will not be repeated here.
作为本公开的四个方面,提供一种交换设备,包括:As four aspects of the present disclosure, a switching device is provided, including:
存储模块,所述存储模块上存储有可执行程序;A storage module, the storage module stores an executable program;
一个或多个处理器,当所述可执行程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现上述的报文处理方法。One or more processors, when the executable program is executed by the one or more processors, enable the one or more processors to implement the foregoing message processing method.
需要说明的是,本公开提供的交换设备还包括多个网络模块,通过执行本公开提供的报文处理方法,在所述网络模块上进行VLAN标识符、生成树组标识符、ACL规则等配置。It should be noted that the switching device provided by the present disclosure also includes a plurality of network modules. By executing the message processing method provided by the present disclosure, VLAN identifier, spanning tree group identifier, ACL rule and other configurations are performed on the network module. .
本公开提供的交换设备能够实现本公开提供的报文处理方法,上文已经对所述报文处理方法的工作原理和有益效果进行了详细的描述,此处不再赘述。The switching device provided in the present disclosure can implement the message processing method provided in the present disclosure. The working principle and beneficial effects of the message processing method have been described in detail above, and will not be repeated here.
作为本公开的第五个方面,提供一种计算机可读存储介质,所述计算机可读存储介质上存储有可执行程序,所述可执行程序被执行时能够实现上述的报文处理方法或上述的检测方法。As a fifth aspect of the present disclosure, a computer-readable storage medium is provided, and an executable program is stored on the computer-readable storage medium, and the executable program can implement the foregoing message processing method or the foregoing The detection method.
其中,计算机可读存储介质包括在用于存储信息(诸如计算机可读指令、数据结构、程序模块或其他数据)的任何方法或技术中实施的易失性和非易失性、可移除和不可移除介质。计算机可读存储介质包括但不限于RAM、ROM、EEPROM、闪存或其他存储器技术、CD-ROM、数字多功能盘(DVD)或其他光盘存储、磁盒、磁带、磁盘存储或其他磁存储介质、或者可以用于存储期望的信息并且可以被计算机访问的任何其他的介质。Among them, the computer-readable storage medium includes volatile and non-volatile, removable and The media cannot be removed. Computer-readable storage media include but are not limited to RAM, ROM, EEPROM, flash memory or other memory technologies, CD-ROM, digital versatile disk (DVD) or other optical disk storage, magnetic cassettes, magnetic tapes, magnetic disk storage or other magnetic storage media, Or any other medium that can be used to store desired information and that can be accessed by a computer.
作为本公开的第六个方面,提供一种多框路由设备,所述多框路由设备包括:As a sixth aspect of the present disclosure, a multi-frame routing device is provided, and the multi-frame routing device includes:
存储模块,所述存储模块上存储有可执行程序;A storage module, the storage module stores an executable program;
一个或多个处理器,当所述可执行程序被所述一个或多个处理器执行时,使得所述一个或多个处理器实现上述的报文处理方法或上述的检测方法。One or more processors, when the executable program is executed by the one or more processors, enable the one or more processors to implement the foregoing message processing method or the foregoing detection method.
需要说明的是,所述多框路由设备还包括多个中心框,每个中心框包括多个中心框主控板和多个中心交换板;中心框主控板包括多个交换芯片,用于连接本框内所有其它功能板在整个系统内的控制面通信;中心交换板包括CPU和多个交换芯片,用于连接各个框主控板,并用于连接整个多框路由设备控制面的通信。所述多框路由设备还包括多个线卡框,每个线卡框包括线卡框主控板和线卡板,线卡框主控板用于连接本框内所有线卡板在整个系统内控制面的通信。It should be noted that the multi-frame routing device also includes a plurality of center frames, each center frame includes a plurality of center frame main control boards and a plurality of center switching boards; the center frame main control board includes a plurality of switching chips for Connect all other functional boards in this frame to communicate in the control plane of the entire system; the central switch board includes a CPU and multiple switching chips, used to connect the main control boards of each frame, and to connect the entire multi-frame routing device control plane communication. The multi-frame routing device also includes a plurality of line card frames, each line card frame includes a line card frame main control board and a line card board, the line card frame main control board is used to connect all the line card boards in the frame in the entire system Communication within the control plane.
本公开提供的多框路由设备根据本公开提供的报文处理方法对报文进行处理并转发,使得当所述特定端口在默认VLAN中的端口状态为阻塞状态时,特定报文也能够从所述特定端口转发出去,并且只有特定报文能够从所述特定端口转发出去,从而实现了对特定报文和普通报文的差异化转发,降低了维护成本和复杂度。The multi-frame routing device provided by the present disclosure processes and forwards messages according to the message processing method provided by the present disclosure, so that when the port status of the specific port in the default VLAN is blocked, the specific message can also be sent from all sources. The specific port is forwarded, and only specific messages can be forwarded from the specific port, thereby realizing differentiated forwarding of specific messages and ordinary messages, and reducing maintenance costs and complexity.
本公开提供的报文处理方法及模块、检测方法、交换设备、存储介质,简化了报文处理程序,实现了对报文的差异化处理和转发,降低了维护的复杂度及维护成本。The message processing method and module, detection method, switching device, and storage medium provided by the present disclosure simplifies the message processing procedure, realizes differentiated processing and forwarding of messages, and reduces maintenance complexity and maintenance costs.
可以理解的是,以上实施方式仅仅是为了说明本公开的原理而采用的示例性实施方式,然而本公开并不局限于此。对于本领域内的普通技术人员而言,在不脱离本公开的原理和实质的情况下,可以做出各种变型和改进,这些变型和改进也视为本公开的保护范围。It can be understood that the above implementations are merely exemplary implementations used to illustrate the principle of the present disclosure, but the present disclosure is not limited thereto. For those of ordinary skill in the art, various modifications and improvements can be made without departing from the principle and essence of the present disclosure, and these modifications and improvements are also deemed to be within the protection scope of the present disclosure.
Claims (11)
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201911303617.XA CN112995006B (en) | 2019-12-17 | 2019-12-17 | Message processing method and module, detection method, switching equipment and storage medium |
| CN201911303617.X | 2019-12-17 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2021121003A1 true WO2021121003A1 (en) | 2021-06-24 |
Family
ID=76342465
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2020/131806 Ceased WO2021121003A1 (en) | 2019-12-17 | 2020-11-26 | Message processing method, module, detection method, switching device and storage medium |
Country Status (2)
| Country | Link |
|---|---|
| CN (1) | CN112995006B (en) |
| WO (1) | WO2021121003A1 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN115357503B (en) * | 2022-08-24 | 2025-10-21 | 云合智网(上海)技术有限公司 | Initialization method of SAI Thrift test environment |
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101808045A (en) * | 2010-04-29 | 2010-08-18 | 迈普通信技术股份有限公司 | Method and exchange equipment for preventing old information message circulation in MSTP (Multiple Spanning Tree Protocol) |
| US20120176893A1 (en) * | 2011-01-10 | 2012-07-12 | Brocade Communications Systems, Inc. | Congestion notification in private vlans |
| CN102801638A (en) * | 2012-09-06 | 2012-11-28 | 武汉烽火网络有限责任公司 | Management and control method of port forwarding state of switch chip |
| CN104243208A (en) * | 2014-09-09 | 2014-12-24 | 福建星网锐捷网络有限公司 | Port expansion and message processing method, device and network device |
| CN108337192A (en) * | 2017-12-28 | 2018-07-27 | 华为技术有限公司 | Message communication method and apparatus in a kind of cloud data center |
Family Cites Families (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2008114364A1 (en) * | 2007-03-16 | 2008-09-25 | Fujitsu Limited | Relay device, its conduction confirmation method, and conduction confirmation circuit |
| CN101686167A (en) * | 2008-09-22 | 2010-03-31 | 中兴通讯股份有限公司 | Method for controlling recovery of faults of Ethernet |
| CN101753465B (en) * | 2010-02-11 | 2014-03-12 | 中兴通讯股份有限公司 | Protection method taking Ethernet Ring protection system to control VLAN message and device thereof |
| US8891533B2 (en) * | 2012-06-07 | 2014-11-18 | Extreme Networks, Inc. | Methods systems and apparatuses for dynamically tagging VLANs |
| CN103401797B (en) * | 2013-07-24 | 2016-05-11 | 杭州华三通信技术有限公司 | A kind of message processing method and equipment |
-
2019
- 2019-12-17 CN CN201911303617.XA patent/CN112995006B/en active Active
-
2020
- 2020-11-26 WO PCT/CN2020/131806 patent/WO2021121003A1/en not_active Ceased
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN101808045A (en) * | 2010-04-29 | 2010-08-18 | 迈普通信技术股份有限公司 | Method and exchange equipment for preventing old information message circulation in MSTP (Multiple Spanning Tree Protocol) |
| US20120176893A1 (en) * | 2011-01-10 | 2012-07-12 | Brocade Communications Systems, Inc. | Congestion notification in private vlans |
| CN102801638A (en) * | 2012-09-06 | 2012-11-28 | 武汉烽火网络有限责任公司 | Management and control method of port forwarding state of switch chip |
| CN104243208A (en) * | 2014-09-09 | 2014-12-24 | 福建星网锐捷网络有限公司 | Port expansion and message processing method, device and network device |
| CN108337192A (en) * | 2017-12-28 | 2018-07-27 | 华为技术有限公司 | Message communication method and apparatus in a kind of cloud data center |
Also Published As
| Publication number | Publication date |
|---|---|
| CN112995006B (en) | 2024-10-25 |
| CN112995006A (en) | 2021-06-18 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| EP1190532B1 (en) | Intelligent stacked switching system | |
| US7233991B2 (en) | Self-healing tree network | |
| EP2264949B1 (en) | Forwarding frames in a computer network using shortest path bridging | |
| US7872989B1 (en) | Full mesh optimization for spanning tree protocol | |
| US8848575B2 (en) | High availability and multipathing for fibre channel over ethernet | |
| EP2774328B1 (en) | Hierarchy of control in a data center network | |
| US20130108264A1 (en) | Hierarchy of control in a data center network | |
| CN104243324B (en) | The method and apparatus E-Packeted | |
| EP3175590A1 (en) | Bridging clouds | |
| JP2001028605A (en) | Data communication system with distributed multicasting | |
| EP2731313A1 (en) | Distributed cluster processing system and message processing method thereof | |
| US8750122B1 (en) | Method and apparatus for layer 2 loop prevention in a multi-node switch cluster | |
| EP3316555B1 (en) | Mac address synchronization method, device and system | |
| US20210211351A1 (en) | Stacking-port configuration using zero-touch provisioning | |
| CN105656645A (en) | Decision making method and device for fault processing of stacking system | |
| US20100115032A1 (en) | Dynamic connectivity determination | |
| US9384102B2 (en) | Redundant, fault-tolerant management fabric for multipartition servers | |
| US20060002299A1 (en) | Method and apparatus for detecting support for a protocol defining supplemental headers | |
| US20220311702A1 (en) | Efficient propagation of fault routing notifications | |
| EP1345356A2 (en) | Topology discovery process and mechanism for a network of managed devices | |
| US8861403B2 (en) | Interconnecting segmented layer two network for cloud switching | |
| CN116566752A (en) | Security drainage system, cloud host and security drainage method | |
| WO2021121003A1 (en) | Message processing method, module, detection method, switching device and storage medium | |
| US8228823B2 (en) | Avoiding high-speed network partitions in favor of low-speed links | |
| US7376089B2 (en) | Multiple-instance meshing |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 20903099 Country of ref document: EP Kind code of ref document: A1 |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20903099 Country of ref document: EP Kind code of ref document: A1 |
|
| 32PN | Ep: public notification in the ep bulletin as address of the adressee cannot be established |
Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 01/03/2023) |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 20903099 Country of ref document: EP Kind code of ref document: A1 |