1 Introduction

A mobile ad hoc network (MANET) is a very flexible local area network, with no centralized control [1]. Its topology can change at any time in an unpredictable way, in which nodes such as sensor bearing devices, laptops, and others, can move around at different speeds, connecting to one another and disconnecting without previous warning. According to [2], “MANET is a collection of wireless devices that form a temporary network without the collaboration of any centralized administration to which hosts are connected”. Each node is equipped with a radio transceiver and appropriate antennas, which can be omnidirectional. The devices may act both as direct agents of a network communication or as routers. These devices are classified as source and destination nodes when they are in the role of direct agents, and are classified as intermediate nodes when they are in the role of routers.

Statistical propagation models,Footnote 1 such as the shadowing model used in this work, try to mimic the influence that environment with buildings and others interfering obstacles, has on the propagation of radio waves. Therefore, the results offered here help filling this gap and intend to provide a better understanding of how the routing algorithms works in such environments.

Due the wide variety of possible scenarios and applications, investigation about the performance and operation of MANETs are still active research topics. In particular, with regards to the routing algorithms for these networks, several interesting study topics remain unexplored or overlooked.

In this paper, we evaluate the performance and behavior of the DSR protocol in MANETs. Tests were carried out considering shadowing, two-ray ground, and free-space propagation models, with different configuration parameters and two different transport protocols, Transmission Control Protocol (TCP) and User Datagram Protocol (UDP). With the contributions given in this work, it is possible to evaluate the system performance when using DSR and considering the influence of the environment (signal fading).

This paper is organized as follows. Section 2 surveys works found in the literature and related to the theme considered here. Section 3 presents an overview of the DSR algorithm. Section 4 describes the tests performed and the results obtained. Section 5 includes discussions about the results obtained. Finally, Sect. 6 presents conclusions, final comments and future work.

2 Related Work

In [1], numerous functions of the DSR algorithm are detailed. The authors perform experiments in a 1500 × 300 m scenario using CBR (Constant Bit Rate) and UDP traffic, with 10, 20 and 30 mobile devices, generating a traffic of 4 packets/s. However, the authors do not specify the propagation model used and do not perform tests using TCP, thus leaving the need for further studies with other variables and scenarios.

The work in [3] discusses the battery consumption with shadowing propagation and two transmission models, including direct transmission model, and a vehicular cell model with fixed and mobile nodes. However, the work does not evaluate metrics such as bandwidth consumption, overhead, and delay.

In [4], DSDV, OLSR and AODV routing protocols for MANETs are analyzed in road scenarios, simulating the communication between vehicles using NS-3 and Sumo simulators. By analyzing the throughput, end-to-end delay and packet delivery rate, the authors report that the studied algorithms can be used in vehicular ad hoc networks, but characteristics of those algorithms need to be further optimized due to the high mobility of nodes in vehicular networks.

In [5], a performance comparison of DSR, AODV and DSDV routing protocols for MANETs is performed. The simulations center on three parameters: throughput, packet delivery ratio and end-to-end delay. The NS-2.33 simulator is used, and results show that DSR outperforms the other two protocols in throughput and packet delivery ratio, and DSDV delivers the lowest end-to-end delay. However, the authors considered only the two-ray ground propagation model, leaving the need to evaluate other metrics and other more accurate propagation models.

In [6], investigation of AODV and DSR routing algorithms with respect to packet delivery ratio under TCP and UDP environments is presented. The results show that for TCP transmissions, the packet delivery ratio of AODV is not good when compared to DSR. The authors report that the routing protocols efficiency depends on the number of packets successfully received at the destination. However, others metrics are not considered in this work.

3 DSR Overview

Dynamic Source Routing (DSR) is a source routing algorithm, that is, the source node determines the sequence of nodes through which the packet should pass [1]. DSR does not send periodic messages to update routing information. This reflects in network bandwidth savings, and hence, battery power.

Most traditional routing algorithms only store one route, i.e., the main route to a destination. However, DSR has an additional functionality. Alternative routes are cached for use if the main route is broken or no longer valid. Also, DSR has two phases of operation: route discovery and route maintenance, as detailed in the following.

3.1 Route Discovery

The route discovery phase occurs when the source device wants to send data to a destination to which a valid route is unavailable. Routing algorithms in MANETs, such as DSR, usually use flooding as the main mechanism for route discovery. During floods, each device broadcasts Route Request (RREQ) packets to its neighbors with the aim of making one of these packets reach the intended destination. The RREQ packets contain the path traveled by the packet so that the return route is easily known. A device that receives a RREQ packet responds with a Route Reply (RREP) packet if it is the desired destination, or if it knows a route to the destination.

3.2 Route Maintenance

