Research on the Implementation of Routing Protocol in Ad hoc Network

1 Introduction

The current routing protocols are only studied under simulation conditions, and few real test beds are implemented. However, the simulation cannot fully reflect the real state of the routing protocol in actual work, and it cannot obtain the precise behavior of the actual system. Implementing a mobile ad hoc network routing protocol requires many system components. Many routing protocols must support events, so support for corresponding events should be added. Here we explore the basic problems encountered in the implementation of the Ad hoc routing protocol in the actual operating system, and propose a new architecture solution.

2 Basic problems of Ad hoc routing protocol implementation

2.1 General routing architecture

The current routing architecture will be divided into packet forwarding and packet routing according to function. Among them, the packet forwarding function is implemented in the kernel part of the operating system; and the routing function is implemented as a daemon in user space. The general routing architecture is: the kernel receives the packet, queries the routing table and forwards the packet to the next-hop neighbor through the corresponding network interface. The kernel routing table entity is generated by the routing daemon according to its routing algorithm. The idea of ​​separate forwarding and routing functions is consistent with the idea of ​​basic Unix system mechanisms and strategies. This mechanism is efficient and lightweight because the design of the strategy can be changed over a large time span without affecting the mechanism. Packet forwarding can efficiently forward each packet, so this mechanism should be located in the core. This grouping can pass through the node as soon as possible. This separation principle makes the routing functions of modern operating systems more efficient and flexible. At the same time, the routing function can be continuously improved without changing the system kernel.

2.2 Basic problems of on-demand routing

Ad hoc network routing protocols can be divided into two types: active routing and reactive routing. Active routing protocols (table-driven) maintain a route to all possible destinations by periodically exchanging control information, while reactive routing (on demand) initiates routing requests only when needed. Active Lunan protocol (DSDV) can be easily implemented in the user space in the routing system like routing protocols in wired networks (such as RIP, OSPF, BGP). The reactive routing protocol. Such as AODV and DSR bring the following challenges:

(1) Processing without routing packets Normally the packets passing through the forwarding module will match the kernel routing table. If the population does not have a matching destination address, the kernel will immediately discard the packet. In the on-demand routing protocol, this is undesirable, because not all routes exist in advance, and some are discovered only when there is a routing demand, so the correct method is to notify the routing daemon of the route request , The packet is cached until the route discovery process ends and the routing table is updated. However, the operating system does not support this new mechanism of packet forwarding behavior, and the kernel does not provide sufficient support for all unprocessed packets for these tasks (such as queuing).

(2) Update route cache The on-demand routing protocol usually caches the most recently used Lunan in user space to reduce route discovery overhead. Each entry in the route cache has a timer. When the corresponding route is used, the timer needs to be reset, and when the time expires, the entry is deleted. If the entry in the kernel routing table has not been used within a pre-defined time (for example, it has not been looked up), this information must be available to the user space routing daemon. This is difficult to achieve under the current routing protocol system, because there is no available routing usage record in the kernel.

(3) Mixed forwarding and routing Some Ad hoc Lunan protocol forwarding and routing functions have no obvious boundaries, such as DSR. The protocol requires that each packet (not just routing control packets) must carry a special DSR header for processing by the DSR daemon in user space. This combination of routing and forwarding functions is not compatible with the internal routing architecture of modern operating systems and is difficult to apply efficiently. Put the entire routing protocol into the kernel, or separate the core routing table and put the forwarding function into user space. In some cases, the separation principle is violated and some optimizations are obtained to reduce routing overhead.

(4) New routing model Some routing protocols use non-traditional routing models (such as source routing, flow-based forwarding routing, etc.). These routing patterns deviate from the current IP routing architecture and pose challenges to system design. In the source routing mode, all paths to be traversed by a packet are determined by the source node, and these routing information are encoded in the packet header. The traditional IP routing forwarding function is hop-by-hop and is driven by the local routing table. In the flow-based forwarding method, each packet has a flow ID, and each node in the network has a flow table. The forwarding process is to find the flow table based on the flow ID, and the routing process is to establish a flow at each node table.

Most general-purpose operating systems cannot flexibly support the new routing model, so the implementation of these routing protocols must modify the kernel; the IP stack must also use the kernel extension mechanism to avoid the IP stack.

(5) Cross-layer interaction wireless channels provide many opportunities for cross-layer interaction. In some routing algorithms, the design of routing protocols uses physical layer and link layer parameters, such as signal strength and link status. Conceptually, cross-layer interaction should be abandoned, because although cross-layer design will provide optimization, indiscriminate access to all underlying parameters will seriously damage the network architecture. Many routing protocols use other layer routing protocol information to improve performance. For example, the link quality information of each neighboring node is required by certain routing algorithms. Despite the availability of this information, there is no uniform standard across different hardware and operating systems. It is necessary to obtain low-level information through standard methods, which is very important for the development of routing protocols.

3 New architecture

First, a general method is proposed to support the on-demand routing protocol in a general operating system, and the following mechanism is proposed to enhance the current packet forwarding function. A flag is added to each entry in the kernel routing table to indicate whether the entry is an on-demand routing entry, so that when the route is unreachable, the kernel queues the packets instead of discarding them directly. If a route has an empty next or interface, it will be cached to wait for route discovery. At the same time, the routing table does not need to include the possible destinations. The routes based on the subnet logo and the default route can achieve the same purpose. A new component called the on-demand routing component (ODRC) is added to the core packet forwarding function to implement the on-demand routing function. When the kernel receives a packet and finds that there is no corresponding route, it first notifies the routing daemon in user space to issue a routing request for the destination of the packet, and then caches the packet to wait for the daemon to return to the route discovery state. If the process is successfully completed, the corresponding routing table entry is filled and the buffered packet is reinserted into the forwarding queue. To solve the routing cache problem, you must add a timestamp to each routing entry and record the last time the entry was used. The timestamp is used to delete an unused expired route.

3.2~4.6L Air Fryer

Tower Air Fryer,Air Fryer 3.5L,Digital Air Fryers,Industrial Air Fryer

Ningbo Anbo United Electric Appliance Co.,ltd , https://www.airfryerfactory.com