# Route Availability as a Communication Quality Metric of a Mobile Ad Hoc Network
## 4 Construction of an Evaluation Environment  
We have constructed an evaluation environment. The environment must be able to emulate transmission of video streams over a MANET and must provide means to measure network states. The configuration of the evaluation environment is shown in Figure 7. A network emulator, Scenario Emailator (2018), which runs on Linux and is from Space-Time Engineering, was used to emulate a MANET. Two USB-Ethernet converters were attached to the PC in which the emulator was implemented. A PC for sending videos and a receiver PC were connected to these converters using a wired LAN.  
Figure 6: Flowchart for calculating route availability (RA).  
Figure 7: Configuration of the evaluation environment constructed to emulate transmission of video streams over a MANET.  
Figure 8 shows the configuration of the network that connects the emulator PC, in which Scenario Emulator had been installed, and other PCs. The three Ethernet ports were connected to the sender PC, the receiver PC, and the WAN (Wide Area Network), respectively. The WAN was connected because, to use Scenario Emulator, the emulator PC needs to be connected to an external server for authentication. Each tap device, which was a virtual network interface card (NIC) created using a tap command, was bridge-connected to an Ethernet port, which was connected to either the sender PC or the receiver PC [19]. Bridge-connected NIC devices--Br1 and Br2--were connected to the emulator PC. This is how the emulator PC was connected to the sender PC and the receiver PC. The server node and the client node respectively played the roles of the sender-side node and the receiver-side node on Scenario Emulator. We set the properties of Scenario Emulator by referring to Reference [18].  
The media server used was Video LAN Client (VLC) Media Player. It played video streams using UDP (User Datagram Protocol). The quality of videos recorded in the receiver PC was evaluated. In the experiment, immediately after the sender PC started sending a video, the emulator program was launched to start the MANET simulator. Videos recorded in the receiver PC over a specified emulation time were used as evaluation videos.  
The quality metrics used were RA, average number of hops, throughput, and packet loss rate. RA and the average number of hops were obtained by having a calculation program developed in Perl read trace data produced by the emulation. The calculation program implemented the measurement and RA calculation method described in Section 3. Throughput is the number of bytes in the video packets received--which was counted by Wireshark [20]--divided by communication time. This is shown in Equation (5). Packet loss rate is \"the number of packets sent by the sender side minus the number of packets received by the receiver side\" divided by the number of packets sent by the sender. Both the number of packets received and the number of packets sent were counted by Wireshark. This is shown in Equation (6).  
\[\text{Throughput (Kbps)}=\frac{\text{Number of received packets }\times\text{ packet length }\times 8}{\text{Communication time }\times 1000} \tag{5}\]  
\[\text{Packet loss rate}=1-\frac{\text{Number of packets received by the receiver side}}{\text{Number of packets sent by the sender side}} \tag{6}\]  
Figure 8: Network configuration of the emulator. TAP: tap device.