Cross-layer protocol stack rapid simulation method based on Core + Emane
By implementing cross-layer interface modules and optimizing data transmission paths in CORE custom services, the problems of large latency and poor real-time performance in cross-layer protocol simulation in wireless network simulation platforms are solved, achieving efficient cross-layer protocol stack simulation and improving the reliability of simulation results and portability efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NANJING PANDA HANDA TECH
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-15
AI Technical Summary
Existing wireless network simulation platforms suffer from problems such as large latency, loss of real-time performance, and significant discrepancies between simulation and measured results in cross-layer protocol simulations. This is especially true in vehicular wireless communication systems where the MAC layer and network layer are highly coupled, leading to significant deviations between simulation and measured data.
A rapid simulation method for cross-layer protocol stacks is adopted. By implementing a unified cross-layer interface module in the CORE custom service, physical layer parameters are adjusted in real time to optimize data transmission paths. Furthermore, by combining the TAP virtual network interface card and the EMANE component, data plane pass-through and control plane adjustment are achieved, ensuring real-time interoperability and efficient interaction between the protocol stack and the physical layer.
It achieves real-time interoperability between the upper-layer protocol and the physical layer, reduces latency, improves cross-layer real-time interaction capabilities, and the simulation results are closer to the behavior of real wireless networks, thus improving reliability and protocol stack portability efficiency.
Smart Images

