Download Section 1 - Sharada Vikas Trust

Document related concepts

Policies promoting wireless broadband in the United States wikipedia , lookup

Asynchronous Transfer Mode wikipedia , lookup

Wireless USB wikipedia , lookup

Airborne Networking wikipedia , lookup

Network tap wikipedia , lookup

Computer network wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Wake-on-LAN wikipedia , lookup

IEEE 802.11 wikipedia , lookup

TCP congestion control wikipedia , lookup

Deep packet inspection wikipedia , lookup

Wireless security wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Internet protocol suite wikipedia , lookup

Cellular network wikipedia , lookup

IEEE 1355 wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

UniPro protocol stack wikipedia , lookup

Transcript
Mobile Computing
zz
MOBILE
COMMUNICATION
(STUDY MATERIAL)
1
Mobile Computing
Contents
Serial
Number
1.
Topic
Subtopics
Introduction
2.
Protocol TCP and IP Suite
1.0 Introduction
1.1 Application
1.2 History of Wireless Communication
1.3 A simplified reference model
1.4 Cellular Systems
2.1 The need for Protocol Architecture
2.2 The TCP/IP Protocol Architecture
2.3 Internetworking
2.4 Internet Protocol (IP)
2.5 Transmission Control Protocol (TCP)
2.6 User Datagram Protocol (UDP)
3.
Medium Access Control
4.
Wireless LAN
5.
Bluetooth
3.0 Introduction to MAC
3.1 Motivation for a specialized MAC
3.2 Hidden and Exposed Terminals
3.3 Near and Far Terminals
3.4 SDMA, FDMA, TDMA and CDMA
3.5 Classical Aloha
3.6 Slotted Aloha
3.7 Types of Carrier Sense Multiple Access
3.8 MACA
3.8.1 Solution of MACA
3.8.2 Concept of Polling
3.8.3 ISMA
3.9 Comparison of S/T/F and CDMA
4.1 Introduction
4.2Goals,Advantages & Disadvantages
4.3Infrared Versus Radio Transmission
4.4. Infrastructure of Adhoc Networks
4.5 IEEE 802
4.5.1Architecture of IEEE 802.11 and Adhoc
Wireless LAN’s
4.6 Protocol Architecture
4.7 MAC Management
5.1 Bluetooth Introduction
5.2 Bluetooth Applications
5.3 Architecture
5.4 Concepts of Networking and Bluetooth
5.5 Piconet
5.6 Bluetooth Scartternet
5.7 Protocol Stack
5.8 Core Protocols of Bluetooth
5.9 L2CAP
5.10 Bluetooth Security
5.11 Power Management
2
Mobile Computing
6.
Mobile Transport Layer
6.1 Introduction
6.2 Differences of UDP and TCP
6.3 Traditional TCP
6.3.1 Congestion Control
6.3.2 Slow Start
6.3.3 Fast Retransmit and Fast Recovery
6.3.4 Implications on Mobility
6.4 Classical TCP Improvement
6.5 Indirect TCP(I-TCP)
6.5.1 Advantages of I-TCP
6.5.2 Disadvantages of I-TCP
6.5.3 Snooping TCP
7.
Mobile Network Layer
7.1 Introduction to Mobile IP
7.2 Entities and Terminologies
7.3 IP Packet Delivery
7.4 Agent Discovery
7.5 Agent Solicitation
7.6 Registration
3
Mobile Computing
Chapter 1
Introduction
1.0 Introduction
There would not be any accurate prediction for how computers and the networks will be in future.
Definitely it would be more and more wireless and mobile. In today’s world many devices are wireless
and mobile for instance cameras, mobile phones, CD-players, headsets, keyboards etc.At this juncture
we need to know many jargons of this mobile world.
1.
User Mobility
This refers to user who has access to the same or similar telecommunication services at different
places. i.e., the user may be mobile or moving and the services will follow him or her.
2.
Device Portability
Here the communication device moves (may be with or without a user).Typical example is our mobile
phone system, where the system itself hands the device from one base station (also called as Radio
Transmitter) to the other if the signal becomes too weak.
The Mobile Communication here uses user mobility and the device portability at the same time, with
this regard to the device, the term wireless is used. In case of wireless the communication is not by
wire and is replaced by the transmission of electromagnetic waves through the air.
Any communication system can be broadly classified into the following 4 characteristics:
1.
Fixed and Wired
This is our typical desktop at home, office or college. It is the weight and power consumption of
these desktop which makes them immobile. These devices use fixed networks.
2.
Mobile and Wired
Many of today’s laptop fall into this category and users carry the laptop from one hotel to the
other, reconnecting to the company’s network via the telephone network and a modem.
3.
Fixed and Wireless
In the historical buildings and at trade shows they use fixed & wireless category of communication
system to avoid damages to the building due to the installation of wires.
4.
Mobile and Wireless
This is the most interesting case; no cable restricts the user, who can roam between different
wireless networks.
1.1 Applications
Many applications can benefit from wireless networks and mobile communication. Some of them are
listed below:
1. Vehicles(Road Traffic)
Today’s cars already have many technologies but future cars will have wireless communication
systems and mobility aware applications. Music, news, road conditions, weather reports and
other broadcast information are received via the digital audio broadcasting (DAB) with 1.5 Mbs
4
Mobile Computing
For personal communication a universal mobile telecommunication system (UMTS) phone may
be available for voice and data connectivity with 348kbps.For remote areas, satellite
communication can be used while the current position of the car is determined via the
global positioning system (GPS). Cars driving in the same area build a local ad-hoc network for
the fast exchange of information in emergency situation or help each other keep a safe distance.
Many cars already have this technology, in future we may have cars which slows down even
before the driver recognizes the accident.
2. Emergencies
If we have a high quality wireless system in the ambulance which give the vital information
about the injured person’s situation and the necessary arrangements can be done in the
hospital before the patient /victim arrives. Wireless networks are the only means of
communication in case of the natural disaster. In worst-case only decentralized wireless
ad-hoc network services.
3. Business
A salesman job in today’s world needs lot of traveling .He may need instant access to the company’s
database for a presentation, for this he always carriers a laptop which would be his mobile office, but
there must be efficient and powerful synchronization mechanisms are needed to ensure data
consistency.
4. Replacement of wired networks
In some cases, wireless networks can also be used to replace wired networks like remote sensors, for
tradeshows or in historic buildings. For weather forecasts it could use satellite connections
Tradeshows needs a highly dynamic infrastructure for the old historical buildings they use wireless
access points in corners of the rooms.
5. Information and more
When you are traveling you can have a travel guide about the place either in your Laptop or a CD
or a DVD got via the internet at home; but the wireless network can provide you up-to-date
information about the appropriate location via the GPS or by contacting a local base station. Another
growing field of wireless network applications lies in entertainment and games.
6. Location dependent services
Many research efforts in mobile computing and wireless networks try to hide the fact that the
network access has been changed (e.g. from mobile phones to WLAN or between different
access points) or that a wireless link is more error prone than a wired one.
Mobile and Wireless Devices
The following list gives some examples of mobile and wireless devices graded by increasing
performance.
Sensor:
A sensor transmitting state information represents a very simple wireless device.
E.g.: Switch sensing the office door.
5
Mobile Computing
Embedded Controllers:
Many appliances have a simple or sometimes more complex controller. Keyboards, mice, headsets
coffee machines, hair dryers are some examples. Why not have the hair dryer as a simple mobile and
wireless device that is able to communicate with the mobile phone?
Pager
As a very simple receiver, a pager can only display short text message, has a tiny display and cannot
send any messages; where as the mobile’s SMS has replaced pagers. Still pages may be useful where it
may be necessary to page a large number if users reliably within short time.
Mobile Phones
Traditional mobile phones have only simple black and white text display which send and receive voice
and short text messages .Today mobile phones has graphic color display ,touch screen and internet
browser.
Personal Digital Assistant (PDA)
PDA’s typically accompany a user and offer simple version of office software like calendar, notepad
and software packages like web browser and input device like a pen. It has inbuilt character
recognition translating handwriting into characters.
Pocket Computer
A pocket computer with tiny keyboards, color displays and the simple programs like text-processing,
spreadsheets on the desktop.
Notebook /Laptop
Laptops more or less have the same performance as a standard desktop but technically its size &
weight are less or small, it runs on a battery. If operated via sensitive display like touch screen then
device is known as notepads or tablet PC’s.
1.2 History of Wireless Communication
The use of light for wireless communication has roots in the ancient times. We will view the different
stages in the history of the wireless communication as several landmarks as described below:
Landmark 1:
Formerly ,”mirrors” were used to create on/off in the light pattern, similarly flags were used to signal
code words.
Use of light and flags for wireless communication remained important for the navy until radio
transmission was introduced; this system is followed even today by many sailors if all other means of
wireless communication fail.
Landmark 2:
By the end of 18th Century Claude Chappe invented the optical telegraph; as a result the long distance
wireless communication was possible with technical means.
Landmark 3:
Alexander Graham Bell (1876) invented and marketed the wired communication system by the name
“telephone” .The first commercial telegraph line was between Washington and Baltimore in 1843.
Philip Reis (1843-1847) discovered the telephone principle in 1861.
The first regular public voice and video service i.e., our multimedia was already available in 1986
between Berlin & Leipzig.
Generally all optical transmission system suffers from the obstacle of shadows, rain and fog which
make communication almost impossible. But today by means of the laser all these are overcome.
6
Mobile Computing
Landmark 4:
The wireless communication era started by the efforts of Guglielmo Marconi (1874 -1937).
He gave the first demonstration of wireless telegraphy in 1895 using long wave transmission with very
high transmission power. The first transatlantic transmission followed in 1901.
Landmark 5:
Then the first radio broadcast took place in 1906 when Reginald A. Fessenden (1866 – 1932)
transmitted voice and music for Christmas.
Landmark 6:
The first commercial radio station started in 1920 (KDKA from Pittsburgh). Here the sender and
receiver need huge antennas and high transmission power.
Landmark 7:
One of the first “mobile” transmitters was on board by Zeppelin in 1911.
Landmark 8:
On big slip forward in this respect was the invention of frequency modulation in 1993 by Edwin .H.
Armstrong. After the Second World War, many national and international projects in this area of
wireless communications were triggered off.
Landmark 9:
The Northern European countries of Denmark, Finland, Norway and Sweden agreed upon the Nordic
Mobile Telephone (NMT) System.
The analogue NMT uses a 450 MHz carrier and is still the only available system for mobile
communication in some very remote places.
Landmark 10:
The pan-European Mobile phone standard evolved which found a new development by the new
Groupe Speciale Mobile(GSM) which uses new spectrum of 900Mhz,allows roaming throughout
Europe, is fully digital and offers voice and data service.
In 1983, the US system advanced mobile phone system (AMPS) started working at 850 MHz.
Landmark 11:
Telephone at home went wireless with the standard CT (Cordless Telephone) in 1984.
Landmark 12:
After many years of discussion and field trials, GSM was standardized. The first version of GSM now
called GLOBAL SYSTEM for MOBILE COMMUNICATION worked at 900 MHz and uses 124 full
duplex channels, it also offers full international roaming, automatic location services, authentication,
encryption on the wireless link, efficient interoperation with ISDN systems and relatively high audio
quality.
Landmark 13:
It was soon discovered that the analog AMPS in US and the digital GSM at 900 MHz in Europe are not
sufficient for the high user densities in cities. While in the US, no new spectrum was allocated for a
new system, in Europe a new frequency band at 1800 MHz was chosen. In the Us, different
companies developed different new, more bandwidth technologies to operate side-by-side with AMPS
in the same frequency band. There was birth of 3 incompatible systems, the analog narrowband AMPS
and two digital systems TDMA and CDMA.
7
Mobile Computing
Landmark 14:
19918 marked the beginning of mobile communications using the satellite with Iridium system. The
Iridium marked the beginning of small truly portable mobile satellite telephones including data service.
Landmark 15:
1990 saw several more powerful WLAN standards. IEEE published 802.11b offering 11Mbit/s at
2.4GHz .The same spectrum is used by Bluetooth, which is a short range technology to set –up
wireless personal area networks with gross data rate less than 1Mbit/s.
The wireless application protocol (WAP) started at the same time as i-mode in Japan, while WAP did
not succeed at the beginning; i-mode became a tremendous success.
Landmark 16:
The year 2000, came with higher data rates and packet-oriented transmission for GSM. This is the year
which found lot of hype about the communication business. Most of the hype is over, but the third
generation of mobile communication started in 2001 in Japan with the FDMA service.
IEEE released a new WLAN standard 802.11a, operating at 5GHz and offering gross data rate of
54Mbit/s
Landmark 17:
In 2002 new WLAN developments followed.
1.3 A Simplified Reference Model

It uses the basic reference model, which is used to structure communication systems.

The Fig1. Shown below is a Personal Digital Assistant (PDA), which provides an example for
a wireless and portable device.

The PDA communicates with a base station in the middle of the picture. The Base station
consists of a radio transceiver (sender and receiver) and an interworking unit connecting the
wireless link with the fixed link.

The communication partner of the PDA a conventional computer on the right side of the
diagram

It also shows the protocol stack implemented in the according to the reference model.

The PDA and the computers which are the end-systems needs the full protocol stack
comprising of the Application Layer, Transport Layer , Network Layer ,Data Link and the
Physical Layer.
These two communicate with each other using the Application Layer, which takes the
services provided by the lower layer. The internetworking unit, which are intermediate system
directly in this scenario
8
Mobile Computing
PDA
Base Station
Conventional Computer
Application
Application
Transport
Transport
Network
Network
Network
Data Link
Data Link
Data Link
Physical
Physical
Physical
Network
Data Link
Physical
Radio
Fig.1.3 Personal Digital Assistant for Wireless and Portable Devices
Functions of each layer
Physical Layer




Lowest layer in a communication system
Converts a stream of bits into signals that can be transmitted on the sender side.
The physical layer of the receiver then transforms the signal back into a bit stream.
For wireless communication, the physical layer is responsible for frequency selection,
generation of the carrier frequency, signal detection.
Data Link Layer


The main tasks of this layer include accessing the medium, multiplexing of different data
streams, correction of transmission errors and synchronization.
This layer is responsible for a reliable point-to-point connection between two devices or a
point-to-multipoint connection between one sender and several receivers.
9
Mobile Computing
Network Layer
 This is responsible for routing packers through a network or establishing a connection
between two entities over many other intermediate systems.
 Important topics are addressing, routing, device location and handover between different
networks.
Transport Layer
 This layer is used in the reference model to establish an end-to-end connection.
 Topics like quality of service, flow and congestion control are relevant, especially if the
transport protocols known from the internet, TCP and UDP are to be used over a wireless link.
Application Layer
 This layer is situates on top of all transmission-oriented layers.
 Topics of interest in this context are service location, support for multimedia applications
adaptive applications that can handle the large variations in transmission characteristics and
wireless access to the World Wide Web using a portable device.
1.4 Cellular Systems
Cellular Systems for mobile communications implement SDM. Each transmitter generally called as base
station covers a certain area called as cell. Cell radii could be 10mts to 10’s of kilometers in the
countryside.
F3
F3
F2
F1
F3
F2
F1
F3
F2
F1
F3
F2
F1
F3
F2
F1
F3
F2
F3
F5
F4
F7
F2
F6
F3
F5
F4
F1
F7
F2
F6
F3
F1
F3
F5
F2
Fig. 1.4 Cellular System
10
Mobile Computing
Cells are never perfect circles or hexagons, but they depend on environment i.e., buildings, mountains,
valleys etc weather condition and sometimes even on system load.
Typical systems using this approach are mobile telecommunication systems, where a mobile station
within the cell around a base station communicates with this base station and vice versa.

To avoid interference, different transmitters within each other’s interference range use FDM. If
FDM is combined with TDM the hopping pattern has to be coordinated.

The general goal is never to use the same frequency at the same time within the interference range.
The above Fig. 2a and 2b depicts the two possible models to create cell patterns with minimal
interference .The cells are combined in clusters. The first one has three cell clusters and the second
one uses the seven cell clusters.

In real –life the transmission patterns differ and hexagon is used to illustrate the model in the
simplest way.

In this pattern we can observe that the frequency has repeated. The transmission power of a sender
has to be limited to avoid interference with the next cell using the same frequencies.

Further you could sectorized antennas to even reduce further interference

On case of traffic variation, assignment of fixed assignment of frequencies to cell cluster is not
efficient, like a cell may have heavy load whereas a neighboring cell has light load then we could
think of borrowing the frequencies. That is cells with more traffic is dynamically allotted more
frequencies and this scheme is called as Borrowing Channel Allocation (BCA) Scheme whereas
the fixed frequency is called as Fixed Channel Allocation (FCA) Scheme.

The FCA is used in the GSM system, as it is simpler to use, but needs careful traffic analysis
before installation.

We could also have DCA Dynamic Channel Allocation Scheme where the frequencies can only be
borrowed, but it is also possible to freely assign frequencies to cell. But here the danger of
interference with cells using the same frequency exists.

Cellular systems uses CDM instead of FDM as it does not need elaborate channel allocation
schemes and complex frequency planning.

Here users are separated through the code they use and not through the frequency.

CDM cells are commonly not congested and are said to “breathe”. While a cell can cover a larger
area under a light load, it shrinks if the load increases. The reason for this is the growing noise
level if more users are in a cell.

