Preamble time-division multiple access fixed slot assignment protocol for secure mobile ad hoc networks

Mobile ad hoc networks are the ‘‘spontaneous networks’’ which create a temporary network in any place and any time without using any extra fixed radio device of a full infrastructure network. Each device in this network works as a router to develop end-to-end communication connections and move independently in any direction. Mostly, mobile ad hoc networks use the IEEE 802.11b protocol with carrier-sense multiple access with collision avoidance medium access control layer protocol for sharing a common medium among the nodes simultaneously. Due to this distributed medium, the routing and medium access control layer of the mobile ad hoc network are prone to attacks. Among several attackers, blackhole attacker is the dangerous one which causes the loss of all data packets of devices in the network. Efficient medium access control protocol designs in this respect play a key role in determining channel utilization, network delay, and, more importantly, network security. In the proposed work, preamble information is used with time-division multiple access medium access control. The preamble time-division multiple access uses time synchronization for each time slot and does not assign much time to the blackhole attacker due to a fixed time slot. As a result, blackhole is not stable in all communications and such an attack is effectively defended. Simulation results show that, in the presence of the black-hole attacker, carrier-sense multiple access with collision avoidance has a high packet loss ratio and low network throughput as compared to the proposed preamble time-division multiple access.


Introduction
Since decades, the demand of mobile/wireless subscribers has been increasing rapidly due to the extensive use of bandwidth-hungry applications such as video on demand (VoD), on-line gaming, and BitTorrent. 1 Infrastructure-full and infrastructure-less communications are two main types of wireless communication to support high data rates for a wireless medium in this case. Infrastructure-full communication 2 is known as single-hop communication (e.g. GSM (Global System for Mobile Communications), CDMA (code-division multiple access), LTE (Long-Term Evolution), etc.) or as the terrestrial fixed wireless network. Infrastructurefull network is a fixed network where the end-to-end route is established by some fixed base stations or access points, as shown in Figure 1.
The base stations and access points are connected with the backbone network via microwave or optical fiber. Due to some excellent features (such as the mobility of end users), the infrastructure-full network had replaced the wired network. 3 Furthermore, end users can communicate during movement due to the handover/handoff process, but the movement is limited to be within the network coverage area of base stations. In addition, the coverage area can also be increased using the concept of the terrestrial multi-hop network at last miles. [4][5][6] The infrastructure-full network is a more secure wireless network due to its central management technique. Therefore, attackers do not easily attack it. If any attacker attacks on this network, the central management technique handles attacks and safeguards this network.
The infrastructure-less network, on the other hand, is established without any base station or access point of wireless network where end users do not require any central fixed device for establishing the network. Mobile ad hoc network (MANET) is one of the fastest developed research areas in the wireless network. 7,8 MANET is a self-configuring and dynamic network with a large number of portable devices. 9 MANET's nodes create a temporary and dynamic network of portable devices such as laptops, mobiles, and printers with wireless links (Figure 2). There is no pre-defined wireless route established among the MANET's nodes. Therefore, each device has its routing capability 10 and nodes create trust levels on each other. These nodes can easily move up in their set wireless range. 11 Due to its nature of the infrastructure-less and open network structure, there are so many issues and limitations in MANET as well, [12][13][14][15] such as challenges related to routing, 16,17 medium access control (MAC), 18,19 transmission range, 20 mobility, 21 energy issues, [22][23][24] location management, [25][26][27][28] and security. 29 Among all, the main issue is the failure of nodes or communication links due to instability observed in this network. Since MANET does not have any central management technique such as a terrestrial fixed wireless network, many attackers and unauthorized users can invade and attack this network easily. As we have discussed above, all nodes interact and develop trust levels for routing; therefore, attack on any node can easily disturb and destabilize the whole network. Blackhole attack is a well-known attack; it generates a fake trust level for the destination in an open MANET network. This article presents a novel and an appropriate solution to secure MANET. We have compared the performance of two existing MAC protocols in the presence of a blackhole attacker and identified the secure MAC protocol for the MANET.

