[go: up one dir, main page]

CN112929417B - Message processing method and device - Google Patents

Message processing method and device Download PDF

Info

Publication number
CN112929417B
CN112929417B CN202110090063.0A CN202110090063A CN112929417B CN 112929417 B CN112929417 B CN 112929417B CN 202110090063 A CN202110090063 A CN 202110090063A CN 112929417 B CN112929417 B CN 112929417B
Authority
CN
China
Prior art keywords
protocol
network device
message
hash table
processing
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.)
Active
Application number
CN202110090063.0A
Other languages
Chinese (zh)
Other versions
CN112929417A (en
Inventor
余华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
New H3C Security Technologies Co Ltd
Original Assignee
New H3C Security Technologies Co Ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by New H3C Security Technologies Co Ltd filed Critical New H3C Security Technologies Co Ltd
Priority to CN202110090063.0A priority Critical patent/CN112929417B/en
Publication of CN112929417A publication Critical patent/CN112929417A/en
Application granted granted Critical
Publication of CN112929417B publication Critical patent/CN112929417B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • H04L67/1001Protocols in which an application is distributed across nodes in the network for accessing one among a plurality of replicated servers
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Computer And Data Communications (AREA)

Abstract

The application provides a message processing method and a device, wherein the method is applied to a first network device, the first network device is configured with a first load sharing algorithm, and the method comprises the following steps: receiving a first protocol message sent by second network equipment, wherein the first protocol message comprises a destination address and a first protocol type; judging whether the destination address is the address of the first network equipment or not according to the first load sharing algorithm; if yes, judging whether the first protocol type is the same as a configured second protocol type; if the first protocol message is different from the second protocol message, forwarding the first protocol message to third network equipment through an IPL link so that the third network equipment performs corresponding processing on the first protocol message; the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.

Description

Message processing method and device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method and an apparatus for processing a packet.
Background
In Distributed Resilient Network Interconnect (DRNI) networking, as shown in fig. 1, fig. 1 is a schematic diagram of an existing DRNI Network model. In the process of accessing the IP network, the client sends a protocol packet to a device (device) C, which may also be referred to as an access switch. And a load sharing algorithm configured by the aggregation port of the device C determines that the protocol message is forwarded to the IP network through the device A or the device B. When the destination address accessed by the client indicates the device a or the device B, if the load sharing algorithm configured in the device C is not the stream-by-stream load sharing algorithm, the device will fail to process the protocol packet.
An 802.1X protocol is taken as an example for explanation, wherein an EAP relay mode single device authentication procedure of an 802.1X authentication system is shown in fig. 2. The devices in fig. 2 include device a, device B, and device C. The 802.1X client initiates authentication to the authentication server through the device A, the device B and the device C, and the authentication server returns an authentication result to the 802.1X client through the device A, the device B and the device C.
Under DRNI networking, the 802.1X client performs authentication at a Distributed Relay interface (DR) port of the device C. The 802.1X client sends an EAPOL-Start message to device C. And the equipment C forwards the EAPOL-Start message to the equipment A according to the configured load sharing algorithm. The device a returns an EAP-Request/Identity message to the device C. Subsequently, if the 802.1X client sends an EAP-Response/Identity message to the device C, at this time, if the device C forwards the EAP-Response/Identity message to the device B according to the configured load sharing algorithm. Since the prior device B does not receive and transmit the related message authenticated by the 802.1X client, the device B will cause the authentication failure of the 802.1X client. As shown in fig. 3, fig. 3 is a timing diagram illustrating an authentication failure of an 802.1X client.
For the above problems, the existing packet processing scheme cannot be fundamentally solved, and it relies on configuring a stream-by-stream load sharing algorithm and a multiple packet retransmission mechanism on the device C to probabilistically send all protocol packets included in one protocol flow session to the same device for processing. Thus, the following problems are also brought about: 1) a load sharing algorithm configured by an excessive dependence access switch; 2) a large amount of protocol messages need to be retransmitted; 3) the protocol flow can only be completed once probabilistically, and the efficiency is low and unreliable.
Disclosure of Invention
In view of this, the present application provides a method and an apparatus for processing a packet, so as to solve the problem that when a destination address of a protocol packet sent by an 802.1X client in an existing DRNI networking is a DRNI member device, a protocol flow is probabilistically completed only by configuring a stream-by-stream load sharing algorithm and a multiple packet retransmission mechanism on the device.
In a first aspect, the present application provides a packet processing method, where the method is applied to a first network device, where the first network device has configured a first load sharing algorithm, and the method includes:
receiving a first protocol message sent by second network equipment, wherein the first protocol message comprises a destination address and a first protocol type;
judging whether the destination address is the address of the first network equipment or not according to the first load sharing algorithm;
if yes, judging whether the first protocol type is the same as a configured second protocol type;
if the first protocol message is different from the second protocol message, forwarding the first protocol message to third network equipment through an IPL link so that the third network equipment performs corresponding processing on the first protocol message;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
In a second aspect, the present application provides a packet processing method, where the method is applied to a first network device, where the first network device has configured a first load sharing algorithm, and the method includes:
receiving a first protocol message sent by second network equipment, wherein the first protocol message comprises a first source address;
inquiring whether a first hash table item matched with the first source address exists in a local protocol processing hash table or not according to the first load sharing algorithm;
if the first hash table entry does not exist, inquiring whether a second hash table entry matched with the first source address exists in a neighbor protocol processing hash table or not;
if the second hash table entry exists, sending the first protocol message to a third network device through an IPL link, so that the third network device performs corresponding processing on the first protocol message;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
In a third aspect, the present application provides a packet processing apparatus, where the apparatus is applied to a first network device, where the first network device has configured a first load sharing algorithm, and the apparatus includes:
a receiving unit, configured to receive a first protocol packet sent by a second network device, where the first protocol packet includes a destination address and a first protocol type;
a first determining unit, configured to determine whether the destination address is an address of the first network device according to the first load sharing algorithm;
a second judging unit, configured to, if yes, judge whether the first protocol type is the same as a configured second protocol type;
a sending unit, configured to forward the first protocol packet to a third network device through an IPL link if the first protocol packet is different from the second protocol packet, so that the third network device performs corresponding processing on the first protocol packet;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
In a fourth aspect, the present application provides a packet processing apparatus, where the apparatus is applied to a first network device, where the first network device has configured a first load sharing algorithm, and the apparatus includes:
a receiving unit, configured to receive a first protocol packet sent by a second network device, where the first protocol packet includes a first source address;
a first query unit, configured to query, according to the first load sharing algorithm, whether a first hash table entry matching the first source address exists in a local protocol processing hash table;
a second query unit, configured to query, if the first hash table does not exist, whether a second hash table matching the first source address exists in a neighbor protocol processing hash table;
a sending unit, configured to send the first protocol packet to a third network device through an IPL link if the second hash table entry exists, so that the third network device performs corresponding processing on the first protocol packet;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
In a fifth aspect, the present application provides a network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method provided by the first aspect of the present application.
In a sixth aspect, the present application provides a network device comprising a processor and a machine-readable storage medium storing machine-executable instructions executable by the processor, the processor being caused by the machine-executable instructions to perform the method provided by the second aspect of the present application.
Therefore, by applying the message processing method and apparatus provided by the present application, the first network device receives the first protocol message sent by the second network device, where the first protocol message includes the destination address and the first protocol type. And according to the configured first load sharing algorithm, the first network equipment judges whether the destination address is the address of the first network equipment. If so, the first network device judges whether the first protocol type is the same as the configured second protocol type. If the two protocols are different, the first network equipment forwards the first protocol message to the third network equipment through the IPL link, so that the third network equipment correspondingly processes the first protocol message. The first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
Therefore, the problem that when the destination address of a protocol message sent by an 802.1X client in the existing DRNI networking is a DRNI member device, a protocol flow is probabilistically completed only by configuring a flow-by-flow load sharing algorithm and a multi-time message retransmission mechanism on the device is solved. The method and the system realize that one network device processes the protocol messages of the same protocol type in a centralized way in the DR system, and improve the protocol message processing efficiency of the network device.
Drawings
Fig. 1 is a schematic diagram of a conventional DRNI network model;
fig. 2 is a sequence diagram of an EAP relay mode single device authentication procedure of an 802.1X authentication system;
FIG. 3 is a timing diagram illustrating an authentication failure of an 802.1X client;
fig. 4 is a flowchart of a message processing method according to an embodiment of the present application;
fig. 5 is a timing diagram illustrating processing of an 802.1X protocol packet by a network device in a DRNI system according to an embodiment of the present application;
fig. 6 is a timing diagram of processing an 802.1X protocol packet and an HTTP protocol packet by a network device in the DRNI system according to the embodiment of the present application;
fig. 7 is a flowchart of another message processing method according to an embodiment of the present application;
fig. 8 is a timing diagram illustrating processing of an 802.1X protocol packet by a network device in another DRNI system according to the embodiment of the present application;
fig. 9 is a structural diagram of a message processing apparatus according to an embodiment of the present application;
fig. 10 is a structural diagram of another message processing apparatus according to an embodiment of the present application;
fig. 11 is a hardware structure diagram of a network device according to an embodiment of the present application.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the exemplary embodiments below do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present application, as detailed in the appended claims.
The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the corresponding listed items.
It is to be understood that although the terms first, second, third, etc. may be used herein to describe various information, such information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, first information may also be referred to as second information, and similarly, second information may also be referred to as first information, without departing from the scope of the present application. The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination", depending on the context.
The following describes the message processing method provided in the embodiment of the present application in detail. Referring to fig. 4, fig. 4 is a flowchart of a message processing method according to an embodiment of the present application. The method is applied to a first network device, and the message processing method provided by the embodiment of the application may include the following steps.
Step 410, receiving a first protocol packet sent by a second network device, where the first protocol packet includes a destination address and a first protocol type.
Specifically, the first network device, the second network device, and the third network device construct a DRNI system. The first network device and the third network device form a DR system, and IPL links are formed between the two devices through respective IPP interfaces. The first network equipment and the third network equipment exchange protocol messages and transmit data flow through IPL links. Wherein only one IPL link exists within one DR system. Keep-alive (keep alive) links are further established between the first network device and the third network device, and keep-alive detection is further carried out through the keep-alive links. The first network device and the third network device are connected with the aggregation port on the second network device through respective DR interfaces. The client is connected with the second network equipment.
And in the process of accessing the DR system by the client, the client sends a first protocol message to the second network equipment. After the second network device receives the first protocol packet, the second network device determines to forward the first protocol packet to the first network device or the third network device according to a load sharing algorithm configured by the second network device.
In this embodiment, an example in which the second network device sends the first protocol packet to the first network device is taken as an example for description. It is understood that the process of the second network device sending the first protocol packet to the third network device is the same as the process of the second network device sending the first protocol packet to the first network device, and will not be repeated here.
The first network equipment receives a first protocol message, wherein the first protocol message comprises a destination address and a first protocol type.
The destination address is the address of the first network device or the third network device. In the embodiment of the application, the first network device and the third network device are both configured with the same access address. The first protocol type is used for indicating the protocol type corresponding to the protocol message which can be processed by the network equipment. The first protocol packet includes a protocol feature field in which a value of the protocol type is stored. 888E is used to indicate the 802.1X protocol type and 80 is used to indicate the HTTP protocol type, for example.
Further, before executing this step, the first network device also receives a configuration instruction input by a user, and performs corresponding configuration locally through the configuration instruction.
The first network equipment receives a first configuration instruction input by a user, wherein the first configuration instruction comprises a second protocol type corresponding to a protocol message which can be processed by the first network equipment and a third protocol type corresponding to a protocol message which can be processed by the third network equipment.
For example, a user configures a first network device for processing a protocol packet corresponding to an 802.1X protocol type; the user configures the third network device for processing a protocol packet corresponding to the HTTP protocol type.
The first network equipment receives a second configuration instruction input by a user, wherein the second configuration instruction comprises a first load sharing algorithm used when the first network equipment processes a protocol message. In this embodiment of the present application, the first load sharing algorithm is specifically a protocol type algorithm of a network device processing instruction.
Similarly, the user may also perform input configuration on the third network device. The specific configuration process is the same as the process of configuring the first network device by the user, and will not be repeated here. The third network device may also be configured with the same first load sharing algorithm.
Step 420, according to the first load sharing algorithm, determining whether the destination address is the address of the first network device.
Specifically, according to the description of step 410, after receiving the first protocol packet, the first network device obtains the destination address and the first protocol type from the first protocol packet. According to the first load sharing algorithm, the first network device first judges whether the destination address is the address of the first network device.
If the destination address is an address of itself, step 430 is performed. If the destination address is not the address of the first network device, the first network device may forward the first protocol packet to the network device indicated by the destination address according to the destination address.
And 430, if so, judging whether the first protocol type is the same as the configured second protocol type.
Specifically, according to the determination of step 420, if the destination address is the address of itself, the first network device continues to determine whether the first protocol type is the same as the configured second protocol type.
If the first protocol type is different from the second protocol type, step 440 is performed. If the first protocol type is the same as the second protocol type, the first network device determines that the first network device can process the first protocol message and continues to process the first protocol message correspondingly.
Step 440, if the two are different, forwarding the first protocol packet to a third network device through an IPL link, so that the third network device performs corresponding processing on the first protocol packet.
Specifically, according to the judgment of step 430, if the first protocol type is different from the second protocol type, the first network device determines that it cannot process the first protocol packet. Meanwhile, the first network device searches for the locally recorded protocol type configured by the neighbor network device, and obtains a third protocol type configured by a third network device.
In this embodiment of the present application, if the third protocol type configured by the third network device is the same as the first protocol type, the first network device determines that the third network device can process the first protocol packet. The first network device forwards the first protocol packet to the third network device through the IPL link, so that the third network device performs corresponding processing on the first protocol packet.
It can be understood that, after receiving the first protocol packet, the third network device obtains the destination address and the first protocol type from the first protocol packet. According to the first load sharing algorithm, the third network device first determines whether the destination address is the address of the third network device. If the destination address is the address of the third network device, the third network device continues to determine whether the first protocol type is the same as the configured third protocol type.
And if the first protocol type is the same as the third protocol type, the third network equipment determines that the third network equipment can process the first protocol message and continues to correspondingly process the first protocol message.
Therefore, by applying the message processing method and apparatus provided by the present application, the first network device receives the first protocol message sent by the second network device, where the first protocol message includes the destination address and the first protocol type. And according to the configured first load sharing algorithm, the first network equipment judges whether the destination address is the address of the first network equipment. If so, the first network device judges whether the first protocol type is the same as the configured second protocol type. If the two protocols are different, the first network equipment forwards the first protocol message to the third network equipment through the IPL link, so that the third network equipment correspondingly processes the first protocol message. The first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
Therefore, the problem that when the destination address of a protocol message sent by an 802.1X client in the existing DRNI networking is a DRNI member device, a protocol flow is probabilistically completed only by configuring a flow-by-flow load sharing algorithm and a multi-time message retransmission mechanism on the device is solved. The method and the system realize that one network device processes the protocol messages of the same protocol type in a centralized way in the DR system, and improve the protocol message processing efficiency of the network device.
Optionally, in this embodiment of the present application, a process in which the first network device receives a second protocol packet sent by a third network device is further included.
Specifically, in the process that the client accesses the DR system, the client sends a second protocol packet to the second network device. After the second network device receives the second protocol packet, the second network device determines to forward the second protocol packet to the third network device according to a load sharing algorithm configured by the second network device.
And after receiving the second protocol message, the third network equipment acquires the destination address and the fourth protocol type from the second protocol message. According to the first load sharing algorithm, the third network device first determines whether the destination address is the address of the third network device. If the destination address is not the address of the third network device, the third network device may forward the second protocol packet to the network device indicated by the destination address according to the destination address.
If the destination address is the address of the third network device, the third network device continues to determine whether the fourth protocol type is the same as the configured third protocol type. If the fourth protocol type is the same as the third protocol type, the third network device determines that the third network device can process the second protocol message and continues to process the second protocol message correspondingly.
And if the fourth protocol type is different from the third protocol type, the third network equipment determines that the third network equipment can not process the second protocol message. Meanwhile, the third network device searches the locally recorded protocol type configured by the neighbor network device, and obtains the second protocol type configured by the first network device.
In this embodiment of the present application, if the second protocol type configured by the first network device is the same as the fourth protocol type, the third network device determines that the first network device can process the second protocol packet. And the third network equipment forwards the second protocol message to the first network equipment through the IPL link, so that the first network equipment correspondingly processes the second protocol message.
Through the IPL link, the first network device obtains the destination address and the fourth protocol type from the second protocol packet after receiving the second protocol packet. According to the first load sharing algorithm, the first network device first judges whether the destination address is the address of the first network device. If the destination address is the address of the first network device, the first network device continues to determine whether the fourth protocol type is the same as the configured second protocol type.
If the fourth protocol type is the same as the second protocol type, the first network device determines that the first network device can process the second protocol message and continues to process the second protocol message correspondingly.
The following describes in detail a message processing method provided in the embodiment of the present application, by taking an example of a processing process of an 802.1X protocol message by a network device. Referring to fig. 5, fig. 5 is a timing diagram illustrating processing of an 802.1X protocol packet by a network device in a DRNI system according to an embodiment of the present application.
In conjunction with the DRNI network model shown in fig. 1. The client is an 802.1X client, and a DRNI system is constructed by the device A, the device B and the device C. The device A and the device B form a DR system, and an internal control Link (IPL) Link is formed between the two devices through respective internal control Link Interfaces (IPP). And the equipment A and the equipment B exchange protocol messages and transmit data flow through the IPL link. The equipment A and the equipment B are connected with the aggregation port on the equipment C through respective DR interfaces. The 802.1X client connects with device C.
In the embodiment of the present application, a user configures a protocol type corresponding to a protocol packet that can be processed by a device a and a device B in advance. For example, a user configures device a for processing a protocol packet corresponding to an 802.1X protocol type; the user configures the device B for processing protocol packets corresponding to the HTTP protocol type.
The user also configures a load sharing algorithm for the device A and the device B respectively. For example, the user configures a first load sharing algorithm for device a and device B, respectively.
In the process of authenticating the 802.1X client, the 802.1X client sends an EAPOL-Start message to the device C. After receiving the EAPOL-Start message, the device C determines to forward the EAPOL-Start message to the device A according to a load sharing algorithm configured by the device C.
After receiving the EAPOL-Start message, the device A determines that the 802.1X client starts authentication. The device A generates an EAP-Request/identity message and sends the EAP-Request/identity message to the device C. Device C forwards the EAP-Request/identity packet to the 802.1X client.
According to the EAP-Request/identity message, the 802.1X client generates an EAP-Response/identity message and sends the EAP-Response/identity message to the device C. After receiving the EAPOL-Start packet, the device C determines to forward the EAP-Response/identity packet to the device B according to a load sharing algorithm configured by the device C.
After receiving the EAP-Response/identity packet, the device B obtains the destination address stored in the destination address field and the first protocol type stored in the protocol feature field. For example, the first protocol type has a value of 888E, which 888E is used to indicate an 802.1X protocol type.
According to the first load sharing algorithm, the device B first determines whether the destination address is the address of itself. If the destination address is the address of itself, device B continues to determine if 888E is the same as the value corresponding to the configured HTTP protocol type. In the embodiment of the present application, the value corresponding to the HTTP protocol type may be 80.
As can be seen from the foregoing example, 888E is significantly different from 80, device B determines that it cannot process the first protocol packet. Meanwhile, the device B searches for the locally recorded protocol type configured by the neighbor network device, and obtains the value of the protocol type configured by the device a.
In this embodiment of the present application, if the value of the protocol type configured by the device a is the same as the value of the first protocol type included in the first protocol packet, the device B determines that the device a can process the EAP-Response/identity packet.
The device B forwards the EAP-Response/identity message to the device A through the IPL link, so that the device A correspondingly processes the EAP-Response/identity message.
It can be understood that, after receiving the EAP-Response/identity message, the device a obtains the destination address stored in the destination address field and the 888E stored in the protocol feature field from the EAP-Response/identity message.
According to the first load sharing algorithm, the device a first determines whether the destination address is the address of the device a. If the destination address is its own address, device A continues to determine if 888E is the same as the value corresponding to the configured 802.1X protocol type.
As can be seen from the foregoing example, 888E and the configured 802.1X protocol type have the same value, device a determines that it can process the EAP-Response/identity packet and continues to process the EAP-Response/identity packet correspondingly.
It can be understood that the subsequent procedure of processing the EAP-Response/identity packet by the device a and the authentication procedure of each device to the 802.1X client are the same as the authentication procedure to the 802.1X client in the prior art, and are not repeated again.
If the device C sends the protocol packet corresponding to the 802.1X protocol type to the device B again, the device B may forward the protocol packet to the device a through the IPL link according to the process described above, and the device a performs subsequent processing on the protocol packet.
The following describes in detail the message processing method provided in the embodiment of the present application, taking as an example a processing process of a network device on an 802.1X protocol message and an HTTP protocol message. Referring to fig. 6, fig. 6 is a timing diagram of processing an 802.1X protocol packet and an HTTP protocol packet by a network device in the DRNI system according to the embodiment of the present application.
Fig. 5 is a timing diagram of processing 802.1X protocol packets by a network device in the DRNI system. When the device C receives the first protocol packet corresponding to the 802.1X protocol type, the device C determines to forward the first protocol packet to the device B according to the load sharing algorithm configured by the device C itself, and then the device B may forward the protocol packet to the device a through the IPL link according to the process described above, and the device a performs subsequent processing on the protocol packet.
Similarly, when the device C receives the second protocol packet corresponding to the HTTP protocol type, the device C determines to forward the second protocol packet to the device a according to the load sharing algorithm configured by the device C, and the device a may forward the protocol packet to the device B through the IPL link according to the process executed by the device B in the foregoing description, and the device B performs subsequent processing on the protocol packet, which is not repeated here.
The following describes the message processing method provided in the embodiment of the present application in detail. Referring to fig. 7, fig. 7 is a flowchart of another message processing method according to the embodiment of the present application. The method is applied to a first network device, and the message processing method provided by the embodiment of the application may include the following steps.
Step 710, receiving a first protocol packet sent by a second network device, where the first protocol packet includes a first source address.
Specifically, the first network device, the second network device, and the third network device construct a DRNI system. The first network device and the third network device form a DR system, and IPL links are formed between the two devices through respective IPP interfaces. The first network equipment and the third network equipment exchange protocol messages and transmit data flow through IPL links. Wherein only one IPL link exists within one DR system. A Keepalive link is further established between the first network device and the third network device, and then keep-alive detection is performed through the Keepalive link. The first network device and the third network device are connected with the aggregation port on the second network device through respective DR interfaces. The client is connected with the second network equipment.
And in the process of accessing the IP system by the client, the client sends a first protocol message to the second network equipment. After the second network device receives the first protocol packet, the second network device determines to forward the first protocol packet to the first network device or the third network device according to a load sharing algorithm configured by the second network device.
In this embodiment, an example in which the second network device sends the first protocol packet to the first network device is taken as an example for description. It is understood that the process of the second network device sending the first protocol packet to the third network device is the same as the process of the second network device sending the first protocol packet to the first network device, and will not be repeated here.
The first network device receives a first protocol packet, which includes a first source address. The first source address may specifically be a source MAC address and a source IP address.
In the embodiment of the application, the first network device and the third network device are both configured with the same access address.
Further, before executing the step, the first network device further receives a configuration instruction input by a user, and performs corresponding configuration locally through the configuration instruction.
The first network equipment receives a first configuration instruction input by a user, wherein the first configuration instruction comprises a first load sharing algorithm used when the first network equipment processes a protocol message. In this embodiment of the present application, the first load sharing algorithm is specifically a protocol packet first position processing algorithm.
Similarly, the user may also perform input configuration on the third network device. The specific configuration process is the same as the process of configuring the first network device by the user, and is not repeated here. The third network device may also be configured with the same first load sharing algorithm.
Step 720, according to the first load sharing algorithm, inquiring whether a first hash table item matched with the first source address exists in a local protocol processing hash table.
Specifically, according to the description of step 710, after receiving the first protocol packet, the first network device obtains the first source address from the first protocol packet. If the first protocol message is a two-layer protocol message, the first source address is specifically a source MAC address; if the first protocol message is a three-layer protocol message, the first source address is specifically a source IP address.
Using the first source address, the first network device queries whether a first hash table entry matching the first source address exists in a local protocol processing hash (hash) table.
If the first hash entry does not exist, step 730 is performed. And if the first hash table entry exists, the first network equipment correspondingly processes the first protocol message.
Step 730, if the first hash table entry does not exist, inquiring whether a second hash table entry matched with the first source address exists in a neighbor protocol processing hash table.
Specifically, according to the judgment in step 720, if the first hash table does not exist, the first network device queries, using the first source address, whether a second hash table matching the first source address exists in the neighbor protocol processing hash table.
And the neighbor protocol processing hash table is sent to the first network equipment through the IPL link after the third network equipment generates the local protocol processing hash table. And after receiving that the third network equipment generates the local protocol processing hash table, the first network equipment stores the local protocol processing hash table as a neighbor protocol processing hash table.
It can be understood that the first network device further sends the local protocol processing hash table generated by the first network device to the third network device through the IPL link, so that the third network device stores the received local protocol processing hash table as the neighbor protocol processing hash table.
If a second hash entry exists, then step 740 is performed. And if the second hash table entry does not exist, the first network equipment acquires the first VLAN, the first DR port information and the first timestamp. The first VLAN is an original VLAN of the client; the first DR port information is DR port information in the first network equipment; the first timestamp is a time when the first network device receives the first protocol packet.
The first network device generates a first message, where the first message includes a first protocol message, a first VLAN, first DR port information, and a first timestamp. And through the IPL link, the first network equipment sends the first message to the third network equipment, so that the third network equipment correspondingly processes the first protocol message.
After receiving the first message, the third network device obtains a first protocol message, a first VLAN, first DR interface information and a first timestamp from the first message. Wherein the first protocol packet includes a first source address.
And according to the first load sharing algorithm, the third network equipment queries whether a third hash table item matched with the first source address exists in the local protocol processing hash table, wherein the third hash table item comprises a second timestamp.
And if the third hash table entry exists, the third network equipment judges whether the second timestamp is earlier than the first timestamp. And if the second timestamp is earlier than the first timestamp, the third network equipment correspondingly processes the first protocol message. Meanwhile, the third network equipment generates a second message, and the second message comprises message confirmation processing information.
And the third network equipment sends the second message to the first network equipment. And after receiving the second message, the first network equipment acquires message confirmation processing information from the second message. And according to the message confirmation management information, the first network equipment generates a fourth hash table item by using the first source address, the first VLAN, the first DR port information and the first timestamp. And the first network equipment stores the fourth hash table entry into the neighbor protocol processing hash table.
And if the second timestamp is not earlier than the first timestamp, the third network equipment deletes the third hash table entry from the local protocol processing hash table. And generating a fifth hash table entry by the third network device by using the first source address, the first VLAN, the first DR port information and the first timestamp. And the third network equipment stores the fifth hash table entry into the neighbor protocol processing hash table. Meanwhile, the third network device generates a third message, which includes message unprocessed information. And the third network equipment sends a third message to the first network equipment through the IPL link.
And after receiving the third message, the first network equipment acquires message unprocessed information from the third message. And according to the message unprocessed information, the first network equipment correspondingly processes the first protocol message. And generating a sixth hash table entry by the first network device by using the first source address, the first VLAN, the first DR port information and the first timestamp. And the first network equipment stores the sixth hash table entry into the local protocol processing hash table.
If the third hash table entry does not exist, the third Network device generates a seventh hash table entry by using the first source address, the first Virtual Local Area Network (VLAN), the first DR port information, and the first timestamp. And the third network equipment stores the seventh hash table entry into the neighbor protocol processing hash table. Meanwhile, the third network device generates a fourth message, which includes message unprocessed information. And the third network equipment sends a fourth message to the first network equipment through the IPL link.
And after receiving the fourth message, the first network equipment acquires message unprocessed information from the fourth message. And according to the message unprocessed information, the first network equipment correspondingly processes the first protocol message. And generating an eighth hash table entry by the first network device by using the first source address, the first VLAN, the first DR port information and the first timestamp. And the first network equipment stores the eighth hash table entry into the local protocol processing hash table.
Step 740, if the second hash table entry exists, sending the first protocol packet to a third network device through an IPL link, so that the third network device performs corresponding processing on the first protocol packet.
Specifically, according to the judgment in step 730, if the second hash table entry exists, the first network device sends the first protocol packet to the third network device through the IPL link, so that the third network device performs corresponding processing on the first protocol packet.
Therefore, by applying the message processing method and apparatus provided by the present application, the first network device receives the first protocol message sent by the second network device, where the first protocol message includes the destination address and the first protocol type. And according to the configured first load sharing algorithm, the first network equipment judges whether the destination address is the address of the first network equipment. If so, the first network device judges whether the first protocol type is the same as the configured second protocol type. If the two protocols are different, the first network equipment forwards the first protocol message to the third network equipment through the IPL link, so that the third network equipment correspondingly processes the first protocol message. The first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
Therefore, the problem that when the destination address of a protocol message sent by an 802.1X client in the existing DRNI networking is a DRNI member device, a protocol flow is probabilistically completed only by configuring a flow-by-flow load sharing algorithm and a multi-time message retransmission mechanism on the device is solved. The method and the system realize that one network device processes the protocol messages of the same protocol type in a centralized way in the DR system, and improve the protocol message processing efficiency of the network device.
Optionally, in this embodiment of the present application, a process in which the first network device receives a fifth packet sent by the third network device, and processes the fifth packet is further included.
Specifically, in the process of accessing the IP system, the client sends the second protocol packet to the second network device. After the second network device receives the second protocol packet, the second network device determines to forward the second protocol packet to the first network device or the third network device according to a load sharing algorithm configured by the second network device.
In this embodiment, an example in which the second network device sends the second protocol packet to the third network device is taken as an example for description.
And after receiving the second protocol message, the third network equipment acquires a second source address from the second protocol message. If the second protocol message is a two-layer protocol message, the second source address is specifically a source MAC address; and if the second protocol message is a three-layer protocol message, the second source address is specifically a source IP address.
And using the second source address, the third network equipment inquires whether a ninth hash table item matched with the second source address exists in the local protocol processing hash table.
And if the ninth hash table entry exists, the third network equipment correspondingly processes the second protocol message. And if the ninth hash table entry does not exist, using the second source address, and inquiring whether a tenth hash table entry matched with the second source address exists in the neighbor protocol processing hash table or not by the third network equipment.
And if the tenth hash table entry does not exist, the third network equipment acquires the second VLAN, the second DR port information and the third timestamp. The second VLAN is the original VLAN of the client; the second DR port information is DR port information in third network equipment; the third timestamp is a time when the third network device receives the second protocol packet.
And the third network equipment generates a fifth message, wherein the fifth message comprises a second protocol message, a second VLAN, second DR port information and a third timestamp. And through the IPL link, the third network equipment sends a fifth message to the first network equipment so that the first network equipment correspondingly processes the second protocol message.
And if the tenth hash table entry exists, the third network device sends the second protocol message to the first network device through the IPL link, so that the first network device performs corresponding processing on the second protocol message.
And after receiving the fifth message sent by the third network device, the first network device acquires the second protocol message, the second VLAN, the second DR interface information and the third timestamp from the fifth message. Wherein the second protocol packet includes a second source address.
According to the first load sharing algorithm, the first network device queries whether an eleventh hash table entry matched with the second source address exists in the local protocol processing hash table, wherein the eleventh hash table entry comprises a fourth timestamp.
If the eleventh hash table entry exists, the first network device determines whether the third timestamp is earlier than the fourth timestamp. And if the third timestamp is earlier than the fourth timestamp, the first network equipment correspondingly processes the second protocol message. Meanwhile, the first network device generates a sixth message, which includes message acknowledgement processing information.
And the first network equipment sends a sixth message to the third network equipment. And after receiving the sixth message, the third network equipment acquires message confirmation processing information from the sixth message. And according to the message confirmation processing information, the third network equipment generates a twelfth hash table item by using the second source address, the second VLAN, the second DR port information and the third timestamp. And the third network equipment stores the twelfth hash table entry into the neighbor protocol processing hash table.
And if the third timestamp is not earlier than the first timestamp, the first network device deletes the eleventh hash table entry from the local protocol processing hash table. And generating a thirteenth hash table entry by using the second source address, the second VLAN, the second DR port information and the third timestamp. And the first network equipment stores the thirteenth hash table entry into the neighbor protocol processing hash table. Meanwhile, the first network device generates a seventh message, wherein the seventh message comprises message unprocessed information. And sending the seventh message to the third network equipment by the first network equipment through the IPL link.
And after receiving the seventh message, the third network equipment acquires message unprocessed information from the seventh message. And the third network equipment correspondingly processes the second protocol message according to the message unprocessed information. And generating a fourteenth hash table entry by the third network device by using the second source address, the second VLAN, the second DR port information and the third timestamp. And the third network equipment stores the fourteenth hash table entry into the local protocol processing hash table.
And if the eleventh hash table entry does not exist, the first network device generates a fifteenth hash table entry by using the second source address, the second VLAN, the second DR port information and the third timestamp. And the first network device stores the fifteenth hash table entry into the neighbor protocol processing hash table. Meanwhile, the first network device generates an eighth packet, where the eighth packet includes message unprocessed information. And sending the eighth message to the third network equipment by the first network equipment through the IPL link.
And after receiving the eighth message, the third network equipment acquires message unprocessed information from the eighth message. And the third network equipment correspondingly processes the second protocol message according to the message unprocessed information. And generating a sixteenth hash table entry by the third network device by using the second source address, the second VLAN, the second DR port information and the third timestamp. And the third network device stores the sixteenth hash table entry into the local protocol processing hash table.
The following describes in detail a message processing method provided in the embodiment of the present application, by taking an example of a processing process of an 802.1X protocol message by a network device. Referring to fig. 8, fig. 8 is a timing diagram illustrating processing of an 802.1X protocol packet by a network device in another DRNI system according to the embodiment of the present application.
In conjunction with the DRNI network model shown in fig. 1. The client is an 802.1X client, and a DRNI system is constructed by the device A, the device B and the device C. The device A and the device B form a DR system, and an IPL link is formed between the two devices through respective IPP interfaces. And the equipment A and the equipment B exchange protocol messages and transmit data flow through the IPL link. The equipment A and the equipment B are connected with the aggregation port on the equipment C through respective DR interfaces. The 802.1X client connects with device C.
In the embodiment of the present application, a user configures a protocol type corresponding to a protocol packet that can be processed by a device a and a device B in advance. For example, a user configures device a for processing a protocol packet corresponding to an 802.1X protocol type; the user configures the device B for processing protocol packets corresponding to the HTTP protocol type.
The user also configures a load sharing algorithm for the device A and the device B respectively. For example, the user configures a first load sharing algorithm for device a and device B, respectively.
During the process of authenticating the 802.1X client, the 802.1X client sends an EAPOL packet (which may also be referred to as an 802.1X protocol packet) to device C. After receiving the EAPOL packet, the device C determines to forward the EAPOL-Start packet to the device a according to a load sharing algorithm configured by the device C.
After receiving the EAPOL message, the device A determines that the 802.1X client starts authentication. Device a obtains the first source address therefrom. If the EAPOL message is a two-layer protocol message, the first source address is specifically a source MAC address; if the EAPOL message is a three-layer protocol message, the first source address is specifically a source IP address.
By using the first source address, the device a queries whether a first hash table entry matching the first source address exists in the hash table of the local protocol processing.
If the first hash table entry exists, the device a performs corresponding processing on the first protocol packet. If the first hash table entry does not exist, the device A queries whether a second hash table entry matched with the first source address exists in the neighbor protocol processing hash table or not by using the first source address.
And if the second hash table entry exists, the device A sends an EAPOL message to the device B through the IPL link, so that the device B performs corresponding processing on the EAPOL message.
And if the second hash table entry does not exist, the device A acquires the first VLAN, the first DR port information and the first timestamp. The first VLAN is an original VLAN of the client; the first DR port information is DR port information in the equipment A; the first timestamp is the time when the device a receives the EAPOL message.
The device A generates a first message, wherein the first message comprises an EAPOL message, a first VLAN, first DR port information and a first timestamp. Through the IPL link, the device a sends the first packet to the device B, so that the device B performs corresponding processing on the first protocol packet.
After receiving the first message, the device B acquires the EAPOL message, the first VLAN, the first DR port information, and the first timestamp from the first message. The EAPOL message includes a first source address.
According to the first load sharing algorithm, the device B queries whether a third hash table entry matching the first source address exists in the hash table of the local protocol processing, where the third hash table entry includes the second timestamp.
If the third hash table entry exists, the device B determines whether the second timestamp is earlier than the first timestamp. And if the second timestamp is earlier than the first timestamp, the device B correspondingly processes the EAPOL message. Meanwhile, the device B generates a second message, which includes message acknowledgement processing information.
And the device B sends a second message to the device A. And after receiving the second message, the device A acquires message confirmation processing information from the second message. And according to the message confirmation management information, the device A generates a fourth hash table item by using the first source address, the first VLAN, the first DR port information and the first timestamp. And the device A stores the fourth hash table entry into the neighbor protocol processing hash table.
And if the second timestamp is not earlier than the first timestamp, the device B deletes the third hash table entry from the local protocol processing hash table. And generating a fifth hash table entry by the device B by using the first source address, the first VLAN, the first DR port information and the first timestamp. And the device B stores the fifth hash table entry into the neighbor protocol processing hash table. Meanwhile, the device B generates a third message, which includes message unprocessed information. And the device B sends a third message to the device A through the IPL link.
And after receiving the third message, the device A acquires message unprocessed information from the third message. And according to the message unprocessed information, the equipment A correspondingly processes the EAPOL message. And generating a sixth hash table entry by the device a by using the first source address, the first VLAN, the first DR port information and the first timestamp. And the device A stores the sixth hash table entry into the local protocol processing hash table.
If the third hash table entry does not exist, the device B generates a seventh hash table entry by using the first source address, the first VLAN, the first DR port information, and the first timestamp. And the device B stores the seventh hash table entry into the neighbor protocol processing hash table. Meanwhile, the device B generates a fourth packet, which includes the message unprocessed information. And the device B sends a fourth message to the device A through the IPL link.
And after receiving the fourth message, the device A acquires message unprocessed information from the fourth message. And according to the message unprocessed information, the equipment A correspondingly processes the EAPOL message. And generating an eighth hash table entry by the device a by using the first source address, the first VLAN, the first DR port information and the first timestamp. And the device A stores the eighth hash table entry into the local protocol processing hash table.
In the subsequent message interaction process, if the device C sends the protocol message corresponding to the 802.1X protocol type to the device B, the device B may forward the protocol message to the device a through the IPL link according to the process described above, and the device a performs subsequent processing on the protocol message.
Based on the same inventive concept, the embodiment of the application also provides a message processing device corresponding to the message processing method. Referring to fig. 9, fig. 9 is a structural diagram of a message processing apparatus provided in this embodiment, where the apparatus is applied to a first network device, and the first network device has configured a first load sharing algorithm, and the apparatus includes:
a receiving unit 910, configured to receive a first protocol packet sent by a second network device, where the first protocol packet includes a destination address and a first protocol type;
a first determining unit 920, configured to determine whether the destination address is an address of the first network device according to the first load sharing algorithm;
a second determining unit 930, configured to determine whether the first protocol type is the same as the configured second protocol type if yes;
a sending unit 940, configured to forward the first protocol packet to a third network device through an IPL link if the first protocol packet is different from the second protocol packet, so that the third network device performs corresponding processing on the first protocol packet;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
Optionally, the apparatus further comprises: and a processing unit (not shown in the figure), configured to perform corresponding processing on the first protocol packet if the first protocol packet is the same as the second protocol packet.
Optionally, the receiving unit 910 is further configured to receive a first configuration instruction input by a user, where the first configuration instruction includes a second protocol type corresponding to a protocol packet that can be processed by the first network device and a third protocol type corresponding to a protocol packet that can be processed by the third network device;
and receiving a second configuration instruction input by a user, wherein the second configuration instruction comprises a first load sharing algorithm used when the first network equipment processes the protocol message.
Optionally, the receiving unit 910 is further configured to receive, through the IPL link, a second protocol packet sent by the third network device, where the second protocol packet includes a destination address and a fourth protocol type;
the first determining unit 920 is further configured to determine whether the destination address is an address of the first network device according to the first load sharing algorithm;
the second determining unit 930 is further configured to, if yes, determine whether the fourth protocol type is the same as the configured second protocol type;
the processing unit (not shown in the figure) is further configured to, if the two protocol packets are the same, perform corresponding processing on the second protocol packet.
Based on the same inventive concept, the embodiment of the application also provides a message processing device corresponding to the message processing method. Referring to fig. 10, fig. 10 is a structural diagram of another packet processing apparatus provided in this embodiment, where the apparatus is applied to a first network device, and the first network device has configured a first load sharing algorithm, and the apparatus includes:
a receiving unit 1010, configured to receive a first protocol packet sent by a second network device, where the first protocol packet includes a first source address;
a first querying unit 1020, configured to query, according to the first load sharing algorithm, whether a first hash table entry matching the first source address exists in a local protocol processing hash table;
a second querying unit 1030, configured to query whether a second hash table matching the first source address exists in a neighbor protocol processing hash table if the first hash table does not exist;
a sending unit 1040, configured to send the first protocol packet to a third network device through an IPL link if the second hash table entry exists, so that the third network device performs corresponding processing on the first protocol packet;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
Optionally, the apparatus further comprises: and a processing unit (not shown in the figure), configured to perform corresponding processing on the first protocol packet if the first hash table entry exists.
Optionally, the sending unit 1040 is further configured to send, if the second hash table entry does not exist, a first packet to the third network device through an IPL link, where the first packet includes the first protocol packet, a first VLAN, first DR port information, and a first timestamp, so that the third network device performs corresponding processing on the first protocol packet.
Optionally, the receiving unit 1010 is further configured to receive, through the IPL link, a second packet sent by the third network device, where the second packet includes packet confirmation processing information;
the device further comprises: a generating unit (not shown in the figure), configured to generate a third hash table entry according to the message acknowledgement processing information, by using the first source address, the first VLAN, the first DR interface information, and the first timestamp;
a storage unit (not shown in the figure) configured to store the third hash table entry into the neighbor protocol processing hash table.
Optionally, the receiving unit 1010 is further configured to receive, through the IPL link, a third packet sent by the third network device, where the third packet includes information that is not processed;
the processing unit (not shown in the figure) is further configured to perform corresponding processing on the first protocol packet according to the unprocessed packet information;
the generating unit (not shown in the figure) is further configured to generate a fourth hash table entry by using the first source address, the first VLAN, the first DR port information, and the first timestamp;
the storing unit (not shown in the figure) is further configured to store the fourth hash table entry into the local protocol processing hash table.
Optionally, the sending unit 1040 is further configured to send, through the IPL link, a fourth packet to the third network device, where the fourth packet includes the local protocol processing hash table, so that the third network device stores the received local protocol processing hash table as a neighbor protocol processing hash table.
Optionally, the receiving unit 1010 is further configured to receive, through the IPL link, a fifth packet sent by the third network device, where the fifth packet includes a local protocol processing hash table generated by the third network device;
the storage unit (not shown in the figure) is further configured to store the local protocol processing hash table as a neighbor protocol processing hash table.
Optionally, the receiving unit 1010 is further configured to receive, through the IPL link, a sixth packet sent by the third network device, where the sixth packet includes a second protocol packet, a second VLAN, second DR interface information, and a second timestamp, and the second protocol packet includes a second source address;
the first querying unit 1020 is further configured to query, according to the first load sharing algorithm, whether a fifth hash table entry matching the second source address exists in a local protocol processing hash table, where the fifth hash table entry includes a third timestamp;
the device further comprises: a determining unit (not shown in the figure), configured to determine whether the third timestamp is earlier than the second timestamp if the fifth hash table entry exists;
the processing unit (not shown in the figure) is further configured to, if the second protocol packet is earlier than the first protocol packet, perform corresponding processing on the second protocol packet;
the sending unit 1040 is further configured to send a seventh packet to the third network device through the IPL link, where the seventh packet includes packet acknowledgement processing information.
The generating unit (not shown in the figure) is further configured to, if the fifth hash table does not exist, generate a sixth hash table by using the second source address, the second VLAN, the second DR port information, and the second timestamp;
the storage unit (not shown in the figure) is further configured to store the sixth hash table entry into the neighbor protocol processing hash table;
the sending unit 1040 is further configured to send, through the IPL link, an eighth packet to the third network device, where the eighth packet includes message unprocessed information.
Optionally, the apparatus further comprises: a deleting unit (not shown in the figure), configured to delete the fifth hash table entry from the local protocol processing hash table if the fifth hash table entry is not earlier than the first hash table entry;
the generating unit (not shown in the figure) is further configured to generate a seventh hash table entry by using the second source address, the second VLAN, the second DR port information, and the second timestamp;
the storage unit (not shown in the figure) is further configured to store the seventh hash table entry into the neighbor protocol processing hash table;
the sending unit 1040 is further configured to send, through the IPL link, a ninth packet to the third network device, where the ninth packet includes message unprocessed information.
Therefore, by applying the message processing apparatus provided by the present application, the apparatus receives a first protocol message sent by a second network device, where the first protocol message includes a destination address and a first protocol type. According to the configured first load sharing algorithm, the device judges whether the destination address is the address of the first network equipment. If so, the apparatus determines whether the first protocol type is the same as the configured second protocol type. If the two protocols are different, the device forwards the first protocol message to the third network equipment through the IPL link, so that the third network equipment correspondingly processes the first protocol message. The first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
Therefore, the problem that when the destination address of a protocol message sent by an 802.1X client in the existing DRNI networking is a DRNI member device, a protocol flow is probabilistically completed only by configuring a flow-by-flow load sharing algorithm and a multi-time message retransmission mechanism on the device is solved. The method and the system realize that one network device processes the protocol messages of the same protocol type in a centralized way in the DR system, and improve the protocol message processing efficiency of the network device.
Based on the same inventive concept, the embodiment of the present application further provides a network device, as shown in fig. 11, including a processor 1110, a transceiver 1120, and a machine-readable storage medium 1130, where the machine-readable storage medium 1130 stores machine-executable instructions capable of being executed by the processor 1110, and the processor 1110 is caused by the machine-executable instructions to perform the method provided by the embodiment of the present application. The message processing apparatus shown in fig. 9 and 10 may be implemented by using a network device hardware structure shown in fig. 11.
The computer-readable storage medium 1130 may include a Random Access Memory (RAM) or a Non-volatile Memory (NVM), such as at least one disk Memory. Optionally, the computer-readable storage medium 1130 may also be at least one memory device located remotely from the processor 1110.
The Processor 1110 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; the Integrated Circuit can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field Programmable Gate Array (FPGA), or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components.
In embodiments of the present application, the processor 1110, by reading machine executable instructions stored in the machine-readable storage medium 1130, is caused by the machine executable instructions to enable the processor 1110 itself and the call transceiver 1120 to perform the methods described in embodiments of the present application.
Additionally, the present embodiment provides a machine-readable storage medium 1130, where the machine-readable storage medium 1130 stores machine executable instructions, and when the machine executable instructions are called and executed by the processor 1110, the machine executable instructions cause the processor 1110 itself and the calling transceiver 1120 to execute the message processing method described in the foregoing embodiments of the present application.
The implementation process of the functions and actions of each unit in the above device is specifically described in the implementation process of the corresponding step in the above method, and is not described herein again.
For the device embodiments, since they substantially correspond to the method embodiments, reference may be made to the partial description of the method embodiments for relevant points. The above-described embodiments of the apparatus are merely illustrative, and the units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the scheme of the application. One of ordinary skill in the art can understand and implement it without inventive effort.
As for the message processing apparatus and the machine-readable storage medium, the content of the related method is substantially similar to that of the foregoing method embodiment, so that the description is relatively simple, and for the relevant points, reference may be made to the partial description of the method embodiment.
The above description is only exemplary of the present application and should not be taken as limiting the present application, as any modification, equivalent replacement, or improvement made within the spirit and principle of the present application should be included in the scope of protection of the present application.