The higher the noise, the higher is the path loss and transmission errors. Finally, mobile stations
farther away from the base station drop out of the cell.
Advantages of Cellular System with small cells
1. Higher Capacity
Implementing the SDM allows frequency reuse. If one transmitter is far away from another
(outside the interference range) it can reuse the same frequency. As most mobile phone systems assign
frequencies to certain users and this frequency is blocked for other users. But frequencies are a scare
resource and the number if concurrent users per cell are very limited.
11
Mobile Computing
Huge cells do not allow more users, they limit to less possible user/km2. That is why in cities where
there are many mobile phone users, there are no huge cells but rather many small cells.
2. Robustness
The cellular systems are decentralized are thus more robust against the failure of single
components. If one antenna fails, then it affects only small area.
3. Less Transmission Power
Power is a big for mobile station than the base stations. A receiver far away from a base station
needs much more transmit power, but energy is serious problem for the mobile handheld devices.
4. Local Interference Only
The long distances between sender and the receiver results in more interference problems. With small
cells the mobile stations and the base stations have to deal with ‘local’ interference.
Disadvantages of small cells:
1.
Infrastructure needed
Cellular systems need a complex infrastructure to connect all base stations. It needs many
antennas; switches for call forwarding, location register to find a mobile station etc, which makes the
whole concept expensive.
2.
Handover needed
The mobile station has to perform a handover when changing from one cell to another. Depending
on the cell size and the speed of movements, this can happen quite often.
3.
Frequency planning
To avoid interference between transmitters using the same frequencies need to be carefully
distributed. It must be taken care that interference need to be avoided as well as only a limited number
of frequencies is available.
12
Mobile Computing
Chapter 2
PROTOCOLS AND THE TCP/IP SUITE
2.1 The need for Protocol Architecture
When two computers, terminals and /or any other data processing device exchange data the
procedure is quite complex. We know that there must be a high degree of co-operation between the two
computer systems. Instead of applying the logic for a single module, every task is broken into subtasks,
each of which is implemented separately.
In the protocol architecture, the modules are arranged in a vertical stack. Each layer in the stack
performs a related subset of the functions required to communicate with another system. It relies on the
next lower layer to perform more primitive functions and to conceal the details of those functions. Ideally,
layers should be defined so that changes in one layer do not require changes in other layer.
Communication is achieved by having the corresponding or peer layers in two systems
communicate. The peer layers communicated by means of formatted block dos data that obey a set of rules
or conventions known as a protocol.
The key features of the protocol are as follows:
Syntax: Concerns the format of the data blocks
Semantics: Includes control information for co-ordination and error handling
Timing: Include speed matching and sequencing
2.2 TCP/IP Protocol Architecture
About TCP/IP Protocol Architecture
This is the outcome of the research and development conducted on the ARPANET (an experimental
packet–switched network) funded by the Defense Advanced Research Project Agency (DARPA). It is
generally called as TCP/IP Protocol Suite. It has large collection of protocols that have been issued as
Internet Standards by the Internet Architecture Board (IAB).
TCP/IP Layers
Communication involves three agent applications, computer and networks. Examples of
application include file transfer and electronic mail. Applications are concerned with exchange of data
between two computer systems.
Computers are connected to networks and the data to be exchanged are transferred by the network from one
computer to another. Thus, the transfer of data from one applications to another involves first getting the
data to the computer in which the application resides and then getting the data to the intended application
within the computer.
The communication task is organized into 5 relatively independent layers.
1. Physical Layer
2. Network Access Layer
3. Internet Layer
4. Host-to-host or transport Layer
5. Application Layer
Physical Layer
 The physical layer covers the physical interface between a data transmission device i.e. computer,
workstation and a transmission medium or network.
 This layer is concerned with specifying the characteristics of the transmission medium the nature
of the signals, the data rate and related matters.
13
Mobile Computing
Network Access Layer
 This layer is concerned with the exchange of data between an end system(which could be a server,
workstation etc) and the network to which it is attached.
 The sending computer must provide the network with the address of the destination computers, so
that the network may route the data to the appropriate destination.
 The specific software used at this layer depends on the type of network to be used, there are
different standards for circuit switching and packet switching (x.25, Ethernet etc).
 The layers above the network access layer need not worry about the specifics of the network to be
used, the high –layer software should function properly regardless of the particular network to
which the computer is attached.
 The network access layer is concerned of routing the data from one system to other in the same
network, but if the systems are in different network, and then it is handled by the Internet layer.
Internet Layer
 In cases where two devices are attached to different networks, procedures are needed to allow data
to traverse multiple interconnected networks. This is the function of internet layer.
 It uses Internet Protocol (IP) at this layer to provide the routing function across multiple networks.
 The IP protocol is implemented in the end systems and routers.
Transport Layer
 The next concept is the reliability of the data i.e all the data arrive at the destination application in
the same order as it was sent.
 These mechanisms must be independent of the nature of application. Thus we need to collect those
mechanisms in a common layer shared by all applications and it is called host-to-host or transport
layer.
 It uses the Transmission Control Protocol (TCP) to provide this functionality.
Application Layer
 This contains the logic needed to support the various user applications.
 For each different type of application like a file transfer, a separate module is needed that is
peculiar to that application.
TCP/IP Concepts
 The fig.2.2 below indicates how these protocols are configured for communications. To
 Make clear that the total communications facility may consists of multiple networks, the
constituent networks are usually referred to as subnetworks.
 Some sort of network access protocol such as the Ethernet logic, is used to connect a computer to
a subnetwork.
 The protocol enables the host to send data across the subnetwork to another host to, in the case of
a host on another subnetwork, to a router.
 The IP is implemented in all the end systems and the routers. This helps to move block of data
from one host to another through one or more routers
 The IP need not be told the identity of the destination port, all it needs to know is that the data are
intended for host B. The TCP is implemented only in the end systems; it keeps track of the blocks
of data to assure that all are delivered reliably to the appropriate application.
 For any successful communication there must be some unique address. Actually, two levels of
addressing are needed.
 1. Global Internet Address which is a unique address each host on a subnetwork must have.
2. Ports or Service Access Point (SAP) this is an address, which each process with a host must
have and it must be unique within the host. This allows the host-to-host protocol(TCP) to
deliver data to the actual process.
14
Mobile Computing
Port or service access point (SAP)
HOST A
HOST B
App X
App X
App Y
App Y
Logical Connection
(TCP )
TCP
TCP
IP
IP
Network Access
Protocol #1
Network Access
Protocol # 2
Physical
Physical
Global
Network
Address
Logical
Connection
(e.g., virtual
circuit)
Subnetwork attachment
point address
Router J
IP
Network 1
NAP1
Physical
NAP 2
Network 2
Physical
Fig 2.2 a
Now let us consider that a process in port 1 at the host A wishes to send a message to another
process associated with the port 3 at host B.
15
Mobile Computing


The process at A hands the message down to TCP with instructions to send it to host B port 3.TCP
hands the message down to IP with instructions to send it to host B.
IP hands the message down to the network access layer with instructions to send it to router J
To control this operation, control information as well as user data must be transmitted as shown in the
figure shown below
User data
TCP
Header
IP
Header
Application byte stream
TCP Segment
IP Datagram
Network –level
packet
Network
Header
Fig .2.2 b Protocol Data Units (PDUs) in the TCP/IP Architecture
To control this operation, control information as well as user data must be transmitted as suggested in the
Fig.2.2. b above. Let us say that the sending process generates a block of data and passes this to TCP. TCP
may break this block into smaller pieces to make it more manageable.
The TCP to each of these pieces it appends the control information known as the TCP header, forming
a TCP segment. The control information is to be used by the peer TCP protocol entity at host B (like the
destination port, sequence number and the checksum)
The TCP hands each segment over to IP, with instructions to transmit it to B. These segments must be
transmitted across one or more subnetwork and relayed through one or more intermediate routers. This
also needs the use or the control information. Thus IP appends a header of control information to each
segment to form an IP datagram.
Finally, each IP datagram is presented to the network access layer for transmission across the first
subnetwork in its journey to the destination. The network access layer appends its own header,
creating a packet or frame. The packet is transmitted across the subnetwork to router J. The packet
header contains the information that the subnetwork needs to transfer the data across the subnetwork.
At router J, the packet header is stripped off and the IP header examined. On the basis of the destination
address information in the IP header, the IP module in the router directs the datagram out across
subnetwork 2 to B. To do this, the datagram is again augmented with a network access header.
When data is received at B, the reverse process occurs. At each layer , the corresponding header is
removed, and the remainder is passed on to the next higher layer, until the original user data are delivered
to the destination process.
16
Mobile Computing
As an aside, the generic name for a block of data exchanged at any protocol level is referred to as a
protocol data unit (PDU). Thus, a TCP segment is a TCP PDU.
Applications of TCP/IP Applications
The most common application are :
1. The Simple Mail Transfer Protocol (SMTP)
 This provides a basic electronic mail facility.
 It provides a mechanism for transferring messages among separate hosts.
 It has mailing lists, return receipts and forwarding.
 Once message is created SMTP accepts the message and makes use of TCP to send it to an
SMTP module on another host.
2. File Transfer Protocol (FTP)
 It is used to send files from one system to another under user command.
 It can accommodate both text and binary files
 When user wishes to engage in file transfer, FTP sets up a TCP connection to the target
system for the exchange of control messages
 The file is transferred over the data connection, without the overhead of any headers or
control information at the application level.
 When the transfer is complete, the control connection is used to signal the completion and to