Routing issues
MANET uses different routing protocols to establish network dynamic topology and maintain end-to-end routing information within the network. Therefore, MANET's nodes have all routing information without  any help of fixed base stations or access points in the network. Many routing protocols have been developed with different routing techniques such as proactive, reactive, and hybrid routing techniques; these all are topology-based routing protocols, as shown in Figure 3. In proactive routing methods, the routing protocols establish all information before nodes start communication. When any node needs routes, proactive routing protocol assigns the pre-calculated shortest route. Destination-sequenced distance vector (DSDV) routing is the famous routing protocol under this category. 30 The reactive routing protocols, in contrast, create the shortest routing path on the demand of nodes. Ad hoc on-demand distance vector (AODV) routing is a popular routing protocol under this category. 31 Hybrid routing protocol uses the features of both proactive and reactive routing protocols such as the zone routing protocol (ZRP). 32

MAC issues
MAC protocols assign the channel accessing for communication MAC protocols that do not have any routing capability. MAC protocols are designed to increase channel utilization and network lifetime, decrease delay, and safeguard the overall network. According to Noori and Ardakani, 33 the network lifetime is the time period over which the network can operate effectively. It can also be referred as the percentage of dead nodes and as the moment when the number of live nodes drops below (1 À b)N , where 0 ł b\1 and N stands for the total number of nodes in the network. 34 The nodes in MANET use a shared channel to exchange information among nodes. 35 Collision may occur among the transmitting nodes due to the shared channel. As a reason, MANET needs some dynamic MAC protocols that can easily avoid and handle collisions. These protocols can be typically categorized into two main groups: contention-based and schedule-based (contention-free) MAC protocols. Using contentionbased protocols, a single radio channel is shared by all nodes and is allocated on demand. An example of such MAC is carrier-sense multiple access with collision avoidance (CSMA/CA) (802.11b) used in MANET. 36 Schedule-based protocols are a class of deterministic MAC protocols in which access to the channel is based on a schedule. This is achieved based on the preallocation of resources to individual nodes. An example of such a scheme is time-division multiple access (TDMA). 37 Figure 4 shows some categories of MAC protocols for MANET.

Security issues
MANET is an open and less secure network. Different kinds of attacks can easily damage the MANET with their intelligence. Therefore, security is an essential factor for MANET. 38 Physical, MAC, and routing layers are an essential part of MANET. Mostly, the routing layer and MAC layer are much affected due to a different type of attack. Figure 5 shows the list of different types of attacks of MANET. Recently, many researchers have focused on the security perspectives and have either proposed new protocols or improvised the existing protocols for MANET, considering different scenarios in various simulation tools. [39][40][41] Most of the previous studies are conducted for secure mobile communication in a less dense network, with slow speed and small terrain size showing irregularities in results. In this article, we present a secure data transmission solution for non-stationary mobile nodes in MANET using MAC protocols. Our contributions are summarized as follows: This article is structured as follows: section ''Related work'' presents the related work to the security of MANET according to the routing and MAC layers; section ''Proposed method'' explains the proposed methods and problem definition, section ''Experimental evaluation'' describes the experiments and evaluations

