Comparative Analysis of Infrastructure and Ad-Hoc Wireless Networks

. The paper introduces the difference between infrastructure and ad hoc mode in the 802.11 Wi-Fi framework. We evaluate and compare the performance of ad hoc versus infrastructure through a series of experiments. We evaluate the performance depending of the mobility of the nodes and range of the area covered by the nodes.

2 Ad hoc and Infrastructure Wireless Networks

Ad hoc Wireless Networks
There is no access point in ad hoc network. Nodes are within range of each other they can communicate directly with no access point. [1] Moreover, Nodes organize themselves into a network and route among themselves. Each node participates in routing by forwarding data for other nodes. [2] In the Windows operating system, ad-hoc is a communication mode (setting) that allows computers to directly communicate with each other without a router. [3]

Infrastructure Wireless Networks
In infrastructure mode (STA-AP), all communication needs to go through the access point (AP), and access point plays key role in connecting wireless devices (Stations) to wired network.
Let's take two laptops positioned next to each other as an example. They can be connected to the same wireless network, but they are not directly communicating with each other. What happens is, one device sends packets to the access point and the packets are sent to the other laptop. To connect all the devices, you'd need an infrastructure mode network with a central access point. [4] 3 NS-3 Introduction

NS-3
Network Simulator 3(NS-3) is free software, licensed under the GNU GPLv2 license, and is publicly available for research, development, and use.
[5]NS-3 is modular design network simulator can be connected to a real network. It has logging facility for debugging and tracing for getting output. Most of the users focus on wireless simulation includes models for Wi-Fi and routing protocols such as AODV and OLSR. NS-3 is split over number of modules having one or more models for real network device and protocols. [6] The first is to download and build an official release from the main web site. After we finished downloading and building ns-3, we wrote some scripts that will create a WiFi link between the nodes and generate traffic between the nodes.

FlowMonitor
FlowMonitor is a network monitoring framework for the NS-3 which can be easily used to collect and store network performance data from a NS-3 simulation instead of WireShark. FlowMonitor can automatically detect all flows passing through network. NS-3 provides We mainly focused on the packets server node received in the same period of time when the same application was installed on the client node.

3 nodes topology
There are 3 nodes topology which is equilateral triangle.
Each node will be installed ad hoc mode and infrastructure mode. Application is OnOff using OnOffHelper. Generate traffic from n0 to n2, as follows. We can see from the figure 2 that ad hoc mode is better within a certain distance. STA-AP mode is better beyond a certain distance. Since STA-AP mode is better beyond a certain distance , if we try to add routing on the nodes in ad hoc mode , we can find ad hoc mode is better than STA-AP mode after adding AODV routing protocol.STA-AP mode is better than ad hoc mode after adding OLSR routing protocol.

5 nodes topology
We will simulate topology like figure3 in different simulator.Each node will be installed ad hoc protocol or STA-AP Protocol.The nodes will be installed routing protocol when they are in ad hoc mode.Generate traffic flow1 from n0 to n2.Generate traffic flow2 from n3 to n4 We can draw conclusions from experiment that no matter AP node is static or moving, the number of packets received in ad hoc mode is always two times that of STA-AP mode. Ad hoc mode is better than STA-AP mode because STA-AP mode transfers a packet two times as long as ad hoc mode.

Conclusion
Ad hoc mode is better within a certain distance. STA-AP mode is better beyond a certain distance. After adding routing in ad hoc mode, which is better depends on routing protocol. Ad hoc mode is better than STA-AP mode because STA-AP mode transfers a packet two times as long as ad hoc mode.
In addition, ad hoc networks are very fast. Throughput rate is twice as fast as STA-AP networks. But limited wireless transmission range is the fact. By comparison, infrastructure networks can connect to a wired network and extend your wireless network's range. In the future, we will explore more complicated scenarios to get better Onoff ad hoc Sta-AP Packets/s