Link breaks in MANETs may occur due to the high node mobility, or the low battery level of devices. When a break between two devices is detected, the device that detected it sends a Route Error (RERR) packet to the source device, notifying it of the link break and that an update in its routing table is necessary. At this moment the alternative route, if one exists, becomes the main route.

4 Simulations

There is high accuracy for the data produced in experiments carried out using the NS-2 open-source simulator, as confirmed in [7]. Therefore, in our study we use the NS-2 simulator considering its good previous record. The metrics evaluated in this work offer an indication of the protocol efficiency, and are given in the following.

  • Delay: time difference between sending a packet from the source device and receiving it at the destination.

  • Overhead: number of bits of control packets required during transmission for correctly received messages at the destination.

  • Packet Loss: total data packet loss over a period of time.

4.1 Experimental Setup

The radio equipment used in this study has characteristics similar to the Lucent Technologies’ ORINOCO driver. A modification to the radio was made to set a nominal bit-rate of 2 Mb/s, and a nominal radio range of 250 m. Although there are newer equipments currently in use, the radio used in this work is the one implemented in NS-2. A detailed description of the radio operation bands and medium access protocol are given in [8].

The simulations were carried out using File Transfer Protocol (FTP) on the TCP VegasFootnote 2 variant, and Constant Bit Rate (CBR) on UDPFootnote 3 traffic model. In the case of CBR, it was stipulated traffic rate at 4 packets/s, a value also used and justified in [1] and used in [10]. Higher rates caused an exponential increase of packet loss due the fact that the intermediate devices were unable to process and forward data packets due to the increase in the network congestion.

The propagation models are detailed with their characteristics, functionalities and mathematical formulation in the following.

4.2 Free-Space Model

The free-space propagation model is characterized by the fact that both the source and destination have complete view of each other, i.e., there are no obstacles between them and no other objects around them. The model predicts that power decreases with increasing distance between transmitter and receiver [11]. The received power \(P_r\) is given by the Friis formula as

$$\begin{aligned} P_{r}(d) = \frac{P_{t} G_{t} G_{r} \lambda ^{2}}{(4\pi )^2 d^2 L} \end{aligned}$$
(1)

in which \(P_t\) is the transmitted signal power, \(G_t\) and \(G_r\) are the antenna gains of the transmitter and the receiver, respectively, d is the distance between the antennas, L is other losses in the system,Footnote 4 and \(\lambda\) is the carrier wavelength.

In a mobile radio channel, a single direct path between the base station and a mobile node is hardly the only physical means for propagation, and hence, free-space in most cases is inaccurate when used alone [12].

4.3 Two-Ray Ground Model

The two-ray ground propagation model expands the free-space model to include a reflection component of the signal on the ground surface, i.e., it models the interference between the direct signal emitted from the transmitter to the receiver and the one reflected on the ground. As a result, the signal accuracy is greater than the free-space model at longer distances [12]. The received power \(P_r\) is the result of contributions from the direct and reflected waves, and is given as

$$\begin{aligned} P_{r}(d) = \frac{P_{t} G_{t} G_{r} h_{t}^2 h_{r}^2}{d^{4} L} \end{aligned}$$
(2)

in which \(h_t\) and \(h_r\) are the heights of the transmit and receive antennas, respectively.

With the increase in the distance, (2) shows a power loss greater than (1). However, due to the oscillation caused by the constructive and destructive combination of the two rays, the two-ray ground model does not give a good result at short distances.

4.4 Shadowing Model

As indicated in [12], environmental and infrastructural conditions are factors that influence the signal degradation in wireless communications. The shadowing propagation model is a static and non-deterministic model that assumes that there are a large number of obstacles between source and destination. The path loss is expressed, in dB, as

$$\begin{aligned} P_L(d) = -10 \beta \log \left( \frac{d}{d_{0}}\right) + G(\mu ,\sigma ^2) \end{aligned}$$
(3)

in which \(\beta\) is the path loss exponent, varying from 2 (free space environment) to 4 (urban environment) or above, G is a log-normal random variable with mean value \(\mu\) and variance \(\sigma ^2\), d is the distance between antennas, and \(d_{0}\) is a reference distance.

Propagation models such as free-space and two-ray ground are considered simpler and may be inaccurate. However, they have been largely used in many simulations of routing algorithms for MANETs. They are deterministic propagation models that do not consider the existence of obstacles between transmitter and receiver. With the shadowing propagation model, the signal level can vary in accordance to the statistical distribution selected (in this case, the log-normal distribution). Although a complete fading model should also include short term fading, here we assume, given the bandwidth specification used, that the effects short term fading are minimized and dealt with by the physical layer. Therefore, it offers results that are closer to the actual propagation environments.

5 Results and Discussions