Claims (15)

1. A method for processing a packet, the method being applied to a first network device, the first network device having configured a first load sharing algorithm, the method comprising:
receiving a first protocol message sent by second network equipment, wherein the first protocol message comprises a destination address and a first protocol type;
judging whether the destination address is the address of the first network equipment or not according to the first load sharing algorithm;
if yes, judging whether the first protocol type is the same as a configured second protocol type;
if the first protocol message is different from the second protocol message, forwarding the first protocol message to third network equipment through an IPL link so that the third network equipment performs corresponding processing on the first protocol message;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
2. The method of claim 1, further comprising:
and if the first protocol message is the same as the second protocol message, performing corresponding processing on the first protocol message.
3. The method of claim 1, wherein before receiving the first protocol packet sent by the second network device, the method further comprises:
receiving a first configuration instruction input by a user, wherein the first configuration instruction comprises a second protocol type corresponding to a protocol message which can be processed by the first network device and a third protocol type corresponding to a protocol message which can be processed by the third network device;
and receiving a second configuration instruction input by a user, wherein the second configuration instruction comprises a first load sharing algorithm used when the first network equipment processes the protocol message.
4. The method of claim 1, further comprising:
receiving a second protocol message sent by the third network device through the IPL link, wherein the second protocol message comprises a destination address and a fourth protocol type;
judging whether the destination address is the address of the first network equipment or not according to the first load sharing algorithm;
if yes, judging whether the fourth protocol type is the same as the configured second protocol type;
and if the two protocol messages are the same, performing corresponding processing on the second protocol message.
5. A method for processing a packet, the method being applied to a first network device, the first network device having configured a first load sharing algorithm, the method comprising:
receiving a first protocol message sent by second network equipment, wherein the first protocol message comprises a first source address;
inquiring whether a first hash table item matched with the first source address exists in a local protocol processing hash table or not according to the first load sharing algorithm;
if the first hash table entry does not exist, inquiring whether a second hash table entry matched with the first source address exists in a neighbor protocol processing hash table or not;
if the second hash table entry exists, sending the first protocol message to a third network device through an IPL link, so that the third network device performs corresponding processing on the first protocol message;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
6. The method of claim 5, further comprising:
and if the first hash table entry exists, correspondingly processing the first protocol message.
7. The method of claim 5, further comprising:
and if the second hash table entry does not exist, sending a first message to the third network device through an IPL link, wherein the first message comprises the first protocol message, a first VLAN, first DR port information and a first timestamp, so that the third network device performs corresponding processing on the first protocol message.
8. The method of claim 7, further comprising:
receiving a second message sent by the third network device through the IPL link, wherein the second message comprises message confirmation processing information;
generating a fourth hash table entry by using the first source address, the first VLAN, the first DR port information and the first timestamp according to the message confirmation processing information;
and storing the fourth hash table entry into the neighbor protocol processing hash table.
9. The method of claim 7, further comprising:
receiving a third message sent by the third network device through the IPL link, wherein the third message comprises message unprocessed information;
according to the message unprocessed information, the first protocol message is correspondingly processed;
generating a sixth hash table entry by using the first source address, the first VLAN, the first DR port information and the first timestamp;
and storing the sixth hash table entry into the local protocol processing hash table.
10. The method of claim 5, wherein before receiving the first protocol packet sent by the second network device, the method further comprises:
and sending the generated local protocol processing hash table to the third network equipment through the IPL link, so that the third network equipment stores the received local protocol processing hash table as a neighbor protocol processing hash table.
11. The method of claim 5, further comprising:
and receiving the local protocol processing hash table of the third network equipment through the IPL link, and storing the local protocol processing hash table as a neighbor protocol processing hash table.
12. The method of claim 5, further comprising:
receiving a sixth message sent by the third network device through the IPL link, where the sixth message includes a second protocol message, a second VLAN, second DR interface information, and a second timestamp, and the second protocol message includes a second source address;
inquiring whether a fifth hash table item matched with the second source address exists in a local protocol processing hash table according to the first load sharing algorithm, wherein the fifth hash table item comprises a third timestamp;
if the fifth hash table entry exists, judging whether the third timestamp is earlier than the second timestamp;
if the first protocol message is earlier than the second protocol message, performing corresponding processing on the second protocol message;
and sending a seventh message to the third network device through the IPL link, wherein the seventh message comprises message confirmation processing information.
13. The method of claim 12, further comprising:
if not, deleting the fifth hash table entry from the local protocol processing hash table;
generating a seventh hash table entry by using the second source address, the second VLAN, the second DR port information and the second timestamp;
storing the seventh hash table entry into the neighbor protocol processing hash table;
and sending a ninth message to the third network device through the IPL link, wherein the ninth message comprises message unprocessed information.
14. A message processing apparatus, wherein the apparatus is applied to a first network device, and the first network device has configured a first load sharing algorithm, and the apparatus comprises:
a receiving unit, configured to receive a first protocol packet sent by a second network device, where the first protocol packet includes a destination address and a first protocol type;
a first determining unit, configured to determine whether the destination address is an address of the first network device according to the first load sharing algorithm;
a second judging unit, configured to, if yes, judge whether the first protocol type is the same as a configured second protocol type;
a sending unit, configured to forward the first protocol packet to a third network device through an IPL link if the first protocol packet is different from the second protocol packet, so that the third network device performs corresponding processing on the first protocol packet;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
15. A message processing apparatus, wherein the apparatus is applied to a first network device, and the first network device has configured a first load sharing algorithm, and the apparatus comprises:
a receiving unit, configured to receive a first protocol packet sent by a second network device, where the first protocol packet includes a first source address;
a first query unit, configured to query, according to the first load sharing algorithm, whether a first hash table entry matching the first source address exists in a local protocol processing hash table;
a second query unit, configured to query, if the first hash table does not exist, whether a second hash table matching the first source address exists in a neighbor protocol processing hash table;
a sending unit, configured to send the first protocol packet to a third network device through an IPL link if the second hash table entry exists, so that the third network device performs corresponding processing on the first protocol packet;
the first network device and the third network device form a DR system, and the first network device and the third network device are both configured with the same access address.
CN202110090063.0A 2021-01-22 2021-01-22 Message processing method and device Active CN112929417B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110090063.0A CN112929417B (en) 2021-01-22 2021-01-22 Message processing method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110090063.0A CN112929417B (en) 2021-01-22 2021-01-22 Message processing method and device