Figure CN122053738A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of network communication and simulation technology, and in particular to a fast simulation method for cross-layer protocol stacks based on Core+Emane. Background Technology
[0002] Wireless network simulation platforms are tools for verifying and optimizing the performance of wireless communication networks based on computer modeling technology. Their core functions include object-oriented modeling methods and a graphical editor interface, which can intuitively map the actual network component structure. CORE and EMANE are open-source network simulation platforms commonly used to simulate complex network environments for protocol verification and network performance evaluation. CORE provides flexible network topology construction and upper-layer protocol simulation capabilities; EMANE offers various physical layer and MAC layer models, such as RF-Pipe, TDMA, and BYPASS, capable of simulating link characteristics.
[0003] While existing wireless network simulation platforms can perform protocol verification and performance evaluation, the simulation environment usually strictly separates each protocol layer. However, in actual project development, the coupling between protocol layers is usually quite high, and they are not strictly separated according to ISO. For example, a vehicle wireless communication system project needs to simulate cross-layer cooperation from the MAC layer to the network layer. The MAC layer will adjust the channel occupancy strategy according to the routing priority of the network layer, which will lead to significant deviations between the simulation data and the measured data.
[0004] In traditional simulation environments, the upper-layer protocol network layer in CORE and the MAC layer in EMANE are simulated "independently in layers." Information exchange between them requires forwarding through complex intermediate modules, resulting in significant latency and the loss of the crucial real-time characteristic of cross-layer decision-making. However, in real-world testing environments, the network layer and MAC layer communicate directly via memory or hardware bus. This difference between simulation and real-world cross-layer interaction modes causes network layer algorithms evaluated in simulation to completely fail in real-world testing due to increased interaction latency. Summary of the Invention
[0005] The purpose of this invention is to provide a fast cross-layer protocol stack simulation method that enables real-time communication between upper-layer protocols and physical layer parameters, dynamically optimizes transmission strategies based on network conditions, has low latency, high realism in protocol stack migration, and high reliability.
[0006] The technical solution to achieve the purpose of this invention is: a fast cross-layer protocol stack simulation method based on Core+Emane, comprising the following steps:
[0007] Step 1: Encapsulate the protocol stack functions to be simulated into a CORE custom service in the form of an executable file, and implement a unified cross-layer interface module in the CORE custom service;
[0008] Step 2: During the operation of the protocol stack, the link layer or network layer calls the cross-layer interface to adjust the physical layer parameters in real time according to business requirements, QoS indicators or routing status.
[0009] Step 3: Optimize the data transmission path;
[0010] Step 4: Deploy multiple nodes in CORE GUI, with each node running a self-developed protocol stack service. Observe and control the physical layer parameters of each node in real time through the cross-layer interface module, and verify the changes in protocol performance under different topologies and interference conditions.
[0011] Furthermore, the protocol stack in step 1 includes the application layer, network layer, and link layer.
[0012] Furthermore, the cross-layer interface module in step 1 has the following functions:
[0013] (1) Obtain physical layer real-time parameters from EMANE, including channel quality, rate, and antenna orientation;
[0014] (2) Send parameter adjustment commands to EMANE, including changes in transmit power, antenna pointing adjustment, and rate switching.
[0015] Furthermore, the cross-layer interface module in step 1 adopts a unified API design, enabling the program to access physical layer information or issue control commands as if calling local functions.
[0016] Furthermore, as described in step 2, during the operation of the protocol stack, the link layer or network layer calls cross-layer interfaces to adjust physical layer parameters in real time based on service requirements, QoS indicators, or routing status, as detailed below:
[0017] (1) When the link layer detects an increase in packet loss rate, it calls the interface to adjust the antenna direction according to the antenna algorithm;
[0018] (2) When the network layer detects an increase in path delay, it reduces the link rate;
[0019] (3) When the node power consumption configuration is issued, reduce or increase the transmit power in response to the configuration.
[0020] Furthermore, the data transmission path optimization described in step 3 is as follows:
[0021] Step 3.1, Functional Decoupling: Configure the EMANE component to disable its link layer function and enable only its physical layer function model to simulate wireless channel propagation, interference, rate adaptation, and antenna processing; the simulation node in the CORE platform runs a custom service containing complete link layer logic.
[0022] Step 3.2, Data Plane Transparent Transmission: Set the TAP virtual network card as the only Layer 2 data entry and exit point for the emulation node protocol stack; Ethernet frames generated or received by the protocol stack are transmitted through the TAP virtual network card, and after being encapsulated in frame format by the link layer of the EMANE component, they are directly transparently transmitted to the physical layer for processing and transmission. The link layer of the EMANE component is configured not to execute any media access control policies, including carrier sense, backoff, queue scheduling, congestion control and automatic retransmission.
[0023] Step 3.3, Control plane adjustment: During simulation, the physical layer simulation parameters are atomically adjusted through the event service or management interface provided by the EMANE component. The adjustment operation is independent of the user data transmission path in the data plane pass-through step.
[0024] Step 3.4, Observability Construction: Synchronously collect and record the first set of performance indicators located on the TAP virtual network card side and the second set of performance indicators located on the EMANE physical layer side, along with simulation events, to construct an end-to-end performance evidence chain from the protocol stack to the wireless channel.
[0025] Furthermore, in step 3.3, the physical layer simulation parameters that are atomically adjusted include at least one of the following: antenna pointing angle, antenna elevation angle, antenna gain mode, transmit power, information transmission rate, and node movement position.
[0026] Furthermore, in step 3.4, the first set of performance metrics includes throughput, end-to-end latency, and packet error rate (PER); the second set of performance metrics includes channel interference status, signal-to-noise ratio (SNR), and physical layer bit error rate events.
[0027] Furthermore, in step 3.2, the link layer encapsulation of Ethernet frames by the EMANE component does not add or process any control or management frames related to the Media Access Control Protocol.
[0028] Furthermore, step 3.4 is followed by a consistency verification step: by comparing and analyzing the metrics recorded by the TAP virtual network card side and the events and metrics recorded by the EMANE physical layer side in the end-to-end performance evidence chain, the consistency between the simulated data plane behavior and the expected behavior of the actual protocol stack is verified.
[0029] Compared with the prior art, the present invention has the following significant advantages: (1) The upper layer protocol and physical layer parameters can communicate in real time, and the transmission strategy can be dynamically optimized according to the network status, which improves the cross-layer real-time interaction capability; (2) The parameter adjustment is directly called in the protocol stack process by calling the EMANE API, without relying on external scripts, which reduces the control delay; (3) For the simulation requirements of projects with high coupling of the link layer, it avoids large-scale rewriting of the link layer code, and the original protocol stack can be migrated with almost zero modification, which improves the protocol stack porting efficiency; (4) The dynamic call to the cross-layer optimization mechanism makes the simulation results closer to the real wireless network behavior, closer to the real environment, and improves the credibility of cross-layer protocol stack simulation. Attached Figure Description
[0030] Figure 1 This is a flowchart illustrating a fast simulation method for cross-layer protocol stacks based on Core+Emane according to the present invention. Detailed Implementation
[0031] The present invention will now be described in further detail with reference to the accompanying drawings and specific embodiments.
[0032] like Figure 1 As shown, this invention provides a fast cross-layer protocol stack simulation method based on Core+Emane, comprising the following steps:
[0033] Step 1: Encapsulate the protocol stack functions to be simulated into a CORE custom service in the form of an executable file. Implement a unified cross-layer interface module in the CORE custom service to break away from the original Core+Emane layered architecture and achieve rapid porting from simulation to the actual test environment.
[0034] As a specific example, the protocol stack includes an application layer, a network layer, and a link layer.
[0035] As a specific example, the cross-layer interface module has the following functions:
[0036] (1) Obtain real-time physical layer parameters from EMANE, such as channel quality, rate, and antenna orientation;
[0037] (2) Send parameter adjustment commands to EMANE, such as changes in transmit power, antenna pointing adjustment, and rate switching.
[0038] As a specific example, the cross-layer interface module adopts a unified API design, which allows the program to access physical layer information or issue control commands as if calling local functions. This minimizes the workload of modifying the code at each layer when porting the simulation code to the real machine environment, and flexibly realizes the co-simulation of custom protocols under Core+Emane.
[0039] Step 2: During the protocol stack operation, the link layer or network layer calls cross-layer interfaces to adjust physical layer parameters in real time based on service requirements, QoS indicators, or routing status, as follows:
[0040] (1) When the link layer detects an increase in packet loss rate, it calls the interface to adjust the antenna direction according to the antenna algorithm;
[0041] (2) When the network layer detects an increase in path delay, it reduces the link rate to improve stability;
[0042] (3) When the node power consumption configuration is issued, reduce or increase the transmit power in response to the configuration.
[0043] Step 3: Optimize the data transmission path, as follows:
[0044] At the architectural level, the responsibilities of each component are clearly defined through functional decoupling and hierarchical shielding;
[0045] Given that the CORE node has built-in complete custom services, including the link layer logic to be simulated, in order to avoid model conflicts, the EMANE is functionally trimmed, retaining only physical layer capabilities, including wireless propagation, interference calculation, rate adaptation, and antenna model processing, while shielding the original link layer model; this ensures that the simulated link layer behavior is completely defined by the CORE side and is consistent with the actual protocol stack.
[0046] On the data plane path, the TAP virtual network interface card is established as the sole Layer 2 (L2) traffic entry and exit point. The simulated node protocol stack sends and receives data through the TAP interface in the standard Ethernet frame format. When the data flows through the EMANE, the link layer (MAC) performs only minimal processing: it is responsible for the encapsulation and transparent transmission of the frame structure, without implementing any contention-based backoff mechanism, queue scheduling, congestion control, or retransmission strategy. This design fundamentally avoids the "dual MAC" problem caused by the simultaneous operation of the two link layer logics of EMANE and CORE, and maintains the consistency between the end-to-end path from the protocol stack to the wireless channel and the actual machine environment to the greatest extent.
[0047] On the control plane, the physical layer parameters are atomically adjusted at runtime through the EMANE event service and management interface. The issuance of all control commands (such as power, frequency, antenna pointing, etc.) is strictly separated from the data plane traffic to ensure that the performance measurement process is not disturbed by additional control signaling. To ensure the consistency of the experiment and the reproducibility of the results, the system constructs an end-to-end evidence chain: all key events, state changes and performance indicators (KPIs) are captured and recorded synchronously on both the TAP interface and the EMANE physical layer, so as to achieve accurate correlation between data plane behavior and physical layer state and post-event traceability.
[0048] As a specific example, step 3, which involves optimizing the data transmission path, is as follows:
[0049] Step 3.1, Functional Decoupling: Configure the EMANE component to disable its link layer function and enable only its physical layer function model to simulate wireless channel propagation, interference, rate adaptation, and antenna processing; the simulation node in the CORE platform runs a custom service containing complete link layer logic.
[0050] Step 3.2, Data Plane Transparent Transmission: Set the TAP virtual network card as the only Layer 2 data entry and exit point for the emulation node protocol stack; Ethernet frames generated or received by the protocol stack are transmitted through the TAP virtual network card, and after being encapsulated in frame format by the link layer of the EMANE component, they are directly transparently transmitted to the physical layer for processing and transmission. The link layer of the EMANE component is configured not to execute any media access control policies, including carrier sense, backoff, queue scheduling, congestion control and automatic retransmission.
[0051] Step 3.3, Control plane adjustment: During simulation, the physical layer simulation parameters are atomically adjusted through the event service or management interface provided by the EMANE component. The adjustment operation is independent of the user data transmission path in the data plane pass-through step.
[0052] Step 3.4, Observability Construction: Synchronously collect and record the first set of performance indicators located on the TAP virtual network card side and the second set of performance indicators located on the EMANE physical layer side, along with simulation events, to construct an end-to-end performance evidence chain from the protocol stack to the wireless channel.
[0053] As a specific example, in step 3.3, the physical layer simulation parameters are atomically adjusted, including at least one of the following: antenna pointing angle, antenna elevation angle, antenna gain mode, transmit power, information transmission rate, and node movement position.
[0054] As a specific example, in step 3.4, the first set of performance metrics includes throughput, end-to-end latency, and packet error rate (PER); the second set of performance metrics includes channel interference status, signal-to-noise ratio (SNR), and physical layer bit error rate events.
[0055] As a specific example, in step 3.2, the link layer encapsulation of Ethernet frames by the EMANE component does not add or process any control or management frames related to the Media Access Control Protocol.
[0056] As a specific example, step 3.4 is followed by a consistency verification step: by comparing and analyzing the metrics recorded by the TAP virtual network card side and the events and metrics recorded by the EMANE physical layer side in the end-to-end performance evidence chain, the consistency between the simulated data plane behavior and the expected behavior of the actual protocol stack is verified.
[0057] Step 4: Deploy multiple nodes in CORE GUI, with each node running a self-developed protocol stack service. Observe and control the physical layer parameters of each node in real time through the cross-layer interface module, and verify the changes in protocol performance under different topologies and interference conditions.
[0058] Example
[0059] In this embodiment, six simulation nodes are deployed in the CORE+EMANE environment, with each node running the cross-layer interface module of this invention. The network layer periodically collects routing delay and packet loss rate. The link layer triggers antenna direction adjustment based on signal quality, and the adjustment command is sent in real time through EMANE AntennaProfileEvent. The physical layer rate is dynamically adjusted based on the service queue length, and the datarate parameter is modified by calling the EMANE Event API.
[0060] During the simulation, the link layer of the CORE custom service handles neighbor maintenance and network construction entirely, while EMANE only provides channel propagation and rate control. The TAP interface sends and receives data frames, and the frame header contains a custom EtherType to distinguish between control frames and data frames. The simulation can be ported to the actual test project simply by modifying the corresponding physical layer device interface.
[0061] In traditional simulation architectures, the link layer and physical layer are separated into distinct layers. Migrating simulation code to real-world projects requires modifying both the link layer logic of the core and the physical layer interface of the EMANE, as well as the middleware between them, significantly increasing the workload. This invention addresses the simulation needs of projects with high coupling between the link and network layers, avoiding large-scale rewriting of the link layer code. It allows for near-zero modification to the existing protocol stack migration, improving protocol stack porting efficiency.
[0062] The above are merely preferred embodiments of the present invention. It should be noted that those skilled in the art can make various improvements and modifications without departing from the principle of the present invention, and these improvements and modifications should also be considered within the scope of protection of the present invention.
Claims
1. A fast simulation method for cross-layer protocol stacks based on Core+Emane, characterized in that, Includes the following steps: Step 1: Encapsulate the protocol stack functions to be simulated into an executable file as a CORE custom service, and implement a unified cross-layer interface module in the CORE custom service; Step 2: During the operation of the protocol stack, the link layer or network layer calls the cross-layer interface to adjust the physical layer parameters in real time according to business requirements, QoS indicators or routing status. Step 3: Optimize the data transmission path; Step 4: Deploy multiple nodes in CORE GUI, with each node running a self-developed protocol stack service. Observe and control the physical layer parameters of each node in real time through the cross-layer interface module, and verify the changes in protocol performance under different topologies and interference conditions.
2. The method for rapid simulation of cross-layer protocol stacks based on Core+Emane according to claim 1, characterized in that, The protocol stack in step 1 includes the application layer, network layer, and link layer.
3. The method for rapid simulation of cross-layer protocol stacks based on Core+Emane according to claim 1, characterized in that, The cross-layer interface module in step 1 has the following functions: (1) Obtain physical layer real-time parameters from EMANE, including channel quality, rate, and antenna orientation; (2) Send parameter adjustment commands to EMANE, including changes in transmit power, antenna pointing adjustment, and rate switching.
4. The method for rapid simulation of cross-layer protocol stacks based on Core+Emane according to claim 1, characterized in that, The cross-layer interface module in step 1 adopts a unified API design, which allows the program to access physical layer information or issue control commands as if calling local functions.
5. The method for rapid simulation of cross-layer protocol stacks based on Core+Emane according to claim 1, characterized in that, Step 2 describes how, during the protocol stack operation, the link layer or network layer adjusts physical layer parameters in real time by calling cross-layer interfaces based on service requirements, QoS metrics, or routing status. Specifically: (1) When the link layer detects an increase in packet loss rate, it calls the interface to adjust the antenna direction according to the antenna algorithm; (2) When the network layer detects an increase in path delay, it reduces the link rate; (3) When the node power consumption configuration is issued, reduce or increase the transmit power in response to the configuration.
6. The method for rapid simulation of cross-layer protocol stacks based on Core+Emane according to claim 1, characterized in that, Step 3, which involves optimizing the data transmission path, is as follows: Step 3.1, Functional Decoupling: Configure the EMANE component to disable its link layer function and enable only its physical layer function model to simulate wireless channel propagation, interference, rate adaptation, and antenna processing; the simulation nodes in the CORE platform run custom services containing complete link layer logic. Step 3.2, Data Plane Transparent Transmission: Set the TAP virtual network card as the only Layer 2 data entry and exit point for the emulation node protocol stack; Ethernet frames generated or received by the protocol stack are transmitted through the TAP virtual network card, and after being encapsulated in frame format by the link layer of the EMANE component, they are directly transparently transmitted to the physical layer for processing and transmission. The link layer of the EMANE component is configured not to execute any media access control policies, including carrier sense, backoff, queue scheduling, congestion control and automatic retransmission. Step 3.3, Control plane adjustment: During simulation, the physical layer simulation parameters are atomically adjusted through the event service or management interface provided by the EMANE component. The adjustment operation is independent of the user data transmission path in the data plane pass-through step. Step 3.4, Observability Construction: Synchronously collect and record the first set of performance indicators located on the TAP virtual network card side and the second set of performance indicators located on the EMANE physical layer side, along with simulation events, to construct an end-to-end performance evidence chain from the protocol stack to the wireless channel.
7. The method for rapid simulation of cross-layer protocol stacks based on Core+Emane according to claim 6, characterized in that, In step 3.3, the physical layer simulation parameters are atomically adjusted, including at least one of the following: antenna pointing angle, antenna elevation angle, antenna gain mode, transmit power, information transmission rate, and node movement position.
8. The method for rapid simulation of cross-layer protocol stacks based on Core+Emane according to claim 6, characterized in that, In step 3.4, the first set of performance metrics includes throughput, end-to-end latency, and packet error rate (PER); the second set of performance metrics includes channel interference status, signal-to-noise ratio (SNR), and physical layer bit error rate events.
9. The method for rapid simulation of cross-layer protocol stacks based on Core+Emane according to claim 6, characterized in that, In step 3.2, the link layer of the EMANE component encapsulates Ethernet frames without adding or processing any control or management frames related to the Media Access Control Protocol.
10. The method for rapid simulation of cross-layer protocol stacks based on Core+Emane according to claim 6, characterized in that, Step 3.4 is followed by a consistency verification step: by comparing and analyzing the metrics recorded by the TAP virtual network card side and the events and metrics recorded by the EMANE physical layer side in the end-to-end performance evidence chain, the consistency between the simulated data plane behavior and the expected behavior of the actual protocol stack is verified.