Routing protocol
Attacker nodes in contrast to normal nodes in the network do not cooperate to transfer data packets correctly among MANET nodes. Ali Zardari et al. 42 proposed a method of dual attack detection for blackand grayhole attacks (DDBG) to detect and prevent both attackers. DDBG uses an intrusion detection system (IDS) and connected dominating set (CDS) techniques. Furthermore, DDBG creates a set of nodes using CDS. DDBG also checks the energy level of nodes since the attacker node consumes a large amount of energy as compared to the normal node. The DDBG protocol technique sends some status packet from the IDS set to check the attacker node and blacklist of attackers. Moreover, the IDS node must have a high energy level to be the trusted nodes and they broadcast the status packet to detect the attacker periodically. Gupta et al. 43 proposed a reliable routing technique to prevent the attack of blackhole attackers in a MANET. They found better results using the proposed routing technique. They suggested that a little change can make it more secure than the normal AODV routing protocol.
To identify routing attacks is a very challenging task. Soni and Joshi 44 compared AODV with the secure ad hoc on-demand distance vector (SAODV) routing protocol under different attack conditions such as a blackhole, route disruption attack, route invasion attack, and reply attacks. SAODV sends an encrypted message against the routing attacks. SAODV gets help using asymmetric or public key encryption to broadcast secure routing packets. This protocol uses hash chain  and digital signature to make secure mutual header and non-mutual header fields. In these fields, all routing information is included. Due to encrypted routing messages, the attacker cannot easily understand routing packets. However, the ordinary node understands encrypted messages and sends back the digital signature to source nodes. This validates, as per authors, that SAODV is more secure than normal AODV for preventing these attacks. Alomari 54 developed an authentication scheme for routing procedures among the nodes in the MANET. They modified the AODV routing protocol according to their authentication scheme. They used a random number, secrete key, and hash function to develop an authentication scheme. The random number with a timestamp was used to protect the network nodes. The random number uses a hash function to secure a secrete key and restricts the doubling and fake values. This scheme solves the synchronization problem but consumes some extra bytes for storing hash and addresses of the nodes. This protocol presented better results in terms of security and authenticity as compared to the SAODV routing protocol under blackhole attack. Singh and Singh 55 developed a modified version of AODV known as enhanced secure trusted AODV (ESTA) for multiple and loop-free disjoint paths. ESTA is a multipath data routing protocol based on a combination of trust, authentication key, and asymmetric cryptography technique for data security. However, a slightly large delay was observed in ESTA due to multipath transmissions. Based on their NS3 simulation results, the authors concluded that the ESTA routing protocol was more secure than AODV. Raj and Swadas 56 proposed an extension of AODV called the detection, prevention and reactive AODV (DPRAODV) routing protocol. This protocol was capable of detecting and preventing blackhole attackers in MANET with improved PDR values as compared to AODV. DPRAODV first detects and isolates the blackhole node and then sends an alarm in the form of a reply packet to neighbor nodes. Neighbor m = node updates their routing table and creates a blacklist for blackhole node which will be ignored in the future routing. Khamayseh et al. 57 proposed two secure routing protocols (e.g. binary decision diagram AODV (BDD-AODV) and Hybrid). BDD-AODV is based on the original AODV routing protocol. The Hybrid routing protocol is a combination of BDD-AODV and multiple paths in Intermediate nodes in AODV protocol (MI-AODV) routing protocols. These protocols detect and prevent blackhole attackers in the MANET and presented better results in terms of high PDR, low PLR, and low overhead compared to the AODV and MI-AODV routing protocols. ''Accurate and cognitive intrusion detection system'' (ACIDS) in Sivanesh and Dhulipala 58 fixed the threshold value based on the destination sequence number and AODV route reply (RREP) messages to identify the blackhole attackers. This protocol offered better results in terms of PDR and network throughput and from security perspectives compared to AODV.

