CN116094990B - Software optimization method and device based on MAC address forwarding table and electronic equipment - Google Patents
Software optimization method and device based on MAC address forwarding table and electronic equipment Download PDFInfo
- Publication number
- CN116094990B CN116094990B CN202310078721.3A CN202310078721A CN116094990B CN 116094990 B CN116094990 B CN 116094990B CN 202310078721 A CN202310078721 A CN 202310078721A CN 116094990 B CN116094990 B CN 116094990B
- Authority
- CN
- China
- Prior art keywords
- ring network
- mac address
- forwarding table
- network state
- rotatable
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 43
- 230000009471 action Effects 0.000 claims abstract description 10
- 230000006870 function Effects 0.000 claims description 37
- 238000004590 computer program Methods 0.000 claims description 7
- 230000003068 static effect Effects 0.000 claims description 7
- 238000005457 optimization Methods 0.000 claims description 5
- 238000004891 communication Methods 0.000 abstract description 14
- 238000010586 diagram Methods 0.000 description 5
- 230000008569 process Effects 0.000 description 5
- 230000000903 blocking effect Effects 0.000 description 4
- 238000003491 array Methods 0.000 description 2
- 238000012545 processing Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/28—Routing or path finding of packets in data switching networks using route fault recovery
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L12/00—Data switching networks
- H04L12/28—Data switching networks characterised by path configuration, e.g. LAN [Local Area Networks] or WAN [Wide Area Networks]
- H04L12/42—Loop networks
- H04L12/437—Ring fault isolation or reconfiguration
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L45/00—Routing or path finding of packets in data switching networks
- H04L45/74—Address processing for routing
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02T—CLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
- Y02T10/00—Road transport of goods or passengers
- Y02T10/10—Internal combustion engine [ICE] based vehicles
- Y02T10/40—Engine management systems
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Small-Scale Networks (AREA)
Abstract
The application relates to the technical field of ring network communication, in particular to a software optimization method and device based on a MAC address forwarding table and electronic equipment, wherein the method comprises the following steps: based on at least one ring network state of the current vehicle-mounted ring network, determining a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from a preset MAC address forwarding table, and based on the virtual local area network corresponding to the at least one ring network state, executing forwarding action of forwarding data according to the rotatable port and the target physical address of forwarding data so as to optimize ring network switching function of the current vehicle-mounted ring network. According to the software optimization method based on the MAC address forwarding tables, two ports belonging to the virtual local area network and used by the Ethernet ring network are bound to each MAC address forwarding table, so that the MAC address forwarding tables are enabled to take effect, and the protection switching function of the ring network is realized.
Description
Technical Field
The present application relates to the field of ring network communications technologies, and in particular, to a software optimization method and apparatus based on a MAC (MEDIA ACCESS Control) address forwarding table, and an electronic device.
Background
On a Classic AutoSar-based software development platform, ring network protection switching is generally realized through an output port of a switch and a virtual local area network, but in the implementation process, the condition of overtime of refreshing an MAC address forwarding table is easy to occur, and the MAC address forwarding table contains a destination MAC address for forwarding data, so that a link switching scheme needs to be optimized.
In the related art, a method of synchronously calling an interface function of a switch is mostly adopted to realize a protection switching function of an Ethernet ring network.
However, the method depends on the call time of the Switch interface in the implementation process, and when the method is called through the Switch interface, the call time is overtime, so that system blocking is often caused, the operation function of the system is affected, and the problem needs to be solved.
Disclosure of Invention
The application provides a software optimization method, a device and electronic equipment based on a MAC address forwarding table, which are used for solving the problems that when a Switch interface is called, system blocking is caused by overtime of calling time, so that the system operation function, the ring network protection switching function and the like are affected.
An embodiment of a first aspect of the present application provides a software optimization method based on a MAC address forwarding table, including the following steps: determining at least one ring network state of a current vehicle-mounted ring network; based on the at least one ring network state, determining a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from a preset MAC address forwarding table; and executing the forwarding action of the forwarding data according to the rotatable port and the target physical address of the forwarding data based on the virtual local area network corresponding to the at least one ring network state so as to optimize the ring network switching function of the current vehicle-mounted ring network.
According to the technical means, two ports belonging to the virtual local area network and used by the Ethernet ring network are bound to each MAC address forwarding table, so that the MAC address forwarding table is enabled to be effective, and the protection switching function of the ring network is realized.
Further, in one embodiment of the present application, before determining, based on the at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from the preset MAC address forwarding table, the method further includes: determining at least one static MAC address forwarding table to bind a plurality of rotatable ports used when the current vehicle-mounted ring network is used; determining a target physical address of corresponding forwarding data of each rotatable port according to the plurality of rotatable ports; and obtaining the preset MAC address forwarding table according to the plurality of the rotatable ports and the target physical addresses of the corresponding forwarding data of each rotatable port.
According to the technical means, the protection switching function of the ring network is realized by determining the target physical address of each port of the switch and storing the target physical address into the MAC address forwarding table.
Further, in an embodiment of the present application, the ring network state includes at least one of a no-fault state, a single link fault state, and a double link fault state.
According to the technical means, the data communication condition of the virtual local area network configured by each switch port is described through a plurality of ring network states, so that the operation efficiency of the communication system is improved.
Further, in an embodiment of the present application, the software optimization method based on the MAC address forwarding table further includes: and when the virtual local area network binds a plurality of rotatable ports, calculating the time consumption of each scheduling period according to the calling times set by each scheduling period.
According to the technical means, the optimization function of the MAC address forwarding table is realized by calculating the time consumption of each scheduling period.
Further, in an embodiment of the present application, the software optimization method based on the MAC address forwarding table further includes: identifying a current mode of each switch within the at least one ring network state; and if the current mode is a dynamic learning mode, closing the dynamic learning mode of each switch.
According to the technical means, the mode of each switch in the ring network state is judged, and then the switch is opened or closed, so that the stability of a communication system is ensured.
An embodiment of a second aspect of the present application provides a software optimization device based on a MAC address forwarding table, including: the first determining module is used for determining at least one ring network state of the current vehicle-mounted ring network; a second determining module, configured to determine, based on the at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from a preset MAC address forwarding table; and the optimization module is used for executing the forwarding action of the forwarding data according to the rotatable port and the target physical address of the forwarding data based on the virtual local area network corresponding to the at least one ring network state so as to optimize the ring network switching function of the current vehicle-mounted ring network.
Further, in one embodiment of the present application, before determining, based on the at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from the preset MAC address forwarding table, the second determining module further includes: the first determining unit is used for determining a plurality of rotatable ports used when at least one static MAC address forwarding table binds the current vehicle-mounted ring network; a second determining unit, configured to determine a target physical address of the forwarding data corresponding to each of the plurality of rotatable ports according to the plurality of rotatable ports; and the acquisition unit is used for acquiring the preset MAC address forwarding table according to the plurality of the rotatable ports and the target physical addresses of the corresponding forwarding data of each rotatable port.
Further, in an embodiment of the present application, the ring network state includes at least one of a no-fault state, a single link fault state, and a double link fault state.
Further, in an embodiment of the present application, the software optimizing apparatus based on the MAC address forwarding table further includes: and the calculating unit is used for calculating the time consumption of each scheduling period according to the calling times set by each scheduling period when the virtual local area network binds a plurality of rotatable ports.
Further, in an embodiment of the present application, the software optimizing apparatus based on the MAC address forwarding table further includes: the identifying unit is used for identifying the current mode of each switch in the at least one ring network state; and if the current mode is a dynamic learning mode, closing the dynamic learning mode of each switch.
An embodiment of a third aspect of the present application provides an electronic device, including: the system comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the program to realize the software optimization method based on the MAC address forwarding table according to the embodiment.
An embodiment of a fourth aspect of the present application provides a computer readable storage medium having stored thereon a computer program for execution by a processor for implementing a software optimization method based on a MAC address forwarding table as described in the above embodiment.
Based on at least one ring network state of the current vehicle-mounted ring network, the embodiment of the application determines a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port of each switch and forwarding data in the at least one ring network state from a preset MAC address forwarding table, and further executes forwarding action of forwarding the data so as to optimize ring network switching function of the current vehicle-mounted ring network. Therefore, the problems that when the Switch interface is called, the calling time is overtime to cause system blocking, thereby influencing the system operation function, the protection switching function of the ring network and the like are solved.
Additional aspects and advantages of the application will be set forth in part in the description which follows and, in part, will be obvious from the description, or may be learned by practice of the application.
Drawings
The foregoing and/or additional aspects and advantages of the application will become apparent and readily appreciated from the following description of the embodiments, taken in conjunction with the accompanying drawings, in which:
Fig. 1 is a flowchart of a software optimization method based on a MAC address forwarding table according to an embodiment of the present application;
fig. 2 is a schematic diagram of an ethernet ring network according to one embodiment of the present application;
FIG. 3 is an exemplary diagram of a software optimization apparatus based on a MAC address forwarding table according to an embodiment of the present application;
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Reference numerals illustrate: 10-a software optimizing device based on a MAC address forwarding table; 100-a first determining module, 200-a second determining module and 300-an optimizing module.
Detailed Description
Embodiments of the present application are described in detail below, examples of which are illustrated in the accompanying drawings, wherein like or similar reference numerals refer to like or similar elements or elements having like or similar functions throughout. The embodiments described below by referring to the drawings are illustrative and intended to explain the present application and should not be construed as limiting the application.
The following describes a software optimization method, a device and an electronic device based on a MAC address forwarding table according to an embodiment of the present application with reference to the accompanying drawings. Aiming at the problem that when the Switch interface is called in the background art, the calling time is overtime, the system is blocked, so that the system operation function and the protection switching function of the ring network are affected, the application provides a software optimization method based on an MAC address forwarding table. Therefore, the problems that when the Switch interface is called, the system is blocked due to overtime calling time, the system operation function and the protection switching function of the ring network are affected are solved, and the two ports belonging to the virtual local area network and used by the Ethernet ring network are bound to each MAC address forwarding table, so that the MAC address forwarding table is effective, and the protection switching function of the ring network is realized.
Specifically, fig. 1 is a schematic flow chart of a software optimization method based on a MAC address forwarding table according to an embodiment of the present application.
As shown in fig. 1, the software optimization method based on the MAC address forwarding table includes the following steps:
in step S101, at least one ring network status of the current vehicle ring network is determined.
Specifically, in the embodiment of the application, the vehicle-mounted ring network mainly comprises three ring networks including a single ring, a double ring and multiple rings, wherein the virtual local area networks used by each ring of the single ring, the double ring and the multiple rings are different, so that the rings do not influence each other when the data flow runs in the respective rings.
Further, as shown in fig. 2, in the embodiment of the present application, a single ring is taken as an example, and in the single ring state, the ring network state in the embodiment of the present application mainly includes at least one of a no-fault state, a single link fault state, and a double link fault state.
In step S102, based on the at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state are determined from a preset MAC address forwarding table.
Further, in one embodiment of the present application, before determining, based on at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a port capable of forwarding data of each switch in the at least one ring network state from a preset MAC address forwarding table, the method further includes: determining a plurality of rotatable ports used when at least one static MAC address forwarding table binds the current vehicle-mounted ring network; determining a target physical address of corresponding forwarding data of each rotatable port according to the plurality of rotatable ports; and obtaining a preset MAC address forwarding table according to the plurality of the rotatable ports and the target physical addresses of the corresponding forwarding data of each rotatable port.
Specifically, the switch a, the switch B and the switch C in the embodiment of the present application each have a plurality of rotatable ports used when the vehicle-mounted ring network is provided, each port corresponds to a target physical address of a target connection device, and the plurality of rotatable ports of each switch and the target physical address of the corresponding forwarding data of each rotatable port are mapped, so as to store the mapped data in a preset MAC address forwarding table.
Further, in the embodiment of the present application, in the obtained preset MAC address forwarding table, a virtual local area network corresponding to at least one ring network state and a rotatable port of each switch and a target physical address for forwarding data in at least one ring network state need to be determined, and since each port of the switch achieves a function of data exchange by identifying a corresponding target physical address, data traffic transmitted by a port of each switch has its own dedicated channel and also has its own target physical address, so that no blocking phenomenon occurs when the data traffic runs on the respective channel regardless of whether it is a single ring, dual ring or multiple ring ethernet.
Specifically, as shown in fig. 2, if the embodiment of the present application is in the non-failure ring network state in the single ring state, when the switch B communicates with the switch C and the lower hanging node device of the switch a, respectively, because the target physical address corresponding to each port of the switch is related to the virtual lan configured at the port, when the virtual lan of the P5 port of the switch B is closed, the static MAC forwarding table of the port is not effective at this time, so the outgoing data traffic can only be transferred from the P7 port of the switch B, and similarly, the data traffic on the switch a can only be transferred from the P5 port of the switch a; when the virtual local area network of the two ports of the switch C is in a completely opened state, outgoing data traffic can be simultaneously transferred out of the two ports respectively, and it is required to be noted that when the outgoing data traffic is transferred out of each port, one more invalid traffic can occupy the switch bandwidth.
Further, when the embodiment of the application is in a single-link fault state in a single-ring state, taking the link 1 fault in fig. 2 as an example, the switch C communicates with the switch B and the switch a down-hanging device respectively, because the P6 port virtual local area network of the switch C is closed, the outgoing data traffic can only be turned out from the P7 port of the switch C, and similarly, the outgoing data traffic on the switch a can only be turned out from the P6 port of the switch; when the virtual local area network of the two ports of the switch B is in a fully-opened state, outgoing data traffic can be simultaneously transferred out of the two ports respectively.
Further, in the case of the dual-link failure state in the single-ring state in the embodiment of the present application, taking the RPL (Remote Initial Program Load, remote start service) link and link 1 failure in fig. 2 as an example, since the RPL link and link 1 have failures, the virtual local area networks of the P5 and P6 ports of the switch a, the P5 port of the switch B, and the P6 port of the switch C are in the closed state, and the outgoing data traffic is intelligently transferred out through the P7 ports of the switch B and the switch C without being affected by the link failure.
In step S103, based on the virtual local area network corresponding to the at least one ring network state, the forwarding action of forwarding data is executed according to the port capable of being turned out and the target physical address of forwarding data, so as to optimize the ring network switching function of the current vehicle ring network.
Specifically, the embodiment of the application forwards the data traffic of each port channel to the corresponding target physical address based on the virtual local area network state corresponding to each switch port in at least one ring network state and the target physical address corresponding to each port so as to optimize the ring network switching function of the current vehicle-mounted ring network, and meanwhile, if the MAC address forwarding table discovers a new switch port, the target physical address of the new port can be learned and stored so as to improve the operation performance of the vehicle-mounted ring network system.
Further, in an embodiment of the present application, the software optimization method based on the MAC address forwarding table further includes: when the virtual local area network binds a plurality of rotatable ports, the time consumption of each scheduling period is calculated according to the calling times set by each scheduling period.
Specifically, in the embodiment of the application, a plurality of rotatable ports are bound in the virtual local area network of each switch, and in the scene of ring network protection switching function and recovery switching, a EthSwt _Enable Vlan interface or a AutoSar standard interface is required to be called to realize data information transmission of each port.
For example, taking the example of calling the switch a port, the embodiment of the present application uses a scheduling period of 10ms, and each period needs to call the EthSwt _enable Vlan interface 2 times, and at this time, the switch a port needs to process three periods, so that the time consumption of each scheduling period is 3×10ms+20-30 ms=50-60 ms, and at the same time, one processing period is increased every virtual local area network is added.
Further, in an embodiment of the present application, the software optimization method based on the MAC address forwarding table further includes: identifying a current mode of each switch within the at least one ring network state; if the current mode is the dynamic learning mode, the dynamic learning mode of each switch is closed.
Specifically, when the embodiment of the application is used for transmitting data traffic, the current operation mode of each switch in at least one ring network state needs to be identified, and if the current mode of each switch is a dynamic learning mode, unknown unicast data traffic can be flooded to all devices of an invalid link at the moment, so that the dynamic learning mode of each switch needs to be closed in order to ensure the stability of a communication system.
According to the software optimization method based on the MAC address forwarding table, based on at least one ring network state of the current vehicle-mounted ring network, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port of each switch and forwarding data in the at least one ring network state are determined from a preset MAC address forwarding table, and forwarding actions of forwarding data are further executed, so that ring network switching functions of the current vehicle-mounted ring network are optimized. Therefore, the problems that when the Switch interface is called, the system is blocked due to overtime calling time, the system operation function and the protection switching function of the ring network are affected are solved, and the two ports belonging to the virtual local area network and used by the Ethernet ring network are bound to each MAC address forwarding table, so that the MAC address forwarding table is effective, and the protection switching function of the ring network is realized.
Next, a software optimizing apparatus based on a MAC address forwarding table according to an embodiment of the present application will be described with reference to the accompanying drawings.
Fig. 3 is a block diagram of a software optimizing apparatus based on a MAC address forwarding table according to an embodiment of the present application.
As shown in fig. 3, the software optimizing apparatus 10 based on the MAC address forwarding table includes: a first determination module 100, a second determination module 200, and an optimization module 300.
The first determining module 100 is configured to determine at least one ring network state of the current vehicle-mounted ring network;
A second determining module 200, configured to determine, based on at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from a preset MAC address forwarding table; and
The optimization module 300 is configured to execute a forwarding action of forwarding data according to the rotatable port and a target physical address of forwarding data based on the virtual local area network corresponding to the at least one ring network state, so as to optimize a ring network switching function of the current vehicle ring network.
Further, in one embodiment of the present application, before determining, based on the at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a port capable of forwarding data of each switch in the at least one ring network state from a preset MAC address forwarding table, the second determining module 200 further includes: the device comprises a first determining unit, a second determining unit and an acquiring unit.
The first determining unit is used for determining a plurality of rotatable ports used when at least one static MAC address forwarding table binds the current vehicle-mounted ring network;
A second determining unit, configured to determine a target physical address of the forwarding data corresponding to each of the rotatable ports according to the plurality of rotatable ports;
and the acquisition unit is used for acquiring a preset MAC address forwarding table according to the plurality of the rotatable ports and the target physical addresses of the corresponding forwarding data of each rotatable port.
Further, in one embodiment of the present application, the ring network state includes at least one of a no-fault state, a single link fault state, and a double link fault state.
Further, in an embodiment of the present application, the software optimizing apparatus 10 based on the MAC address forwarding table further includes:
And the calculating unit is used for calculating the time consumption of each scheduling period according to the calling times set by each scheduling period when the virtual local area network binds a plurality of rotatable ports.
Further, in an embodiment of the present application, the software optimizing apparatus 10 based on the MAC address forwarding table further includes:
the identifying unit is used for identifying the current mode of each switch in at least one ring network state;
If the current mode is the dynamic learning mode, the dynamic learning mode of each switch is closed.
According to the software optimizing device based on the MAC address forwarding table, based on at least one ring network state of the current vehicle-mounted ring network, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port of each switch and forwarding data in the at least one ring network state are determined from the preset MAC address forwarding table, and then forwarding actions of forwarding data are executed, so that ring network switching functions of the current vehicle-mounted ring network are optimized. Therefore, the problems that when the Switch interface is called, the system is blocked due to overtime calling time, the system operation function and the protection switching function of the ring network are affected are solved, and the two ports belonging to the virtual local area network and used by the Ethernet ring network are bound to each MAC address forwarding table, so that the MAC address forwarding table is effective, and the protection switching function of the ring network is realized.
Fig. 4 is a schematic structural diagram of an electronic device according to an embodiment of the present application. The electronic device may include:
Memory 401, processor 402, and a computer program stored on memory 401 and executable on processor 402.
The processor 402 implements the software optimization method based on the MAC address forwarding table provided in the above embodiment when executing the program.
Further, the electronic device further includes:
A communication interface 403 for communication between the memory 401 and the processor 402.
A memory 401 for storing a computer program executable on the processor 402.
Memory 401 may include high-speed RAM (Random Access Memory ) memory, and may also include non-volatile memory, such as at least one disk memory.
If the memory 401, the processor 402, and the communication interface 403 are implemented independently, the communication interface 403, the memory 401, and the processor 402 may be connected to each other by a bus and perform communication with each other. The bus may be an ISA (Industry Standard Architecture ) bus, a PCI (PERIPHERAL COMPONENT, external device interconnect) bus, or EISA (Extended Industry Standard Architecture ) bus, among others. The buses may be divided into address buses, data buses, control buses, etc. For ease of illustration, only one thick line is shown in fig. 4, but not only one bus or one type of bus.
Alternatively, in a specific implementation, if the memory 401, the processor 402, and the communication interface 403 are integrated on a chip, the memory 401, the processor 402, and the communication interface 403 may perform communication with each other through internal interfaces.
The processor 402 may be a CPU (Central Processing Unit ) or an ASIC (Application SPECIFIC INTEGRATED Circuit, application specific integrated Circuit) or one or more integrated circuits configured to implement embodiments of the present application.
The embodiment of the application also provides a computer readable storage medium, on which a computer program is stored, which when being executed by a processor, implements the software optimization method based on the MAC address forwarding table.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or N embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, "N" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more N executable instructions for implementing specific logical functions or steps of the process, and further implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.
It is to be understood that portions of the present application may be implemented in hardware, software, firmware, or a combination thereof. In the above-described embodiments, the N steps or methods may be implemented in software or firmware stored in a memory and executed by a suitable instruction execution system. As with the other embodiments, if implemented in hardware, may be implemented using any one or combination of the following techniques, as is well known in the art: discrete logic circuits having logic gates for implementing logic functions on data signals, application specific integrated circuits having suitable combinational logic gates, programmable gate arrays, field programmable gate arrays, and the like.
Those of ordinary skill in the art will appreciate that all or part of the steps carried out in the method of the above-described embodiments may be implemented by a program to instruct related hardware, and the program may be stored in a computer readable storage medium, where the program when executed includes one or a combination of the steps of the method embodiments.
While embodiments of the present application have been shown and described above, it will be understood that the above embodiments are illustrative and not to be construed as limiting the application, and that variations, modifications, alternatives and variations may be made to the above embodiments by one of ordinary skill in the art within the scope of the application.
Claims (6)
1. The software optimization method based on the MAC address forwarding table is characterized by comprising the following steps of:
Determining at least one ring network state of a current vehicle-mounted ring network;
Based on the at least one ring network state, determining a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from a preset MAC address forwarding table; and
Based on the virtual local area network corresponding to the at least one ring network state, executing forwarding action of forwarding data according to the rotatable port and the target physical address of the forwarding data so as to optimize ring network switching function of the current vehicle-mounted ring network;
before determining, based on the at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from the preset MAC address forwarding table, the method further includes:
Determining at least one static MAC address forwarding table to bind a plurality of rotatable ports used when the current vehicle-mounted ring network is used;
Determining a target physical address of corresponding forwarding data of each rotatable port according to the plurality of rotatable ports;
Obtaining the preset MAC address forwarding table according to the plurality of the rotatable ports and the corresponding target physical addresses of forwarding data of each rotatable port;
The ring network state includes at least one of a no-fault state, a single link fault state, and a double link fault state.
2. The method as recited in claim 1, further comprising:
and when the virtual local area network binds a plurality of rotatable ports, calculating the time consumption of each scheduling period according to the calling times set by each scheduling period.
3. The method as recited in claim 1, further comprising:
identifying a current mode of each switch within the at least one ring network state;
And if the current mode is a dynamic learning mode, closing the dynamic learning mode of each switch.
4. A software optimizing apparatus based on a MAC address forwarding table, comprising: the first determining module is used for determining at least one ring network state of the current vehicle-mounted ring network;
A second determining module, configured to determine, based on the at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from a preset MAC address forwarding table; and
The optimization module is used for executing the forwarding action of the forwarding data according to the rotatable port and the target physical address of the forwarding data based on the virtual local area network corresponding to the at least one ring network state so as to optimize the ring network switching function of the current vehicle-mounted ring network;
Before determining, based on the at least one ring network state, a virtual local area network corresponding to the at least one ring network state and a target physical address of a rotatable port and forwarding data of each switch in the at least one ring network state from the preset MAC address forwarding table, the second determining module further includes:
the first determining unit is used for determining a plurality of rotatable ports used when at least one static MAC address forwarding table binds the current vehicle-mounted ring network;
A second determining unit, configured to determine a target physical address of the forwarding data corresponding to each of the plurality of rotatable ports according to the plurality of rotatable ports;
The obtaining unit is used for obtaining the preset MAC address forwarding table according to the plurality of the rotatable ports and the target physical addresses of the corresponding forwarding data of each rotatable port;
The ring network state includes at least one of a no-fault state, a single link fault state, and a double link fault state.
5. An electronic device, comprising: a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the software optimization method based on a MAC address forwarding table as claimed in any one of claims 1-3.
6. A computer readable storage medium having stored thereon a computer program, the program being executable by a processor for implementing a software optimization method based on a MAC address forwarding table as claimed in any of claims 1-3.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310078721.3A CN116094990B (en) | 2023-01-19 | 2023-01-19 | Software optimization method and device based on MAC address forwarding table and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202310078721.3A CN116094990B (en) | 2023-01-19 | 2023-01-19 | Software optimization method and device based on MAC address forwarding table and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN116094990A CN116094990A (en) | 2023-05-09 |
CN116094990B true CN116094990B (en) | 2024-06-14 |
Family
ID=86210035
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202310078721.3A Active CN116094990B (en) | 2023-01-19 | 2023-01-19 | Software optimization method and device based on MAC address forwarding table and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN116094990B (en) |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101815107A (en) * | 2010-05-13 | 2010-08-25 | 华为技术有限公司 | Method, system and equipment for managing address in Ethernet ring |
Family Cites Families (14)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20100238813A1 (en) * | 2006-06-29 | 2010-09-23 | Nortel Networks Limited | Q-in-Q Ethernet rings |
CN100466584C (en) * | 2007-04-03 | 2009-03-04 | 中兴通讯股份有限公司 | Processing method for loop network protection |
CN101997724A (en) * | 2010-11-22 | 2011-03-30 | 中兴通讯股份有限公司 | Method and device for updating multicast forwarding entries |
CN102255757B (en) * | 2011-08-08 | 2014-05-07 | 杭州华三通信技术有限公司 | Link switching method and device |
CN104009903B (en) * | 2014-06-05 | 2017-07-14 | 新华三技术有限公司 | Flow forwarding method and device in elastic package circular network |
CN108206792B (en) * | 2016-12-16 | 2020-10-23 | 北京神州泰岳软件股份有限公司 | Topological structure discovery method and device of switch |
CN108366013B (en) * | 2018-02-26 | 2021-05-28 | 新华三技术有限公司 | Message forwarding method and device |
CN110247784B (en) * | 2018-03-07 | 2023-09-26 | 北京京东尚科信息技术有限公司 | Method and device for determining network topology structure |
CN110247851B (en) * | 2019-06-28 | 2022-01-21 | 北京东土军悦科技有限公司 | Information updating method and device in three-layer switch, three-layer switch and medium |
CN113542932B (en) * | 2020-04-15 | 2023-03-21 | 中国联合网络通信集团有限公司 | Main/standby switching method, system, equipment and storage medium of network |
CN112187646B (en) * | 2020-09-25 | 2022-07-29 | 新华三信息安全技术有限公司 | Message table item processing method and device |
CN112637052B (en) * | 2020-12-18 | 2022-02-22 | 迈普通信技术股份有限公司 | Switching method, switching device, ring network, electronic equipment and storage medium |
CN113194162B (en) * | 2021-04-28 | 2023-03-14 | 浙江宇视科技有限公司 | Data transmission method, device, electronic equipment and medium |
CN114978990A (en) * | 2022-07-26 | 2022-08-30 | 北京智芯微电子科技有限公司 | Service message forwarding method and system based on ring network |
-
2023
- 2023-01-19 CN CN202310078721.3A patent/CN116094990B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101815107A (en) * | 2010-05-13 | 2010-08-25 | 华为技术有限公司 | Method, system and equipment for managing address in Ethernet ring |
Also Published As
Publication number | Publication date |
---|---|
CN116094990A (en) | 2023-05-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8134922B2 (en) | Reducing flooding in a bridged network | |
US8339943B2 (en) | Virtual router failover dampening | |
CN109743197B (en) | Firewall deployment system and method based on priority configuration | |
CN105791126B (en) | Ternary Content Addressable Memory (TCAM) table look-up method and device | |
CN111682927A (en) | Message synchronization method, device, equipment and medium based on MLAG environment | |
CN112422422B (en) | Network redundancy method, device and equipment | |
EP3713160A1 (en) | Packet transmission method and apparatus | |
EP2618523B1 (en) | Method, network device and system for ethernet ring protection switching | |
CN112087375A (en) | WAN port switching method of WAN port standby router, storage medium and router | |
KR102684903B1 (en) | Network operation methods, devices, facilities and storage media | |
CN116094990B (en) | Software optimization method and device based on MAC address forwarding table and electronic equipment | |
US8902738B2 (en) | Dynamically adjusting active members in multichassis link bundle | |
CN114598570A (en) | Multicast data message forwarding method and equipment | |
CN111464443A (en) | Message forwarding method, device, equipment and storage medium based on service function chain | |
CN114531396B (en) | Fault back switching method and device in Ethernet virtual private network | |
EP4002779B1 (en) | Method and apparatus for sharing information in redundant network, and computer storage medium | |
CN110830598A (en) | Method and network equipment for establishing and transmitting interface address and alias in BGP (Border gateway protocol) session | |
CN111464436B (en) | Method for solving single-port loop of RSTP (remote station transfer protocol) | |
CN108111419B (en) | Path selection method and device | |
CN112988187B (en) | Equipment upgrading method and device | |
EP2429129A1 (en) | Method for network protection and architecture for network protection | |
US11729022B2 (en) | Uplink connectivity in ring networks | |
CN117955895B (en) | Switch, forwarding table item updating method thereof, storage medium and computing device | |
CN107846299B (en) | Method and device for realizing two-layer and three-layer service bridging and PTN (packet transport network) equipment | |
CN118827523A (en) | Device interface configuration management method, device and readable 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 |