CN112887229B - Session information synchronization method and device - Google Patents

Session information synchronization method and device Download PDF

Info

Publication number
CN112887229B
CN112887229B CN202110031959.1A CN202110031959A CN112887229B CN 112887229 B CN112887229 B CN 112887229B CN 202110031959 A CN202110031959 A CN 202110031959A CN 112887229 B CN112887229 B CN 112887229B
Authority
CN
China
Prior art keywords
multicast
service board
session information
cpu
mac address
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
CN202110031959.1A
Other languages
Chinese (zh)
Other versions
CN112887229A (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.)
Hangzhou DPTech Technologies Co Ltd
Original Assignee
Hangzhou DPTech 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 Hangzhou DPTech Technologies Co Ltd filed Critical Hangzhou DPTech Technologies Co Ltd
Priority to CN202110031959.1A priority Critical patent/CN112887229B/en
Publication of CN112887229A publication Critical patent/CN112887229A/en
Application granted granted Critical
Publication of CN112887229B publication Critical patent/CN112887229B/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
    • H04L49/00Packet switching elements
    • H04L49/20Support for services
    • H04L49/201Multicast operation; Broadcast operation
    • 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/1095Replication or mirroring of data, e.g. scheduling or transport for data synchronisation between network nodes
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L2101/00Indexing scheme associated with group H04L61/00
    • H04L2101/60Types of network addresses
    • H04L2101/618Details of network addresses
    • H04L2101/622Layer-2 addresses, e.g. medium access control [MAC] addresses

Abstract

The application provides a session information synchronization method and device. A method for synchronizing session information is applied to network equipment comprising at least two service boards, and comprises the following steps: creating a multicast group for the at least two service board cards, wherein the multicast MAC address of the multicast group is a designated MAC address; after a CPU of any service board card operates session information, if the current network equipment is checked to start a session synchronization function, the relevant information of the operation is packaged in a multicast message of which the destination MAC address is the specified MAC address, and the multicast message is sent to a switching chip of the service board card, so that the switching chip sends the multicast message to other service board cards in the multicast group; and when any service board card receives the multicast message of which the destination MAC address is the specified MAC address, operating the session information according to the multicast message. By the method, the CPU resource can be effectively saved when the synchronization of the session information between the service board cards is realized.

Description