MAC protocols: CSMA and TDMA
In Dasari, 45 the real-time detection of MAC layer attacks in 802.11 has been proposed. The author focused on detecting and preventing the denial of service (DoS) attack with minimal detection delay. The author suggested that the backoff attack has a more lethal effect as compared to RTS (request to send) flooding. Guang 46,47 measured the misbehavior effect of MAC for network layer performance. The author simulated two reactive routing protocols known as AODV and dynamic source routing (DSR) in the MANET with two MAC attacks (e.g. backoff manipulation and RTS data packet drop attacks). They measured the disturbance of MAC attacks to the network layer. Therefore, the routing protocols did not perform very well. Aggarwal 40 presented a new malicious attack (TO attack [various type of attacks]). Primarily, the author concentrated on detecting and handling the selfish attack on the MAC layer and suggested detection and reply schemes. The reply depended on two stages: the first is mitigating and the second is punishing mechanisms. Both stages help improve the network performance in identifying the attacker. By their simulation results, they showed good accuracy in identifying the attacker node. Zhou and Nettles 49 proposed a new defense mechanism against the two types of DoS attacks (single adversary attack (SAA) and colluding adversary attack (CAA)) on 802.11. SAA reduces the capacity of the channel to legitimate nodes. CAA destroys the real traffic and creates fake traffic flow among the nodes. In this article, the author proposed a packet by the packet authentication method to control the SAA attack. To control the CAA attacks, the authors proposed more than one methods such as fair MAC protocol, introducing protecting traffic flow and adjusting distance. Gupta et al. 50 suggested a hybrid approach to detecting sinkhole attack using the TDMA MAC protocol in the wireless sensor network (WSN). They used destination sequence number and one-hop mechanism for detecting the attacker in a network. Their approach has better efficiency in detecting the malicious node and its misbehavior. Through simulation, they showed an improvement in the results of the network using their proposed technique. They also presented an IDS for vehicular ad hoc networks (VANETs). 43 The proposed model has the ability to detect Sybil and wormhole attacks in VANETs. They used the TDMA MAC protocol for channel access. Through the TDMA MAC protocol, they prevented the effect of attacks. The security system was more efficient, accurate and provided quick identification of misbehavior of the attacker vehicle node in the network.
Toledo and Wang 59 used a robust non-parametric detection mechanism for the CSMA/CA MAC protocol to prevent the DoS attack. They proposed a technique to observe the general operations of the network. They did not change existing CSMA/CA, but they only used M-truncated sequential Kolmogorov-Smirnov test to notice transmissions and the distribution of the explainability of collisions in MANET. The explain-ability of collision is the probability calculation of collision that describes an observation of events in the network. They observed network jamming due to DoS attacks. Due to jamming attacks, the number of collisions is increased highly in the network. They used the NS2 simulator to observe collisions due to jamming attacks. They showed that the collisions are very sensitive when the number of nodes is changing in MANET. They noticed that the explain-ability collision correctly indicated that a jammer was present in the network and nodes were not communicating correctly. Djahel et al. 60 highlighted the MAC (802.11b) layer misbehavior for reactive (AODV) and proactive (optimized link state routing (OLSR)) routing protocols in MANET. It was found that there was no packet delivered during the virtual link attack. Using OPNET14 simulations, MAC and routing layers cooperated in the network to resist attacks and managed to achieve more throughput, PDR, and end-toend delay in case of nodes' misbehavior.

Secure wireless communication
Soni and Joshi 44 implemented a combined solution for MAC and routing layers of MANET. They used cumulative frequency detection (CFD), data forwarding behavior detection (DFBD), and MAC authentication techniques to prevent the attacks on MANET. CFD uses channel busy (CB) bit with RTS/CTS (clear to send) to detect the malicious node. DFBD determines the malicious node using an incentive-based scheme. The error bit technique helps identify the malicious node in the MAC-based authentication method. This joint optimization isolated the malicious nodes efficiently and offered increased PDR and reduced PLR. An encryption method against blackhole attackers, using the Diffie-Hellman key exchange algorithm, is introduced by Taya and Gupta. 53 Nodes use key exchange before transferring the data with the AODV routing protocol. The source node sends one key in route request (RREQ) when the source node gets RREP) from any node, it checks the critical value of RREP, and, if the key is matched with previous RREQ, then the source node starts to send data.
Dilli and Reddy 61 used a secure hash algorithm (SH-3)-based technique called hash-based MAC-SH-3 (HMAC-SH-3) in AODV against DoS, blackhole, and cooperative blackhole attacks in MANET. They detect and prevent multiple attackers using confirmation hash-based MAC messages, secrete keys, and reliability of node. In the presence of multiple attackers, Qualnet7.4 simulation revealed that the proposed algorithm improved network throughput and PDR. Ndajah et al. 62 analyzed blackhole attackers in the peer-to-peer (P2P) wireless network. They modified the AODV routing protocol and considered the action of disobeying each node in the network. They used an active table where each node stores its identification, number of RREQ messages, and number of RREP messages. Each packet is signed using a public key of all nodes in the network. Whenever any node receives any message, it increases the sequence number of the corresponding message. Due to the digital signature and activity of each node, their proposed work is more secure than other traditional protocols. Mishra et al. 63 presented a collective analysis of existing MAC protocols of the WSN and focused on two MAC protocols, that is, localized encryption and authentication protocol (LEAP) and TinySec, which are used for monitoring attacks in WSNs. It was observed that TinySec is lightweight but not suitable from the WSN security point of view. On the other hand, LEAP is not lightweight, but it handles attacks reasonably and makes WSN more secure.