For the figures and tables given below, the following acronyms apply:

  • TPS: total packets sent;

  • TPR: total packets received;

  • TPL: total lost packet;

  • %PD: percentage packet delivery;

  • TBR: total KBytes received;

  • TPDSR: total DSR packets trafficked;

  • TPCTR: total control packets trafficked;

  • WoM: without node movement;

  • WM: with node movement;

For all simulations, we assume the following conditions:

  1. 1.

    All nodes have same isotropic and omnidirectional antenna.

  2. 2.

    All nodes have the same radio equipment and configuration.

For all simulations performed in this work, unless otherwise stated, the parameters in Table 1 are considered. In addition, for simulation using the shadowing fading model, the following applies:

  1. 1.

    The reference distance \(d_0\) in (3) is set to 1 m.

  2. 2.

    Results presented are the average of thirty independent simulations, each with different statistical seed.

Table 1 Simulation parameters for all simulations

5.1 Experiment I

In this experiment, 50 devices were randomly positioned in an 1000 × 1000 m area, with ten devices originating traffic addressed to a single destination, i.e., the drain of the network. Network nodes were set to move in a constant speed of 20 km/h at random directions. In order to limit NS-2 log files, the maximum simulation time was set to 300 s. Devices started moving for about 30 s until they stopped at a random selected point.Footnote 5 This is repeated again at every 30 s until the end of the simulation. For experiments using shadowing propagation model, thirty different RNG Seeds were used to produce the average results presented. Table 2 details the parameters used in the simulation environment.

In addition, the following assumptions are made:

  1. 1.

    Considering the scenarios with movement of nodes, all of them move independently of others.

  2. 2.

    Considering the nodes initial position, the average distance between a node and its 7 closest neighbors is 305 m.

Table 2 Simulation parameters for experimental II

A summary of results considering channel with shadowing is given in Tables 3 and 4. Interestingly, the results show higher percentage of packet delivery when nodes are moving, with this percentage above 95%, for both transport protocols and fading parameters values.

Table 3 Results of TCP simulations with shadowing
Table 4 Results of UDP simulations with shadowing

Considering the average delay, simulations indicate that the two-ray ground model outperforms free-space and shadowing, as shown in Fig. 1, compared to Figs. 2, 3 and 4. This difference occurs due to smaller interference seen in the two-ray model. Node movement has small influence in the results obtained with free-space and two-ray channel models. For shadowing, simulation results for scenarios using \(\{\beta , \sigma \} =\) {2, 5 dB}, and {3, 7 dB} are somewhat similar, as shown in Figs. 3 and 4, but with lower delays seen for the more severe fading conditions.

Fig. 1
figure 1

Delay in two-ray ground propagation model

Fig. 2
figure 2

Delay in free-space propagation model

Fig. 3
figure 3

Delay in shadowing propagation model with \(\beta =2\) and \(\sigma =5\) dB

Fig. 4
figure 4

Delay in shadowing propagation model with \(\beta =3\) and \(\sigma =7\) dB

In general, two-ray ground model offers better results for the metrics evaluated here when compared to the other propagation models. For instance, Fig. 5 shows simulations results for the overhead with two-ray ground model, noticing that higher overhead is expected for TCP transmissions because of its greater use of control packets. For free-space and shadowing models, the observed overhead is higher, as can be seen in Figs. 6, 7 and 8. In these figures, UDP and TCP transmissions produces similar results for free-space and shadowing propagation models. It is due the fact that in the free-space propagation model, attenuation in closer to the square of the distance. However, attenuation in two-ray ground is proportional to the fourth power of the distance. The reasons for this results are better explained in Experimental II.

Fig. 5
figure 5

Overhead in two-ray ground propagation model

Fig. 6
figure 6

Overhead in free-space propagation model

Fig. 7
figure 7

Overhead in shadowing model with \(\beta =2\) and \(\sigma =5\) dB

Fig. 8
figure 8

Overhead in shadowing model with \(\beta =3\) and \(\sigma =7\) dB

Due to lower signal attenuation in free-space environments when compared to two-ray ground environments, higher number of packet collisions and channel interference occurs. Therefore, a larger amount of MAC and DSR packet transmissions is observed in the mentioned figures, mainly in TCP transmissions. Table 5 shows the total packet transmissions of the MAC and DSR protocols during the simulations in environments characterized by the free-space and two-ray ground models. It is noticeable the larger number of transmissions of these packets occurs in the free-space model. This is due to the lower attenuation of the signal in this model, causing greater number of collisions and with this, greater need to resend these packets. As previously discussed, experiments to exemplify the effects of lower attenuation of the free-space model and a possible solution to this problem are elucidated in Experiment II.

Table 5 Results of TCP simulations with free-space and two-ray ground model
Fig. 9
figure 9