Session information synchronization 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 synchronizing session information.
Background
At present, a plurality of service boards are generally accessed to a network device to meet the requirement of large-flow data forwarding, and in order to make the load of each service board more balanced, the network device generally distributes the flow uniformly to each service board, and each service board respectively processes the flow distributed to it and records the session information of the distributed flow. This means that session information of any traffic is only recorded on one of the plurality of service boards, and if any service board cannot normally operate due to abnormal restart, hot plug, or the like, traffic corresponding to the session information recorded by the service board will be forwarded in failure, resulting in interruption of the user network.
Disclosure of Invention
The application provides a session information synchronization method and device, so as to realize the synchronization of session information among all service board cards.
The technical scheme provided by the application comprises the following steps:
in a first aspect, the present application provides a session information synchronization method, applied to a network device, the network device comprises at least two service boards, and the method comprises the following steps:
creating a multicast group for the at least two service board cards, wherein the multicast MAC address of the multicast group is a designated MAC address;
after a CPU of any service board card operates session information, if the current network equipment is checked to start a session synchronization function, the relevant information of the operation is packaged in a multicast message of which the destination MAC address is the specified MAC address, and the multicast message is sent to a switching chip of the service board card, so that the switching chip sends the multicast message to other service board cards except the service board card in the multicast group;
and when any service board card receives the multicast message of which the destination MAC address is the specified MAC address, operating the session information according to the multicast message.
In a second aspect, the present application provides a session information synchronization apparatus, which is applied to a network device, where the network device includes at least two service boards, and the method includes:
a creating unit, which creates a multicast group for the at least two service boards, wherein the multicast MAC address of the multicast group is a designated MAC address;
a sending unit, configured to package, after a CPU of any service board operates session information, relevant information of the operation in a multicast packet whose destination MAC address is the specified MAC address if it is checked that a current network device starts a session synchronization function, and send the multicast packet to a switch chip of the local service board, so that the switch chip sends the multicast packet to other service boards in the multicast group except the local service board;
and a synchronization unit, wherein any service board operates the session information according to the multicast message when receiving the multicast message with the destination MAC address as the specified MAC address.
According to the method and the device, a multicast group is established for a plurality of service board cards accessed by the network equipment, so that a CPU (central processing unit) of any service board card can package related information of operation on session information in a multicast message, an exchange chip of the service board card sends the multicast message to other service board cards in the multicast group, and the other service board cards in the multicast group can operate the session information according to the multicast message after receiving the multicast message, so that the synchronization of the session information is realized. In addition, according to the scheme provided by the application, no matter how many service boards exist in the multicast group, the CPU of each service board can only send a multicast message for encapsulating the information to be synchronized to the switching chip, so that the CPU resource can be effectively saved in the session information synchronization process.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
Fig. 1 is a schematic structural diagram of a network device according to an embodiment of the present application;
fig. 2 is a flowchart of a session information synchronization method provided in the present application;
fig. 3 is a structural diagram of a session information synchronization apparatus provided in the present application;
fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present application.
Detailed Description
The terminology used in the description herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this specification 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 associated listed items.
It should be understood that although the terms first, second, third, etc. may be used herein to describe various information, these information should not be limited to these terms. These terms are only used to distinguish one type of information from another. For example, the first information may also be referred to as second information, and similarly, the second information may also be referred to as first information, without departing from the scope of the present specification. The word "if," as used herein, may be interpreted as "at … …" or "at … …" or "in response to a determination," depending on the context.
In one example, to meet the requirement of forwarding large-traffic data, a network device supports access to multiple service boards. As an embodiment, a service board accessible to a network device may include: a firewall (Fire Wall, FW) service board, an Intrusion Prevention System (IPS) service board, a remote Access service (UAG) service board, and the like, which are respectively used to provide different services. As an embodiment, the network device may access a plurality of service boards of the same type, and may also access a plurality of service boards of different types. For convenience of description, the following embodiments are mainly directed to network devices accessing a plurality of service boards of the same type, and for network devices accessing different types of service boards, differentiation processing may be performed on related flows according to actual use requirements.
For the convenience of understanding the embodiments provided in the present application, the following briefly describes the structure of the network device with reference to fig. 1:
referring to fig. 1, fig. 1 is a schematic structural diagram of a network device according to an embodiment of the present application.
As shown in fig. 1, a network device has several service boards. Each service board card comprises a CPU and an exchange chip, and the exchange chip is mainly used for forwarding messages; the switching chips of the service boards are connected by internal wires to form a data channel between the switching chips, so that the service boards can communicate with each other, and a specific connection mode is not shown in fig. 1, and various modes in the prior art can be referred to.
In order to implement load balancing of each service board, as an embodiment, when a switch chip of any service board receives a traffic from outside of the network device, the switch chip may determine, according to a certain rule, a service board for processing the traffic, and then send the traffic to the determined service board for processing. Specifically, determining the service board card for processing the traffic may include: the exchange chip obtains a hash value according to the source IP address and the destination IP address of the flow, then calculates the hash value according to a flow distribution algorithm to obtain a calculation result, and takes the service board card corresponding to the calculation result as the service board card for processing the flow.
It should be noted that the network device structure shown in fig. 1 is only an example, and is not used to specifically limit the present application. In addition, in practical applications, the network device may further include a main control board, a switch board, a backplane, and other structures, which are not the main structures of the present application, and therefore, detailed descriptions thereof are omitted here.
The session information synchronization method provided by the present application is described below by way of example with reference to fig. 2, and by the session information synchronization method provided by the present application, synchronization of session information between each service board of the network device can be achieved, and CPU resources can be effectively saved in the synchronization process.
Referring to fig. 2, fig. 2 is a flowchart of a session information synchronization method provided in the present application. In one example, the method may be applied to a network device, such as a gateway, that includes at least two traffic boards. As shown in fig. 2, the process may include the following steps S201 to S203:
step S201, a multicast group is created for all the service boards of the network device, and the multicast MAC address of the multicast group is the designated MAC address.
In one example, creating a multicast group for all service boards of the network device may include: configuring a multicast MAC address of at least one port on each service board card as a designated MAC address, and configuring output port information for each service board card to send multicast messages to other service board cards in a multicast group.
As an embodiment, the designated MAC address may be any multicast MAC address, and meets the format requirement of the multicast MAC address. Specifically, the multicast MAC address is composed of 48 bits, wherein the upper 24 bits is 0x01005e, the 25 th bit is 0, that is, the upper 25 bits of the multicast MAC address is a fixed value, and as for the lower 23 bits of the multicast MAC address, the lower 23 bits of the multicast MAC address can be mapped by the lower 23 bits of the multicast IP address. When configuring multicast MAC addresses for the ports of the service boards, as an embodiment, the multicast MAC addresses of all the ports of each service board may be configured as designated MAC addresses, or the multicast MAC addresses of the same number of ports on each service board may be configured as designated MAC addresses. More sophisticated techniques exist in the art for how to statically configure multicast MAC addresses for ports, and are not described in detail herein.
As an embodiment, when a service board on the network device changes, for example, a service board is added or some service boards are unplugged, in order to ensure synchronization of session information of each service board, a multicast group may be created for each changed service board, and each service board in the newly created multicast group is configured with egress port information for sending a multicast packet to other service boards in the multicast group. Taking an example of adding a new service board card on the network device, it is possible to reconfigure egress port information for sending multicast packets to other service boards in the multicast group for each current service board card of the network device, and configure the multicast MAC address of at least one port of the newly added multicast group as the designated MAC address.
Step S202, after the CPU of any service board operates the session information, if the current network device is checked to start the session synchronization function, the relevant information of the operation is packaged in the multicast message of which the destination MAC address is the specified MAC address, and the multicast message is sent to the switching chip of the service board, so that the switching chip sends the multicast message to other service boards except the service board in the multicast group.
The session synchronization function is a function of synchronizing session information between the service boards, and in one example, the network device may enable or disable the session synchronization function according to the received configuration. For one embodiment, the network device may employ a value of a specified variable to indicate whether the session synchronization function is enabled. Specifically, after the CPU of the service board operates the session information, the current value of the specified variable may be checked, and if the current value of the specified variable is a first value, it is determined that the network device starts the session synchronization function, and if the current value of the specified variable is a second value, it is determined that the network device does not start the session synchronization function.
After the CPU specifically operates the session information, the relevant information of the operation is encapsulated in the multicast message, which is described below by way of example and is not repeated herein.
The process of sending the multicast message to other service boards in the multicast group except the service board by the switching chip of the service board may include: and the switching chip copies the multicast messages with the same quantity according to the quantity of other service board cards in the multicast group except the service board card and sends the copied multicast messages to other service board cards. Taking the example that the multicast group created on the network device includes the service board a and the service board B, when the switching chip of the service board a receives the multicast message from the CPU, since the switching chip includes only one service board B in addition to the service board a in the multicast group, the switching chip can copy 1 part of the multicast message accordingly and send the copied multicast message to the service board B.
Step S203, when receiving the multicast packet with the destination MAC address as the specified MAC address, any service board operates the session information according to the multicast packet.
Through the step S203, the service board can synchronously operate the session information of itself according to the multicast message sent by the other service boards, so that the session information of itself is synchronized with the other service boards.
Thus, the flow shown in fig. 2 is completed.
Through the process shown in fig. 2, the synchronization of session information between the service board cards can be realized, and when any service board card is abnormally restarted, the traffic on the service board card can be normally forwarded by other service board cards. And no matter how many service boards exist in the multicast group, the CPU of each service board can only send a multicast message for encapsulating the information to be synchronized to the switching chip, so that the CPU resource can be effectively saved in the session information synchronization process.
In the flow shown in fig. 2, the following describes, by way of example, how the CPU specifically operates the session information and then encapsulates the relevant information of the operation in the multicast message:
in one example, the operation performed by the CPU on the session information may include: adding session information, modifying recorded session information, and deleting recorded session information.
As an embodiment, when the CPU adds new session information, at least the added session information may be encapsulated in a multicast packet whose destination MAC address is a designated MAC address. As an embodiment, the multicast packet may further include an instruction for indicating the new session information.
As an embodiment, the CPU may add new session information if: the service board card has a fast forwarding function, and the CPU of the service board card can forward a message which cannot be forwarded according to the fast forwarding flow according to the slow forwarding flow under the condition that the message meets the condition of entering the slow forwarding flow. Wherein, the slow forwarding flow at least comprises: and further, the CPU can respectively add marks to the recorded forward quintuple information and the reverse quintuple information so as to be convenient for processing related services according to the marks in the following. For the convenience of understanding the present embodiment, the following briefly describes the fast forwarding procedure and the slow forwarding procedure:
as an embodiment, the fast forwarding procedure may include: after receiving a message to be processed, a CPU of a service board may parse quintuple information (a source IP address, a destination IP address, a source port, a destination port, a protocol number) of the message, and query a session cache table according to the quintuple information, if a session entry matching the quintuple information exists in the session cache table (that is, the session quintuple information in the session entry is completely consistent with the quintuple information of the message), may further determine whether a fast forwarding entry (including an output interface, a next hop, etc.) in the session entry is available, and when the fast forwarding entry is available, directly forward the message according to the fast forwarding entry. As an embodiment, after parsing the quintuple information of the packet, the CPU may record the quintuple information and the ingress interface information of the packet on the network device in a network packet.
If the CPU determines that the fast forwarding table entry in the session table entry is not available, for example, the fast forwarding table entry is marked with an aging mark, or the session table entry matching with the five-tuple information of the packet is not found in the session cache table (that is, there is no fast forwarding table entry corresponding to the packet), the packet cannot be forwarded according to the fast forwarding flow. For the message which can not be forwarded according to the fast forwarding flow, the CPU can judge whether the condition of entering the slow forwarding flow is met or not, if so, the CPU enters the slow forwarding flow, and if not, the CPU can discard the message. Taking the example that the CPU does not find the session table entry matching the quintuple information of the packet in the session cache table, the CPU can create a new session table entry, and extract the session information of the session to which the packet belongs and record the session information into the created session table entry.
In some embodiments, the slow forwarding process may further include, in addition to recording the session information of the session to which the packet belongs to the session cache table, steps of packet information verification, attack packet detection, and/or routing table entry query, which may be specifically set according to actual needs.
As an embodiment, when the CPU modifies the recorded session information, at least the session information before and after modification may be encapsulated in a multicast packet whose destination MAC address is a designated MAC address. As an embodiment, the multicast message may further include an instruction for instructing to modify the session information.
As an embodiment, when the CPU deletes the recorded session information, at least the deleted session information may be encapsulated in a multicast packet whose destination MAC address is a designated MAC address. As an embodiment, the multicast message may further include an instruction for indicating to delete the session information.
The above embodiment is only an example, and the scheme may be adjusted according to specific requirements in actual application, for example, the CPU of the configurable service board synchronizes session information to other service boards only when session information is newly added and recorded session information is modified.
To this end, the description of how the CPU operates the session information and then encapsulates the relevant information of the operation in the multicast message in the flow shown in fig. 2 is completed.
For the sake of understanding the flow shown in fig. 2, the flow shown in fig. 2 is described below with reference to a specific example:
taking a network device as a gateway device, and accessing a FW service board a and a FW service board B to the gateway device as an example. According to the process shown in fig. 2, a multicast group (denoted as multicast group G) may be created for FW service board a and FW service board B, and the multicast MAC address of the multicast group G is the designated MAC address MAC M.
When a message P with a source IP address of 1.1.1.1 and a destination IP address of 2.2.2.2 enters the gateway device, assuming that the switching chip of the FW service board a first receives the message P, the switching chip may first determine a service board for processing the message. Specifically, the switching chip may hash the source IP address and the destination IP address of the packet P to obtain a hash value H, and then calculate the hash value H according to the split-flow algorithm to obtain a calculation result, and assuming that the service board card corresponding to the obtained calculation result is the FW service board card a, the switching chip may upload the packet P to the CPU of the FW service board card a for processing.
After receiving the packet P, the CPU of the FW service board a parses five-tuple information of the packet, where the five-tuple information includes a source IP address, a destination IP address, a source port, a destination port, and a protocol number of the packet, and the CPU can record the parsed five-tuple information and information of an interface of the packet entering the gateway device in a network packet.
After analyzing the quintuple information of the message P, the CPU may query the currently recorded session cache table according to the quintuple information, and if a session entry matching the quintuple information exists in the session cache table, the CPU may further determine whether a fast forwarding entry in the session entry is available, and if so, forward the message P according to the forwarding information such as an output interface in the fast forwarding table.
If the CPU does not inquire the session table item matched with the quintuple information of the message P or the quick forwarding table in the inquired session table item is unavailable, the CPU can enter a slow forwarding flow under the condition of meeting the condition.
In the slow forwarding process, the CPU may add new session information of a session to which the packet P belongs to the session cache table, and if it is checked that the gateway device enables the session synchronization function, may encapsulate the added session information into the multicast packet, and assign a destination MAC address of the multicast packet to a multicast MAC address MAC M of the multicast G. Then, the CPU can send the multicast message to the switch chip of the FW service board a, and the switch chip copies the multicast message of the response number according to the number of members in the multicast group G, and since the multicast group G only includes the FW service board a and the FW service board B at this time, the switch chip can copy a packet multicast message and send the multicast message to the FW service board B.
When the FW service board B receives the multicast message from the FW service board a, session information of the message P can be extracted from the multicast message, and the session information is added to the session cache table of the service board, thereby realizing session information synchronization.
The method provided by the present application is described above, and the device provided by the present application is described below:
referring to fig. 3, fig. 3 is a structural diagram of a session information synchronization apparatus provided in the present application. In one example, the apparatus is applicable to a network device that includes at least two traffic boards. As shown in fig. 3, the apparatus includes: a creating unit 301, a sending unit 302 and a synchronizing unit 303.
In an example, the creating unit 301 is configured to create a multicast group for the at least two service boards, where a multicast MAC address of the multicast group is a designated MAC address;
a sending unit 302, configured to, after a CPU of any service board operates session information, if it is checked that a current network device starts a session synchronization function, encapsulate relevant information of the operation in a multicast packet whose destination MAC address is the specified MAC address, and send the multicast packet to a switch chip of the service board, so that the switch chip sends the multicast packet to other service boards in the multicast group except the service board;
in the synchronization unit 303, when receiving the multicast packet with the destination MAC address as the specified MAC address, any service board operates the session information according to the multicast packet.
As an embodiment, the above-mentioned CPU performs operations on the session information, including: the CPU newly records the session information; the related information of the above operation at least includes: the session information newly recorded by the CPU; alternatively, the first and second electrodes may be,
the above-mentioned CPU performs operations on the session information including: the CPU modifies the recorded session information; the related information of the above operations at least includes: the session information modified by the CPU; alternatively, the first and second electrodes may be,
the above-mentioned CPU performs operations on the session information including: the CPU deletes the recorded session information; the related information of the above operation at least includes: the session information deleted by the CPU.
As an embodiment, the above sending unit 302 checks whether the current network device enables the session synchronization function, including:
if the current value of the specified variable indicating the starting of the session synchronization function is checked to be a first value, determining that the network equipment starts the session synchronization function; and if the current value of the specified variable is checked to be a second value, determining that the network equipment does not start the session synchronization function.
As an embodiment, the creating unit 301 creates a multicast group for the at least two service boards, including:
and configuring the multicast MAC address of at least one port of each service board card as the specified MAC address, and configuring output port information for each service board card to send multicast messages to other service board cards in the multicast group.
As an embodiment, the creating unit 301 is further configured to:
when the network device adds a service board card or extracts a service board card, newly configuring output port information for each service board card, which is used for sending multicast messages to other service board cards in the multicast group.
The implementation process of the functions and actions of the modules in the apparatus is specifically described in the implementation process of the corresponding steps in the 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 apparatus embodiments are merely illustrative, and the components shown as modules may or may not be physical modules, may be located in one place, or may be distributed over a plurality of network modules. The modules can be selected according to actual needs to achieve the purpose of the scheme in the specification. One of ordinary skill in the art can understand and implement it without inventive effort.
Referring to fig. 4, fig. 4 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure. The electronic device may include a processor 401, memory 402, and a communication bus 403. The processor 401 and the memory 402 communicate with each other via a communication bus 403. Wherein, the memory 402 stores a computer program; the processor 401 may perform the session information synchronization method described above by executing a program stored on the memory 402.
The memory 402 referred to herein may be any electronic, magnetic, optical, or other physical storage device that can contain or store information such as executable instructions, data, and the like. For example, the memory 402 may be: RAM (random Access Memory), volatile Memory, non-volatile Memory, flash Memory, a storage drive (e.g., a hard drive), a solid state drive, any type of storage disk (e.g., an optical disk, a dvd, etc.), or similar storage medium, or a combination thereof.
Embodiments of the present application also provide a machine-readable storage medium, such as the memory 402 in fig. 4, storing a computer program, which can be executed by the processor 401 in the electronic device shown in fig. 4 to implement the session information synchronization method described above.
For the sake of convenience of the description, the above devices are described separately in terms of functional divisions into various units. Of course, the functionality of the units may be implemented in one or more software and/or hardware when implementing the present application.
As will be appreciated by one skilled in the art, embodiments of the present application may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, embodiments of the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The above description is only an example of the present application and is not intended to limit the present application. Various modifications and changes may occur to those skilled in the art. Any modification, equivalent replacement, improvement or the like made within the spirit and principle of the present application shall be included in the scope of the claims of the present application.