Problem definition
MANET is a dynamic network, and it does not have any centralized management system. Therefore, many issues occur; the security of traffic is one of them in MANET. However, attack strategies that target the interaction between the MAC layer and the routing layer have not been fully explored. In the absence of interaction between MAC and routing layers, a new class of attacks is created. These attacks extend to the routing layer from the MAC level, where they appear as blackhole attacks, thus inflicting severe degradation over the network's overall performance between terms concerning the carried out throughput, latency, and connectivity.

CSMA/CA (802.11b) in MANET
The traditional contention-based protocol is used for short-distance communication, which, unlike the schedule-based ones, does not require coordination between nodes getting access to the channel. Node with information to be sent must try to get bandwidth by collisions with other node transfers are minimized. If a collision occurs, the colliding nodes return for a random period before attempting to reuse the channel. These MAC protocols are more efficient than the other MAC protocols if the nodes have burst data. CSMA is one such contention-based approach. It uses the carrier-sense multifunction to avoid collisions due to CSMA/CA shared media. 64 In CSMA/CA, when a node needs a channel to send data, it first listens to the channel to see if another node is currently using the channel.
It performs four steps when any node needs a channel for transmitting the data: (1) listen to the favored channel; (2) if the channel is idle (no active transmitters), it sends a packet; (3) if the channel is engaged, then the node waits until the transmission quit afterwards a rivalry period where minimum age a host has to transfer before it does stay secure so the no sordid host's piece has collided including its transmission; (4) if the duct is nevertheless idle at the stop regarding the rivalry period after the node transmits its piece in any other case that repeats the procedure described in step 3 above until it receives a broad channel. In Figure 6, the flowchart of CSMA/CA is presented.
CSMA/CA optionally utilizes RTS/CTS after the trade of the data. At first, the sender tests whether or not the medium is idle; if not, postulate so, after the distributed interframe space (DIFS) devices on time, it publicizes an RTS body to the receiver address. Second, if the grantee is inside the range, below such wish await because short interframe space (SIFS is the little day heart within the data body or its acknowledgment) one about time, after only it replied following the sender with a CTS frame. Third, the sender gets hold of the CTS frame, since it has been waiting because of every other SIFS soloist concerning era earlier than sending the statistics frame according to the receiver. Finally, so the receiver choice efficaciously obtain the facts frame, such wish pause for SIFS unit over a day or also ship an Acknowledgment (ACK) advice return following the sender. Figure 7 shows how data are exchanged using RTS/CTS. Due to simplicity, flexibility, and robustness, CSMA/CA is famous in wireless networks. However, the attacker attacks easily on MANETs. Therefore, the CSMA/CA protocol is less considered for secure MANET environments.

