# Exercises - Mininet-wifi These exercises are based on the book: *Wireless Network Emulation with Mininet-WiFi*. available here: https://mininet-wifi.github.io/book/ and a 100% open source version here: https://github.com/ramonfontes/mn-wifi-ebook/blob/main/toc.md The steps to be followed in each one of the parts are contained in the sections of the book. :::danger **MUST DO:** Before starting any of the exercises, execute the following commands: ```bash $ cd cpqd-tutorials/02-mininet-wifi/mininet-wifi $ git checkout HEAD $ sudo make install ``` The commands above will set and install the mininet-wifi to the version existent in the book, so the exercises will be executed correctly. ::: :::warning Remember: The mininet-wifi folder is located at: `~/cpqd-tutorials/02-mininet-wifi/mininet-wifi` ::: :::danger Between activities, use the command `sudo mn -c` for a clean exit of the Mininet-WiFi emulator before starting the next activity. ::: ## First steps with Mininet-wifi After following the steps of Section [**2.1.First Steps to use Mininet-WiFi**](https://github.com/ramonfontes/mn-wifi-ebook/blob/main/beginner.md#first-steps-to-use-mininet-wifi) (Primeiros passos com Mininet-WiFi): :::danger After each execution of the command ping, What is the delay observed between sta1 and sta2? Was there any packet loss in the channel? Justify your answers objectively. Use the command `iperf` to evaluate the throughput (Mbps) between sta1 and sta2. ::: ## Accessing nodes information After following the steps of Section [**2.3.Acessing Node Information**](https://github.com/ramonfontes/mn-wifi-ebook/blob/main/beginner.md#accessing-node-information) (Acessando informação dos nós): :::danger Comment on each one of the informations specified by the sta1 parameters list. ::: ## Visualizing 2D and 3D graphics After following the steps of Section [**2.5.3.Visualizing 2D and 3D graphics**](https://github.com/ramonfontes/mn-wifi-ebook/blob/main/beginner.md#viewing-2d-and-3d-graphics) (Visualizando gráficos 2D e 3D): :::danger Access the script mininet-wifi/examples/position.py and change the net.plotGraph function according to the steps in section 2.5.3. Plot the recommended 3 graphics. ::: ## Traffic Analysis After following the steps of Section [**3.2.Traffic analysis**](https://github.com/ramonfontes/mn-wifi-ebook/blob/main/intermediate.md#traffic-analysis) (Análise de tráfego): :::danger Compare the packet captures between an Ethernet link (802.3) and wireless (802.11). Explain the difference among the number of MAC addresses in each one of them, and their role in the link layer of LANs. ::: ## Propagation Models Follow the steps of Section [**2.7.Propagation models**](https://github.com/ramonfontes/mn-wifi-ebook/blob/main/beginner.md#propagation-model) (Modelos de propagação), **skipping** Section *2.7.1*. :::danger How the propagation model impacts the Received Signal Strength (RSS) perceived by stations? **TIP:** Think about Path Loss and signal attenuation ::: :::warning In this approach, the Received Signal Strength Indicator (RSSI) is calculated by software according to the chosen propagation model. If you are curious, take a look at how the propagation models are implemented in the file ~/mininet-wifi/mn_wifi/propagationModels.py. ::: ## Distance x Bandwidth/RSS Relationship After following the steps of Section [**2.10.Distance versus received signal**](https://github.com/ramonfontes/mn-wifi-ebook/blob/main/beginner.md#distance-versus-received-signal) (Relação distância versus sinal recebido): :::danger Using the file position.py, set sta2's position to ('50,45,0'). Then, gradually move sta1 away from sta2, considering a growing value of distance between them (e.g., 2, 4, 8, 16, 32, 40 meters). For each iteration, measure the throughput between sta1 and sta2. Also, collect the RSS perceived by sta1. Use the results obtained to create a table or figure that compares Throughput and Signal Level Indicator (RSSI) to distance. Feel free to use any propagation model. ::: :::warning Mininet-wifi detains a CCA Threshold (Clear Channel Assessment) that closes communication when the signal level reaches -92dBm. ::: :::danger Explain what CCA Threshold means. ::: ## (Optional) Delivering fidelity Follow the steps in Section [**2.6. Wireless network emulation**](https://github.com/ramonfontes/mn-wifi-ebook/blob/main/beginner.md#wireless-network-emulation) (Emulação do meio sem fio) and Section **2.7.** Providing more realism (Provendo mais realismo). :::danger Discuss the main advantage(s) of using wmediumd over TC (regarding wireless channel simulation). ::: ## (Optional) Openflow Protocol About Section [**3.6.Openflow Protocol**](https://github.com/ramonfontes/mn-wifi-ebook/blob/main/intermediate.md#openflow-protocol) (Protocolo Openflow), after following the steps in **3.6.1**, **3.6.2** and **3.6.3**: :::danger Execute ping among hosts h1 and h2 (as mentioned in Section 3.6.1). Explain the reasons of the delay among the first ICMP packet and the following others. How such delay could be avoided? Following the steps in Section 3.6.5: explain how nodes mobility affects/impacts the topologies based on Openflow. Propose and discuss possible approaches to circumvent such impacts. ::: ## Congratulations! Now you know a little about Mininet-wifi!