Claims (10)

1. A session information synchronization method is applied to a network device, wherein the network device includes at least two service boards, and the method includes:
creating a multicast group for the at least two service board cards, wherein the multicast MAC address of the multicast group is a designated MAC address;
after receiving a message, a switching chip of any service board card obtains a hash value according to a source IP address and a destination IP address of the message, and calculates the hash value through a shunting algorithm to obtain an indication result, wherein the indication result is used for indicating any service board card for processing the message in the network equipment;
sending the message to a CPU of any service board card for processing the message in the network equipment according to the indication result so as to analyze the session information of the message;
after the CPU of any service board card operates the session information, if the current network equipment is checked to start the session synchronization function, the related information of the operation is packaged in a multicast message of which the destination MAC address is the specified MAC address, and the multicast message is sent to a switching chip of the service board card, so that the switching chip sends the multicast message to other service board cards in the multicast group except the service board card;
and when any service board card receives the multicast message of which the destination MAC address is the specified MAC address, operating the session information according to the multicast message.
2. The method of claim 1, wherein the CPU performing operations on session information comprises: the CPU adds new session information; the relevant information of the operation at least comprises: the CPU adds new session information; alternatively, the first and second electrodes may be,
the CPU performing operations on the session information comprises: the CPU modifies the recorded session information; the relevant information of the operation at least comprises: the CPU modifies the session information before and after modification; alternatively, the first and second electrodes may be,
the CPU performing operations on the session information comprises: the CPU deletes the recorded session information; the relevant information of the operation at least comprises: session information deleted by the CPU.
3. The method of claim 1, wherein checking whether the current network device enables a session synchronization function comprises:
if the current value of the specified variable indicating whether the session synchronization function is enabled is checked to be a first value, determining that the network equipment enables the session synchronization function; and if the current value of the specified variable is checked to be a second value, determining that the network equipment does not start the session synchronization function.
4. The method of claim 1, wherein the creating a multicast group for the at least two service boards comprises:
and configuring a multicast MAC address of at least one port of each service board card as the specified MAC address, and configuring output port information for each service board card to send multicast messages to other service board cards in the multicast group.
5. The method of claim 4, further comprising:
when the network device adds service boards or extracts existing service boards, newly configuring output port information for each service board, which is used for sending multicast messages to other service boards in the multicast group.
6. A session information synchronization device is applied to a network device, wherein the network device includes at least two service boards, and the device includes:
a creating unit, configured to create a multicast group for the at least two service boards, where a multicast MAC address of the multicast group is an assigned MAC address;
the system comprises a shunting unit, a switching chip of any service board card receives a message, obtains a hash value according to a source IP address and a destination IP address of the message, and calculates the hash value through a shunting algorithm to obtain an indication result, wherein the indication result is used for indicating any service board card for processing the message in the network equipment;
the sending unit is used for sending the message to a CPU (central processing unit) of any service board card for processing the message in the network equipment according to the indication result so as to analyze the session information of the message;
the sending unit is further configured to, after the CPU of any service board operates the session information, if it is checked that the current network device starts a session synchronization function, encapsulate related information of the operation in a multicast packet whose destination MAC address is the specified MAC address, and send the multicast packet to a switch chip of the service board, so that the switch chip sends the multicast packet to other service boards in the multicast group except the service board;
and a synchronization unit, wherein any service board operates the session information according to the multicast message when receiving the multicast message with the destination MAC address as the specified MAC address.
7. The apparatus of claim 6, wherein the CPU performing operations on session information comprises: the CPU adds new session information; the relevant information of the operation at least comprises: the CPU adds new session information; alternatively, the first and second electrodes may be,
the CPU performing operations on the session information comprises: the CPU modifies the recorded session information; the relevant information of the operation at least comprises: the CPU modifies the session information before and after modification; alternatively, the first and second electrodes may be,
the CPU performing operations on the session information comprises: the CPU deletes the recorded session information; the relevant information of the operation at least comprises: session information deleted by the CPU.
8. The apparatus of claim 6, wherein the sending unit checks whether a session synchronization function is enabled for a current network device, and comprises:
if the current value of the specified variable indicating whether the session synchronization function is started is checked to be a first value, determining that the network equipment starts the session synchronization function; and if the current value of the specified variable is checked to be a second value, determining that the network equipment does not start the session synchronization function.
9. The apparatus of claim 6, wherein the creating unit creates a multicast group for the at least two service boards, and includes:
and configuring a multicast MAC address of at least one port of each service board card as the specified MAC address, and configuring output port information for each service board card to send multicast messages to other service board cards in the multicast group.
10. The apparatus of claim 9, wherein the creating unit is further configured to:
when the network device adds service boards or extracts existing service boards, newly configuring output port information for each service board, which is used for sending multicast messages to other service boards in the multicast group.
CN202110031959.1A 2021-01-11 2021-01-11 Session information synchronization method and device Active CN112887229B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110031959.1A CN112887229B (en) 2021-01-11 2021-01-11 Session information synchronization method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110031959.1A CN112887229B (en) 2021-01-11 2021-01-11 Session information synchronization method and device