Preamble TDMA in MANET
In schedule-based MAC protocols, scheduling techniques settle the claims of resources (i.e. time slots) among the MANET's nodes. Most MANET scheduling protocols use TDMA system conversion where the channel for sending and receiving nodes is divided into different time slots. The superset of these time slots is referred to as a TDMA frame, as shown in Figure 8. In a time zone where N is a system parameter, an adjacent set of N time slots forms a logical frame that repeats periodically over time. Within each frame, each node is assigned several specific time slots.
The traditional concept of TDMA MAC was implemented in previous research 65 where they used preamble information to save the energy of nodes. In this MAC protocol, the TDMA frame contains a preamble in addition to the data gaps. In the preamble, each node has its subset, sending the destination node ID of the outbound packet. The other nodes stop in the preamble and store the time slots to receive packets. Like other generic TDMA protocols (e.g. GSM), each node has a data transfer port for transferring packets. The frame structure of the preamble TDMA is shown in Figure 8, where the preamble (P) has a time duration of Tp. The duration of data (D) transmission is known as Td and the duration of guard band is known as Tg. The total time duration is known as one frame time (Tf ). We can say that Tf is the total time allocated for data transmission. The following equations show the mathematical calculation of all the time durations where equations (1)-(3) represent the calculation of the length of one frame, the overall data transmission time of all nodes, and the TDMA efficiency (nf ), respectively. The preamble TDMA MAC protocol improves transmission reliability and reduces delays in a dense network. However, in a low, dense network, the fixed frame length signifies ''the lost time in the free slots'' which eventually becomes slightly less. The preamble in TDMA provides a fixed slot length to all nodes including the blackhole node for time synchronization. Due to this reason, the blackhole node cannot drop all data packets of the network. Source nodes do not send all packets through the route where the blackhole attacker is present. This saves data packets. All nodes access preamble data structure for all time slots. When a node needs the channel to send and receive data, first it writes the receiving device ID into the subslot in the preamble. Following the preamble phase, each node transmits a packet in its data slot and tests the preamble to determine if the packet is being received in other time slots. Based on a fixed schedule, the node varies between two modes of operation: active mode and sleep mode. In the active mode, the sensor wakes up and sends or receives data frames using the time slots assigned to it in a logical frame. Otherwise, they switch their transceivers off into sleep mode. The preamble-based TDMA MAC protocol is presented in Figure 9 and Table 1 and explained in the subsequent discussion.  The pseudocode of the preamble TDMA algorithm defines the data transmission time slot assigned to each node in the network for communication. First, it checks the number of active nodes (N ); if the number of active nodes is greater than MaxN , then it is not executed further because the preamble TDMA MAC protocol works on a limited number of active nodes. If the number of active nodes is within the range, then it declares the first round to SlotCount. When SlotCount is in the first round, it creates a new preamble and turns on the (active mode) radio mode. A new preamble has a droptail queue (IFq) in which the upper layer Tx packet is stored. It runs the dequeue operation and assigned the destination node ID to tdmaPreamble½Slot. Then the transmitter broadcasts the packet. At the receiving address, if the radio mode is on (active), then the receiver node receives the packet and turns off the (sleep mode) radio mode; otherwise, it releases the packet.

AODV
AODV creates the shortest possible route with minimal end-to-end delay within the network among source and destination nodes when the source intends to communicate. This routing protocol uses some control messages (e.g. RREQ, RREP, etc.) for data transmission and reception. 66 Initially, the source node broadcasts an RREQ message to find the path of the destination node. Either the destination node may receive directly the RREQ message or the destination receives a message via intermediate nodes. When the destination node receives the RREQ message, it unicasts the RREP message to the source node. RREP sets up a reverse path from the destination to the source node. Any intermediate node or destination node generates a route error (RRER) message due to the mobility of MANET nodes. As the source node receives RRER messages, it tries to regenerate a new route for data transmission.