Packet loss in shadowing model with \(\beta =2\) and \(\sigma =5\) dB

Fig. 10
figure 10

Packet loss in shadowing model with \(\beta =3\) and \(\sigma =7\) dB

Figures 9 and 10 show the packet loss for the shadowing propagation model using \(\{\beta , \sigma \} =\) {2, 5 dB}, and {3, 7 dB}, respectively. Figures for TCP traffic are similar for all models considered. Also, for shadowing model, it is noticeable that, regardless of the transport protocol, packet loss is higher with higher values of \(\beta\) and \(\sigma\), due to more hostile propagation environment, also highlighted in Tables 3 and 4, that summarize the results of both simulations. Finally, for shadowing model, it can be observed the good performance of the algorithm’s route maintenance mechanism even when the nodes are moving, with better packet delivery percentage.

The following experiment explore why the two-ray ground model shows better delay results when compared to the other propagation models.

5.2 Experiment II

Results obtained in Experiment II, especially with free-space and two-ray ground models, indicate a large delay difference for these propagation models. This is due to the different signal attenuation with distance from the transmitting antenna expected from these models. In the free-space model, the signal attenuation occurs proportionally to the square of the distance, whereas in the two-ray ground model the signal decays proportionally to the fourth power of the distance. Therefore, the two-ray ground model causes less interference in the channel because its attenuation is greater in comparison to the free-space model. An example of this can be seen in Figs. 1 and 2, which highlights the smaller delay in simulations with two-ray ground model.

A possible solution to the interference problem caused by lower attenuation in some propagation models is to transmit packets with only the minimum power required to reach the desired destination. For this, adjustments in the radio’s transmission power may be performed depending on the distance between transmitter and receiver.

In this experiment, we assume the following:

  • The distance between transmitter and receiver nodes is 360 metros.

  • All nodes have the same radio configuration, carrier sense and reception range.

  • The antenna gain is set in 1.5 dB.

In this scenario, node 1 intends to send packets to nodes 2, and node 3 intends to send packets to node 4. Using the original configuration of the radio (transmit power at 24 dBm), node 1 causes greater interference in the channel because its radio signal reaches all other devices. However, by reducing the radio power to 15 dBm, which is the minimum necessary to reach the desired destination, it reduces the interference in the network and allows for parallel transmissions to occur.

Table 6 Results for transmissions with different radio power
Fig. 11
figure 11

Delay in free-space model at different transmission powers

Table 6 shows the results of transmissions for which different radio power settings were used, highlighting the good packet delivery percentage and the same results in the free-space model for both simulated power, 16 dBm to 24 dBm. However, in the simulation where the radio power was adjusted to 24 dBm, it is noticeable the greater amount of control packets (RTS, CTS, ARP) needed to transmit data, resulting in longer wait compared to simulations where the radio was set to 15 dBm. These results can also be seen in Fig. 11, highlighting the smaller delay in the free-space model when radio power was set at 15 dBm. However, lower is the percentage of packet delivery.

6 Conclusion

In the current work, performance of the DSR algorithm for ad hoc networks is presented. We observe that the algorithm has low delay and overhead for both two-ray ground and free-space propagation model. An important reason for this is the fact that DSR operates fully on demand. However, for a good operation of the algorithm, adjustments in the antenna gain or radio power might be necessary in order to minimize interference. In fact, the successful operation of the network might be based on the careful selection of the radio power level. The interference level influences significantly the performance figures, and if one wishes to optimize the network operation this might be a very good parameter to start. The nodes localization and the effects of signal fading are not considered by DSR when establishing routes. Therefore, the greater the distance between nodes, lower is the probability of receiving messages, and when these nodes are part of routes, these routes tend to break up more easily.

In our simulations, we found that shadowing propagation model has good results in mild fading environments. However, such scenarios may not accurately represent urban environments. Therefore, when performing the simulations in more severe fading environments, with buildings and other constructions, the shadowing propagation model shows low packet delivery and high overhead results. In this propagation environment, the route management of DSR may not work correctly because often RERR messages (link breakage) may not reach the source device and, in such case, it continues sending packets to a broken link.

During the whole test, two-ray ground and free-space propagation models, with the static and moving nodes, obtained very close results for overhead and percentage of packets delivered. In our results, it is clear that the better performance of the algorithm with regards to the percentage of packet delivery and other metrics is seen when TCP is used.

In an ad hoc network, devices typically have a limited battery life, so DSR is a good choice as a routing protocol because it is an algorithm designed to work on demand by discovering routes only when needed, and at the same time preserving the battery power. For future work, we would place our efforts to obtain better results for the shadowing propagation model by incorporating some additional optimization, and perform experiments by adjusting radio power to send packets directly to the destination.