Publications (2)

Publication Number Publication Date
CN112887229A CN112887229A (en) 2021-06-01
CN112887229B true CN112887229B (en) 2023-04-07

Family

ID=76044200

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110031959.1A Active CN112887229B (en) 2021-01-11 2021-01-11 Session information synchronization method and device

Country Status (1)

Country Link
CN (1) CN112887229B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113641623B (en) * 2021-06-30 2024-02-20 曙光网络科技有限公司 Information interaction method and device, frame type network equipment and computer readable storage medium
CN113810313B (en) * 2021-09-06 2024-04-19 山石网科通信技术股份有限公司 Processing method and processing device for distributed session message
CN114500470A (en) * 2021-12-29 2022-05-13 天翼云科技有限公司 Data packet processing method and device
CN114338595B (en) * 2021-12-31 2024-02-02 山石网科通信技术股份有限公司 Distributed processing method and device for message, storage medium and processor

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011147206A1 (en) * 2010-05-28 2011-12-01 华为技术有限公司 Multicast traffic sharing method and correlative device
CN103414773A (en) * 2013-08-12 2013-11-27 杭州华三通信技术有限公司 Stacking system MAC address information synchronizing method and device
CN105991301A (en) * 2015-03-13 2016-10-05 杭州迪普科技有限公司 Message synchronization method and device
CN109218205A (en) * 2018-09-26 2019-01-15 新华三信息安全技术有限公司 A kind of message forwarding method and device

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7647427B1 (en) * 2002-10-18 2010-01-12 Foundry Networks, Inc. Redundancy support for network address translation (NAT)
CN101009692A (en) * 2006-01-25 2007-08-01 中兴通讯股份有限公司 Hardware address parsing method and communication processing device, and message processing method
US10305796B2 (en) * 2015-06-01 2019-05-28 Ciena Corporation Enhanced forwarding database synchronization for media access control addresses learned in interconnected layer-2 architectures
CN107819684B (en) * 2016-09-12 2022-08-02 中兴通讯股份有限公司 Synchronous processing method and device
CN107846433A (en) * 2016-09-19 2018-03-27 阿里巴巴集团控股有限公司 A kind of synchronous methods, devices and systems of session information
CN106656869A (en) * 2016-12-30 2017-05-10 杭州迪普科技股份有限公司 Information synchronization method and system in frame type device
CN108011958B (en) * 2017-12-06 2021-05-07 新华三技术有限公司 Network device and MAC address table synchronization method
CN109495345B (en) * 2018-11-22 2020-01-03 北京华三通信技术有限公司 BFD processing method and network equipment
CN111431921B (en) * 2020-03-31 2022-08-26 杭州迪普科技股份有限公司 Configuration synchronization method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2011147206A1 (en) * 2010-05-28 2011-12-01 华为技术有限公司 Multicast traffic sharing method and correlative device
CN103414773A (en) * 2013-08-12 2013-11-27 杭州华三通信技术有限公司 Stacking system MAC address information synchronizing method and device
CN105991301A (en) * 2015-03-13 2016-10-05 杭州迪普科技有限公司 Message synchronization method and device
CN109218205A (en) * 2018-09-26 2019-01-15 新华三信息安全技术有限公司 A kind of message forwarding method and device

Also Published As

Publication number Publication date
CN112887229A (en) 2021-06-01

Similar Documents

Publication Publication Date Title
CN112887229B (en) Session information synchronization method and device
US11929945B2 (en) Managing network traffic in virtual switches based on logical port identifiers
US11050586B2 (en) Inter-cloud communication method and related device, and inter-cloud communication configuration method and related device
US10547538B2 (en) Packet forwarding method and apparatus
US10063470B2 (en) Data center network system based on software-defined network and packet forwarding method, address resolution method, routing controller thereof
US11005752B2 (en) Packet transmission
RU2562438C2 (en) Network system and network management method
RU2576473C2 (en) Network system and routing method
US10397126B2 (en) VXLAN packet transmission
US20190222538A1 (en) Packet Processing Method, Computing Device, and Packet Processing Apparatus
CN108259347B (en) Message transmission method and device
CN106878194B (en) Message processing method and device
US11671363B2 (en) Method and apparatus for cross-service-zone communication, and data center network
CN109728962B (en) Method and equipment for sending message
CN109995639B (en) Data transmission method, device, switch and storage medium
CN109379241B (en) Path information determination method and device
US9197598B2 (en) MAC address distribution
EP4239973A1 (en) Packet sending method, device, and system
US20240048479A1 (en) Packet Forwarding Method and Apparatus, Network Device, and Storage Medium
CN114465931A (en) Network detection method, device, electronic equipment and storage medium
CN109379239B (en) Method and device for configuring access switch in OpenStack environment
EP3503484B1 (en) Message transmission methods and devices
CN112583736A (en) Signaling message distribution method, device, equipment and medium
EP4236245A1 (en) Route advertisement method, apparatus, and system
WO2016188222A1 (en) Service message forwarding method and apparatus, 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