Blackhole attacker
Blackhole attacker is one of the dangerous attackers and is aware of how to instantly retrieve a direction or path without locating the route. In each routing protocol, the source node continually communicates through the shortest and valid route with other nodes. In AODV, the shortest path and a large sequence number play a crucial role in defining a complete path. A large sequence number shows the timeliness of the path. Looking at these two parameters, the malicious node always tries to give false information that it has the shortest path with a complete large destination series number. Therefore, the source node selects the route that consists of the malicious node, ensuing in a blackhole attack that every node can misuse. It causes serious network disruption by targeting both data and control packets, resulting in decreased network performance.
Blackhole is a lively and routed attacking method in which the attacker identifies itself as the high-quality node course for gaining access to the goal and all different nodes. In this assault, the attacker node waits till the neighboring nodes begin the RREQ packet. When an attacker node receives an RREQ message, it sends back a fake routing response (FRREP) packet with a new sequence range. 67 Figure 10 shows a typical MANET topology of nine mobile nodes, where S is the source node, D is the destination node, node 4 is the blackhole node, and the others are intermediate nodes.
S initiates broadcasting and broadcasts the RREQ message. When the RREQ message reaches the destination node D, D regenerates another message known as RREP. However, when the RREQ message arrives at node 4, an intermediate node infects it, but it reaerates a fake reply message known as FRREP with one hop count. As S receives a reply message with one hop count, then it starts to send the data packets because  the source node itself does not know about any fake reply. When node 4 receives data packets, it drops all data packets instead of forwarding to the actual destination node.
The main question is ''How does source node know about a fake reply message?'' In TCP (transmission control protocol) connection, when the source node does not receive any acknowledge packet, the source will understand about errors but, in the UDP (user datagram protocol) connection, there is no concept of acknowledgment. Therefore, it is mostly an open problem for the UDP connection. Blackhole takes advantage of UDP connections. In this article, we simulate the UDP connection in the presence of a blackhole attacker in MANET. We use AODV as a routing protocol and compare the performance of preamble TDMA and CSMA with and without blackhole attacker and verify which MAC protocol is more secure.

