# EmuCD: An Emulator for Content Dissemination Protocols in Vehicular Networks
## 5 EmuCD in Action
### Content Distribution Results  
We used the facilities of our emulator to test and adapt three P2P content distribution protocols for content dissemination in a VANET environment: IPFS, Sprinkler and BitTorrent. This section describes that development process, and the obtained results. IPFS was compared with Sprinkler [26], Veniam's P2P protocol being used for V2V content dissemination. Additionally BitTorrent was also evaluated, given its immense popularity as a P2P protocol. From these three, only Sprinkler was specifically developed for use in a VANET.  
In EmuCD, results can be analyzed through content distribution metrics (which are easily customizable and new ones can be added), with 3 being default: cumulative download progress (sum of bytes that each OBU has downloaded), number of OBUs that reached 100% in each instant and progress rate (average of the content's download progress across all OBUs). Next, the results of a 50 MB file being distributed through 200 nodes from 15 h to 16 h are shown in Figures 12 and 13; it can be observed that 20% of the content is distributed in the first 5 min, but the progress then slows down, as it takes 20 min for another 20% to be disseminated. After an hour, 60% of the content has been distributed across the network. As Figure 12 shows, this does not mean that every node has 60% of the content: dozens of OBUs receive everything in the first 5 min and after an hour, there may be  
Figure 11: Scenario 3: Comparison of download times of a 50 MB file dissemination in a 5 node VANET using IPFS vs. EmuCD using IPFS  
Figure 10: Scenario 2: Comparison of download times of a 50 MB file dissemination in a 5 node VANET using IPFS vs. EmuCD using IPFS.  
OBUs that have not downloaded a single byte due to constraints in the network's topology as they may be far away from the other nodes.  
The graphs previously shown can be generated in EmuCD's frontend dashboard, Figure 14, which also displays the nodes in a map and their individual download progress (by default On-Board Units (OBUs) as blue dots and Road-Side-Units (RSUs) as orange dots), presents the emulation's status and is also used to start and stop the emulation.  
Figure 12: OBUs that downloaded 100% of a 50 MB file distributed across 200 nodes from 15 h to 16 h in EmuCD running IPFS.  
Figure 13: Progress rate of a 50 MB file distributed across 200 nodes from 15 h to 16 h in EmuCD running IPFS.  
Figure 15 shows the results of running three protocols-IPFS, BitTorrent and Sprinkler-in a real VANET datatrace of Oporto for 20 min, where a 50 MB file was distributed across 200 nodes (RSUs and OBUs). The number of OBUs that reached 100% and average download progress across all OBUs, show how both IPFS and Sprinkler can distribute on average 30% of the total content to the network in 20 min, whereas BitTorrent was poorly suited to the high-mobility characteristic of a VANET, as demonstrated by the 5% average progress rate.  
These results show how EmuCD can be very fruitful to the evaluation of content dissemination protocols: it was able to run a large number of vehicles, the emulated results were very similar to the real ones, and it enabled a comparison between different protocols with a low programming overhead.  
Figure 14: Frontend of the network emulator running a scenario with 200 nodes in Oporto.