Publications (2)

Publication Number Publication Date
CN112929417A CN112929417A (en) 2021-06-08
CN112929417B true CN112929417B (en) 2022-05-27

Family

ID=76164965

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110090063.0A Active CN112929417B (en) 2021-01-22 2021-01-22 Message processing method and device

Country Status (1)

Country Link
CN (1) CN112929417B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114172690B (en) * 2021-11-11 2023-12-26 新华三大数据技术有限公司 Terminal authentication method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102065028A (en) * 2010-12-31 2011-05-18 上海顶竹通讯技术有限公司 Gateway equipment and message processing method
CN106559342A (en) * 2016-11-10 2017-04-05 上海斐讯数据通信技术有限公司 It is a kind of based on the protocol port guard method of SDN, device and system
CN107948082A (en) * 2016-10-12 2018-04-20 中国电信股份有限公司 The processing method and system and agent apparatus of point-to-point protocol on Ethernet
CN109067634A (en) * 2018-09-28 2018-12-21 新华三技术有限公司 A kind of forwarding-table item creation method and device
CN110839046A (en) * 2019-12-03 2020-02-25 睿哲科技股份有限公司 Multi-protocol intercommunication method and system

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104125088B (en) * 2013-04-28 2019-05-10 中兴通讯股份有限公司 Method and system for exchanging information between systems within the same terminal in DRNI

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102065028A (en) * 2010-12-31 2011-05-18 上海顶竹通讯技术有限公司 Gateway equipment and message processing method
CN107948082A (en) * 2016-10-12 2018-04-20 中国电信股份有限公司 The processing method and system and agent apparatus of point-to-point protocol on Ethernet
CN106559342A (en) * 2016-11-10 2017-04-05 上海斐讯数据通信技术有限公司 It is a kind of based on the protocol port guard method of SDN, device and system
CN109067634A (en) * 2018-09-28 2018-12-21 新华三技术有限公司 A kind of forwarding-table item creation method and device
CN110839046A (en) * 2019-12-03 2020-02-25 睿哲科技股份有限公司 Multi-protocol intercommunication method and system