accept new file transfer commands.
3.TELNET
This provides the remote logon capability, which enables a user at a terminal or PC to logon to a
remoter computer and function as if directly connected to that computer.
2.3 Internetworking (Terms in Internetworking)
Communication Network
A facility that provides a data transfer service among device attached to the network. Local Area Network
(LAN’s), Metropolitan Area Network (MAN’s) and Wide Area Network (WAN’s) are all examples of
communication networks.
LAN –Local Area Network is a communication network that interconnects a variety of devices and
provides a means of information exchange among those devices. Scope of LAN is small, typically a single
building or a cluster of buildings. Usually a LAN is owned by the same organization that owns the attached
devices.
Workstations….
Server
Fig2.3. Shared Transmission Medium
17
Mobile Computing
All devices are attached to a shared transmission medium .A transmission from any one device can be
received by all other devices attached to the same network. Today we have high speed LAN’s with a data
rate of 100Mbps to 10Gbps.
Wide Area Network (WAN)
WAN’s cover a large geographical area, may require the crossing of public rights of ways and may rely at
least in part on circuits provided by a common carrier.
Typically a WAN consists of a number of interconnected switching nodes. Traditionally, WAN’s provides
only relatively modest capacity to subscribers. For data attachment, either to a data network or to a
telephone network by means of a modem, data rates of 64,000bps or less have been common.
With the optical fiber facilities high speed WAN’s of a speed around 10’s and 100’s of Mbps have
emerged.
Metropolitan Area Network (MAN)
MAN occupies a middle ground between the LAN and WAN. MAN’s cover greater distances at higher
data rates than LAN’s although there is some overlap in geographical coverage.
Interest in MAN’s has come about as a result of recognition that the traditional point-to-point and switched
network technique used in WAN’s may be inadequate for the growing needs of organizations.
The primary markets of MAN’s are the customers who have high capacity needs in a metropolitan area.
Internet
It is a collection of communication networks interconnected by bridges and/or routers.
Intranet
An internet used by a single organization that provides the key internet applications especially the World
Wide Web. An intranet operates within the organization for internal purposes and can exist as an isolated
self-contained internet, or may have links to the internet.
End System (ES)
A device attached to one of the networks of a internet that is used to support end user applications or
services.
Intermediate System (IS)
A device used to connect two networks and permit communication between end systems attached to
different networks.
Bridge
An IS used to connect two LAN’s that use similar LAN protocols. The bridge acts as address filter, picking
up packets from one LAN that are intender for a destination on another LAN and padding those packets on.
Bridge does not modify the contents of the packets; neither adds anything to the packets. It acts at the layer
2 of the OSI model.
Router
This is an Intermediate system that is used to connect two networks that may or may not be similar. It
employs the IP protocol. It operates at layer 3 of the OSI model. Essential functions that the router must
perform include the following.
1. Provide a link between networks.
2. Provide for the routing and delivery of data between processes on end systems attached to different
networks.
3. Provide these functions in such a way as not to require modifications of the networking architecture of
any of the attached subnetworks.
Examples of Internetworking
18
Mobile Computing
This Fig 2.3 a. depicts a configuration that illustrates the interactions among protocols for internetworking.
Here the server is attached to an ATM WAN and workstation is attached to an IEEE 802 LAN and Router
is used to connect two networks.
Workstation
S
E
R
V
E
R
Router
ATM
Network
IEEE 802 LAN
Application
Application
TCP
TCP
IP
IP
IP
LLC
ATM
ATM
ATM
MAC
Physical
Physical
Physical
Physical
Fig.2.3a Internet Protocol, Transmission Control Protocol and User Datagram Protocol
2.4 Internet Protocol
Now let us look at Internet Protocol (IP) and the Transmission Control Protocol (TCP) and the User
Datagram Protocol.
The most important of the TCP/IP suite is the Internet Protocol (IP). It has two versions IPv4 and IPv6 .IPv6
has been standardized but is not yet widely deployed. The diagram below depicts the IPv 4 header format
19
Mobile Computing
0
2
0
O
C
T
E
T
S
Version
4
IHL
8
Type of Service
Identification
Time to live
16
19
Total Length
Flags
Protocol
31
Fragment Offset
Header Checksum
Source Address
Destination Address
Options + Padding
Fig.2.4a IPv4 Header
Version (4 bits)
Represents version number, it allows the evolution of protocol and the value is 4.
Internet Header Length (IHL) (4 bits)
Its length is 32 bit words and minimum value is 5
Type of Service (8 bits)
Provides guidance to end systems IP modules and to routers along the packet’s path in terms of the
priority of the packets.
Total Length (16 bits)
Depicts the total length of the IP packet
Identification (16 bits)
This is used to identify the packet uniquely. It has source address, destination address and user
protocol. It is a sequence number; thus it must be unique number.
Flags (3 bits)
Only two of the bits are currently defined. More bit and don’t fragment bit. When a packet is fragmented
that more bit indicates whether this is the last fragment in the original packet. The Don’t Fragment bit
prohibits fragmentation if set. This bit may be useful if it is known that the destination does not have the
capability to reassemble fragments.
20
Mobile Computing
Fragment Offset (13 bits)
Indicates where in the original packet this fragment belongs; this is measured in 64-bit units.(This implies
that fragments other than the last fragment must contain a data field that is a multiple of 64 bits in length.
Time to Live TTL (8 bits)
This specifies how long a packet is allowed to remain in the internet.
Protocol (8 bits)
Indicates the next higher level protocol which is to receive the data field at the destination; thus this field
identifies the type of the next header in the packet after the IP header.
Header Checksum (16 bits)
An error-detecting code applied to the header only. Because some header fields may change during transit,
this is re-verified and recomputed at each router. This field is 16 bit ones complemented addition of all 16bit words in the header. Checksum field is itself initialized to a value to zero.
Source Address (32 bits)
Coded to allow a variable allocation of bits to specify the network and the end system attached to the
specified network.
Destination Address (32 bits)
This has the same characteristics of the source address.
Options
Encodes the options requested by sending users; these may include security label, source routing, record
routing and time stamping
Padding
Used to ensure that the packet header is a multiple of 32 bits in length.;
IPV6 Header
The Internet Engineering Task Force (IETF) in 1996, which develops protocol standards for the Internet,
issued a specification for a next –generation IP, known then as IPng, this led to the development of standard
known as IPv6.
The IPv6 provides a number of functional enhancements over IPv4, it provides facility for graphics and
video.
IPv4 uses 32-bit address to specify a source and destination. With the explosive growth of the internet and
of private networks attached to the internet, this address length became insufficient to accommodate all
systems needing addresses. .IPv6 includes 128-bit source and destination addresses.
21
Mobile Computing
0
Bit:
Version
4
0
4
Traffic Class
Payload length
O
C
T
E
T
S
12
16
31
Flow Label
Next header
Hop Limit
Source Address
Destination Address
Fig 2.4b. Ipv6 Header
IP Address Formats are
The source and the destination address fields in the IP header each contain a 32-bit global internet address,
generally consisting of a network identifier and a host identifier. The address is coded to allow a variable
allocation of bits to specify network and host as shown in the diagram above.
This encoding provides flexibility in assigning addresses to hosts and allow a mix of network sizes on an
internet. The three principal network classes are best suited to the following conditions:
Class A: Few networks, each with many hosts
Class B: Medium number of networks, each with a medium number of hosts
Class C: Many networks, each with a few hosts.
Class A network addresses begin with a binary 0.Network addresses with a first octet of 0 (binary
00000000) and 127 (binary 01111111) are reserved so there are 126 potential class A network numbers.
Class B network addresses begin with a binary 10, so that the range of the first decimal numbers in a class
B is 128 to 191.
Class C addresses, the first decimal number ranges from 192 to 223.
22
Mobile Computing
0
Network
1 0
(7 bits)
Host (24 bits)
Network (14bits)
Host (16 bits)
1 1
0
1 1
1 0
1 1
1 1 0
Network (21bits)
Class A
Class B
Host (8bits)
Class C
Class D
Multicast
Future Use
Class E
2.5 Transmission Control Protocol
Most of the applications make use of TCP/IP protocol suite , the application relies on TCP to assure
reliable delivery of data; TCP in turn relies on IP to handle addressing and routing chores.
TCP Flow Control
 This is the central mechanism of TCP.
 It uses the sliding window protocol /mechanism
 The flow control mechanism used by TCP is known as a credit allocation scheme. In this scheme,
each individual octet of data that is transmitted is considered to have a sequence number.
 In addition to data each transmitted segment, the header has 3 fields related to flow control, and
they are sequence number (SN), acknowledgement number (AN) and the Window (w).
 When a transport entity sends a segment, it includes the sequence number of the first octet in the
segment data field.
 A transport entity acknowledges an incoming segment with a return segment that includes
(AN =i, w=j) with the following interpretation
1. All octets through sequence number SN=i-1 are acknowledge; the next expected octet has
sequence number “i “.
2. Permission is granted to send an additional window of W=j octets of data; that is the “j”
octets corresponding to sequence number “i” through i+j-1.
The Fig.2.5 represents the mechanism
23
Mobile Computing
For simplicity, let us consider that the data flow is only in one direction. Assuming that 200 octets of data
are sent in each segment. Initially, through the connection establishment process the sending and the
receiving sequence numbers are synchronized and A is granted an initial credit allocation of 1400 octets
beginning with the octet number 1001.
After sending 600 octets in three segments “A” has shrunk its window to a size of 800 octets. Following
receipt of these segments B acknowledges receipt of all octets through 1601 and issues a credit of 1000
octets. i.e. A can send octets 1601 through 2600.
However, by the time that B’s message has arrived at A, A has already sent two segments, containing octets
1601 through 2000.Thus A’s remaining credit at this point is only 400 octets.
As the exchange proceeds, A advances the trailing edge of its window each time that it transmits and
advances the leading edge only when it is granted credit. The edit allocation mechanism is quite flexible.
For example consider that the last message issued by B was (AN=i , W=j) and that the last octet of data
received by B was octet number i-1, then
To increase credit to am amount k (k >j) when no additional data have arrived B issues (AN = i, W = k).To
acknowledge an incoming segment containing ‘m’ octets of data (m<j> without granting additional credit,
B issues (AN = i+m, W = j-m) Please refer to the Credit Allocation Diagram
0
Bit:
4
10
16
Source Port
31
Destination Port
2
0
Sequence Number
O
C
T
E
T
S
Header Length
Checksum
Unused
Flags
Window
Urgent pointer
Options + padding
Fig.2.5 TCP HEADER
TCP uses only a single type of protocol data unit called a TCP segment.
These fields are as follows:
24
Mobile Computing
1. Source Port (16 bits): Denotes the Source TCP user
2. Destination Port (16 bits) : Denotes the Destination TCP user
3. Sequence Number (32 bits) : Sequence number of the first data octet in this segment except when the
SYN flag is set. ( If SYN is set , it is the initial sequence number (ISN) and the first data octet is ISN +1).
4. Acknowledge Number (32 bits)
A piggybacked acknowledgement. It contains the sequence number of the next data octet that the TCP
Entity expects to receive.
5. Data Offset (4 bits)
It is a number of 23-bit words in the header.
6. Reserved (6 bits): Reserved for the future use.
7. Flags (6 bits):
URG: Urgent pointer field significant
ACK: Acknowledgement field significant
PSH: Push function
RST: Reset the connection
SYN: Synchronize the sequence number
FIN: No more data from sender.
8. Window (16 bits):
Flow control credit allocation in octets. Contains the number of data octets, beginning with the one
indicated in the acknowledgement field that the sender is willing to accept.
9. Checksum (16 bits):
The ones complement of the sum modulo 216 -1 of the entire 16 –bit words in the segment plus a
pseudo header.
10. Urgent Pointer (16 bits):
Points to the last octet in a sequence of urgent data. This allows the receiver to know how much urgent
data are coming.
11. Options (variable):
An example is the option that specifies the maximum segment size that will be accepted.
2.6 User Datagram Protocol (UDP)
The User Datagram Protocol provides a connectionless service for application –level procedures.
UDP is basically an unreliable service, here the delivery and duplicate protection are not guaranteed.
However this does reduce the overhead of the protocol and may be adequate in many cases. Connectionless
service, however is more appropriate in some context. At lower layers(internet, network ) connectionless
service is more robust.
A connectionless service represents a “least common denominator” of service to be expected at higher
layers. Further, even at transport and above there is justification for a connectionless service.UDP sits on
top of IP as it is connectionless. Essentially, it adds a port addressing capability to IP
25
Mobile Computing
The UPD header is show below:
Bit :
0
16
31
8
O
C
T
E
T
S
Source Port
Segment Length
Destination Port
Checksum
Fig.2.6. UDP HEADER
Source and Destination Port: The header includes a source port and destination port . Length Field contains
the length of the entire UDP segment including header and data. Checksum is the same algorithm used for
TCP and IP.
For UDP, the checksum applies to the entire UDP segment plus a pseudoheader prefixed to the UDP header
at the time of calculation and is the same pseudoheader used for TCP. This is optional
If an error is detected, the segment is discarded an no further action is taken. If not used, then it is set to
zero.
26
Mobile Computing
Chapter 3
Medium Access Control
3.0 Introduction
The basics…..
The Protocol Architecture defined specifically for LAN and MAN address the issues for transmitting
blocks of data over the network.
Here the higher layer protocols i.e. 3 or 4 and above are independent of network architecture. Thus we need
to concentrate on the lower layers of the OSI model for discussing the LAN protocols.
The LAN protocols to the OSI architecture as specified by the IEEE 802 committee .It is generally referred
to as IEEE 802 reference model.
Diagrammatically
OSI Reference Model
Application
Presentation
Upper layer
protocol
Session
Transport
LLC
Network
Data Link
MAC
Physical
Scope of
IEEE 802
standards
Physical
Medium
Medium
(Fig.3.0)
MAC (Medium Access Control)
The MAC’s are needed in the wireless domain .It comprises of all the mechanisms that regulate user access
to a medium using the SDM, TDM, FDM or CDM.
The MAC algorithms are specifically adapted to the wireless domain.
3.1 Motivation for a specialized MAC
Can we use CSMA/CD (Carrier Sense Multiple Access with Collision Detection) which is an elaborate
MAC schemes from wired networks as specified by IEEE 802.3 networks (Ethernet).
27
Mobile Computing
What is CSMA/CD and How does it work? [Carrier Sense Multiple Access with Collision Detection.]
This is a technology for the wired network. The medium used is the wire or the coaxial cable as the
technology for the wired medium.
A sender senses the medium to see if it is free. If the medium is busy then the sender waits until it is free. It
the medium is free, and then the sender starts transmitting data and continues to listen into the medium. If
the sender detects a collision while sending, it stops at once and sends a jamming signal.
CSMA/CD fails in wireless networks why?
The CSMA/CD is not interested about the collision at the sender, but ensures no collision takes place at the
receiver side; but sender is the one detecting the collisions.
In case of wired network, if the collision occurs somewhere in the wire it is noticed by everybody, it is not
the situation in case of the wireless networks.
Here the strength of the signal unlike the wired ones decreases proportionally to the square of the distance
to the sender. The sender may now apply carrier sense and detect an idle medium, the sender starts sending
but a collision happens at the receiver due to second sender.
The same can happen to the collision detection .The sender detects no collision and transmits the data at the
receiver; but actually the collision might have destroyed the data at the receiver. Thus collision detection is
very difficult in wireless scenarios as the transmission power in the area of the transmitting antenna is
several magnitude higher than the receiving power. Thus the common MAC schemes from the wired
network fails in the wireless scenario.
3.2 Hidden and Exposed Terminals
A
B
C
Fig.3.2
Let us consider three mobile phones A,B and C
 Transmission range of A reaches B but not C, C reaches B, but not A
 B reaches both A and C
 A starts sending to B but C does not receive this transmission ,C also wants to send something to
B and senses the medium
For C medium appears to be free and carrier sense fails, then C sends but it collides at B. Now A
cannot detect collision at B and A also transmits, now A is hidden for C and vice versa. A is hidden
terminal and these hidden terminals may cause collision and unnecessary delay.
Let us consider another scenario where ‘B’ sends something to ‘A’ and ‘C’ wants to transmit data to
some other mobile phones outside the interference ranges pf A and B.
C senses the carrier and detects that the carrier is busy ; C postpones its transmission until it detects
the medium is free ; but as A is outside the interference range of C, waiting is not necessary. I.e.
collision at B does not matter because the collision is too weak to propagate to A.
28
Mobile Computing
3.3Near and Far Terminals
A
B
C
Fig.3.3
 Let us consider that A and B both sending with the same transmission power. When the signal
strength decreases proportionally to the square of the distance B’s signal drowns out A’s
signal .As a result ‘C’ cannot receive ‘A’s transmission.
 Now think of ‘C’ as being an arbiter for sending rights. In this case terminal B would already
 drown out terminal A on the physical layer.
 ‘C’ in return would have no chance of applying a fair scheme as it would only hear B.
 The near/far effect is a severe problem of the wireless network using the CDM.All signals
should arrive at the receiver with more or less the same strength.
 Otherwise a person standing closer to somebody could always loud than a person farther
away. Even if the sender were separated by code , the closest one would simply drown out the
others.
3.4 SDMA, FDMA, TDMA, CDMA
Space division multiple access (SDMA)






This is used for allocating a separate space to user in wireless network.
A typical application involves assigning an optimal base station to a mobile phone user.
The mobile phone may receive several base stations with different quality. A MAC algorithm
could now decide which base station is best, taking into account which frequencies (FDM), time
slots (TDM) or code (CDM) are still available.
SDMA typically , is not used in isolation but always in combination with one or more schemes.
The basis for the SDMA algorithm is formed by cells and sectorized antennas which constitute the
infrastructure implementing space division multiplexing.
Single users are separated in space by individual beams. This can improve the overall capacity of a
cell tremendously.
Frequency division multiple access (FDMA)
 This comprises all algorithms allocating frequencies to transmission channels according to the
frequency division multiplexing (FDM).
29
Mobile Computing

















Frequency can be fixed or dynamic
Channels can be assigned to the same frequency at all times which is called pure FEMA or change
frequencies according to a certain pattern i.e. FDMA combined with TDMA.
The second concept of changing frequencies based on some pattern is commonly used in many
wireless systems to circumvent narrowband interference at certain frequencies known as
frequency hopping.
Sender and receiver have to agree on a hopping pattern, otherwise the receiver could not tune to
the right frequency. The fact that it is not possible to arbitrarily jump in the frequency space is one
of the main differences between FDM schemes and TDM schemes.
Furthermore, FDM is often used for simultaneous access to the medium by the base station and
mobile station in cellular networks. Here the two partners typically establish a duplex channel i.e.,
a channel that allows for simultaneous transmission in both directions. The two directions, mobile
station to base station and vice versa are now separated using different frequencies. This scheme is
then called frequency division duplex (FDD).
Again, both partners have to know the frequencies in advance; they cannot just listen into the
medium. These two frequencies are known as the uplink and downlink frequencies.
Uplink is from mobile station to the base station or from ground to satellite.
Downlink is from the base station to the mobile station or from the satellite to the ground control.
The following diagram depicts the frequency division multiplexing for multiple access and duplex.
The figure shows the situation in a mobile phone network based on the GSM standard for
900MHz (The basic frequency for GSM is fixed and regulated by national authorities.
All uplinks use the range of frequency between 890.2 MHz and 915 MHz and all downlinks from
935.2 to 960 MHz.
In the above diagram the base station which is at the right, allocates a certain frequency for up-link
as well as downlink to establish a duplex channel with a mobile phone.
Note the up and the downlinks have a fixed relation.
If uplink frequency fu =890MHz + n.0.2 MHz
Then downlink frequency fd = fu + 45 MHz for a certain channel ‘n’.
The base station selects the channel and each channel has a bandwidth of 200 MHz.
This illustrates the use of the FDM for multiple access and duplex according to a predetermined
scheme.
f
960 MHz
12412
935.2 MHz
20 MHz
915 MHz
890.2 MHz
t
30
Mobile Computing
Fig.3.4a
Time Division Multiple Access (TDMA)
 This is more flexible scheme when compared to FDMA, which comprises all technologies
that allocate certain time slots for communication i.e. controlling TDM.
 Now tuning into a certain frequency is not necessary i.e. the receiver can stay at the same
frequency the whole time. As we already know listening to different frequencies at the same
time is quite difficult, but listening to many channels separated in time at the same frequency
is simple.
 Many wired network MAC schemes like Ethernet, ATM, and Token Ring works according to
this principle.
 The TDMA has to have synchronization between sender and receiver in the time domain. It is
achieved by allocating a certain time slot for a channel or by using a dynamic allocation
scheme.
 Dynamic allocation scheme and fixed scheme
The dynamic allocation scheme requires identification for each transmission as this is the case for
typical wired MAC schemes or the transmission has to be announced beforehand. The MAC
addresses are often used as identification. This enables a receiver in a broadcast medium to
recognize if it really is the intended receiver of a message.
On contrary, the fixed schemes do not need identification, but are not as flexible considering
varying bandwidth requirements.
Fixed TDM
 The simplest algorithm for using TDM is allocating time slots for channels in a fixed pattern.
This results in a fixed bandwidth and is the typical solution for wireless phone systems.
 MAC is quite simple, as the only crucial factor is accessing the reserved time slot at the right
moment. If this synchronization is assured, each mobile station knows its turn and no
interference will happen.
 This fixed pattern can be assigned by the base stations, where the competition between different
mobile stations that want to access the medium is solved.
 Fixed access patterns fit perfectly well for connections with a fixed bandwidth.
 The following fig3.4b depicts the time division multiplexing for multiple access and duplex.
417 µs
1
2
3
11
12
1
2
3
Downlink
11
12
Uplink
Fig.3.4b
31
Mobile Computing







This depicts how these fixed TDM patterns are used to implement multiple access and a
duplex channel between a base station and mobile station. Assigning different slots for
uplink and downlink using the same frequency is called time division duplex (TDD).
The above figure shows the base station uses one out of 12 slots for downlink, where as
the mobile station uses one out of 12 slots for the uplink.
The uplink and downlink are separated in time.
Using this scheme up to 12 different mobile stations can use the same frequency without
interference. Here each connection is allotted its own up and downlink pair.
In case of DECT cordless phone system, the pattern is repeated every 10ms, which means
each slot, has duration of 417µs. This repetition guarantees access to the medium every
10ms, independent of any other connections.
This system used by DECT is perfectly apt for connections with a constant data rate but
are inefficient for bursty data or asymmetric connections.
In this scheme there is waste of lot of bandwidth. It is very static and very inflexible for
data communication. For such cases the connectionless, demand-oriented TDMA
schemes can be used.
3.5 Classical Aloha




This is a scheme which was invented at the University if Hawaii and was used in the
ALOHANET for wireless connection if several stations.
Aloha neither coordinates medium access nor does it resolve contention on the MAC layer.
Instead each station can access the medium at any time as shown in the figure below.
This is a random access scheme, without a central arbiter controlling access and without
coordination among the stations.
If two or more stations access the medium at the same time, a collision occurs and the
transmitted data is destroyed.
Sender A
Sender B
Sender C
Collision
Fig.3.5
 Resolving this problem is left to higher layers
 A simple Aloha works fine for light load and does not require any complicated mechanisms.
Here the assumption is that the data packet arrival follows a Poisson distribution (where a maximum
throughput is achieved for an 18 percent load).
32
Mobile Computing
3.6 Slotted Aloha
Collision
Sender A
Sender B
Sender C
Fig.3.6
This is a refinement of the classical Aloha scheme.
It introduces time slots, where all senders have to be synchronized and transmission can only start
at the beginning of a time slot as depicted in the figure above.
 Here still the access is not coordinated , here
the introduction of slots raise the
throughput from 18 percent to 36 percent (doubling the throughput).

Note that the Aloha systems work perfectly well under a light load, but they cannot give any hard
transmission guarantees, like the maximum delay before accessing the medium or minimum
throughput.The UMTS system of the mobile communication relies on the slotted Aloha for medium
access in certain situation.
3.7 Types of Carrier Sense Multiple Access
CSMA is definitely an improvement over the Aloha for sensing the medium.
Sensing the carrier and accessing the medium only when it is free is good means to avoid collision, but
here the problem of the hidden and exposed terminals are not solved.
Several versions or types of CSMA exists, they are
1. Non-persistent CSMA – Here the stations sense the carrier and starts sending immediately if the
medium is idle. If the medium is busy, the station waits for random amount of time before sensing
the medium again and repeats the pattern .
2.
p-persistent CSMA – Here the nodes also senses the medium but only transmits with the
probability of p, with the next slot with the probability of 1-p.
3.
1-persistent CSMA – Here all systems wanting to transmits as soon as the medium is idle or free.
This will cause many collisions as they block each other. In order to give a fair chance for the
stations waiting for longer time back-off algorithms are used, which are sensitive to the waiting
time, which is generally followed in Ethernet.
4.
Elimination yield – non-preemptive multiple access (EY-NMPA) - where several phases of
sensing the medium for contention resolution are interleaved before one “winner “ is got the
access to the medium. It uses the priority schemes to give preferences to the station to access the
medium. This is generally used in the HIPERLAN 1 specification
33
Mobile Computing
5.
In case of Wireless LAN specified by IEEE 802.11 CSMA/CA is used, where the
Carrier sensing is combined with the back –off scheme in case the medium is busy to achieve
fairness among the competing stations.
3.8 Multiple Access with Collision Avoidance (MACA)
This is a simple scheme, which solves the problem of hidden terminals.
It does not need a base station, but adapts the random access aloha scheme with dynamic reservation.
Recollecting the problem of the hidden terminals:
A and C are trying to communicated with B, A has already started the transmission, but as C is hidden
it will not know if even C has begin the transmission, thus causing the collision at B.
What MACA does at this point?
RTS
A
B
CTS








C
CTS
Fig.3.8
A if it has to transmit to B, it does not start immediately, rather it sends a Request to Send (RTS)
first.
B receives the RTS that contains the name of sender and receiver, as well as the length of the
future transmission.
C does not hear this transmission, but triggers and acknowledgement from B, called clear to send
CTS.
The CTS also contains the names of the sender (A) and the receiver (B) of the user data band the
length of the future transmission.
C, thus reserving the use of the medium for future use by A is now reserved for the duration of the
transmission, hears the CTS.
After receiving CTS; C is not allowed to send anything for the duration indicated in the CTS
toward B.
A collision cannot occur at B during data transmission, and the hidden terminal problem is solved
–provided that the transmission conditions remain the same .
Still the problem of the collision can occur when sending an RTS, where both A and C could send
the RTS that collides at B.
Now the next question is about can MACA also help in solving the problem of the exposed terminals?
The exposed terminal problem B wants to communicate to A and C to someone else .But C senses the
medium before transmitting the data and senses a busy medium caused by the transmission from B. Thus C
defers, even though it not cause any collision at A.
3.8.1 Solution of MACA
B has to transmit an RTS first containing the name of the receiver A and the sender B.
It sends RTS to C also but C does not react to this because it is not the receiver, whereas A acknowledges it
by sending an CTS to B.
34
Mobile Computing
At this point C does not receive any CTS and thus finds that A it outside its range, thus it starts transmitting
assuming it will not cause a collision at A.
One problem of MACA is clearly the overheads associated with the RTS and CTS transmissions. For short
and time critical data packets, it is not negligible.
Also MACA assumes symmetrical transmission and reception conditions, otherwise a strong sender and
directed antennas could counteract the scheme described above.
Sender
Receiver
Idle
Packet ready to send; RTS
Idle
Time-out; RTS
RxBusy
Data; ACK
ACK
Time out NAK;
V
RTS
Wait for
ACK
Wait for the
right to send
CTS; data
Where ACK is positive acknowledgement
NAK is negative acknowledgement
RxBusy is Receiver Busy
RTS is Ready to Send
RTS; CTS
Time-out v
Data; NAK
Wait for data
RTS; RxBusy
Fig.3.8.1 The protocol mechanism for Multiple Access With Collision Avoidance
The State Machines for sender and receiver is shown in the diagram above. It depicts the following
steps:
1. The sender is idle until a user requests the transmission of a data packet.
2. The sender then issues an RTS and waits for the right to send.
3. If the receiver gets an RTS and is in an idle state, it sends CTS back and waits for the data.
4. Sender receives the CTS and then sends the data. Otherwise, the sender would send an RTS
again after a time-out.
5. After the transmission of the data, the sender waits for a positive acknowledgement to return
to the idle state. The receiver sends back the positive acknowledgement if the received data
was correct. If not received a correct data or if the waiting time for data is too long, then
the receiver returns to the idle state.
6. If the sender does not receive any acknowledgement or a negative
acknowledgement, it sends an RTS and again waits for the right to send.
7. Alternatively, a receiver could indicate that it is currently busy via a separate RxBusy state.
3.8.2 Concept of Polling
This is strictly centralized scheme with one master station and several base stations.
In this scheme one station is to be heard by all others. The master can poll the slaves according to others.
The master can poll the slaves according to many schemes like round robin or randomly or according to
reservations. The master could also establish a list of stations wishing to transmit during a contention
phase. After this phase the station polls each station on the list.
We could find some similar schemes in the Bluetooth WLAN technologies.
35
Mobile Computing
3.8.3 Inhibit sense multiple_access (ISMA)
Fig.3.8.3
This scheme is used for the packet transmission service cellular digital packet data (CDPD) in the AMPS
Mobile phone system; it is also known as the Digital Sense Multiple Access (DSMA).
Here the base station only signals a busy medium via a busy tone indicated by the BUSY/IDLE on the
downlink. After the busy tone stops, accessing the uplink is not coordinated further. In case of the collision,
additional back-off and retransmission mechanisms are implemented.
CDMA Code Division Multiple Access




Sender A and B wants to send data
CDMA assigns unique Orthogonal key sequence
o Ak =010011 for sender A
o Bk = 110101 for sender B
Sender A wants to send the bit Ad=1
Sender B wants to send the bit Bd=0

Let us assume that we code a binary
o 0 as -1
o 1 as +1

We apply standard addition and multiplication rules.

Both senders spread their signals using their key as chipping sequence [Spreading is nothing but
multiplication of the data bit with chipping sequence]

At the Sender’s side
o
o
o
o
o



Signal As = Ad * Ak
As= + 1 * = (-1, +1, -1, -1, +1, +1)
Similarly Signal Bs = Bd * Bk
Bs= -1 * (+1, +1, -1, +1, -1, +1) = (-1, -1, +1, -1, +1, -1)
Both signals are transmitted at the same time and using the same frequency so that they get
superimposed in space. Here we are not considering the noise from the environment and from
other senders.
Signal C is received at the receiver as
C = As + B s
C = (-1, +1, -1, -1, +1, +1) + (-1, -1, +1, -1, +1, -1) = (-2, 0, 0, -2, +2, 0)
At the Receiver’s side.
36
Mobile Computing

































The receiver wants to receive data sent from A and B
Applies A’s code for despreading
 C * Ak= (-2, 0, 0, -2, +2, 0) * (-1, +1, -1, -1, +1 , +1) = 2+0+0+2+2+0 =6
As the result is > 0 then the receiver detects binary 1.
Similarly for B
Applies B’s code for despreading
C * Bk = (-2, 0, 0, -2, +2, 0) * (+1, +1, -1, +1, -1, +1) = -6
As the result is <o then the receiver detects binary 0
This example is extremely simple and the codes are orthogonal and no noise detected.
If noise was included result may not been -6 and +6 and would be close to ‘0’ which would make it
harder to decide if it is still a valid ‘0’ or ‘1’.
Also both spread bits were precisely superimposed and both signals are equally strong when they reach
the receiver.
Let us assume what happens if signal B was stronger than A.
C’ = As + 5 * Bs

(-1, +1, -1, -1, +1, +1) + (-5, -5, +5, -5, +5, -5) = (-6, -4, +4, -6, +6, -6)
Now at the receiver’s side
A = C’ * Ak

=(-6, -4, +4, -6, +6, -6) * (-1, +1, -1, -1, +1 , +1) = 6
B = C’ * Bk = (-6, -4, +4, -6, +6, -4) * ( -1, -1, +1, -1, +1, -1) = -30
The absolute value of B is much stronger than A.
While -30 might still be detected to ‘0’, it is not easy for 6 because compared to 30, 6 is quite close to
zero and could be interpreted as noise.
Though this is very simple example it shows that power control is essential for CDMA systems.
This is one of the biggest problems CDMA system faces as the power has to be adjusted over
1000times/sec in some systems – thus it consumes lot of energy.
The following example depicts the behavior of CDMA technology with the DSSS (Digital Sequence
Spread Spectrum) spreading using the orthogonal codes.
The code sequence in IS-95 (a mobile phone system that uses CDMA) are 242 -1 chip long, the
chipping rate is 1228800 chips i.e. the code repeats after 41.425 days.
The figure “a” shows a sender A that wants to transmit the bits 101 and sender
The binary key sequence Ak is also shown, here ‘0’ is assigned a positive signal value and the ‘1’ is
assigned a negative signal value.
After spreading i.e. Ad XOR Ak =As which is the resulting signal
Similarly for B Bd is 100 Bs = Bd XOR Bk
As and Bs are superimpose while transmission, the resulting signal is As + Bs (depicted in diagram
“b”)
At the receiver’s side
Reconstruction of the original data from A.
Therefore the receiver applies A’s key Ak to the received signal and feed the result into an integrator.
The comparator then has to decide if the result is 0 or 1.
As we can see, although the original signal form is distorted by B’s signal , the result is quite clear.
Similarly for B’s data, the integrator does (As + Bs) * Bk.
Looking at the one can also imagine, what could happen if A’s signal was much stronger and noise
distorted the signal i.e. the little peaks which are caused by A’s signal would be much higher and the
result of the integrator would be wrong.
Finally the last figure shows, what happens if wrong keys are used, or if it is not synchronized with the
chipping sequence of the transmitter.
The integrator still presents the value after each bit, but now it is not always possible for the
comparator to decide for 1 or 0, as the signal rather resembles noise.
It also illustrates CDMA’s inherent protection against tapping.
37
Mobile Computing
3.9 Comparison of S/T/ F and CDMA
The table below shows the MAC schemes without combining with other schemes. In real systems, the
MAC scheme always occur in combination .A typical combination is constituted by SDMA/TDMA/FDMA
are used in IS-54, GSM ,DECT, PHS and PACS phone systems, or the Iridium and ICO satellite systems.
The mobile phone systems using SDMA/TDMA/FDMA or SDMA/CDMA are centralized systems – a base
station controls many mobile stations – arbitrary wireless communication systems need different MAC
algorithms.
CDMA together with SDMA is used in the IS-95 mobile phone system and the Global star Satellite
System.
CDMA can be used in combination with FDMA/TDMA access schemes to increase the capacity of a cell.
Soft capacity in CDMA systems describes the fact that CDMA systems can add more and more users to a
cell which means there is no limit. In case of TDMA/FDMA systems, a hard upper limit exists – if no
more free time/ frequency slots are available, the system rejects new users.
In case of CDMA cell, if a new user is added, then the noise level rises and the cell shrinks, but the user can
still communicate. Cell planning is easier in fixed TDMA/FDMA schemes but is more difficult in CDMA
systems.
Approach
SDMA
TDMA
FDMA
CDMA
Idea
Segment space Segment sending Segments
the Spread
the
into
cells/ time into disjoint frequency band into spectrum
using
sectors
time-slots, demand disjoint sub-bands.
orthogonal codes.
driven or fixed
patterns
Terminals
Only
one All terminals are Every terminal has its All terminals can
terminal can be active for short own
frequency, be active at the
active in one periods of time on uninterrupted
same place at the
cell/one sector
the same frequency
same
moment,
uninterrupted.
Signal Separation Cell structures Synchronization in Filtering
in
the Code plus special
directed
the time domain
frequency domain
receivers.
antennas
Advantages
Very
simple Established, fully Simple, established, Flexible,
less
increases
digital,
very robust
planning needed,
capacity perkm2 flexible
soft handovers.
Disadvantages
Inflexible
Guard-space
Inflexible, frequencies Complex
antennas
needed(multi-path
are a scarce resource
receivers,
need
typically fixed
propagation),
more complicated
synchronization
power control for
difficult
senders.
Comment
Only
in Standard in fixed Typically combined Used in many 3G
combination
networks, together with
TDMA systems,
higher
with
TDMA, with
(frequency
hopping complexity,
FDMA
or FDMA/SDMA
patterns)
and lowered
CDMA it is used
in
many SDMA(freque4ncy
expectations;
more useful.
mobile networks
reuse)
integrated
with
TDMA/FDMA
38
Mobile Computing
Chapter 4
Wireless LAN
4.1 Introduction
Wireless LAN or simply WLAN. A Wireless LAN is one in which a mobile user can connect to a local area
network through a radio connection. A standard, IEEE 802.11 specifies the technologies for wireless
LAN’s.
WLAN is the fastest growing technology that provides flexibility of wireless access into home, office and
production environment. They are restricted to campus, single room or buildings, which is not managed by
large-scale network providers, but are operated by individuals.
4.2 Goal , Advantages and Disadvantages
A goal, which is thrived by people globally with respect to WLAN, is “To replace office cabling, to enable
unhindered access to the Internet and to introduce a higher flexibility for ad-hoc communication. “
Let us list the advantages and disadvantages of WLAN in comparison with wired network.
Advantages:
1. Flexibility
Radio waves can penetrate wall and all nodes within radio coverage can communicate without any
restrictions. The firewalls built in many buildings may pose problems for wiring, where wireless
may work very well.
2.
3.
4.
Planning
Wired networks need lot of planning and additional cabling with right plugs and probably right
interworking units must be provided. In contrast only wireless ad-hoc networks allows for
communication without any previous planning. As long as the device follows same standards they
can communicate.
Design
Generally cables restrict the design of small and independent devices which is now satisfied by
wireless networks.
Robustness
In case of natural calamities or disasters the wireless networks are the means of communication. If
the wireless devices survive, people can still communicate; whereas infrastructure in these cases
may breakdown completely.
5.
Cost
Once the wireless access through an infrastructure (via the access points) is provided the
additional users to the wireless network will not increase the cost.
In case of wired network the constant plugging and unplugging will sooner or later destroy the
plugs, which means wear and tear, where as the wireless connections do not wearout.
Disadvantages
1. Quality of Services
Generally the quality of service offered by WLAN’s are lower because of lower bandwidth; and
higher error rates due to interference. It also has higher delay or delay variation due to extensive
error correction and detection mechanism.
2.
Proprietary Solutions
Many companies are coming up with the proprietary solutions offering standardized functionality
and also offer some enhanced features like special inter-access point protocols or a higher bit rate
using a patented coding technology. These features only work with same vendors’ adapters at all
wireless nodes. All these have risen because of slow procedures involved in standardization. But
most components today adhere to basic standard IEEE 802.11b and 802.11a.
3.
Restrictions
39
Mobile Computing
4.
Generally all wireless products have to comply with national regulations, several government and
non-government institution frequencies to minimize interference. WLAN’s are limited to only
certain license-free frequency bands, which are not the same worldwide. They are limited to low
power senders.
Safety and Security
The radio waves for data transmission might interfere with high –tech equipments generally used
in hospitals, and as laymen use these, the radiation has to be low. So special precautions have to be
taken to prevent safety hazards. Also eavesdropping may be easier in WLAN when compared to
fiber optics, thus all standards must provide encryption and privacy mechanisms.
Design goals of WLAN for achieving commercial success:
1.
Easy to use
WLAN’s are made simple to use than the complex wireless WAN’s. They should work on a
plug-and-play basis.
2.
Global Operation
The LAN equipments may be carried from one country to another, thus WLAN products
should sell in all countries so, national and international frequency regulations have to be
considered.
3.
Low power
Usually the devices communicating via a WLAN are running on battery power. The LAN
design should take this into account and implement special power-saving modes and power
management functions.
4.
License-free operations
LAN operators do not apply for special license, rather they are license-free band like 2.4 GHz
ISM band.
5.
Robust transmission technology
WLAN’s operate under difficult conditions; if they use radio transmission many other
electrical devices can interfere with them (e.g. vacuum cleaners, hair dryers, train engines
etc.) WLAN transceivers cannot be adjusted for perfect transmission in a standard office or
production environment.
6.
Protection of Investment
A lot of money has already been invested into WLAN’s. The new WLAN’s should protect
this investment by being interoperable with the existing networks.
7.
Safety and Security
WLAN’s should be safe to operate; it has to be safe for pacemakers too. It should also take
into account user privacy i.e. it should not be possible to collect roaming profiles for tracking
persons if they do not agree.
8.
Transparency for applications
Existing applications should continue to run over WLAN’s the only difference being higher
delays and lower bandwidth.
The fact of wireless access and mobility should be hidden if it is not relevant, but the network
should also support location aware applications e.g. by providing location information.
40
Mobile Computing
4.3 Infrared Versus and Radio Transmission
Infrared (Infrared red light at 900nm wavelength) and GHz range radio in a license-free ISM band are the
two popular transmission technologies used to setup WLAN’s.
Both of them can be used to setup ad-hoc connections for work groups to connect, for example a desktop
with a printer without a wire or to support mobility within a small area. Infrared technology uses diffuse
light reflected at wall; furniture etc or directed light if a line-of-sight (LOS) exists between sender and
receiver. Here senders are simple LED’s or laser diodes and the photodiodes acts as receiver.Here the
senders are simple LED’s or laser diodes and the photodiodes acts as the receivers.
Let us glance at the pros and cons of infrared technology:
Pros
 Simple and extremely cheaper senders and receivers.
 These are integrated in almost all mobile devices available today like PDA, notebooks, mobile phones
 These have IrDA (Infra red Data Association Interface)
 No license are needed for infrared technology
 Electrical devices do not interfere with infra red transmission
 IrDA defines data rates of 1.152 and 4 Mbit/s.
Cons
 IR have low bandwidth compared to other LAN technologies
 IrDA devices are typically connected to a serial port limiting transfer rates of 115Kbit/s
 Main disadvantage is that the infrared transmission cannot penetrate walls or other obstacles.
But for a good transmission quality and high data rate LOS is needed.
Now let us have a look at the radio transmission i.e. radio waves are used for data transmission e.g. GSM
900, 1800, 1900MHz, DECT at 1880MHz.
Advantages
They can cover larger areas and can penetrate wall, furniture, plants etc.
They do not need LOS if the frequencies are too high. Further current radio-based products offer much
higher transmission rates than infrared.
Disadvantages
Shielding is not simple.
Radio transmission can interfere with other senders or electrical devices and can transmit data via radio.
Radio transmission is only permitted in certain frequency bands.
Very limited ranges of license –free bands are available worldwide and those available are not same in all
countries.
The 3WLAN technologies are presented here
1.
2.
3.
IEEE 802.11 user standardized infrared transmission in addition to radio transmission.
The European ETSI standard for a high-speed WLAN with QoS support, HIPERLAN2 also relies on
radio.
An industry approach towards wireless personal area network WPAN called as Bluetooth, i.e.
WLAN’s at even a smaller range called Bluetooth.
Note future mobile devices may have to communicate while still in a pocket or from a suitcase so they
cannot rely on infrared and this is the advantage of radio transmission as it does not need LOS and can
penetrate any material.
41
Mobile Computing
4.4 Infrastructure and Ad-hoc Networks
 The following dig 4.4a shows the three infrastructures based wireless networks
 Many WLAN’s today need infrastructure networks. The infrastructure networks provide
access to other networks, forwarding functions and medium access control etc.
 In this network the communication typically access point, but not between the wireless nodes.
PDA
PDA
AP
Wired Network
AP
AP
PDA
Fig.4.4a








The above figure shows the access points with their 3 wireless networks and a wired network.
Several wireless networks may form one logical wireless network. An access point with the fixed
network in between can connect several wireless networks to form a larger network beyond actual
radio coverage.
The infrastructure base wireless networks are simpler as the network functionality lies in the hand of
access point; as a result the wireless clients remain quite simple.
The structure is generally reminiscent of switched Ethernet or other star-based networks which the
controls flow in the network by a central element (like switch).
There is a possibility of collision if there is no coordination between medium access of the wireless
node and the access point.
The access point may poll the single wireless nodes to ensure the data rate.
The infrastructure-based networks lose some flexibility generally associated with the wireless
networks like disaster relief where no infrastructure is left.
Generally the mobile phone networks and satellite-based cellular phones have infrastructure-based
networks.
Ad-hoc Wireless Network




This does not need any infrastructure to work. Each node can directly communicate with other nodes
and there is no need for access point, controlling medium is necessary.
The following diagram shows two ad-hoc wireless networks:
It has two ad-hoc networks with three nodes each. Each node within this ad-hoc networks can only
Communicate if they are in each other’s radio range or if other node can forward the message. In
42
Mobile Computing



The figure4.4b it is also known that the nodes from two networks cannot communicate if they are not
within the same radio range.
In ad-hoc networks, the nodes has to implement medium access mechanisms, mechanism to handle
Hidden and exposed terminals problem, priority mechanisms to provide a certain quality of
services, thus the nodes are more complex.
PDA
PDA
PDA
PDA
PDA
Fig.4.4b



This type of network also shows greater flexibility .It may be helpful in cases of quick replacements of
infrastructure or need for unexpected meetings.
Note the two wireless network described above may not be available in their purest form. When we
consider IEEE 802.11 and HIPERLAN2 are typically infrastructure-based networks, which
additionally support ad-hoc networking.
The Bluetooth, which is a 3rd WLAN category is typically, a wireless ad-hoc network. It basically
focuses on spontaneous ad-hoc meetings or on the simple connection of two or more devices without
requiring setup an infrastructure.
4.5 IEEE 802.11







The IEEE 802.11 is the most famous family of WLAN’s in which many products are available.
This standard belongs to the group of 802.x LAN standard like 802.3 for Ethernet, 802.5 for Token
Ring.
The primary goal of the standard was to provide simple and robust WLAN that offers time-bound and
asynchronous services.
This standard specifies that the physical and medium access layers are adapted to the special
requirements of LAN’s but offers the same interface as the others to higher layers to maintain
interoperability.
Here the MAC layer should be able to operate with multiple physical layers, each of which will have
different transmission characteristics and different transmission characteristics and different medium
sense.
It operates at 2.4GHz ISM band, which is available almost worldwide, where the data rates were
1Mbit/s mandatory and 2Mbit/s optional.
As an additional feature WLAN should manage power (save battery power), managing of the hidden
terminals and ability to operate worldwide.
System Architecture
We know that the wireless system exhibit two different basic system architecture.
1. Infrastructure-based
2. Ad-hoc
43
Mobile Computing
STA1
PDA
BSS1
Access
Point
Portal
Distribution System
Access
Point
ESS
BSS2
PDA
STA2
STA3
802.11 LAN
Fig.4.5 The Architecture of an infrastructure base IEEE 802.11
Stations STAi:
Here the nodes are called as the stations (STAi) . All node are connected to the Access Point(AP). AP’s
support roaming. Stations have access mechanisms to the wireless medium and radio contact to the AP.
Stations can select AP’s.
BSS Base Service Set:
The stations and access points which are within the same radio coverage form basic service set (BSSi). In
the above diagram, there are two basic service set BSS1 and BSS2, which are connected through a
distribution system.
Distribution System:
This connects several BSS’s via the AP to form a single network and thus extends the network or wireless
coverage. This network is now called as the Extended Service Set ESS.
The architecture of the DSS is not specified in IEEE 802.11 .It may consist of bridge , IEEE LAN’s
wireless links or any other networks. The specification of DSS is found in 802.11f.
This handles the transfer of data between the different AP’s.
ESS Extended Service Set:
Every ESS has its own identifier called as the ESSID. It is generally the name of the network and is
separate for every network. If ESSID is known then only you could be participating in a particular WLAN.
Portals:
44
Mobile Computing
The distribution system connects the wireless network via the access points to a portal, which forms the
internetworking unit for other LAN’s.
4.5.1 Architecture of IEEE 802.11 ad-hoc wireless LAN’s
IEEE 802.11 allows the building of ad-hoc networks between stations, thus forming one or more
independent BSSs (IBSS).Diagram depicts the ad-hoc WLAN :
STA1
802.11 LAN
PDA
PDA
STA3
IBSS2
STA5
IBSS1
PDA
802.11 LAN
STA2
STA4
Fig.4.5.1
Here the IBSS comprises a group of stations using the same radio frequency. Stations STA1,
STA2 and STA3 are in IBSS1, whereas STA4 and STA5 are in IBSS2.
It means STA3 can communicate with STA2 directly but not with STA5.IBSS can be formed by
using different carrier frequencies or by having appreciable distance between the IBSS’s (so there
are no overlaps). The IEEE 802.11 does not specify any special nodes that support routing,
forwarding of data or exchange of topology information.
4.6 Protocol Architecture
We know that IEEE 802.11 fits seamlessly into the other 802.x standards. The following diagram
depicts the IEEE 802.11 wireless LAN connected to switched IEEE 802.3 Ethernet via a bridge.
We need to take care that the applications should not notice any difference apart from lower
bandwidth and perhaps higher access time from the wireless LAN.







The WLAN behaves like a slow wired LAN.The higher layers i.e. application, TCP and IP look the
same for both wired and wireless.
The DL Layer has two layers LLC (which covers the medium access control layers needed for
different networks and MAC.)
The IEEE 802.11 standard only covers the PHY the physical layer and the medium access layer MAC
Like the data link layer, the physical layer PHY is subdivided into the PLCP-physical layer
convergence protocol and the PMD – physical medium dependent sub layer.
The task of the MAC is to provide medium access fragmentation of user data and encryption.
The task of the PLCP is to provide a carrier sense signal called as the clear channel assessment (CCA)
also to provide a common PHY service access point (SAP) independent of transmission technology.
The task of the PMD sub layer is to handle modulation and encoding/decoding of signals.
The split up of the physical layer and the data link layer is shown in the figure below.
Apart from the protocol, it also specifies the management layers and the station management.
It has MAC management that supports the association and re-association of a station to an access point and
roaming between different access points. It also controls authentication mechanisms, encryption, and
synchronization of a station with regard to a station with regard to an access point and power management
45
Mobile Computing
to save battery power. The MAC management also maintains the MAC management information base
(MIB).
Fixed
Terminal
Access Point
Mobile Terminal
Infrastructure Network
Application
Application
TCP
TCP
IP
IP
LLC
LLC
802.11 MAC
802.11PHY
D
L
C
802.11 MAC
802.3 MAC
802.11 PHY
802.3 PHY
802.11PHY
Station
Manage
ment
LLC
MAC
802.11 MAC
MAC Management
PLCP
P
H
Y
PHY Management
PMP
Fig.4.6
Station Management
The main task of the PHY management include channel tuning and the PHY-MID maintenance. The station
management interacts with both management layers and is responsible for additional higher layer functions.
Physical Layer
The IEEE 802.11 supports three different physical layers
1. Based on infra red
2. Two layers based on the radio transmission
46
Mobile Computing
We need to look into the Frequency Hopping Spread Spectrum (FHSS) and the Direct Sequence Spread
Spectrum and the infrared related to the PHY layer.
Infra red
The PHY layer, which is based on the IR transmission uses near visible light at 850-950nm.
The infrared light is not regulated apart from the safety restrictions
It does not need line-of-sight but must work with diffused light; this helps in point-to-multipoint
communication. Such networks typically will work in buildings, classrooms, meeting rooms etc.
Here the frequency reuse is very simple and a wall is more than enough to shield one IR based IEEE 802.11
network from another. Today there are no products available that offer infrared communication based on
802.11
Frequency Hopping Spread Spectrum (FHSS)
This technique allows coexistence of multiple networks in the same area by separating different networks
using different hopping sequence.
There were 79 hopping channels for North America and Europe, 23 hopping channels for Japan in 2.4GHz
ISM band .The standard specifies Gaussian shaped FSK (GFSK) as modulation for FHSS PHY.
Direct Sequence Spread Spectrum (DSSS)
This is another spread spectrum, which uses code and not frequency. It uses 11-chip Barker sequence .The
key characteristics of this method are its robustness against interference and its insensitivity to multipath
propagation. But its implementation is more complex compared to the FHSS.
The IEEE 802.11 DSSS PHY also uses the 2.4GHz ISM band and offers both 1 and 2 Mbit/s data rates. It
uses differential binary phase shift keying (DBPSK) for 1Mbit/s transmission and differential quadrature
phase shift keying (DQPSK) for 2Mbit/s.
Medium Access Control Layer
The MAC layer has several tasks. It has to
1. Control medium access
2. It can also offer support for roaming
3. Authentication
4. Power conservation.
The basic services provided by the MAC layer are the mandatory asynchronous data service which is
generally provided in ad-hoc mode and the time-bound service mode found in /provided in the
infrastructure-based network (asynchronous and time-bound is provided in the infrastructure –based
network).
The asynchronous service supports broadcast and multicast packets and packet exchange is based on a
“best effort” model i.e. no delay bounds can be given for transmission.
The following three basic access mechanisms have been defined for IEEE 802.11 the mandatory basic
method based on a version of CSMA/CA, an optional method avoiding the hidden terminal problem and
finally a contention-free polling method for time-bounded service
The first two methods are summarized as distribution coordination function (DCF) and the third method is
called as the point coordination function (PCF).
The DCF only offers asynchronous service that PCH offers both asynchronous and time-bounded service
but needs and access point to control medium access and to avoid contention. The MAC mechanisms are
also called distribution foundation wireless medium access control (DFWMAC).
47
Mobile Computing
4.7 MAC Management
The MAC management plays a central role in an IEEE 802.11 station as it more or less controls all
functions related to system integration, which means the integration of a wireless station into a BSS,
formation of an ESS, synchronization of the station etc.
We need to understand the following functional groups:
1.Synchronization
This is concerned with the synchronization of internal clock and generation of beacon signals.
We know that each node of an 802.11 network maintains an internal clock. To synchronize the clocks
of all nodes, IEEE 802.11 specifies a timing synchronization function (TSF).
The synchronized clocks are needed for power management, co-ordination of the PCF and for the
synchronization of the hopping sequence in an FHSS system.
Beacon Frame
Within a BSS, timing is conveyed by the (quasi) periodic transmission of a beacon frame. Beacon has
a timestamp and other management information used for power management and roaming.
A node to adjust its local clock uses the timestamp. The node need not hear to every beacon to stay
synchronized, but from time to time the internal clock has to be adjusted and the transmission of the
beacon from is not periodic because the beacon frame is also deferred if the medium is busy.
Let us now look how beacon transmission happens in a busy 802.11 infrastructure network and 802.11
ad-hoc networks
Beacon
Interval
Access
point
medium
busy
busy
busy
Fig.4.7a Beacon Transmission in a busy 802.11 Infrastructure Network
In case of the infrastructure-based networks, the access point performs synchronization by periodically
transmitting the beacon signal, whereas all the wireless nodes adjust their local timer to the time stamp.
In the above fig4.7a we can find that the access point is not always able to send its beacon B if the medium
is busy; but access point always tries to schedule transmission according to the expected beacon interval i.e.
beacon intervals are not shifted if one beacon is delayed. The timestamp of a beacon always reflects the real
transmit time and not the scheduled time.
48
Mobile Computing
Station 1
Station 2
medium
busy
busy
busy
busy
Fig. 4.7b Beacon transmission in a busy 802.11 ad-hoc network
In case of ad-hoc network, the situation is slightly more complicated as there are no access points for
beacon transmission.
Here each node maintains its own synchronization timer and starts the transmission. The above fig4.7b
shows an example where multiple stations try to send their beacon; but the standard random backoff
algorithm is also applied to the beacon frames so only one beacon wins.
All other stations now adjust their internal clocks according to the received beacon and suppress their
beacon for this cycle.
If collision occurs, the beacon is lost. In such a case, the beacon intervals can be shifted slightly because
all clocks may vary with respect to node’s view, but after the successful synchronization all nodes again
have the same consistent view.
2.Power Management
Most of the wireless devices are battery powered, thus power-saving mechanisms are crucial for the
commercial success of such devices.
The basic idea of IEEE 802.11 power management is to switch off the transceiver whenever it is not
needed; this may be easy for sending device, but as the power management of a receive r cannot
be known in advance, the transceiver may be waked up periodically. The switching off the transceiver
should be flexible enough to support different applications.
The basic idea of power saving includes two states for a station i. sleep ii. Awake and the buffering of
data in senders.
If the station is asleep and if the sender intends to communicate with a power saving station, then it has
to buffer data.The sleeping station on the other hand has to wake-up periodically and stay awake for
certain time. During this time the sender can announce the destinations of their buffered data frames.
If a station detects that it is a destination of a buffered packet it has to stay awake until the transmission
takes place.
Waking up at the right moment requires the timing synchronization function (TSF). The power
management in infrastructure based network is much simpler compared to ad-hoc network.
The access point buffers all frames destined for stations operating in power-save mode. With every
beacon send by the access point, a traffic indication map (TIM) is transmitted. The TIM contains a list
of stations for which unicast data frames are buffered in the access point.
49
Mobile Computing
The TSF assures that the sleeping stations will wake up periodically and listen to the beacon and the TIM.
If the TIM indicates a unicast frame buffered for the station, the station stays awake for transmission. For
multicast/broadcast transmission, stations will always stay awake.
3. Roaming
A wireless network within building requires more than just one access point to cover all rooms.
Depending on the solidity and the material of the walls, one access point has a transmission range of 1020m, if the transmission is to be of decent quality.Each storey of a building needs its own access points as
quite often walls are thinner than floors.
If a user is walking around with a wireless station, then the station has to move from one access point to
another providing uninterrupted service, thus the moving between the access points is known as roaming
many a times they are also called as “handover” or “handoff” in the context of mobile phones and
cellular phone systems.
Some of the steps for roaming between the access points are:1.
2.
3.
4.
5.
6.
7.
If a station finds that the current link quality for its access point AP1 is too weak then the station starts
scanning for another access point.
Scanning means active search for another BSS and can also be used for setting up a new BSS in case
of ad-hoc networks.
Passive scanning and Active Scanning are the methods of scanning.
Passive Scanning means listening into the medium to find other networks i.e., receiving the beacon of
another network issued by the synchronization function within an access point.
Active Scanning comprises sending a probe on each channel and waiting for a response. Beacon and
probe responses contain the information necessary to join the new BSS.
The station then selects the best access point for roaming based on signal strength and sends an
association request to the selected access point AP2.
The new access point AP2 answers with an association response. If the response is successful, the
station has roamed to the new access point AP2.Otherwise, the station has to continue scanning for
new access points.
Unfortunately, many products implemented proprietary or incompatible version of protocols that support
roaming and inform the old access point about the change in the station’s location. The standard IEEE
802.11f (Inter Access Point Protocol IAPP) should provide a compatible solution for all vendors.
50
Mobile Computing
Chapter 5
Bluetooth
5.0 Introduction to Bluetooth
The history of Bluetooth starts in the 10th Century when Harald Gormsen, King of Denmark erected a rune
stone in Jelling, Denmark; in memory of his parents.The stone had 3 sides, one of which shows a picture of
Christ. Harald had the common epithet of ‘Blatand ‘meaning that he had a rather dark complexion.
It took a thousand of years before the Swedish IT Company Ericsson initiated some studies in 1994 around
a so-called multi communicator link; this project was renamed as ‘Bluetooth’.
Later in 1998 five companies (Ericsson, Intel, IBM, Nokia, Toshiba) founded the Bluetooth Consortium
with the goal of developing a single-chip, low-cost, radio –based wireless network technology.
In 1999, Ericsson erected a rune stone in Lund, Sweden, in memory of Harald Gormsen, called Blatand,
who gave his epithet for this new wireless communication technology. This new carving shows a man
holding a laptop and a cellular phone, a picture that is quite often cited.
In 2001, the first products hit the mass market, and many mobile phones, laptops, PDA’s, video cameras
etc. are equipped with Bluetooth technology today.
During this time the Bluetooth development started, a study group within IEEE 802.11 discussed wireless
personal area networks. WPAN has the following 5 criteria:
1.
2.
3.
4.
5.
Market Potential: How many applications, devices, vendors, customers are available for a certain
technology?
Compatibility: Compatibility with IEEE 802
Distinct Identity: Originally, the study group did not want to establish a second 802.11 standard.
However topics such as low cost, low power or small form factors are not addressed in the 802.11
standard.
Technical Feasibility: Prototypes are necessary for further discussions, so the study group would not
rely on paper work.
Economic Feasibility: Everything developed within this group should be cheaper than other solutions
and allow for high-volume production.
Bluetooth fulfills these criteria so the WPAN group cooperates with the Bluetooth consortium. IEEE
founded its own group of WPAN’s. IEEE 802.15 in March 1999.This group should develop standards for
wireless communications within a personal operating space.
Bluetooth can provide consumers with the ability to do the following
1.
2.
3.
4.
5.
Make calls from a wireless headset connected remotely to a cell phone.
Eliminates cables linking computers to printers, keyboards and the mouse.
Hook up MP3 players wirelessly to other machines to download music.
Set up home networks so that a couch potato can remotely monitor air conditioner, ovens, internet
surfing of the kids etc.
Call home from a remote location to appliances on and off, set the security alarm and monitor activity.
5.1 Bluetooth Applications
Bluetooth is designed to operate in all environments of many users. Up to eight devices can communicate
in a small network called a piconet.
51
Mobile Computing
To provide security, each link is encoded and protected against eavesdropping and interference. Bluetooth
provides support for three general application areas using short-range wireless connectivity:
1.
Data and voice access points
Bluetooth facilitates real-time voice and data transmissions by providing effortless wireless
connection of portable and stationary communication devices.
2.
Cable replacement:
Bluetooth eliminates the need for may cables attachments for connection of practically any kind of
Communication device.Connections are instant and are maintained even when devices are not within
line of sight. The range of each radio is approximately 10m, but can be extended to 100m with
an optional amplifier.
3.
Ad hoc Networking
A device equipped with a Bluetooth radio can establish instant connection to another Bluetooth Radio
as soon as it comes into range.
5.2 Architecture
Like IEEE 9\802.11b, Bluetooth operates in 2.4GHz ISM bands. However, MAC, physical layer and the
offered services are completely different.
The different protocol layers are explained below:
1.
2.
3.
4.
5.
6.
7.
8.
Networking
Protocol stack
Radio Layer
Baseband Layer - physical links
Link Manager Protocol
Logical Link Control and Adaptation Protocol L2CAP
Security
Service Discovery Protocol
5.3 Concept of Networking and Bluetooth
Terms and features of Bluetooth
Bluetooth operates on 79 channels in the 2.4GHz band with 1 MHz carrier spacing. Each device performs
frequency hopping with 1600hops/s in a pseudo random fashion. Most important term in the context of
Bluetooth is “Piconet”.






“Piconet - it is a collection of Bluetooth devices which are synchronized to the same hopping
sequence.”
One device in the piconet acts as Master (M) and all other devices must act as slave (S). Each piconet
has a unique hopping pattern, the master determines the hopping pattern in the piconet and the slaves
have to synchronize to this pattern.
There are also parked (P) and stand-by (SB) devices, which are additional devices. The parked (P)
device cannot actively participate in the piconet but are known and can be reactivated within some
milliseconds.
The stand-by (SB) devices do not participate in the piconet.
Each piconet has exactly one master and up to seven simultaneous slaves, more than 200 parked
devices.
If a parked device has to communicate then one of the slaves must switch to parked mode and allow
the parked device to come to active mode.
52
Mobile Computing
5.4 Formation of piconet
All the active devices in the piconet must have same hopping sequence and they must be synchronized. All
Bluetooth devices have same network capabilities; any one of then can be master or slave.
There in no distinction between terminals and the base stations, any two or more devices can form piconet.
The unit establishing the piconet automatically becomes master and all other devices will be slaves.
The first step involves a master sending its clock and device ID. The hopping pattern is determined by the
device ID, which is a 48-bit world wide unique identifier. The phase in the hopping pattern is determined
by the masters clock; each device after adjusting its clock to master clock can participate in the piconet.
All active devices are assigned a 3-bit active member address (AMA). All parked devices use an 8-bit
parked member address (PMA).
Devices in the stand-by do not need any address.
All users within one piconet have the same hopping sequence and share the same 1MHz channel. As more
and more users join the piconet the throughput per user drops quickly.
This paved way to the idea of forming groups of piconet called as the scatternet. Many piconets with
overlapping coverage can exist simultaneously.
S
P
S
S
M
SB
S
P
SB
Fig 5.4a
5.5 Bluetooth Scatternet
S
P
S
S
M
P
S
M
P
SB
S
P
SB
Fig 5.4b
53
Mobile Computing









The above scatternet consists of two piconets, where one device is participating in two piconets.
Here both piconets use different hopping sequence, which is always determined by the master of the
piconet.
If a device wants to participate in more than one piconet, it has to synchronize to the hopping sequence
of the piconet it wants to take part in.
If a device acts as a slave in one piconet, then it starts synchronizing with the hopping sequence of the
piconet it wants to join. After synchronization it acts as a slave to new piconet and no longer
participates in the older piconet.
Before having one piconet, slaves inform the current master that it will be unavailable for certain
amount of time. The remaining piconets continue to communicate as usual.
The Bluetooth applies FH-CDMA for separation of piconets. Adding new or more piconets leads to a
graceful degradation of performance as more and more collision may occur.
A collision may occur if two or more piconets use the same carrier frequency at the same time, which
probably happens if the hopping sequences are not coordinated.
A master can also leave the piconet and becomes a slave in another piconet; but cannot become master
to another piconet. But as soon as the master leaves the piconet all traffic within the piconet is
suspended until the master returns.
Communication between different piconets takes place by devices jumping back and for the between
these nets. However, scatternets are not yet supported by all devices.
5.6 Protocol Stack
The diagram shows the Bluetooth specification already comprising of many protocols and components.
The Bluetooth protocols stack can be divided into a
1. Core Specification - which describes the protocols from physical layer to the data link control together
with management functions.
2. Profile Specification – which describes many protocols and functions needed to adapt the wireless
Bluetooth technology to legacy and new applications.
5.7 The core protocols of Bluetooth are described here:
1. Radio Layer
Mobile devices have Bluetooth devices integrated in them, they rely on battery power, be built into
handheld devices. Worldwide operation also requires a frequency that is available worldwide.
Bluetooth must support both voice and data. It uses 2.4GHz ISM band license-free frequency for
worldwide operation with some minor adaptations to national restrictions. With a worldwide
Harmonization the Bluetooth devices can be used anywhere.
Bluetooth transceivers use Gaussian FSK for modulation and are available in following 3 classes:
Power Class 1: Max Power 100mW
Min Power 1mW, here the power control is mandatory.
Power Class2: Max Power is 2.5mW
Nominal Power is 1mW
Min Power is 0.25mW; here the power control is optional
Power Class 3: Max Power is 1mW
54
Mobile Computing
Audio .apps
vCBVvCard
OBEX
NW apps
Telephony.apps
AT
Mode
m
Com
mand
s
TCP/UDP
IP
Mgmnt .apps
S
TCS
D
BIN
P
C
O
N
T
R
O
L
PPP/BNEP
RFCOMM (serial line interface)
Audio
Logical Link Control and Adaptation Protocol (L2CAP)
Host Controller Interface
Link Manager
BaseBand
Radio
Fig 5.7a Protocol Layer of Bluetooth
2.
Baseband Layer
This layer performs frequency hopping for interference mitigation, medium access, defines the
physical links and defines the packet formats.
The following diagram shows the frequency selection during data transmission.
Let us consider that the master sends data at fk, then a slave may answer at fk+1, which means TDD is
used for separation of the transmission directions. This figure shows 1-slot packets, where the data
transmission uses one 625microsec.
If a master sends a packet covering 3 or 5 slots, then it is called 3-slot and 5-slot packets, but the radio
transmitter is in the same frequency.
The fig5.7b shows the frequency selection during data transmission 1, 3 and 5 slot packets.
There is no frequency hopping within packets. After transmitting the packet, the radio returns to the
frequency required for its hopping sequence; the reason for this is not every slave might receive a
transmission. Those slaves not involved in the transmission will continue with the hopping sequence.
This is an important behavior, as all devices can remain synchronized; shifting the phase in one device
would destroy the piconet.
55
Mobile Computing
Fk
fk+1
M
S
fk+2
fk+3
M
Fk
M
fk+4
S
M
fk+3
fk+4
S
M
fk
fk+5
fk+6
M
S
fk+5
fk+6
S
M
f k+1
M
f k+6
S
M
Fig5.7b Frequency selection during data transmission 1, 3 and 5 slot packets.
The Fig 5.7c below depicts the components of a Bluetooth packet at the baseband layer.
The packet consists of 3 fields:
1. Access Code
2. Packet Header
68(72)
54
Access code
4
Preamble
3. Payload
0-2744 bits
Packet Header
64
sync
(4)
(trailer)
3
Payload
4
AM address
type
1
1
1
8
flow
ARQN
SEQN
HEC
bits
Fig 5.7c Components of Bluetooth
1.
Access Code
This is needed for timing synchronization and piconet identification (channel access code CAC)
It may represent special codes during paging and inquiry like the device access code (DAC) and
inquiry access code (IAC).
The 64-bit synchronization field derived from the lower 24-bit of an address i.e the lower address
part (LAP).
If the access code is used for channel access then LAP is derived from the master’s unique 48-bit
address.
If a Bluetooth device wants to discover other devices in transmission range, it uses a special
reserved LAP; the special LAP’s are defined for dedicated groups of devices.
56
Mobile Computing
2.
Packet Header
It has address, packet type, flow and error control and checksum.
Address – 3-bit active member address; this represents the address of a slave.
If a master sends data to a slave, then the address is interpreted as receivers address.
If a slave sends data to the master, then address is interpreted as sender address; the value ‘0’ is
reserved for a broadcast from the master to all slaves.
Type - 4-bit type determines the type of the packet. The packet may carry control, synchronous or
asynchronous data.
Flow - if flow=0 in the packet received, then it is asynchronous data, then the transmission must
stop. If flow =1 in the packet received, then transmission may resume.
SEQN -Sequence Number
ARQN - Acknowledgement Number
HEC - an 8-bit header error check (HEC) is used to protect the packet header.
3.
Payload – up to 343 bytes of payload can be transferred. Payload field depends on the type of the
link.
Physical Links
Bluetooth offers two different types of links
1.
2.
Synchronous Connection – Oriented Link (SCO)
Asynchronous Connectionless Link (ACL)
Synchronous Connection-Oriented Link (SCO)




The classical telephone (i.e. voice) requires symmetrical, circuit-switched, point-to-point
connections.
For this type of link, master reserves two consecutive slots at fixed intervals. A master can support
up to 3 simultaneous SCO links to the same slave or different slaves.
Similarly a slave supports up to two links from different masters or up to 3 links from the same
master.
Each SCO link carries voice at 64kbit/s and no forward error correction (FEC); 2/3 FEC or 1/3
FEC can be selected. However voice data over an SCO is never retransmitted.
Asynchronous Connectionless Link (ACL)





We know that the data applications require symmetrical or asymmetrical, packet-switched, pointto-multipoint transfer scenario with broadcast included (like web traffic).
Here the master uses a polling scheme. The slave may only answer if it has been addressed in the
preceding slot. Only one ACL link can exist between a master and a slave. For ACL’s carrying
data 1-slot, 3-slot and 5-slot packets can be used.
Here the data can be protected using a 2/3 FEC scheme. FEC provides protection in case of noisy
environments with a high link error rate; but the FEC may introduce high overhead.
Bluetooth offers a fast automatic repeat request (ARQ) scheme for reliable transmission. The
following example shows the transmission between a master and two slaves.
Master always uses the even frequency slots and slaves always uses the odd frequency slots. In the
diagram, we can find that every sixth slot is used for an SCO link between the master and the
slave whereas the ACL links use single or multiple slots providing asymmetric bandwidth for
connectionless packet transmission.
57
Mobile Computing
Bluetooth data transmission is said to be robust because it is based on several technologies:
1.
2.
3.
4.
5.
6.
FH-CDMA separates different piconet within a scatternet.
FHSS mitigates interference from other devices operating in 2.4GHz ISM band.
FEC can be used to correct transmission errors.
The 1/3 FEC in Bluetooth simply sends 3 copies of each bit the discussions are majorly performed
by the receiver.
The 2/3 FEC encoding detects all double errors and can correct all single bit errors in a code word.
The ACL links can additionally be protected using an ARQ scheme and a checksum; each packet
can be acknowledged in the slot following the packet; if a packet is lost, then the packet cam be
retransmitted immediately in the next slot after the negative acknowledgement, thus it is called as
fast ARQ scheme. The retransmission is triggered by a negative acknowledgement or a time-out.
Link Manager Protocol (LMP)
This manages various aspects of the radio link between the master and a slave and the current parameter
setting of the devices.
The LMP enhances baseband functionality.
The functions covered by the LMP are
i.
Authentication, Pairing and Encryption
Authentication - baseband actually provides the basic authentication service, but LMP has to
control the exchange of random numbers and signed responses.
Pairing – For pairing a trust relationship must be initially established between two devices that
have never communicated before; the result of pairing is a link key which may be accepted,
rejected or changed.
Encryption - The LMP does not actually involve in encryption process as security mechanism of
Bluetooth handle this; here the job of the LMP is to just set the encryption mode like nom
encryption, point-to-point, and broadcast.
ii.
Synchronization
Precise synchronization is more important in Bluetooth network; the clock offset is updated each
time a packet is received from the master.
Devices can also exchange timing information related to the time differences between two
adjacent piconets.
iii.
Capability Negotiation
The Bluetooth devices will not support all features described in the standard, so devices has to
agree upon the usage of some features like multi-slot, SCO link, voice encoding etc.
iv.
Quality of Service Negotiation (QoS)
Different parameters control the QoS of a Bluetooth device at these lower layers .The poll interval
(the maximum time between transmissions from a master to a particular slave, the number of
repetitions for broadcast packets can be controlled. A master can also limit the number of slots
available for slaves.
v.
Power Control
A Bluetooth device can measure the received signal strength; depending on the signal level the
device can direct the sender of the measured signal to increase or decrease the transmit power.
58
Mobile Computing
vi.
Link Supervision
LMP has to control the activity of link, it may set up new SCO links or it may declare the failure
of a link.
vii.
State and transmission mode change
Devices might switch the master/slave role, detach themselves from a connection or change the
operating mode.
5.8 L2CAP –Logical Link Control and Adaptation Protocol
L2CAP it is a data link control protocol offering logical channels between Bluetooth devices with QoS
properties. L2CAP is available for ACL’s only, the Audio application using the SCO’s have to avail only
the baseband layer only.L2CAP provides 3 different logical channels that are transported via the ACL
between the master and slave.
1. Connectionless
These unidirectional channels are used for broadcast from a master to its slave(s).
2. Connection-Oriented
They are bi-directional and support QoS flow specifications for each direction.
The flow specification adhere to RFC 1363 and defines average /peak data rate, maximum burst
size, latency and jitter.
3. Signaling
It is used for exchanging message between L2CAP entities.
Every channel is identified by its channel identifier (CID) where CID=1 for signaling CID=2 for
connectionless channels. For the connection-oriented channels, a CID >=64 is dynamically assigned at
each end of the channel to identify the connection i.e. CID=3 to 63 are reserved for this.
Slave
Master
L2CAP
Slave
L2CAP
1
L2CAP
d
d
Baseband
Baseband
Signalling
d
d
1
1
d
d
2
Baseband
Connection -Oriented
ACL
Connectionless
Fig 5.8a
In the above fig5.8a master has a bi-directional signaling channel to each slave, the CID at each end is 1.
With the CID at 2 , master maintains connectionless channels to both slaves .
59
Mobile Computing
While the CID at the beginning of the connectionless channel is dynamically assigned, but the CID at slave
is 2.Master has one connection-oriented channel to left slave and two to the right slave.
All CID’s for these channels are dynamically assigned.
L2CAP provides mechanisms to add and remove slaves.
L2CAP Packet format
Connectionless PDU
Length
2
CID=2
2
PSM
Payload
>=2
0-65533
bytes
Connection-Oriented PDU
Length
CID
2
Payload
2
0-65533
bytes
Signalling Command
Length
CID=1
one or more commands
Code
1
ID
length
1
2
data
>=0
Fig5.8b







The above fig 5.8b depicts the packet type belonging to different logical channels.
The Length –indicates the length of the payload
For Connectionless PDU’s a PSM i.e. Protocol /Service Multiplexor field is needed to identify the
higher layer recipient for the payload.
For Connection-Oriented PDU’s the CID already fulfills this function.
The payload of the signaling PDU contains one or more commands. Each command has code an Id
and the length field and data field for this command.
Depending on the baseband capabilities, large packets have to be chopped into smaller segments.
For example the DHS links can carry a maximum of 339 bytes while the L2CAP layers accepts up to
64kbytes.
5.9 Bluetooth Security.
Bluetooth devices can transmit private data for example between a mobile phone and PDA, definitely user
do not want eavesdrop in the data transfer.
The main security features offered by the Bluetooth are
1. Challenge-Response routine for authentication
2. A Stream Cipher for Encryption
3. Session Key generation
60
Mobile Computing
In case of Challenge-Response Routine each connection may require a one-way, two-way or no
authentication used. The security features included in Bluetooth only helps to setup a local domain of trust
between devices. It uses security algorithms .The security algorithms make use of four parameters:
1.
2.
3.
4.
Unit address: The 48-bit device address, which is publicly known
Secret authentication key: A secret 128-bit key
Secret privacy key: A secret key if length from 4 to 128 bits
Random Numbers: a 128-bit random number derived from a pseudorandom generation algorithm
executed in the Bluetooth unit.
For each transaction, a new random number is generated on the Bluetooth chip. The key management
is generally left to the higher layer software.
The Bluetooth security architecture of Bluetooth is a shown below:
user input initalization
PIN (1-16 byte)
PIN (1-16 byte)
E2
Link key (128-bit)
Pairing
Authentication key generation (permanent storage)
Authentication
E3
E2
Link key (128-bit)
E3
Encryption key generation
Encryption Key
(128-bits)
Encryption
Key stream
generator
Encryption Key
(128-bit)
Key stream
generator
Payload Key
Ciphering
Payload Key
Cipher data
data
data
Fig5.9 Security Architecture of Bluetooth
61
Mobile Computing

The first step is called as pairing, which is necessary if two Bluetooth devices have never met before.

To setup trust between the two devices a user can enter a secret PIN into both devices. This PIN can
have a length of up to 16 bytes. [Unfortunately, most devices limit the length of four digits or even a
fixed PIN like ‘0000’ that makes the concept of Bluetooth itself questionable.

Based on the PIN the device address and random numbers, several keys can be computed which can be
used as a link key for authentication.

Based on the link key, values generated during the authentication and random number an encryption
key is gener ated during the encryption stage of the security architecture; it has a maximum size of
128-bits and can be individually generated for each transmission.

Based on the encryption key, the device address and the current clock a payload key is generated for
ciphering user data. A payload key is a stream of pseudorandom bits. This ciphering process is simple
XOR of the user data and the payload key.

With all these procedures, Bluetooth is supposed to offer lot more security than 802.11

Bluetooth when it comes to real implementation has some weaknesses.
1.
2.
3.
4.
5.
6.
PIN’s are quite often fixed
Some of the keys are permanently stored on the devices
Quality of the random number generators has not been specified.
If the Bluetooth devices are switched on they can be detected, unless they are operated in no
answer to inquiry requests or non-discoverable mode.
User can use all services as intended by the Bluetooth system or the devices are hidden to protect
privacy.
Roaming profile can be established or devices can be hidden, thus many services will not work.
5.10 Power Management
Bluetooth device cannot be in an active transmit mode all the time, Bluetooth defines several low-power
states for a device.
Every device that is currently not participating in a piconet is in standby mode; this is a low-power mode,
where only the native clock is running.
In case of inquiry mode, the device wants to establish a piconet or a device just wants to listen to see if
something is going on.
1.
2.
A device wants to establish a piconet: A user of the device wants to scan for other devices in the
radio range. The device starts the inquiry procedure by sending an Inquiry Access Code (IAC) that
is common to all Bluetooth devices.
Devices in standby that listen periodically: Devices in standby may enter inquiry mode
periodically to search for IAC messages on the wake-up carriers. As soon as a device detects an
inquiry, it returns a packet containing its device address and timing information required by the
master to initiate a connection. From that moment onwards the device acts as a slave.
If the inquiry was successful, it enters the page mode. The inquiry phase is not co-coordinated; inquiry
messages and answer to these messages may collide, so it may take a while before inquiry is successful.
After some time, a Bluetooth device sees all the devices in its radio range.
62
Mobile Computing
Page State:
In this state two different roles are defined.
After finding all required devices the master is able to setup connections to each device i.e. setting up a
piconet.Depending on the device addresses received the master calculates a special hopping sequences to
contact each devices individually. Thus the slave answers and synchronizes with the master’s clock. The
master may continue to page more devices that will be added to the piconet.
The connection state comprises the active state and the low power states park, sniff and hold states.
Active State:
The slave participates in the piconet by listening transmitting and receiving. Here ACL and SCO links can
be used.
A master periodically synchronizes with all slaves and they must have a 3-bit active member address.
Within the active state devices either transmit data or simply connected or can enter standby again.
63
Mobile Computing
Chapter 6
Mobile Transport Layer
6.1 Introduction
We have already seen how mobility is supported in the lower layers up to the network layer. The network
layer as such addresses the problems of host, whereas the UDP or TCP allow dedicated applications to be
addressed.
We also understand that most applications rely on the transport layer like the TCP and UDP.
The two functions of the transport layer in the Internet are
a. Check summing over user data
b. Multiplexing/Demultiplexing of data from/to applications.
6.2 Differences of UDP and TCP
Both the TCP and UDP allow dedicated applications to be addressed.
UDP is connectionless and do not offer much more than the addressing issue. It does not give any
guarantee and reliable data delivery.
UDP is not “Network friendly” i.e. UDP requires that applications handle reliability, in-order delivery etc,
does not pull back in case of congestion and continues to send packets into an already congested network.
TCP is much more complex and needs special mechanisms to be useful in mobile environments.
Within a connection TCP can give certain guarantees like the in-order delivery or reliable data transmission
using retransmission techniques.
TCP has built-in mechanisms to behave in a “network friendly” manner. If for example, TCP encounters
packet loss, it assumes network internal congestion and slows down the transmission rate. This is one of the
main reasons to stay with protocols like TCP.
6.3 Traditional TCP
We will look into several mechanisms of TCP that influence the efficiency of TCP in a mobile
environment.
6.3.1 Congestion Control
A transport layer protocol such as TCP has been designed for fixed networks with fixed end-systems. Data
transmission takes place using network adapters, fiber optics, copper wires; special hardware for routers
etc.This hardware typically works without introducing transmission errors.
If the software is mature enough, it will not drop packets or flip bits, so if a packet on its way from a
sender to a receiver is lost in a fixed network, it is not because of hardware of software errors.
The probable reason for a packet loss in a fixed network is a temporary overload some point in the
transmission path, i.e. a state of congestion at a node.
Congestion may appear from time to time even in carefully designed networks. The packet buffers of a
router are filled and the router cannot forward the packets fast enough because the sum of the input rates of
packets destined for one output link is higher than the capacity of the output link. The only thing a router
can do in this situation is to drop packets.
64
Mobile Computing
A dropped packet is lost for the transmission, and the receiver notices a gap in the packet stream. Now the
receiver does not directly tell the sender which packet is missing, but continues to acknowledge all insequence packets up to the missing one.
The sender notices the missing acknowledgement for the lost packet and assumes a packet loss due to
congestion. Retransmitting the missing packet and continuing at full sending rate would now be unwise, as
this might only increase the congestion.
Although it is not guaranteed that all packets of the TCP connection take the same way through the
network, this assumption holds for most of the packets.
To mitigate congestion, TCP slows down the transmission rate dramatically. All other TCP connections
experiencing the same congestion do exactly the same so the congestion is soon resolved.
The cooperation of TCP connections in the internet is one of the main reasons for its survival as it is today.
Using UDP is not a solution, because the throughput is higher compared to a TCP connection just at the
beginning. As soon as everyone uses UDP, this advantage disappears.
After that, congestion is standard and data transmission quality is unpredictable. Even under heavy load,
TCP guarantees at least sharing of the bandwidth.
6.3.2 Slow Start
TCP’s reaction to a missing acknowledgement is quite drastic, but it is necessary to get rid of congestion
quickly. The behavior TCP shows after the detection of congestion is called slow start.
The sender always calculates a congestion window for a receiver. The start size of the congestion window
is one segment. The sender sends one packet and waits for acknowledgement. If this acknowledgement
arrives, the sender increases the congestion window by one , now sending two packets (congestion window
=2) . After arrival of the two corresponding acknowledgements , the sender again adds 2 to the congestion
window, one for each of the acknowledgements. Now the congestion window equals 4 .
This scheme doubles the congestion window every time the acknowledgements come back, which takes
one round trip time (RTT). This is called the exponential growth of the congestion window in the slow start
mechanism.
It is too dangerous to double the congestion window each time because the steps might become too large.
The exponential growth stops at the congestion threshold. As soon as the congestion window reaches the
congestion threshold, further increase of the transmission rate in only linear by adding 1 to the congestion
window each time the acknowledgements come back.
Linear increase continues until a time-out the sender occurs due to a missing acknowledgement, or until the
sender detects a gap in transmitted data because of continuous acknowledgements for the same packet. In
either case the sender sets the congestion threshold to half of the current congestion window. The
congestion window itself is set to one segment and the sender starts sending a single segment. The
exponential growth starts once more up to the new congestion threshold, then the window grows in linear
fashion.
6.3.3 Fast Retransmit/ Fast Recovery
Two things lead to a reduction of the congestion threshold. One is a sender receiving continous
acknowledgements for the same packet. This informs the sender of two things. One is that the receiver got
all packets up to the acknowledged packet in sequence. In TCP, a receiver sends acknowledgements only if
it receives any packets from the sender. Receiving acknowledgements form a receiver also shows that the
65
Mobile Computing
receiver continuously receivers something from the sender. The gap in the packet stream is not due to the
severe congestion, but a simple packet loss due to a transmission error. The sender can now retransmit the
missing packet(s) before the timer expires. This behavior is called fast retransmit.
The receipt of acknowledgements shows that there is no congestion to justify a slow start. The sender can
continue with the current congestion window. The sender performs a fast recovery from the packet loss.
This mechanism can improve the efficiency of TCP dramatically.
The other reason for activating slow start is a time-out due to a missing acknowledgement. TCP using fast
retransmit / fast recovery interprets this congestion in the network and activates the slow start mechanism.
6.3.4 Implications on mobility
While slow start is one of the useful mechanisms in fixed networks, it drastically decreases the efficiency
of TCP if used together with mobile receivers or senders. The reason for this is the use of slow start under
the wrong assumptions. From a missing acknowledgment, TCP concludes a congestion situation. While
this may also happen in networks with mobile and wireless end-systems, it is not the main reason for packet
loss.
Error rates on wireless links are orders of magnitude higher compared to fixed fiber or copper links. Packet
loss is much more common and cannot always be compensated for by layer 2 retransmission (ARQ) or
error correction.
Trying to retransmit on layer 2 could, for example, trigger TCP retransmission if it takes too long. Layer 2
now faces the problem of transmitting the same packet twice over a bad link. Detecting these duplicates on
layer 2 is not an option, because more and more connections use end-to-end encryption, making it
impossible to look at the packet.
Mobility itself can cause packet loss. There are many situations where a soft handover from one access
point to another is not possible for a mobile end system. For example, when using mobile IP , there could
still be some packets in transit to the old foreign agent while the mobile node moves to the new foreign
agent. The old foreign agent may not be able to forward those packets to the new foreign agent or even
buffer the packets if disconnection of the mobile node takes too long. This packet loss has nothing to do
with wireless access but is caused by the problems of rerouting traffic.
The TCP mechanism detecting missing acknowledgements via time-outs and concluding packet loss due to
congestion cannot distinguish between the different causes. This is a fundamental design problem in TCP :
An error control mechanism (i.e. missing acknowledgement due to a transmission error) is misused for
congestion control (missing acknowledgement a due to network overload) . In both cases packets are lost
(either due to invalid checksums or to dropping in routers). However, the reasons are completely different.
TCP cannot distinguish between these two different reasons.
Explicit congestion notification (ECN) mechanisms are currently recommended. However, RFC 3155
states that ECN cannot be used as surrogate for explicit transmission error notification.
Standard TCP reacts with slow start if acknowledgements are missing, which does not help in the case of
transmission errors over wireless links and which does not really help during handover. This behavior
results in a severe performance degradation of an unchanged TCP if used together with wireless links or
mobile nodes.
However, one cannot change TCP completely just to support mobile users or wireless links. The same
arguments that were given to keep IP unchanged also apply to TCP. The installed base of computers using
TCP is too large to be changed and more important, mechanisms such as slow start keep the Internet
operable. Every enhancement to TCP, therefore, has to remain compatible with the standard TCP and must
not jeopardize the cautious behavior of TCP in case of congestion.
66
Mobile Computing
6.4 Classical TCP improvements
Together with the introduction of WLAN’s in the mid-nineties several research projects were started with
the goal to increase TCPs performance in wireless and mobile environments.
6.4.1 Indirect TCP
Two competing insights led to the development of indirect TCP also called as I-TCP. One is that
TCP performs poorly together with wireless links; the other is that TCP within the fixed network cannot be
changed. I-TCP segments a TCP connection into a fixed part and a wireless part.
The figure 6.4.1 below shows an example with a mobile host connected via a wireless link and an access
point to the ‘wired’ internet where the correspondent host resides. The correspondent node could also use
wireless access.
Access Point (foreign agent)
Mobile Host
‘Wired ‘
Internet
Standard TCP
‘Wireless’ TCP
Fig.6.4.1Mobile Host Connected Via a Wireless Link
The following would then also be applied to the access link of the correspondent host.
Standard TCP is used between the fixed computer and the access point. No computer in the internet
recognizes any changes to TCP. Instead of the mobile host, the access point now terminates the standard
TCP connection, acting as a proxy.
This means that the access point is now seen as the mobile host for the fixed host and as the fixed host for
the mobile host. Between the access point and the mobile host, a special TCP, adapted to wireless links, is
used.
However, changing TCP for the wireless link is not a requirement. Even an unchanged TCP can benefit
from the much shorter round trip time, starting retransmission much faster. A good place for segmenting
the connection between mobile host and correspondent host is at the foreign agent of mobile IP. The
foreign agent controls the mobility of the mobile host anyway and can also handover the connection to the
next foreign agent when the mobile host moves on.
However, one can also imagine separating the TCP connections at a special server e.g. at the entry point to
a mobile phone network.
The correspondent host in the fixed network does not notice the wireless link of the segmentation of the
connection. The foreign agent acts as a proxy and relays all data in both directions. If the correspondent
host sends a packet, the foreign agent acknowledges this packet, it acknowledges the packet. However, the
foreign agent only uses this acknowledgement.
67
Mobile Computing
If a packet were lost on the wireless link due to a transmission error, the correspondent host would not
notice this. In this case, the foreign agent tries to retransmit this packet locally to maintain reliable data
transport.
Similarly, if the mobile host sends a packet, the foreign agent acknowledges this packet and tries to forward
it to the correspondent host. If the packet is lost on the wireless link, the mobile hosts notice this much
faster due to the lower round trip time and can directly retransmit the packet. The foreign agent now
handles packet loss in the wired network.
I-TCP requires several actions as soon as a handover takes palace. The figure below shows that not, only
the packets have to be redirected using e.g. mobile IP. In the example shown, the access point acts as a
proxy buffering packets for retransmission. After the handover, the old proxy must forward buffered data to
the new proxy because it has already acknowledged the data. After registration with the new foreign agent,
this new foreign agent can inform the old one about its location to enable packet forwarding.
Besides buffer content, the sockets of the proxy, too, must migrate to the new foreign agent located in the
access point. The socket reflects the current state of the TCP connection, i.e., sequence number, addresses,
ports etc. No new connection may be established for the mobile host, and the correspondent host must not
see any changes in a connection state.
6.4.2 Several advantages with I-TCP
I-TCP does not require any changes in the TCP protocol as used by the hosts in the fixed network or other
hosts in a wireless network that do not use this optimization. All current optimizations for TCP still work
between the foreign agent and the correspondent host.
Due to the strict partitioning into two connections, transmission errors on the wireless link i.e. lost packets
cannot propagate into the fixed network. Without partitioning, retransmission of lost packets would take
place between mobile host and correspondent host across the whole network. Now only packets in
sequence, without gaps leave the foreign agent.
It is always dangerous to introduce new mechanisms into a huge network such as the internet without
knowing exactly how they will behave.
However, new mechanisms are needed to improve TCP performance but with I-TCP only between the
mobile host and the foreign agent. Different solutions can be tested or used at the same time without
jeopardizing the stability of the Internet. Furthermore, optimizing of these new mechanisms is quite simple
because they only cover one single hop.
The authors assume that the short delay between the mobile host and foreign agent could be determined and
was independent of other traffic streams. An optimized TCP could use precise time-outs to guarantee
retransmission as fast as possible. Even standard TCP could benefit from the short round trip time, so
recovering faster from packet loss. Delay is much higher in a typical wide area wireless network than in
wired networks due to FEC and MAC. GSM has a delay of up to 100ms circuit switched, 200ms and more
packet switched. This is even higher than the delay on transatlantic links.
Partitioning into two connections also allows the use of a different transport layer protocol between the
foreign agent and the mobile host or the use of compressed headers etc. The foreign agent can now act as a
gateway to translate between the different protocols.
6.4.3 Disadvantages of I-TCP:
The loss of the end-to-end semantics of TCP might cause problems if the foreign agent partitioning the
TCP connection crashes. If a sender receives an acknowledgement, it assumes that the receiver got the
packet. Receiving an acknowledgement now only means that the foreign agent received the packet.
68
Mobile Computing
The correspondent node does not know anything about the partitioning, so a crashing access node may also
crash applications running on the correspondent node assuming reliable end-to-end delivery.
In practical use, increased handover latency may be much more problematic. The foreign agent besides
forwarding them to the mobile host buffers all packets sent by the correspondent host. The foreign agent
removes a packet from the buffer as soon as the appropriate acknowledgement arrives. If the mobile host
now performs a handover to another foreign agent. It takes a while before the old foreign agent can forward
the buffered data to the new foreign agent. During this time the packet may arrive. All these packets have to
be forwarded to the new foreign agent first, before it can start forwarding the new packets redirected to it.
The foreign agent must be a trusted entity because the TCP connections end at this point. If user apply endto-end encryption e.g. according to RFC 2401, the foreign agent has to be integrated into all security
mechanisms.
6.4.5 Snooping TCP
One of the drawbacks of I-TCP is the segmentation of the single TCP connection into two TCP
connections. This loses the original end-to-end TCP semantic.
The following TCP enhancements work completely transparently and leave the TCP end-to-end connection
intact. The main function of the enhancement is to buffer data close to the mobile host to perform fast local
transmission in case of packet loss. A good place for the enhancement of TCP could be the foreign agent in
the Mobile IP context.
In this approach, the foreign agent buffers all packets with destination mobile host and additionally
‘snoops’ the packet flow in both directions to recognize acknowledgements. The reason for buffering
packets towards the mobile node is to enable the foreign agent to perform a local retransmission in case of
packet loss on the wireless link. The foreign agent buffers every packet until it receives an
acknowledgement from the mobile host. If the foreign agent does not receive an acknowledgement from
the mobile host within a certain amount of time, either the packet or the acknowledgement has been lost.
Alternatively, the foreign agent could receive a duplicate ACK, which also shows the loss of a packet. Now
the foreign agent retransmits the packet directly from the buffer, performing a much faster retransmission
compared to the correspondent host. The time-out for acknowledgements can be much shorter, because it
reflects only the delay of one hop plus processing time.
To remain transparent, the foreign agent must not acknowledge data to the correspondent host. This would
make the correspondent host believe that the mobile host had received the data and would violate the endto-end semantic in case of a foreign agent failure. However, the foreign agent can filter the duplicate
acknowledgements to avoid unnecessary retransmissions of data from the correspondent
If the foreign agent now crashes, the time-out of the correspondent host still works and triggers a
retransmission. The foreign agent may discard duplicates the packets already retransmitted locally and
acknowledged by the mobile host. This avoids unnecessary traffic on the wireless link.
Data transfer from the mobile host with destination correspondent host works as follows: The foreign
agent snoops into the packet stream to detect gaps in the sequence numbers of TCP. As soon as the foreign
agent detects a missing packet, it returns a negative acknowledgement (NACK) to the mobile host. The
mobile host can now retransmit the missing packet immediately. Reordering of packets is done
automatically at the correspondent host by TCP.
69
Mobile Computing
Extending the functions of a foreign agent with a ‘snooping’ TCP has several advantages:
The end-to-end TCP semantics is preserved. No matter at what time the foreign agent crashes(if this is the
location of the buffering and snooping mechanisms), neither the correspondent host nor the mobile host
have an inconsistent view of the TCP connection as is possible with I-TCP .The approach automatically
falls back to standard TCP if the enhancements stop working.
The correspondent host does not need to be changed; most of the enhancements are in the foreign agent.
Supporting only the packet stream from the correspondent host to the mobile host does not even require
changes in the mobile host.
It does not need a handover of state as soon as the mobile host moves to another foreign agent. Assume
there might still be data in the buffer not transferred to the next foreign agent. All that happens is a time-out
at the correspondent host and retransmission of the packets, possibly already to the new care-of address.
It does not matter if the next foreign agent uses the enhancement or not. If not, the approach automatically
falls back to the standard solution. This is one of the problems of I-TCP, since the old foreign agent may
have already signaled the correct receipt of data via acknowledgements to the correspondent host and now
has to transfer these packets to the mobile host via the new foreign agent.
Disadvantages:
Snooping TCP does not isolate the behavior of the wireless link as well as I-TCP. Assume, for example,
that it takes some time until the foreign agent can successfully retransmit a packet from its buffer due to
problems on the wireless link (congestion, interference) . Although the time-out in the foreign agent may be
much shorter than the one of the correspondent host, after,
70
Mobile Computing
Chapter 7
Mobile Network Layer
7.1 Mobile IP
We know that IP is the common base for thousands of applications and runs over dozens of different
networks. The Mobile IP adds mobility support to the Internet network layer protocol IP.The basic idea
here is to combine or merge the world of mobile phones with the internet and to support mobility in the
most efficient way.
The original standard RFC 2002 is Perkins and Solomon described the development of mobile IP, all
packet formats, mechanisms and protocols.The new version of Mobile IP does not have major changes, but
corrects some minor problems.
7.1.1 Goals , assumptions and requirements:
Goals and Assumptions:
We know that Internet is the network for global data communication with hundreds of millions of user. The
basic question that may arise in our mind is ‘Why not simply use a mobile computer in the internet?’
The answer of “Once you leave your home network [i.e. the network your computer is configured for] the
computer will not receive a single packet, the reason is well known to us i.e. the host sends and IP packet
with header containing a destination address with other fields. Here the destination address not only has
receiver’s details but also the subnet details also.
The router looks at the destination address in the incoming packet and forwards them respectively as
directed by the routing look-up table. For optimization of these tables the router stores only the prefixes .As
long as the receiver is in the same subnet, the packets reach, but as soon as it moves outside the subnet the
packet will not reach it which means host need a “topologically correct address “.
Solution for this problem Called as “ Quick Solution “
1.
Assign to the computer a new topologically correct IP address i.e. moving to new location would
mean assigning a new IP address. The problem it is impossible to find a host or mobile on the
Internet that has just changed its address.
2.
Dynamic IP Address
By the concept of Dynamic IP address, you could be reachable using the same logical computer
name; but it is important to note that these considerations, it is important if a user wants to offer
services from a mobile node i.e. the node should act as a server; so instead of IP, DHCP can be
used.
Another question in this context is “What happens if we dynamically adapt the IP address with
regard to the current location?”
The problem here is that the domain name system (DNS) needs some time before it updates the
internal tables necessary to map a logical name to and IP address. This approach will not work if the
mobile node moves quite often. Moreover the Internet and DNS cannot make frequent updates; it is
simply too expensive to update quickly.
71
Mobile Computing
Problem of higher layer protocols
TCP relies on IP addresses, changing IP address, while still having a TCP connection open means
breaking the connection.
We know that the TCP connection is identified by {source IP address, source port, destination IP
address, and destination port} tuples. Thus TCP cannot survive any address change.
3.
Creating specific routes to the mobile nodes. It is theoretically possible to change routing tables all
over the world to create specific routes for mobiles. Routers are no doubt extremely fastforwarding, but fast updates are not allowed.
Fast forwarding can be achieved with special hardware support, but latter is a piece of software
that cannot handle the burden of frequent updates.
Finally no service providers or system administrators would allow changes to the routing tables,
probably sacrificing stability to provide mobility.
Requirements
As the quick solution, which is described above failed, many field trials and proprietary systems
finally led to Mobile IP as a standard to enable mobility in the Internet.
With the development of these standards, several requirements accompanied they are:
i. Compatibility
 The new standards cannot bring change in the applications or network protocols already existing in the
system.
 People still are attached to the same browser and do not want to change the application or the
Operating System for the sake of mobility.
 Thus the Mobile IP has to work with the existing Operating System.
 All the routers need not be changed, but the routers capabilities have to be enhanced to support
mobility.
 Mobile IP must not require special media or MAC / LLC protocols; thus they have to use the same
interfaces and mechanisms to access lower layers.
 Mobile IP has to ensure that user can still access all the other servers and systems in the internet (using
the same address format and routing mechanisms).
ii. Transparency
 Mobility should be invisible for many higher layer protocols and applications, only noticeable points
would be lower bandwidth and some interruptions in service.
 On contrary there are some application like the cost –based routing or video compression where the
applications need to know about “mobility aware”. Which means, “it is currently possible to use
different network, the software could choose the cheapest one. Or if a video application knows that
only low bandwidth connection is currently available”
iii. Scalability and Efficiency
 Introducing a new mechanism to the Internet must not compromise with the efficiency.
 Enhancing IP for mobility must not generate too many new messages flooding the whole network.
 With this special care has to be taken for lower bandwidth of wireless links.
 Looking at the growth of mobile devices and the increase in number of computers connected to the
Internet.
 Just think of cars, mobile phones, trucks or planes where there will be some of other form of IP
implementation and may require mobile IP.
 Thus it is crucial for a mobile IP to be scalable over a large number of participants in the whole
Internet, worldwide.
72
Mobile Computing
iv. Security
 Mobility by its nature poses many security problems; thus the basic requirements would be to
authenticate the messages related to the management of Mobile IP.
 The IP layer can only guarantee that the IP address of the receiver is correct, but it has no way of
detecting any attacks or preventing any fake IP addresses. (Generally in the internet philosophy it is
left to the higher layers)
Thus the goal of Mobile IP is
“Supporting end-system mobility while maintaining scalability,
efficiency and compatibility in all respects with existing applications and Internet protocols”
7.2 Entities and Terminologies
RFC 3344 defines several entities and terms needed for Mobile IP.
The following example illustrates them
1. Mobile Node (MN)
2. Correspondent Node (CN)
3. Home Network (HN)
4. Foreign Network
5. Foreign Agent (FA)
6. Care-Of-Address (COA)
7. Home Agent (HA)
Home
Network
Router
HA
Router
FA
Internet
CN
MN
Foreign
Network
Router
HA
Fig 7.2





The above fig 7.2 shows a CN, which is connected via a router to the Internet, similarly the home and
the foreign network.
The Home Agent (HA) is implemented on the router connecting the home network with the internet.
An FA is implemented on the router to the foreign network.
The MN is currently in the foreign network.
The tunnel for packets towards the MN starts at the HA and ends at the FA.
Mobile Node
This is an end system or router which can change its point of attachment to the internet using the mobile IP.
The MN keeps its IP address and can continuously communicate with any other system in the internet as
long as link-layer connectivity is given.
A router onboard an aircraft can be a powerful mobile node.
Correspondent Node (CN)
CN is the partner for the MN; which forms the communication partners for MN.
The correspondent node can be fixed or mobile.
73
Mobile Computing
Home Network (HN)
This is the subnet the MN belongs to with respect to its IP address. For home network the mobile IP
support is not needed.
Foreign Agent (FA)
The foreign agent can provide several services to the MN during its visit to the foreign network.
The foreign agent can be the default router for the MN. The foreign agents can also provide security
services as they belong to the foreign network. Note for the Mobile IP functioning, FA is not mandatory.
Typically they are implemented at the router for the subnet the MN is attached to.
Care-Of-Address (COA)
COA defines the current location of MN from IP point of view. All the packets infact reach COA before
reaching MN. Packet delivery towards the MN is done by tunnel; precisely COA marks the tunnel
endpoint.
COA can be located in two different possible locations
1. Foreign agent COA
2. Co-located COA
Foreign agent COA is located at the FA; FA forms the tunnel end-point and then forwards the packet
to MN. Many MA using the FA can share a common COA.
If the MN temporarily acquired an additional IP address acting as an COA forms a co-located COA;
thus MN becomes the tunnel end point.
Home Agent (HA)
This is located in the home network and provides several services for the MN. The tunnel towards the MN
starts from the home agent .The MN current location is provided by COA, the location registry of this is
maintained by HA. Three alternative implementation of an HA exists.
i.
The HA can be implemented on a router that is responsible for the home
network. This is supposed to be the best position, because without
optimizations to mobile IP, all packets for the MN have to go through the
router anyway.
ii.
If changing the router’s software is not possible, the HA could also be
implemented on an arbitrary node in the subnet. One disadvantage of this
solution is the double-crossing of the router by the packet if the MN is in
a foreign network.
iii.
Importantly, a home network is not necessary at all, the HA could be
given on the ‘router’ but this time only acting as a manager for MN’s
belonging to a virtual home network.
In this solution, all MN’s are always in a foreign network.
7.3 IP Packet Delivery
The following diagram demonstrates the packet delivery to and from the MN.
Step1: The correspondent node CN wants to send an IP packet to the MN; the CN does not need to know
anything about the MN’s current location. Which means CN sends an IP packet CN as the source address
and MN as the destination address.
As Internet is not having any information on the current location of MN, it routes the packet to the router
responsible for the home network of MN.
74
Mobile Computing
Step 2: HA now intercepts the packet, knowing that MN is currently not in its home network. Now the
packet is not forwarded in the same way but is encapsulated and tunneled to the COA. Now new header is
added to the IP header, showing COA as the new destination by making HA as the source of the
encapsulated packet.
Step 3: The foreign agent now decapsulates the packet, which means it removes the additional header and
forwards the original packet with CN as source and MN as destination.
Note for MN mobility is not visible, it receives the packet with same sender and receiver’s address as it
would have done in the home network.
Step 4: MN sends the packet as usual with its own fixed IP address as source and CN’s address as
destination
The router with the FA acts as default router and forwards the packet in the same way as it would do for
any other node in the foreign network.
If CN were also a mobile node residing in a foreign network, the same step 1 to 3 would be applied in other
direction.
7.4 Agent Discovery
Additional mechanisms are needed for Mobile IP to work, they are described here.
One question, which is asked in this context, is how does a MN find that it has moved?
In order to keep track of this, Mobile IP describes 2 methods
a. Agent Advertisement
b. Agent Solicitation
7.5 Agent Advertisement
Foreign agent and home agents advertise their presence periodically using special agent advertisement
messages. These messages use Internal Control Message Protocol (ICMP) obeying RFC 1256 with some
mobility extensions.
These messages can be seen as beacon broadcast into the subnet. The agent advertisement packet according
to RFC 1256 with the extension for mobility is shown in the diagram.
The IP destination address according to standard router advertisement can be either set to 224.0.0.1 which
is the multicast address for all systems on a link or to the broadcast address 255.255.255.255.
3.
Router
HA
Home
Network
2.
1.
Router
FA
Internet
MN
Foreign
Network
4.
1.
CN
Router
HA
Fig 7.5a
The fields in the ICMP part are defined as follows
1. Type is set to 9
2. Code can be 0 if the agent also routes from non-mobile nodes
75
Mobile Computing
3.
4.
5.
6.
code is 16 if it does not route anything other than mobile traffic
#Addresses -represents the number of addresses advertised with this packet.
Lifetime –length of time this advertisement is valid
Preference levels – the preference levels for each address helps a node to choose the router that is
the most eager one to get a new node.
The extension for mobility has the following fields defined
a. Type=16
b. Length –depends on the number of COA’s provided with the message and equal to 6+4.
An agent shows the total number of advertisements sent since initialization in the
Sequence number.
c. Registration lifetime –specify the maximum lifetime in seconds a node can request during
Registration.
d.
R- shows if a registration with this agent is required even when using a collocated COA
at the MN
B-if the agent is currently too busy to accept new registrations; it can set the ‘B’ bit.
H- Denote if the agent offers services as a home page.
F-as foreign page
M-specifies minimal encapsulation
G-generic routing encapsulation
r- is set to zero and must be ignored
T-indicates that reverse tunneling is supported by the FA.
The further fields have COA’s advertised
e.
A mobile node in a subnet can now receive agent advertisement from either its home agent of a foreign
agent. This is one way for the MN to discover its location.
0
type
#addresses
7
8
15
16
23
code
24
31
checksum
addr.size
lifetime
router address1
router address 2
Fig 7.5 b
76
Mobile Computing
7.6 Agent Solicitation
Agent Solicitations are sent from a mobile node when no agent advertisement is present or the interval time
is too high and an MN has not received a COA by other means.
Solicitations are based on RFC 1256 for router solicitation. A mobile node can send out three solicitations
per second as soon as it enters new network.
Note: Care must be taken so that these solicitations do not flood the network. Also in highly dynamic
wireless networks with moving MN’s and probably with applications requiring continuous packet streams
even one-second intervals between solicitation messages might be too long. Before an MN even gets a new
address many packets will be lost without additional mechanisms.
The node should not go on with solicitations if there are no answers received by it, because if done then it
may flood the network. Discovering a new agent can be done anytime.
7.7 Registration
After advertising and soliciting, the MN can now receive a COA, either one for a FA or a co-located COA.
Now MN knows its location i.e. home or foreign network and the capabilities of the agents.
The next task for MN is the registration with the HA if MN is in the foreign network.
“The main purpose of registration is to inform the HA of the current location for correct forwarding of
packets”.
Depending on the location of the COA, registration can be done in two different ways:
a. COA is at the FA
If the COA is at the FA, then MN sends the registration request with COA to FA,
this forwards the request to HA.
b.
c.
The HA combines mobile node’s home IP address + the current COA to form
mobility binding.
Mobility Binding = Mobile node’s home IP address, current COA and additionally
77
Mobile Computing
78