## 4 Ad Hoc Routing: Configuration, Scenarios, and Results
### Scenarios and Results
#### 4.2.3 Scenario 3: Forwarding through Multiple Intermediate Hops  
Now if we increase the distance between the two endpoints--that is, the server and user--there will be more hops in between, and the travel time for a packet will increase. Figure 10 shows such a scenario where the packet takes four hops in \(57.5\) milliseconds to reach the destination. It can also be noticed that some of the nodes are at a greater distance from each other, thus requiring a longer time for packets to travel, for instance, \(34.5\) milliseconds, while others might be closer and take less time for a packet to travel, such as only \(3\) milliseconds, as shown in Figure 10 with the purple boxes.  
BATMAN-ADV is an intelligent protocol that has link quality awareness. When confronted with the situation of more than one route to the destination, it will automatically pick the one with the best link strength and least travel time. One such scenario is presented in Figure 11. Although there is a one-hop route towards the server (through a node with MAC Address \((40:9b:cd:00:5a:5a)\), the link quality of the said path is almost non-existent. Hence, the BATMAN-ADV protocol will take four hops to reach the destination in order to make sure that the message is properly delivered in its entirety.  
Figure 8: One hop through the intermediate \((40:9b:cd:00:5a:85)\) node.  
Figure 10: Four-hop scenario, three intermediate nodes.  
Figure 9: Total travel time for the packet is the sum of both the hops.  
We tested the delivery of packets from a certain client to the server, through multiple hops. However, one should be aware that the TCP communication is bi-directional--not only can multiple users send messages to the server, but the server can also reply to any user via a message in the opposite direction of propagation, as shown in Figure 12, where a packet from the server takes three hops to reach the end-user.  
It should also be noted that, since the entire communication chain is dynamic, the travel time for packets from any particular node to reach any other is constantly changing. As can be seen in Figure 13, the packet sent to a node (\(40:9b:cd:00:5a:50\)) took 2.33 and 2.72 milliseconds for its two consecutive hops, respectively. When another packet was sent from the same node to the same destination, it took less time for the first hop (1.5 milliseconds) and more time for the second hop (3.76 milliseconds), indicating the mobility of its users.  
One limitation of the \"$sudo batctl originators\" command, as shown in Figure 14, is that it only shows the next hop toward any direction of propagation--although there are five different users in the vicinity, the next hop for any one of those five routes is the same. However, in order to view the end-to-end path, the \"$sudo batctl tr\" command can be used with the MAC address of the destination.  
Figure 11: One-hop link quality is merely 2 out of 255, max.  
Figure 12: Trace route at Server for a node with MAC Address \(40:9b:cd:00:5a:50\).  
Figure 13: The dynamic nature of mobile users, indicated through the “batctl” traceroute.  
Lastly, it is worth noting that BATMAN-ADV is a highly dynamic protocol which continuously monitors the environment and keeps itself updated. Therefore, communication is realistic, and ensures the best possible quality at any given time. As shown in Figure 15, each time we ran the \"$sudo batcht o\" command, it assessed the quality of each available path in the network and updated the relevant values. For example, a path which had a low link-quality of 86 in the first run had a link strength of 113 the next time we ran the same command (highlighted in red). Similarly, another path with a link quality of 174 had an even greater link strength of 219 the second time round (highlighted in purple).