ISO/OSI Layers in MANets.
What does make routing and communication in Ad Hoc Networks different from routing and communication in usual LANs, WANs etc.? The main peculiarities are the absence of wires, routers and any predefined infrastructure. The nodes communicate with each other over the air and this is a very unreliable medium. Because of reflection, diffraction, diffusion and other signal propogation properties the data exchanging by nodes is frequently lost. Besides the connections between nodes can break because the nodes move and this changes then the topology of the network.
Taking into consideration all these facts, it’s obvious that the standard approaches applicable to the usual networks with pre-existing infrastructure aren’t suitable in general for the ad hoc networks. In following I’d like to tell a couple of words to ISO/OSI layers and explain briefly how they are realized in ad hoc networks.
Data Link Layer.
In Ethernet the Carrier Sense Multiple Access Collision Detection (CSMA/CD) is mostly used as the Medium Access Control Protocol. This protocol does not work well in ad hoc network. So imagine there is a node A that wants to send a packet to the other node B. A has to be sure that no other neighbour is sending at the moment to avoid collisions. If medium is already in use, A has to wait. The main lack of this approach is so called Hidden Terminal Problem.
The picture depicts it. The node C is hidden from the node A. If C is already sending and A wants to send, it can’t find any sending nodes nearby, so it starts sending too. It leads to a collisions at the node B.
That’s why IEEE 802.11 offers the alternative MAC protocol that partly solves this problem. If the node A wants to send some packet to the node B and the medium is free, A sends first of all a short RTS (ready to send) signal. All the neighbours of A know then that A is going to send. When B recieves RTS it sends CTS (clear to send) signal, and thus all the neihbours of B know that B is going to recieve. After the transmition B sends an ACK and it releases the medium for the neighbours.
Network Layer.
The most important and interesting question is how one node finds a multi-hop path to the other node. Routing protocols for mobile ad hoc networks are devided into three large classes proactive, reactive and hybrid routing protocols. Reactive protocols are designed for the ad hoc networks with high dynamics, where the network topology changes frequently. Each time when one node sends a packet to the other node, the routing path is built up again. Proactive protocols use a kind of routing tables. It is assumed that the routes change not so often and they can be saved for a while in a table. The tables are then changed by the nodes. And at last Hybrid protocols use both of these technics. The list of most popular algorithms can be found for example in Wikipedia.
Transport Layer.
In most ad hoc networks various realizations of TCP are used as the transport protocol. All the realizations like TCP Reno, TCP New-Reno differ from each other by algorithms that set the congestion window. The “normal” TCP doesn’t work well in ad hoc networks because the packets are frequently lost being propagating over the air. “Normal” TCP has to be adopted to these conditions.
Application Layer.
Unlike the Application Layer in common networks, application layer in mobile ad hoc networks can’t be completely isolated from the network layer. The developing applications have to be aware of the dynamics of the network and depending on the frequency of the topology changes apply for example the appropriate routing protocol.

By the way, what is the difference for Application layer to use usual network or ad hoc network? Does it need take some special care about connection lost and something like this?
author: Ilya | July 16th, 2007 at 10:04 amIn general there is no difference. For the application layer there are also only two connection states: connected and disconnected. But in some cases the application layer has to take care about the underlying layers. For example think of relay networks and the classical p2p applications like BitTorrent etc. If a node A is connected with the node B at the application layer, it’s only one hop. But at the network layer there may be more hops between. So the shortest way between two nodes at the application layer is not always the shortest was at the network layer. In usual networks where the bandwidth plays no significant role that’s not a problem. But in ad hoc networks it may be critical. So designing relay networks for ad hoc networks one should take into consideration the network topology at the application layer too.
author: Ilya G. | July 17th, 2007 at 3:00 pmImo, this sounds a bit strange. I mean, it looks logicaly to make decisions about network topology on the network level, but not in the application level. May be there is not enough information about topology on the Network level (and that is why Application level is involved into routing)?
author: Ilya | July 18th, 2007 at 3:05 pmSorry for my delayed answer. Notwithstanding it sounds weird, it makes sense. The task of the network layer is to propagate the information from one node to the other one. So, if the application layer says: hey, please deliver the information to a node A, the network layer obeys and finds out an optimal way depending on the current network topology. But, a relay network is a network above the network layer. So there exist nodes A, B, C, D etc. at the application layer, let’s call them virtual nodes and there exist nodes at the network layer A’, B’, C’, D’ etc. let’s call them physical nodes. So now, let’s imagine that A sends something to C via B: A -> B -> C. When application layer at A sends an information unit to B, the network layer does not know, that this unit will go further to C, it’s only responsible for delivering the information unit from A to B! The decision to forward the information to C is made at the Application Layer!
author: Ilya G. | August 5th, 2007 at 3:25 pm