# A New Linear Model for the Calculation of Routing Metrics in 802.11s Using ns-3 and RStudio
## 1 Introduction  
### Review  
WMNs provide low-cost and effective connectivity solutions. They have the term \"mesh\" as a foundation, which allows for communication between nodes without an access point (AP). Within WMNs, all network nodes can simultaneously be repeaters and clients, so as to cover broader regions. The architecture of a WMNN is shown in Figure 1. The simplicity of adding the new routers makes WMNs the preferred technology for the Internet of Things (IoT), intrusion detection systems, remote video surveillance, smart grids, and environmental monitoring. In many applications, WMNs are expected to support internet services to heterogeneous clients [1].  
The nodes within a WMN perform a primary function, supporting several radios. This is also known as multi-radio. Nevertheless, this feature is not visible with network clients (smartphones, laptops) nor fundamental to creating a WMN. However, it is important to remark that multiradio functionality notably improves the WMN's performance [1].  
HWPM is the default routing protocol in the IEEE 802.11s [3] draft. It works in layer 2 and has three clear-cut objectives to create a WMN. The first is concerned with node discovery and mesh establishment, the second comprises the metric calculation and route maintenance, and the last one focuses on security and synchronization [3]. Furthermore, the same draft proposes the metric calculation for \(ALM\) as follows:  
\[ALM=\frac{\left[O+\frac{Bt}{r}\right]}{(1-ef)} \tag{1}\]  
where:  
\(O\), channel access overhead, standard IEEE 802.11s;  
\(Bt\), number of bits in the test frame;  
\(R\), current bit rate in use;  
_ef_, packet error rate at current bit rate.  
Routing metrics predict the cost of the route calculated by the routing protocols. They provide quantifiable values that can be used to judge the cost or efficiency of a route [4].  
To carry out this work, two computer packages were used. The first is ns-3; this is a discrete-event network simulator for Internet systems, targeted primarily for research and educational use. ns-3 is a free, open-source software, licensed under the GNU GPLv2 license and maintained by a worldwide community [5].  
In ns-3, the implementation of different networking route protocols is developed within multiple file types, with.h files (the libraries) being the most important ones and.cc, which refer to language routines C++. Thus, the application of the IEEE 802.11s standard is characterized by many of these files, among others.  
The second computer package is RSStudio; this is a language for statistical computing and graphics. It is a GNU project which is similar to the S language and environment, which was developed at Bell Laboratories (formerly AT&T, now Lucent Technologies) by [PERSON] and colleagues. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R [6].  
R provides a wide variety of statistical (linear and nonlinear modeling, classical statistical tests, time-series analysis, classification, clustering, etc.) and graphical techniques, and is highly extensible. The S language is often the vehicle of choice for research in statistical methodology, and R provides an open-source route to participation in that activity [7].  
RSStudio is a powerful and easy way to interact with R programming, considered an integrated development environment (IDE) that provides a one-stop solution for all statistical computing and graphics. The RSStudio is a more advanced version of R that comes  
Figure 1: Multi-radio wireless mesh network [2].  
with a multi-pane window setup that provides access to all primary things on a single screen (such as source, console, environment and history, files, photos, graphs, etc.) [8].