Also Published As

Publication number Publication date
CN112929417A (en) 2021-06-08

Similar Documents

Publication Publication Date Title
US11316858B2 (en) Fast heartbeat liveness between packet processing engines using media access control security (MACsec) communication
US20220407948A1 (en) Load Balancing and Session Persistence in Packet Networks
US11115391B2 (en) Securing end-to-end virtual machine traffic
US10129216B2 (en) Low latency server-side redirection of UDP-based transport protocols traversing a client-side NAT firewall
US7107609B2 (en) Stateful packet forwarding in a firewall cluster
US10530644B2 (en) Techniques for establishing a communication connection between two network entities via different network flows
WO2017050117A1 (en) Network load balance processing system, method, and apparatus
WO2017213971A1 (en) Network-visitability detection control
WO2017097023A1 (en) Perception-free authentication method and system, and control method and system based on method
CN108111509B (en) data transfer method
CN107820246B (en) User authentication method, device and system
CN112929417B (en) Message processing method and device
CN111245858A (en) Network flow interception method, system, device, computer equipment and storage medium
CN106603512A (en) SDN (software define network) architecture IS (Intermediate System)-IS (Intermediate System) routing protocol-based trusted authentication method
US10999379B1 (en) Liveness detection for an authenticated client session
US8811179B2 (en) Method and apparatus for controlling packet flow in a packet-switched network
US20210006556A1 (en) Forwarding Method, Forwarding Apparatus, and Forwarder for Authentication Information in Internet of Things
US20250097027A1 (en) Communication device and method therein for facilitating ike communications
CN108667832A (en) Authentication method, server, interchanger based on configuration information and storage medium
US20240152502A1 (en) Data authentication and validation across multiple sources, interfaces, and networks
US20240380753A1 (en) Faster movement of 802.1x supplicants using cache
JP6447138B2 (en) Gateway device
Agostini et al. OpenCAPWAP v2. 0: the new open‐source implementation of the CAPWAP protocol
CN118891860A (en) Application session persistence after dynamic media access control (MAC) address rotation
JP2014236423A (en) Communication device, control method, communication program and communication system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant