[go: up one dir, main page]

CN111988446B - Message processing method and device, electronic equipment and storage medium - Google Patents

Message processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111988446B
CN111988446B CN202010872575.8A CN202010872575A CN111988446B CN 111988446 B CN111988446 B CN 111988446B CN 202010872575 A CN202010872575 A CN 202010872575A CN 111988446 B CN111988446 B CN 111988446B
Authority
CN
China
Prior art keywords
address
switch
message
management
management 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
CN202010872575.8A
Other languages
Chinese (zh)
Other versions
CN111988446A (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.)
Ruijie Networks Co Ltd
Original Assignee
Ruijie Networks 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 Ruijie Networks Co Ltd filed Critical Ruijie Networks Co Ltd
Priority to CN202010872575.8A priority Critical patent/CN111988446B/en
Publication of CN111988446A publication Critical patent/CN111988446A/en
Application granted granted Critical
Publication of CN111988446B publication Critical patent/CN111988446B/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
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5046Resolving address allocation conflicts; Testing of addresses
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/74Address processing for routing
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L61/00Network arrangements, protocols or services for addressing or naming
    • H04L61/50Address allocation
    • H04L61/5007Internet protocol [IP] addresses
    • H04L61/5014Internet protocol [IP] addresses using dynamic host configuration protocol [DHCP] or bootstrap protocol [BOOTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)
  • Small-Scale Networks (AREA)

Abstract

The embodiment of the application provides a message processing method, a message processing device, electronic equipment and a storage medium, which are used for solving the technical problem that a switch cannot perform network operation when IP management addresses of a plurality of switches conflict. The method comprises the following steps: the first switch determines whether the source IP address and the destination IP address of the received message are the same as the first IP management address of the first switch; if the source IP address of the message is the same as the first IP management address, deleting the message; or if the destination IP address of the message is determined to be the same as the first IP management address, intercepting the message, and not forwarding the message to a second switch which is the same as the first IP management address.

Description

Message processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of data communications, and in particular, to a method and apparatus for processing a message, an electronic device, and a storage medium.
Background
Along with the development of network technology, various industries realize networking to different degrees through technical transformation and application upgrading, but in the network deployment process, the IP management address of a switch in the network is basically recorded or configured in a manual mode. However, when the IP management address is manually configured for the switch, the efficiency is low, the cost is high, a professional technician with a certain level of network technical knowledge is required, and once the manual configuration mode is in error, the configuration and management are more difficult, and the conflicting IP management address may occur. And the larger the LAN, the higher the cost and the higher the configuration difficulty.
When a plurality of switches possess the same IP management address, it is indicated that the IP management addresses of the plurality of switches conflict. When the destination IP address of the message request corresponds to a plurality of switches, the target switch cannot be accessed and a part of switches cannot be illegally accessed, so that the part of switches or all switches with the same IP management address cannot perform network operation.
Therefore, when the switch IP management address conflicts, the switch cannot perform network operation is a technical problem to be solved.
Disclosure of Invention
The embodiment of the application provides a message processing method, a message processing device, electronic equipment and a storage medium, which are used for solving the technical problem that a switch cannot perform network operation when IP management addresses of a plurality of switches conflict.
In a first aspect, a method for processing a message is provided, where the method is applied to a plurality of switches, where the plurality of switches includes at least two switches having the same IP management address in cascade, and the method includes:
the first switch determines whether the source IP address and the destination IP address of the received message are the same as the first IP management address of the first switch;
if the source IP address of the message is the same as the first IP management address, deleting the message; or,
if the destination IP address of the message is identical to the first IP management address, intercepting the message, and not forwarding the message to a second switch identical to the first IP management address.
Optionally, before the first switch determines whether the source IP address and the destination IP address of the received packet are the same as the first IP management address of the first switch, the method further includes:
the first switch sends an IP address allocation application to a Dynamic Host Configuration Protocol (DHCP) client;
judging whether the IP address is applied to;
and when the IP address is not applied, setting the default management address of the first switch as the first IP management address of the first switch, wherein the default management address is a fixed address configured when the first switch leaves a factory.
Optionally, the method further comprises:
when the application to the IP address is determined, setting the applied IP address as a first IP management address of the first switch; and setting a default management address of the first switch as a backup address of the first IP management address.
Optionally, after setting the first IP management address for the first switch, the method further includes:
the first switch generates a local host route according to the first IP management address, and the prefix address of the local host route is the first IP management address;
and the first switch receives and processes the message hitting the local host route.
Optionally, the method further comprises:
when the backup address is used for accessing the first switch, the first switch withdraws the set first IP management address and sets the backup address as a new first IP management address of the first switch.
In a second aspect, a packet processing device is provided, where the packet processing device is applied to a plurality of switches, and the plurality of switches includes at least two switches cascaded with the same IP management address, and the device includes:
the determining module is used for determining whether the source IP address and the destination IP address of the received message are the same as the first IP management address of the determining module;
the processing module is used for deleting the message when the determining module determines that the source IP address of the message is the same as the first IP management address; or when the determining module determines that the destination IP address of the message is the same as the first IP management address, intercepting the message, and not forwarding the message to a second switch which is the same as the first IP management address.
Optionally, the processing module is further configured to:
sending an IP address allocation application to a Dynamic Host Configuration Protocol (DHCP) client;
judging whether the IP address is applied to;
and when the IP address is not applied, setting the default management address of the first switch as the first IP management address of the first switch, wherein the default management address is a fixed address configured when the first switch leaves a factory.
Optionally, the processing module is further configured to:
when the application to the IP address is determined, setting the applied IP address as a first IP management address of the first switch; and setting a default management address of the first switch as a backup address of the first IP management address.
Optionally, the processing module is further configured to:
generating a local host route according to the first IP management address, wherein the prefix address of the local host route is the first IP management address;
and receiving and processing the message hitting the local host route.
Optionally, the processing module is further configured to:
and when the backup address is used for accessing the first switch, the set first IP management address is withdrawn, and the backup address is set as a new first IP management address of the first switch.
In a third aspect, an electronic device is provided, the electronic device comprising:
a memory for storing program instructions;
and a processor, configured to call the program instructions stored in the memory, and execute the steps included in the method according to any one of the first aspect according to the obtained program instructions.
In a fourth aspect, there is provided a computer readable storage medium storing computer executable instructions for causing a computer to perform the steps comprised by the method of any one of the first aspects.
In a fifth aspect, a computer program product is provided comprising instructions which, when run on a computer, cause the computer to perform the message processing method described in the various possible implementations described above.
In the embodiment of the application, when a plurality of switches include at least two switches with the same IP management address in cascade, the at least two switches can both receive a message hitting the IP management address. When the first switch receives the message, determining whether the source IP address and the destination IP address of the received message are the same as the first IP management address of the first switch, deleting the received message if the source IP address of the message is determined to be the same as the first IP management address of the first switch, intercepting the received message at the first switch for processing if the destination IP address of the message is determined to be the same as the first IP management address of the first switch, and not forwarding the message to the second switch with the same IP management address as the first switch.
That is, the first switch, upon determining that the source IP address of the received message is the same as its own IP management address, indicates that the message has been processed in the last switch having the same IP management address as the first switch. At this time, the access of the message to the first switch belongs to illegal access, if the first switch processes the message, the switch which has the same IP management address as the first switch and the first switch cannot perform network operation, so that the first switch deletes the message, and the situation that both switches cannot perform network operation due to the conflict of the IP management addresses is effectively avoided. Or when the first switch determines that the destination IP address of the received message is the same as the IP management address of the first switch, the first switch intercepts and processes the message when receiving the message, and does not forward the message to the second switch with other IP management addresses being the first IP management address, thereby effectively avoiding illegal access when the two switches have the same IP management address.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are required to be used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only embodiments of the present invention, and that other drawings can be obtained according to the provided drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flowchart of a message processing method provided in an embodiment of the present application;
fig. 2 is a schematic diagram of a switch cascade with the same IP management address according to an embodiment of the present application;
fig. 3 is a block diagram of a message processing apparatus according to an embodiment of the present application;
fig. 4 is a schematic structural diagram of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the present invention more apparent, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are only some embodiments of the present invention, not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention. Embodiments of the invention and features of the embodiments may be combined with one another arbitrarily without conflict. Also, while a logical order is depicted in the flowchart, in some cases, the steps depicted or described may be performed in a different order than presented herein.
The terms first and second in the description and claims of the invention and in the above-mentioned figures are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the term "include" and any variations thereof is intended to cover non-exclusive protection. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
In the embodiment of the present invention, the "plurality" may mean at least two, for example, two, three or more, and the embodiment of the present invention is not limited.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. The character "/" herein generally indicates that the associated object is an "or" relationship unless otherwise specified.
Before describing the embodiments of the present application, some technical features in the present application will be described first to facilitate understanding by those skilled in the art.
(1) The IP address, which refers to an internet protocol address (Internet Protocol Address), is a unified address format provided by the IP protocol, and assigns a logical address to each network and each host on the internet, thereby masking the difference in physical addresses.
(2) The switch IP management address conflict occurs when the IP management addresses of two communication devices are the same. The communication device may be a personal computer, a mobile device, and any individual network adapter (network card). IP management address conflicts occur between two communication devices, which may render either or both devices inoperable (i.e., neither can be networked).
(3) ARP, address resolution protocol (Address Resolution Protocol), refers to a TCP/IP protocol that obtains a physical address from an IP address.
(4) DHCP, dynamic host configuration protocol (Dynamic Host Configuration Protocol) is generally applied in a large local area network environment, and is mainly used for centralized management and allocation of IP addresses, so that hosts in the network environment dynamically obtain information such as IP addresses, gateway (Gateway) addresses, DNS server addresses, and the like, and the utilization rate of the addresses can be improved.
(5) The local host route, after the three-layer interface of the exchanger configures the IP address, the exchanger generates the route and adds the route to the hardware, and the message hitting the route is sent to the CPU of the exchanger for processing; the message hits the route, that is, the destination IP of the message is the IP address of an interface on the switch, if the message hits the route, it is indicated that the message needs to be sent to the local protocol stack or IP application for processing, so that the interconnection device can perform IP communication.
(6) The FFP (fast filter) processor (Fast Filter Processor) is used for exchanging hardware table items of the ASIC chip, and is mainly used for classifying and filtering data streams when the data streams pass through network equipment, checking the data streams input or output from a designated interface, and allowing the data streams to pass through, discard or take other action strategies according to matching conditions, so that the purposes of limiting certain communication data types in the network, limiting users of the network or using equipment are achieved. And through this feature various access control list (Acess Control Lists, ACL) techniques are implemented to meet the needs of various applications.
The following describes the design concept of the present application.
As mentioned above, when the IP management addresses of the switches conflict, the inability of the switches to perform network operations is a technical problem that needs to be solved currently. In the related art, in order to solve the technical problem, one scheme is to intelligently configure the IP management address of the switch to be a non-conflicting static network address through the steps of initializing data, acquiring actual data of the switch, remotely acquiring actual data of the current switch, updating the actual switch list data and the switch neighbor relation list, eliminating duplicate network addresses, adjusting the related attribute of a master host or related switches through technology, wherein the actual network addresses of all switches are unique and non-conflicting network addresses of the whole network, and the like. That is, the IP management address of the switch is intelligently configured to be a non-conflicting static network address by a switch access control technique, an acquisition switch neighbor technique, an intelligent cancellation technique that results in a failure to access the target switch phenomenon, and a network address that is immediately set to be non-conflicting upon discovery of a conflicting network address.
However, in order to perform network management as soon as the switch is powered on, the switch will configure a default management address when leaving the factory, and the default management addresses configured by the switches of the same manufacturer are the same, at this time, the IP management addresses of all switches are the same, if the above technical scheme is adopted, the IP management addresses need to be reconfigured for all switches, at this time, if the IP management addresses are not reconfigured for all switches due to the network and other problems, that is, a message for hitting the switch is received, illegal access still occurs, so that the switch with the same IP management address cannot perform network operation.
In view of this, the embodiment of the present application provides a message processing method when a plurality of switches include at least two switches having the same IP management address in tandem, by deleting a received message when it is determined that the source IP address of the received message is the same as the first IP management address of the switch itself. Or when the destination IP address of the received message is identical to the first IP management address of the message, intercepting and processing the message, and not forwarding the message to a second switch identical to the first IP management address. Therefore, even if the IP management addresses of two switches are the same, the method and the device can effectively avoid illegal access of the message to the switch with the same IP management address by deleting or intercepting the message. That is, in the embodiment of the present application, even if two switches have the same IP management address, the two switches can still receive the processing packet and perform the network operation, so that the foregoing technical problem is effectively solved.
After the design concept of the embodiment of the present application is introduced, some simple descriptions are made below for application scenarios applicable to the technical solution of the embodiment of the present application, and it should be noted that the application scenarios described below are only used to illustrate the embodiment of the present application and are not limiting. In specific implementation, the technical scheme provided by the embodiment of the application can be flexibly applied according to actual needs.
In order to further explain the technical solutions provided in the embodiments of the present application, the following details are described with reference to the accompanying drawings and the detailed description. Although the embodiments of the present application provide the method operational steps as shown in the following embodiments or figures, more or fewer operational steps may be included in the method, either on a routine or non-inventive basis. In steps where there is logically no necessary causal relationship, the execution order of the steps is not limited to the execution order provided by the embodiments of the present application. The methods may be performed sequentially or in parallel as shown in the embodiments or the drawings when the actual processing or the apparatus is performed.
Based on the foregoing, the embodiment of the application provides a message processing method, which can be applied to a network with a plurality of switches. Wherein the plurality of switches comprises a cascade of at least two switches having the same IP management address. Specifically, the present invention can be applied to any one of at least two switches having the same IP management address. Referring to fig. 1, a flowchart of a message processing method in an embodiment of the present application is described as follows.
Step 101: and determining whether the source IP address and the destination IP address of the received message are the same as the first IP management address of the message.
In this embodiment of the present application, after receiving a packet, a first switch needs to first obtain a source IP address and a destination IP address carried by the packet, and determine whether the source IP address or the destination IP address of the packet is the same as a first IP management address of the first switch. If the source IP address of the message is the same as the first IP management address of the message, the message is indicated to be processed by the exchanger of which the last IP management address is the first IP management address; if the destination IP address of the message is the same as the own first IP management address, the message is indicated to be sent to the switch with the IP management address being the first IP management address for processing, and before the message is forwarded to the current switch (the first switch), the message is not processed by the switch with the IP management address being the first IP management address. The first switch is any switch with the IP management address of the plurality of switches as the first IP management address. Thus, by judging whether the source IP address and the destination IP address of the received message are the same as the first IP management address of the message, the message can be effectively prevented from accessing a plurality of switches with the first IP management address at the same time.
In one possible implementation, the switch configures a default management address when the switch leaves the factory, and the default management addresses configured by the same manufacturer for the switch are the same, wherein the default management addresses are fixed addresses configured when the switch leaves the factory. Therefore, after the switch is connected to the internet, in order to avoid that the IP management addresses of all the switches are the same, the first switch may further send an IP address allocation application to the DHCP server before determining whether the source IP address and the destination IP address of the received message are the same as the first IP management address of the first switch. At this time, if a DHCP server is not disposed around the first switch, or when the first switch sends an address allocation request to the DHCP server, the first switch cannot apply for the IP address because the request cannot be successfully sent out due to unstable network and other reasons; if a DHCP server is disposed around the first switch, and a request for allocating an address sent by the first switch to the DHCP server is smoothly sent to the DHCP server, the DHCP server allocates an IP address to the first switch, and the allocated IP address does not conflict with IP addresses allocated to other switches. Thus, after the first switch sends an address assignment application to the DHCP server, the following two results occur.
First result: the first switch does not apply for an IP address.
When the first switch does not apply for the IP address, the default management address of the first switch is set to the first IP management address of the first switch, for example 192.168.1.200 is set to the first IP management address of the first switch.
Second results: the first switch has applied for an IP address.
When the first switch applies for an IP address, the applied IP address is set as a first IP management address of the first switch, and a default management address of the first switch is set as a backup address of the first IP management address. After the first IP management address is set, the default management address configured at the factory of the first switch will be automatically revoked, and at this time, if the user forgets the first IP management address of the first switch, the first switch cannot be accessed, so the default management address of the first switch is set as the backup address of the first IP management address. And since the default management address of the first switch is described in the manual of the switch, the user can acquire the backup address through the manual. Thus, even when the user forgets the IP address applied from the first switch to the DHCP server, the user can access the first switch.
Specifically, for the second result, if the user forgets the IP address (i.e., the first IP management address) applied by the first switch, after accessing the first switch by using the backup address of the first IP management address, the first switch withdraws the set first IP management address, and sets the backup address as the new first IP management address of the first switch.
In one possible implementation, after the first IP management address is set, the first switch generates a local host route according to the first IP management address, where a prefix address of the generated local host route is the first IP management address. After the first switch generates the local host route, all messages hitting the local host route are sent to the central processing unit (Central Processing Unit, CPU) of the first switch for processing. For example, the first IP management address set for the first switch is 1.1.1.3/24, the first switch generates a local host route of 1.1.1.3/32 according to the first IP management address, when the device ping1.1.1.3 with the user network IP address of 1.1.1.1 hits the local host route of the first switch, at this time, the device with the user network IP address of 1.1.1 can communicate with the first switch, and can send a message to the first switch, and the CPU of the first switch processes the message. Therefore, after the first switch is powered on, in order to communicate with other user equipment, the local host route is first generated according to the set first IP management address to receive the message sent by the other user equipment.
Step 102: deleting the message when the source IP address of the message is identical to the first IP management address; or intercepting and processing the message when the destination IP address of the message is determined to be the same as the first IP management address.
As described above, when it is determined that the source IP address of the received message is identical to the first IP management address of the first switch itself, it is indicated that the message has been processed by the switch whose last IP management address is the first IP management address, so in order to avoid that the processed message is processed again by the first switch, illegal access is generated to the first switch, and at this time, the message needs to be deleted. When the destination IP address of the received message is determined to be the same as the first IP management address of the first switch, the message is indicated to be sent to the switch with the IP management address being the first IP management address, and at the moment, when the first switch receives the message, the message is sent to the CPU for processing, and is intercepted, the message is not sent to the second switch with the IP management address being the first IP management address, namely, the message is intercepted and processed at the current switch and is not forwarded, so that illegal access to the second switch by the message is avoided.
For example, referring to fig. 2, fig. 2 is a schematic diagram of a switch cascade with the same IP management address according to an embodiment of the present application. In fig. 2, the IP management addresses of switch 1, switch 2 and switch 3 are the same, and are all default management addresses 192.168.1.200, and switch 1 may forward a message to switch 2 and switch 3, if a message has been processed in switch 1, but switch 1 forwards the message to switch 2 and switch 3, then when receiving the message, switch 2 and switch 3 find that the source IP address of the message is 192.168.1.200, and the address is the same as the first IP management address of itself, and at this time, switch 2 and switch 3 delete the message received from switch 1. Or when the exchanger 1 receives the message with the destination IP address of 192.168.1.200, the message is sent to the CPU for processing, and the message is not forwarded to the exchanger 2 and the exchanger 3, so that illegal access to the exchanger 2 and the exchanger 3 caused by the message processed by the exchanger 1 is effectively avoided.
In a possible implementation manner, before receiving the message, the first switch may further determine whether the first IP management address of the first switch is a preset address, where the preset address is a default address configured when the first switch leaves the factory, and when determining that the first IP management address is the preset address and the first switch generates a local host route according to the first IP management address, two FFP entries are generated, where one FFP entry is used to delete a message with a source IP address being the same as the first IP management address, and the other entry is used to intercept a message with a destination IP address being the same as the first IP management address, and send the message with the destination IP address being the same as the first IP management address to the CPU of the current switch for processing.
In another possible implementation, the first switch will delete the local host route when the first switch withdraws the set first IP management address. When determining to delete the local host route, the first switch deletes the two installed FFP entries.
Based on the same inventive concept, the embodiment of the application provides a message processing device, which can realize the functions corresponding to the message processing method. The message processing apparatus may be a hardware structure, a software module, or a hardware structure plus a software module. The message processing device can be realized by a chip system, and the chip system can be formed by a chip or can comprise a chip and other discrete devices. Referring to fig. 3, the message processing apparatus includes a determining module 301 and a processing module 302. Wherein:
a determining module 301, configured to determine whether a source IP address and a destination IP address of a received packet are the same as a first IP management address of the determining module;
a processing module 302, configured to delete the packet when the determining module determines that the source IP address of the packet is the same as the first IP management address; or when the determining module determines that the destination IP address of the message is the same as the first IP management address, intercepting the message, and not forwarding the message to a second switch which is the same as the first IP management address.
In a possible implementation manner, the processing module 302 is further configured to:
sending an IP address allocation application to a Dynamic Host Configuration Protocol (DHCP) client;
judging whether the IP address is applied to;
and when the IP address is not applied, setting the default management address of the first switch as the first IP management address of the first switch, wherein the default management address is a fixed address configured when the first switch leaves a factory.
In a possible implementation manner, the processing module 302 is further configured to:
when the application to the IP address is determined, setting the applied IP address as a first IP management address of the first switch; and setting a default management address of the first switch as a backup address of the first IP management address.
In a possible implementation manner, the processing module 302 is further configured to:
generating a local host route according to the first IP management address, wherein the prefix address of the local host route is the first IP management address;
and receiving and processing the message hitting the local host route.
In a possible implementation manner, the processing module 302 is further configured to:
and when the backup address is used for accessing the first switch, the set first IP management address is withdrawn, and the backup address is set as a new first IP management address of the first switch.
All relevant contents of each step related to the foregoing embodiment of the message processing method may be cited to the functional description of the functional module corresponding to the message processing apparatus in the embodiment of the present application, which is not described herein.
The division of the modules in the embodiments of the present application is schematically only one logic function division, and there may be another division manner in actual implementation, and in addition, each functional module in each embodiment of the present application may be integrated in one processor, or may exist separately and physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules.
Based on the same inventive concept, the embodiment of the application provides electronic equipment. Referring to fig. 4, the electronic device includes at least one processor 401 and a memory 402 connected to the at least one processor, in this embodiment, a specific connection medium between the processor 401 and the memory 402 is not limited, and in fig. 4, the connection between the processor 401 and the memory 402 is exemplified by a bus 400, and the bus 400 is shown in a bold line in fig. 4, and a connection manner between other components is only illustrative and not limited. The bus 400 may be divided into an address bus, a data bus, a control bus, etc., and is represented by only one thick line in fig. 4 for ease of illustration, but does not represent only one bus or one type of bus.
In the embodiment of the present application, the memory 402 stores instructions executable by the at least one processor 401, and the at least one processor 401 may execute the steps included in the foregoing message processing method by executing the instructions stored in the memory 402.
The processor 401 is a control center of the electronic device, and may use various interfaces and lines to connect various parts of the entire electronic device, and by executing or executing instructions stored in the memory 402 and invoking data stored in the memory 402, various functions of the electronic device and processing data, so as to monitor the electronic device as a whole. Alternatively, the processor 401 may include one or more processing units, and the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system and an application program, etc., and the modem processor mainly processes wireless communication. It will be appreciated that the modem processor described above may not be integrated into the processor 401. In some embodiments, processor 401 and memory 402 may be implemented on the same chip, and in some embodiments they may be implemented separately on separate chips.
The processor 401 may be a general purpose processor such as a Central Processing Unit (CPU), digital signal processor, application specific integrated circuit, field programmable gate array or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, which may implement or perform the methods, steps and logic blocks disclosed in the embodiments of the present application. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the message processing method disclosed in connection with the embodiments of the present application may be directly embodied in a hardware processor for execution, or may be executed by a combination of hardware and software modules in the processor.
Memory 402 is a non-volatile computer-readable storage medium that can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The Memory 402 may include at least one type of storage medium, which may include, for example, flash Memory, hard disk, multimedia card, card Memory, random access Memory (Random Access Memory, RAM), static random access Memory (Static Random Access Memory, SRAM), programmable Read-Only Memory (Programmable Read Only Memory, PROM), read-Only Memory (ROM), charged erasable programmable Read-Only Memory (Electrically Erasable Programmable Read-Only Memory), magnetic Memory, magnetic disk, optical disk, and the like. Memory 402 is any other medium that can be used to carry or store desired program code in the form of instructions or data structures and that can be accessed by a computer, but is not limited to such. The memory 402 in the present embodiment may also be circuitry or any other device capable of implementing a memory function for storing program instructions and/or data.
By programming the processor 401, the codes corresponding to the message processing method described in the foregoing embodiment may be cured into the chip, so that the chip can execute the steps of the foregoing message processing method when running, and how to program the processor 401 is a technology known to those skilled in the art, which is not repeated herein.
Based on the same inventive concept, embodiments of the present application also provide a computer readable storage medium storing computer instructions that, when run on a computer, cause the computer to perform the steps of the aforementioned message processing method.
In some possible embodiments, aspects of the message processing method provided herein may also be implemented in the form of a program product comprising program code for causing a detection device to perform the steps of the message processing method according to various exemplary embodiments of the present application as described herein above when the program product is run on an electronic device.
It will be appreciated by those skilled in the art that 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, 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 present application is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to the application. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various modifications and variations can be made in the present application without departing from the spirit or scope of the application. Thus, if such modifications and variations of the present application fall within the scope of the claims and the equivalents thereof, the present application is intended to cover such modifications and variations.

Claims (10)

1. A message processing method, applied to a plurality of switches, where the plurality of switches includes at least two switches having the same IP management address in cascade, the method comprising:
the first switch determines whether the source IP address and the destination IP address of the received message are the same as the first IP management address of the first switch;
if the source IP address of the message is the same as the first IP management address, deleting the message; or,
if the destination IP address of the message is identical to the first IP management address, intercepting the message, and not forwarding the message to a second switch identical to the first IP management address.
2. The method of claim 1, further comprising, before the first switch determines whether the source IP address and the destination IP address of the received message are the same as the own first IP management address:
the first switch sends an IP address allocation application to a Dynamic Host Configuration Protocol (DHCP) client;
judging whether the IP address is applied to;
and when the IP address is not applied, setting the default management address of the first switch as the first IP management address of the first switch, wherein the default management address is a fixed address configured when the first switch leaves a factory.
3. The method as recited in claim 2, further comprising:
when the application to the IP address is determined, setting the applied IP address as a first IP management address of the first switch; and setting a default management address of the first switch as a backup address of the first IP management address.
4. A method according to claim 2 or 3, further comprising, after setting a first IP management address for the first switch:
the first switch generates a local host route according to the first IP management address, and the prefix address of the local host route is the first IP management address;
and the first switch receives and processes the message hitting the local host route.
5. A method as recited in claim 3, further comprising:
when the backup address is used for accessing the first switch, the first switch withdraws the set first IP management address and sets the backup address as a new first IP management address of the first switch.
6. A message processing apparatus for use with a plurality of switches, the plurality of switches comprising a cascade of at least two switches having a same IP management address, the apparatus comprising:
the determining module is used for determining whether the source IP address and the destination IP address of the received message are the same as the first IP management address of the determining module;
the processing module is used for deleting the message when the determining module determines that the source IP address of the message is the same as the first IP management address; or when the determining module determines that the destination IP address of the message is the same as the first IP management address, intercepting the message, and not forwarding the message to a second switch which is the same as the first IP management address.
7. The apparatus of claim 6, wherein the processing module is further to:
sending an IP address allocation application to a Dynamic Host Configuration Protocol (DHCP) client;
judging whether the IP address is applied to;
and when the IP address is not applied, setting a default management address of a first switch as the first IP management address of the first switch, wherein the default management address is a fixed address configured when the first switch leaves a factory.
8. The apparatus of claim 7, wherein the processing module is further to:
when the application to the IP address is determined, setting the applied IP address as a first IP management address of the first switch; and setting a default management address of the first switch as a backup address of the first IP management address.
9. An electronic device, comprising:
a memory for storing program instructions;
a processor for invoking program instructions stored in said memory and for performing the steps comprised in the method according to any of claims 1-5 in accordance with the obtained program instructions.
10. A computer readable storage medium, characterized in that the computer readable storage medium stores a computer program comprising program instructions which, when executed by a computer, cause the computer to perform the method of any of claims 1-5.
CN202010872575.8A 2020-08-26 2020-08-26 Message processing method and device, electronic equipment and storage medium Active CN111988446B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010872575.8A CN111988446B (en) 2020-08-26 2020-08-26 Message processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010872575.8A CN111988446B (en) 2020-08-26 2020-08-26 Message processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111988446A CN111988446A (en) 2020-11-24
CN111988446B true CN111988446B (en) 2023-05-23

Family

ID=73440652

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010872575.8A Active CN111988446B (en) 2020-08-26 2020-08-26 Message processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111988446B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115499393B (en) * 2022-09-02 2024-05-07 深圳市楠菲微电子有限公司 TCP (Transmission control protocol) connection message processing method based on network interface chip

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878485A (en) * 2017-02-28 2017-06-20 新华三技术有限公司 A kind of message processing method and device
CN107872391A (en) * 2017-11-23 2018-04-03 锐捷网络股份有限公司 A kind of entry updating method and device
CN109274588A (en) * 2017-07-18 2019-01-25 中兴通讯股份有限公司 The processing method and processing device of IP packet
CN110519410A (en) * 2019-08-29 2019-11-29 深信服科技股份有限公司 A kind of communication means, interchanger, storage medium, communication equipment and communication system

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8738756B2 (en) * 2011-12-01 2014-05-27 International Business Machines Corporation Enabling co-existence of hosts or virtual machines with identical addresses
US20170237704A1 (en) * 2016-02-16 2017-08-17 Le Holdings (Beijing) Co., Ltd. Addressing communication method and electronic device based on media access control address

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106878485A (en) * 2017-02-28 2017-06-20 新华三技术有限公司 A kind of message processing method and device
CN109274588A (en) * 2017-07-18 2019-01-25 中兴通讯股份有限公司 The processing method and processing device of IP packet
CN107872391A (en) * 2017-11-23 2018-04-03 锐捷网络股份有限公司 A kind of entry updating method and device
CN110519410A (en) * 2019-08-29 2019-11-29 深信服科技股份有限公司 A kind of communication means, interchanger, storage medium, communication equipment and communication system

Also Published As

Publication number Publication date
CN111988446A (en) 2020-11-24

Similar Documents

Publication Publication Date Title
JP7085565B2 (en) Intelligent thread management across isolated network stacks
CN107153565B (en) Method for configuring resources and network device thereof
EP3664420B1 (en) Managing address spaces across network elements
CN109067877B (en) Control method for cloud computing platform deployment, server and storage medium
US8081640B2 (en) Network system, network management server, and access filter reconfiguration method
CN114338606B (en) A public cloud network configuration method and related equipment
CN109981493B (en) Method and device for configuring virtual machine network
CN114070723A (en) Virtual network configuration method, system and intelligent network card of bare metal server
EP2774324A1 (en) Distributed address resolution service for virtualized networks
JP2019525604A (en) Network function NF management method and NF management apparatus
CN111641733A (en) Network bridge equipment management method and device and readable storage medium
CN108390956A (en) A kind of method and system for virtual machine configuration internet protocol address
CN108933844A (en) The method and apparatus of DHCP service is provided
US10778574B2 (en) Smart network interface peripheral cards
CN109088957B (en) NAT rule management method, device and equipment
WO2021103657A1 (en) Network operation method, apparatus, and device and storage medium
CN111988446B (en) Message processing method and device, electronic equipment and storage medium
CN106330492A (en) A method, device and system for configuring user equipment forwarding table
CN110839007B (en) Cloud network security processing method and device and computer storage medium
US9417900B2 (en) Method and system for automatic assignment and preservation of network configuration for a virtual machine
CN117478640A (en) Method for realizing opening IPv6 of virtual private network in multi-instance concurrency mode
CN108259345B (en) Port generation method and device
CN114244555B (en) Security policy adjusting method
US20180255124A1 (en) Data center network containers
CN114489953A (en) Virtual machine migration method and device based on cluster, electronic equipment and storage medium

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