Simulation setup
We have designed different MANET topologies with and without blackhole attackers to compare two different MAC protocols. For developing MANET scenarios, we have used a patch file of the blackhole attacker 68 and implemented it in NS2. 35. 69 Table 2 presents the values of the simulation parameters used in the scenarios.
The attacker node moves as a standard random way mobility model that is based on pause time known as the random waypoint mobility model as we have used one blackhole attacker in our all MANET topologies. Constant bit rate (CBR) as an application and UDP as the transport protocol are used. For traffic patterns, Pascal language developed traffic generator, the following 70 is employed. This traffic generator can create a traffic pattern in TCL format supporting end-user coding in NS2. Furthermore, we have used two different MAC protocols (CSMA and TDMA) and AODV as the routing protocol with and without a blackhole attacker. The simulated network consists of 100 randomly allocated wireless nodes in a 1200 3 1200 m 2 flat space. The random waypoint model is used for all topologies with all node mobility. Different pause mobility speeds are used, namely, 5,10,15,20,25,30,35,40,45, and 50 s. We have simulated our network scenarios according to mobility speed (m) and only one attacker is simulated to analyze the impact of a blackhole attacker in an open MANET network. Figure 11 shows the methodology of simulated scenarios.
Results and discussion PDR (%) versus mobility speed. PDR is the ratio of the number of received data packets over the total number of the generated packet. Equation (4) is used to calculate the PDR in MANET. Results of PDR (%) versus mobility speed of nodes for TDMA and CSMA/CA (802.11b) are shown in Figure 12, considering both the presence and absence of the blackhole attacker These two MAC protocols share the channel medium according to their techniques. Referring to the results, TDMA has not allocated a time slot to blackhole attacker; therefore, the attacker could not attack the network and data have been secured. On the other hand, 802.11b has allocated the same medium at the same time to all nodes of MANET. Blackhole attacks the network and keeps the channel busy. Therefore, as the mobility is increased, the attacker absorbed more data packets. CSMA does not have any alternative mechanism to control the blackhole attacker. Nevertheless, even the CSMA MAC protocol does not work well as compared to TDMA.
Normalized routing load (%) versus mobility speed. Normalized routing load (NRL) (%) is the ratio of the total generated routing packets per received data packet (RDP) to maintain the route in MANET. Equation (5)  The values of NRL (%) versus mobility speed of MANET nodes for TDMA and CSMA/CA (802.11b) are analyzed in the presence and absence of the  blackhole attacker, as shown in Figure 13. Referring to the results, CSMA does not control NRL in all scenarios. Even in the absence of the blackhole attacker, NRL of MANET is high. CSMA uses a common medium at the same time and hence suffers heavily from the repeated collisions of data packets. On the other hand, the TDMA has allocated the common channel at different time instants to all nodes and a stable link or route is maintained. As a reason, the routing protocol does not require generating a routing packet frequently due to the stability of the link, even in the case of Blackhole attacker. TDMA does not assign the channel capacity more than the fixed duration so the blackhole cannot attack the MANET anymore.
Average delay (s) versus mobility speed. Average delay is the difference between the total time of sent data packets (SDPs) and the total time of the received data packets (RDPs) divided by the total number of connection (cN ) in the MANET. Equation (6)  The average delay (s) of TDMA and CSMA/CA (802.11b) are compared as shown in Figure 14. The delay of TDMA is lower in the absence of blackhole than in the presence of blackhole. However, the delay is lower than that of CSMA. CSMA suffers more delay in both cases, even in the absence of blackhole when compared to TDMA.
Throughput (kbps) versus mobility speed. Throughput (kbps) is defined as the total amount of received data packets (RDPs) at the destination per unit time. Equation (7) shows the formula to calculate the average throughput Throughput versus mobility speed results shown in Figure 15 highlight that the throughput of CSMA/CA (802.11b) is less than that of TDMA. In the case of CSMA, the throughput is slightly better in the absence of blackhole. However, when the blackhole is present in the network, the throughput is very low in all mobility cases. The blackhole attacker absorbs a higher amount of data and data rarely reach the destination. On the other side, the throughput of TDMA MAC is good; as the mobility speed is increased, the throughput also increased. In the blackhole absence scenario, throughput is constant and high, whereas in its presence the throughput is not good initially, but TDMA controls the channel utilization which leads to increased throughput. Even at the last peak point, it is higher than the constant scenario.
Jitter (ms) versus mobility speed. Jitter quantifies the variation in the delay of received packets. It is measured as the sum of the difference between time of the current received data packet (T RDP ) and time of the previously received packet (T PRDP ). Equation (8) presents the calculation of jitter Figure 16 shows the result of jitter (ms) versus mobility speed. Jitter is the foremost important factor of the network. The jitter of CSMA (802.11b) is high in both cases of the blackhole. Even when the blackhole is not present, the jitter of CSMA is higher than that of TDMA. In the case of TDMA, the jitter is very low when the blackhole is not present. However, in the scenario where the blackhole is present, the jitter is increased linearly at a high mobility speed, but it is lower than that of CSMA. PLR (%) versus mobility speed. PLR (%) is the ratio of the dropped data packets (DDPs) over generated data packets (GDPs) at the source node. Equation (9)   The PLR (%) values of TDMA and CSMA/CA (802.11b) are analyzed as shown in Figure 17 in the presence and absence of blackhole attacker. It shows that TDMA saves more data from the attack of blackhole because TDMA does not allocate a time slot to the blackhole attacker frequently. The loss ratio is constant without a blackhole attacker scenario. On the other hand, in the case of 802.11b, the loss ratio is higher even when there is no blackhole attacker. When the blackhole attacker is active in MANET, the loss ratio is increased. At the high mobility speed, the PLR grows to be higher and the channel remains busy as the blackhole absorbs all data. Moreover, CSMA does not have any alternative mechanism to control packet loss and prevent the blackhole attacker.

Conclusion
This article compares the performance of preamble TDMA and CSMA (802.11b) under blackhole attack. CSMA/CA is not capable of controlling the blackhole and there is no guarantee for successful transmission. CSMA-based protocols suffer from packet loss and extreme delays in high-density networks, whereas TDMA-based protocols work best to improve transmission reliability and suffer fewer delays in a dense network. Simulation analyses in NS2 reveal that, with a fixed slot length to all nodes including the malicious node, preamble TDMA provides improved data packet delivery and avoids/minimizes the effect of blackhole data loss. Furthermore, preamble TDMA suffers less from jitter and delay as compared to the CSMA/CA MAC network. It can be concluded that the overall performance of preamble TDMA is better than that of the CSMA/CA MAC protocol.

Declaration of conflicting interests
The author(s) declared no potential conflicts of interest with respect to the research, authorship, and/or publication of this article.

Funding
The author(s) received no financial support for the research, authorship, and/or publication of this article.