Академический Документы
Профессиональный Документы
Культура Документы
Unit I Introduction
Mobile Computing Mobile Computing Vs wireless Networking Mobile Computing
Applications Characteristics of Mobile computing Structure of Mobile Computing
Application. MAC Protocols Wireless MAC Issues Fixed Assignment Schemes Random
Assignment Schemes Reservation Based Schemes.
Unit II Mobile Internet Protocol and Transport Layer
Overview of Mobile IP Features of Mobile IP Key Mechanism in Mobile IP route
Optimization. Overview of TCP/IP Architecture of TCP/IP- Adaptation of TCP Window
Improvement in TCP Performance.
Unit III Mobile Telecommunication System
Global System for Mobile Communication (GSM) General Packet Radio Service
(GPRS) Universal Mobile Telecommunication System (UMTS)
Unit IV Mobile Ad hoc Networks
Ad-Hoc Basic Concepts Characteristics Applications Design Issues Routing
Essential of Traditional Routing Protocols Popular Routing Protocols Vehicular Ad Hoc
networks ( VANET)MANET Vs VANET Security.
Unit V Mobile Platforms and Applications
Mobile Device Operating Systems Special Constrains & Requirements Commercial
MobileOperating Systems Software Development Kit: iOS, Android, BlackBerry, Windows
Phone-M-commerece- Structure Pros & Cons Mobile Payment System Security Issues.
References:
Prasant Kumar Pattnaik, Rajib Mall, Fundamentals of Mobile Computing, PHI Learning Pvt.
Ltd, New Delhi 2012.
Jochen H. Schller, Mobile Communications, Second Edition, Pearson Education, New Delhi,
2007.
Dharma Prakash Agarval, Qing and An Zeng, "Introduction to Wireless and Mobile systems",
Thomson Asia Pvt Ltd, 2005.
Page 1
Uwe Hansmann, Lothar Merk, Martin S. Nicklons and Thomas Stober, Principles of Mobile
Computing, Springer, 2003.
William.C.Y.Lee,Mobile Cellular Telecommunications-Analog and Digital Systems, Second
Edition,Tata Mc Graw Hill Edition ,2006.
C.K.Toh, AdHoc Mobile Wireless Networks, First Edition, Pearson Education, 2002.
Android Developers : http://developer.android.com/index.html
Apple Developer : https://developer.apple.com/
Windows Phone Dev Center : http://developer.windowsphone.com
BlackBerry Developer : http://developer.blackberry.com/
Page 2
Unit I Introduction
1.1 Mobile Computing
Mobile Computing is a technology that allows transmission of data, voice and video via a
computer or any other wireless enabled device without having to be connected to a fixed
physical link.
The main concept involves Mobile communication, Mobile hardware, Mobile software.
Mobile communication
The mobile communication refers to the infrastructure put in place to ensure that
seamless and reliable communication goes on.
The data format is also defined at this stage. This ensures that there is no collision with
other existing systems which offer the same service.
Mobile Hardware
Mobile hardware includes mobile devices or device components that receive or access the
service of mobility.
It would range from portable laptops, smartphones, tablet PCs, Personal Digital
Assistants.
Page 3
Mobile software
Mobile software is the actual program that runs on the mobile hardware.
Since portability is the main factor, this type of computing ensures that users are not tied
or pinned to a single physical location, but are able to operate from anywhere.
ii.
iii.
Page 4
1g
Drawbacks:
2g
Drawbacks:
2.5g
Features:
3g
Prepared by: Dr.A.Neela Madheswari, Asso Prof/CSE, MEC
Page 5
During 2000
Data transmission speed is 144 Kbps to 2 Mbps
Features:
Faster communication
Send/receive large email messages
High speed web
TV streaming/mobile TV
4g
Drawbacks:
5g
Page 6
Mobile computing is defined as the technology that allows transmission of data, voice and video
via computer or wireless devices. The main advantage of mobile computing is users no need to
sit in a particular place or location. Mobile computing denotes accessing information and
services while we are on move. Wireless networking provides basic communication
infrastructure to make mobile computing possible. Mobile computing is based on wireless
networking. Wireless networking forms one of the necessary components of mobile computing.
Wireless networks appear in various forms such as: i) WLANs, ii) mobile cellular networks, iii)
Personal Area Networks, iv) Adhoc networks.
Wireless networks appear in two forms such as: i) extension of wired networks with the existing
wired infrastructure, ii) ad hoc networks also known as MANET (Mobile Ad hoc Networks).
WSNS (Wireless Sensor Networks) are special type of wireless ad hoc networks.
Wireless networking
X
X
Mobile computing
X
Example
Stationary computers
Notebook in a hotel
Wireless LAN building
PDAs
Page 7
2. Local awareness:
Prepared by: Dr.A.Neela Madheswari, Asso Prof/CSE, MEC
Page 8
3. Adaptation:
4. Broadcast:
5. Personalization:
This is required to let the users easily avail information with their hand held
devices.
Page 9
1. Presentation tier:
The topmost level of a mobile computing application concerns the user interface.
A good user interface facilitates the users to issue requests and to present the
results to them meaningfully.
This layer usually includes web browsers and customized client programs for
dissemination of information and for collection of data from the user.
2. Application tier:
This layer has the vital responsibility of making logical decisions and performing
calculations.
It also moves and processes data between the presentation and data layers.
It performs the processing of user input, obtaining information and then making
decisions.
This layer is implemented using technology like Java, .NET services, cold fusion,
etc.
The implementation of this layer and the functionality provided by this layer
should be database independent.
3. Data tier:
It is responsible for providing the basic facilities of data storage, access, and
manipulation.
Page 10
The MAC layer is the "low" part of the second OSI layer, the layer of the "data link". In fact, the
IEEE divided this layer into two layers "above" is the control layer the logical connection
(Logical Link Control, LLC) and "down" the control layer, the medium access (MAC).
IEEE 802 refers to a family of IEEE standards dealing with LAN and MAN. It includes various
groups and some of them are active and some of them are inactive. It provides standard for
physical and data link layer in OSI model.
Some of the IEEE standards used for MAC are:
IEEE 802.3 Ethernet
IEEE 802.4 Token Bus
IEEE 802.5 Token Ring
IEEE 802.11 Wireless LAN and Wi-Fi
IEEE 802.15 Wireless PAN, Bluetooth and Zigbee Technologies
IEEE 802.15.1 Wireless PAN or Bluetooth operates under 3 classes: 100 mts, 10 mts
and 1 mt
7. IEEE 802.15.4 Zigbee
8. IEEE 802.15.6 Body Area networks
9. IEEE 802.15.7 Visible light communications
10. IEEE 802.16 WiMAX (World wide Interoperability for Microwave access)
1.
2.
3.
4.
5.
6.
For WAN, we have the standard named X.25 by ITU (International Telecommunication Union).
It relates to the lower three layers. X.25 at the physical layer denotes the specification for
electrical, mechanical, etc. At data link layer, it covers link access protocol i.e. LAPB (Link
Access Protocol Balanced) that defines how two devices establish error-free connection. At
network layer, it specifies packet format, routing and multiplexing of transmission between
communicating devices.
We are having two categories of network according to the medium it is used namely: i) networks
that use dedicated link between one node to another, ii) networks that use shared communication
medium between them.
When we are using dedicated link between source and destination system, then there is no
problem. But when we use shared communication medium among multiple systems, the there
arise lot of issues: i) which device will have control over the shared medium, ii) how much time
the device will take control over the shared medium, iii) when two or more devices trying to use
the shared medium at the same time, what is the output?
MAC protocol will take care of these issues. The major classification of MAC protocols are:
i.
ii.
Page 11
iii.
MAC protocol in wireless channel is much more complex than wired channel.
In infrastructure-less networks the issue of hidden and exposed terminals make MAC
protocol inefficient unless special care is taken.
Page 12
MAC protocols usually inhibit transmission when transmission from another terminal is
detected. Consider another node D comes in the range of C. i.e. D and C are in same range of
medium to communicate. Now C can able to reach B and D.
Consider B transmit data to A. During this time, C cannot be transmit to any other node since C
and B shares the same communication medium or in other words, B and C using same range of
medium to communicate. Even if node D wants to transmit to node C and it can be received
properly without any collision, the transmission cannot be happened. This is due to the
knowledge of C that B is communicating to A. The data transmission from B and A is exposed to
C and thus the transmission from C and D cannot be occur. This problem is referred as exposed
terminal problem.
Page 13
The graph is plotted with frequency in y axis and time in x axis for FDMA. The available
bandwidth of the channel is divided into many narrower frequency bands called channels. Each
user is allotted for a particular range of frequency. if we want to use full duplex communication,
then each user is allotted with two different frequencies, one for sending and the other for
receiving. When a call is undertaken by the user, the frequency used by that user will not be
allotted for other user. Hence it does not achieve high channel utilization. In the wired telephone
transmission system, this scheme is used.
Advantages of FDMA
Channel bandwidth is relatively narrow
Simple algorithmically, and from a hardware standpoint
Fairly efficient when the number of stations is small and the traffic is uniformly constant
Capacity increase can be obtained by reducing the information bit rate and using efficient
digital code
No need for network timing
No restriction regarding the type of baseband or type of modulation
Disadvantages of FDMA
If channel is not in use, it sits idle
The presence of guard bands
Maximum bit rate per channel is fixed
Does not differ significantly from analog system
Page 14
Advantages of TDMA
Flexible bit rate
No frequency guard band required
Easy for mobile or base stations to initiate and execute hands off
Extended battery life
TDMA installations offer savings in base station equipment, space and maintenance
The most cost-effective technology for upgrading a current analog system to digital
Disadvantages of TDMA
Requires network-wide timing synchronization
Requires signal processing for matched filtering and correlation detection
Demands high peak power on uplink in transient mode
Multipath distortion
Disadvantages of CDMA
As the number of users increases, the overall quality of service decreases
Self-jamming
Page 15
ALOHA
Slotted ALOHA
CSMA
CSMA/CD
CSMA/CA
i. ALOHA: It is the simplest scheme. It is free for all. When a node needs to send, it does so. If a
frame successfully reaches the destination, then it sends the next frame. It listens for an amount
of time equal to the maximum round trip delay plus a fixed increment. If it hears an
acknowledgement, then there is no problem i.e. the packets are reached without any problem.
Otherwise, it resends after waiting a random amount of time. This type is suitable when small
number of users send data infrequently.
ii. Slotted ALOHA: It is similar to ALOHA, the exception is that the time is divided into equalsized slots in which a packet can be sent. Thus, the size of the packet is restricted. The slotted
ALOHA system employs beacon signals that are sent at precise intervals that mark the beginning
of a slot, at which point the nodes having data to send can start to transmit. This scheme also
does not work well when the number of stations used to send data is high.
iii. CSMA: CSMA stands for Carrier Sense Multiple Access. Every node attached to the system
that implements CSMA is capable of sensing whether the communication medium is free to
transmit or not. Hence this scheme is called LBT (Listen Before Talking) i.e. the node senses the
medium before starting to transmit. If the node senses that some transmission is going on, then it
will not start its transmission.
iv. CSMA/CD: CSMA/CD stands for Carrier Sense Multiple Access with Collision Detection. In
this scheme, the sender starts to transmit if it senses the channel to be free. Even if it senses the
channel to be free, there can be a collision during transmission. This can be happens when two or
more nodes start sending the data at the same time. After sending data, node will sense whether
there is any collision. If there is any collision, then it will stop its transmission. Hence it is also
called LAT (Listen After Talking).
v. CSMA/CA: CSMA/CA stands for Carrier Sense Multiple Access with Collision Avoidance.
There are a multiple number of nodes want to transmit data at the same time whenever the
channel is free to transmit. But more than two systems want to use the shared communication
channel, then there will be a collision and hence the receiver cannot able to receive proper data.
Prepared by: Dr.A.Neela Madheswari, Asso Prof/CSE, MEC
Page 16
To avoid this occurrence of collision, in this scheme, every node will follow a random amount of
time delay to sense the channel is free or not after a particular wait time while checking for the
channel to be free. Hence this scheme is called as collision avoidance.
Page 17
Thus here hidden terminal problem is solved. But collision can occur during the sending of RTS.
i.e. A and C send RTS to B at the same time. In this case, B can resolve this problem by
acknowledging only for one station with CTS. No transmission will occur without an appropriate
CTS.
Solution to Exposed terminal problem
The steps to be followed under MACA to avoid exposed terminal problem are:
i.
ii.
iii.
iv.
v.
Page 18
Using Mobile IP topology, the following scenario shows how a datagram moves from
one point to another within the Mobile IP framework.
1. The Internet host sends a datagram to the mobile node using the mobile node's home
address (normal IP routing process).
Page 19
2. If the mobile node is on its home network, the datagram is delivered through the normal
IP process to the mobile node. Otherwise, the home agent picks up the datagram.
3. If the mobile node is on a foreign network, the home agent forwards the datagram to the
foreign agent.
4. The foreign agent delivers the datagram to the mobile node.
5. Datagrams from the mobile node to the Internet host are sent using normal IP routing
procedures.
6. If the mobile node is on a foreign network, the packets are delivered to the foreign agent.
The foreign agent forwards the datagram to the Internet host.
Mobile IP Functional Entities
Mobile IP introduces the following new functional entities:
1.
Mobile Node (MN)Host or router that changes its point of attachment from one
network to another.
2.
Home Agent (HA)Router on a mobile node's home network that intercepts datagrams
destined for the mobile node, and delivers them through the care-of address. The home
agent also maintains current location information for the mobile node.
3.
Foreign Agent (FA)Router on a mobile node's visited network that provides routing
services to the mobile node while the mobile node is registered.
The mobile node's home address always identifies the mobile node, regardless of its
current point of attachment to the Internet or an organization's network.
When away from home, a care-of address associates the mobile node with its home
address by providing information about the mobile node's current point of attachment to
the Internet or an organization's network.
Mobile IP uses a registration mechanism to register the care-of address with a home
agent.
Page 20
The home agent redirects datagrams from the home network to the care-of address by
constructing a new IP header that contains the mobile node's care-of address as the
destination IP address.
This new header then encapsulates the original IP datagram, causing the mobile node's
home address to have no effect on the encapsulated datagram's routing until it arrives at
the care-of address.
This type of encapsulation is also called tunneling. After arriving at the care-of address,
each datagram is de-encapsulated and then delivered to the mobile node.
Consider a mobile node is currently in network A, it has its associated network IP address. The
network is called home network. If the mobile node changes its position to any other network,
this new network is called foreign network and to get the connectivity to the new network, the
mobile node should be associated with new networks associated IP address. If we change the
mobile nodes IP address according to the new network position, then it will lose its previous
connectivity. To solve these problems, mobile IP is used for mobile nodes. According to the
mobile IP, each mobile node is associated with a pair of IP address namely: i) home address and
ii) care-of-address.
Mobile IP agents
Mobile IP agents are routers that have been given additional programming to make them
Mobile IP aware. The communication between a mobile node and the agent on its local
network is basically the same as the normal communication required between a device on an IP
network and its local router, except more information needs to be sent when the router is an
agent. The router in the home network called home agent and the router in the foreign network
called foreign agent are commonly called mobile IP agents. These home and foreign agents are
used to route the packets for mobile node.
Care-of address
There are two types of care-of addresses. They are:
i.
Foreign agent care-of address: When the mobile node is in foreign network
and if the mobile node is not having its own IP address, then it should use IP
address of the foreign agent itself. Thus foreign agents IP address is used as a
care-of address for mobile node. This type of care-of address is called foreign
agent care-of address. In this case, the mobile node is connected to the foreign
agent using the layer 2 protocol only. Any packets routing from home agent
will reach the foreign agent, then from foreign agent, it uses layer 2 protocol
to reach the mobile node. Consider the figure below for example.
Page 21
ii.
Co-located care-of address: When the mobile node has its own IP address in
its foreign network, this address is referred as co-located care-of address. Any
packet to be routed to the mobile node in the foreign network, then it will be
routed to the mobile nodes co-located care-of address. The mobile node can
obtain this address by two methods: i) manually by enquiring the admin to
provide IP, ii) using DHCP protocol. Consider the figure below for example.
Page 22
During its movement mobile end systems communication should not be disrupted.
The IP address is to be managed transparently and there should not be effect of mobility
on any ongoing communication.
2. Compatibility:
3. Security:
Mobile IP should as far as possible, provide users with secure communications over
Internet.
This should be results in large number of messages or it should not incur too much
computational overhead.
Page 23
i.
Messages are sent from the agent to the node containing important
information about the agent. These messages are called agent advertisement
messages.
ii.
A message can also be sent from the node to the agent asking for this
information to be sent. This message is called agent solicitation message (i.e.
request for agent advertisement).
Orientation: The node uses the agent discovery process to determine where it is.
Specifically, it learns whether it is on its home network or a foreign network by
identifying the agent that sends it messages.
Care-Of Address Assignment: The agent discovery process is the method used to tell a
mobile node the care-of address it should use, when foreign agent care-of addressing is
used.
Agent Solicitation: This message can be sent by a mobile IP device to nudge a local
agent to send an Agent Advertisement.
Agent Registration
Once a mobile node has completed agent discovery, it knows whether it is on its home network
or a foreign network. If on its home network it communicates as a regular IP device, but if on a
foreign network it must activate Mobile IP. This requires that it communicate with its home
agent so information and instructions can be exchanged between the two. This process is called
home agent registration, or more simply, just registration.
The main purpose of registration is to actually start Mobile IP working. The mobile node must
contact the home agent and tell it that it is on a foreign network and request that datagram
forwarding be turned on. It also must let the home agent know its care-of address so the home
agent knows where to send the forwarded datagrams. The home agent in turn needs to
communicate various types of information back to the mobile node when registration is
performed. Note that the foreign agent is not really involved in registration, except perhaps to
relay messages, as we will see.
Mobile Node Registration Events
Successful registration establishes what is called in the standard a mobility binding between a
home agent and a mobile node. For the duration of the registration, the mobile node's regular
Prepared by: Dr.A.Neela Madheswari, Asso Prof/CSE, MEC
Page 24
home address is tied to its current care-of address and the home agent will encapsulate and
forward datagrams addressed to the home address over to the care-of address. The mobile node is
supposed to manage its registration and handle various events using several actions:
o
Registration: The mobile node initiates a registration when it first detects it has moved
from its home network to a foreign network.
Deregistration: When the mobile node returns home, it should tell the home agent to
cancel forwarding, a process called deregistration.
Reregistration: If the mobile node moves from one foreign network to another, or if its
care-of address changes, it must update its registration with the home agent. It also must
do so if its current registration is about to expire, even if it remains stationary on one
foreign network.
Each registration is established only for a specific length of time, which is why regular
reregistration is required whether the device moves or not. Registrations are time-limited to
ensure that they do not become stale. If, for example, a node forgets to de-register when it returns
home, the datagram forwarding will eventually stop when the registration expires.
Mobile IP Data encapsulation and Tunneling
Once a mobile node on a foreign network has completed a successful registration with its home
agent, the Mobile IP datagram forwarding process will be fully activated. The home agent will
intercept datagrams intended for the mobile node as they are routed to its home network, and
forward them to the mobile node. This is done by encapsulating the datagrams and then sending
them to the node's care-of address.
Mobile IP Data Encapsulation Techniques
Encapsulation is required because each datagram we intercept and forward needs to be resent
over the network to the device's care-of address. The default encapsulation process used in
Mobile IP is called IP Encapsulation Within IP, defined in RFC 2003 and commonly abbreviated
IP-in-IP. It is a relatively simple method that describes how to take an IP datagram and make it
the payload of another IP datagram. In Mobile IP, the new headers specify how to send the
encapsulated datagram to the mobile node's care-of address.
In addition to IP-in-IP, two other encapsulation methods may be optionally used: Minimal
Encapsulation Within IP, defined in RFC 2004, and Generic Routing Encapsulation (GRE),
defined in RFC 1701.
The Mobile IP Data Delivery Tunnel
The encapsulation process creates a logical construct called a tunnel between the device that
encapsulates and the one that decapsulates. This is the same idea of a tunnel used in discussions
Prepared by: Dr.A.Neela Madheswari, Asso Prof/CSE, MEC
Page 25
of virtual private networks (VPNs), IPSec tunnel mode, or the various other tunneling protocols
used for security.
The tunnel represents a conduit over which datagrams are forwarded across an arbitrary
internetwork, with the details of the encapsulated datagram (meaning the original IP headers)
temporarily hidden.
In Mobile IP, the start of the tunnel is the home agent, which does the encapsulation. The end of
the tunnel depends on what sort of care-of address is being used:
o
Foreign Agent Care-Of Address: The foreign agent is the end of the tunnel. It receives
encapsulated messages from the home agent, strips off the outer IP header and then
delivers the datagram to the mobile node. This is generally done using layer two, because
the mobile node and foreign agent are on the same local network, and of course, the
mobile node does not have its own IP address on that network (it is using that of the
foreign agent.)
Co-Located Care-Of Address: The mobile node itself is the end of the tunnel and strips
off the outer header.
Page 26
Page 27
Tunneling takes place to forward the datagram from the HA to the mobile node. The packets are
coming from the remote host to the mobile node. if the mobile node is in home network, then it
will follow the normal IP routing process. If the mobile node is in foreign network, then the
packets or datagrams from the remote host will reach to the HA, where it will tunnel the packets
to the foreign network. The tunneling is of two ways:
1. If the mobile node follows co-located care-of address, then the tunneling path is from
HA to the mobile node. Thus the packets are routed through the tunnel from HA to
the mobile node directly.
2. If the mobile node follows FA care-of address, then the tunneling path is from HA to
the FA. Thus the packets from HA will tunnel from HA to FA and from the FA, it
Page 28
will follows the Layer2 protocol to reach the mobile agent. Here tunneling can be
done from HA to FA only.
The steps involved in tunneling process are:
a. When a HA receives a packet addressed to a mobile host, it forwards the packet to the
care-of address using IP-within-IP.
b. Using IP-within-IP, the HA inserts new IP header in front of the IP header of any
datagram.
c. Destination address is set to the care-of-address.
d. Source address is set to the HAs address.
e. After stripping out the first header, IP processes the packet again.
This is a result of the Open Systems Interconnect (OSI) Reference Model designed by the
International Standards Organization (ISO).
The OSI model describes network activities as having a structure of seven layers, each of
which has one or more protocols associated with it.
The layers represent data transfer operations common to all types of data transfers among
cooperating networks.
The protocol layers of the OSI Reference Model are traditionally listed from the top
(layer 7) to the bottom (layer 1) up, as shown in the following table.
The operations defined by the OSI model are conceptual and not unique to any particular
network protocol suite.
For example, the OSI network protocol suite implements all seven layers of the OSI
Reference Model.
TCP/IP uses some of OSI model layers and combines others. Other network protocols,
such as SNA, add an eighth layer.
Page 29
Layer
No.
Layer Name
Description
Application
Presentation
Session
Transport
Network
Data Link
Physical
and
terminations
between
TCP/IP does not correspond to this model directly, as it either combines several OSI
layers into a single layer, or does not use certain layers at all.
The following table shows the layers of TCP/IP, listed from topmost layer (application)
to lowest (physical network).
The table shows the TCP/IP protocol layers, their OSI Model equivalents, and examples
of the protocols available at each level of the TCP/IP protocol stack.
Page 30
Each host involved in a communication transaction runs its own implementation of the
protocol stack.
OSI
Equivalent
Layer
TCP/IP
Layer
5,6,7
Application, Session,
Presentation
Application
Transport
Transport
TCP, UDP
Network
Internet
Data Link
Data Link
Physical
Physical
Network
The physical network layer specifies the characteristics of the hardware to be used for the
network.
The physical layer of TCP/IP describes hardware standards such as IEEE 802.3, the
specification for Ethernet network media, and RS-232, the specification for standard pin
connectors.
Page 31
Data-Link Layer
The data-link layer identifies the network protocol type of the packet, in this case TCP/IP.
Examples of data-link layer protocols are Ethernet IEEE 802.2 framing and Point-toPoint Protocol (PPP) framing.
Internet Layer
This layer, also known as the network layer, accepts and delivers packets for the network.
It includes the powerful Internet protocol (IP), the Address Resolution Protocol (ARP)
protocol, Reverse Address Resolution Protocol (RARP), Internet Group Message
Protocol (IGMP), and the Internet Control Message Protocol (ICMP) protocol.
IP Protocol
The IP protocol and its associated routing protocols are possibly the most significant of the entire
TCP/IP suite. IP is responsible for:
Host-to-host communications - IP determines the path a packet must take, based on the
receiving host's IP address.
Fragmentation - If a packet is too large for transmission over the network media, IP on
the sending host breaks the packet into smaller fragments. IP on the receiving host then
reconstructs the fragments into the original packet.
ARP Protocol
The Address Resolution Protocol (ARP) conceptually exists between the data link and
Internet layers.
RARP protocol
It is used by IP to find the IP address based on the physical address of a computer. The operation
is reverse process of the ARP protocol.
Prepared by: Dr.A.Neela Madheswari, Asso Prof/CSE, MEC
Page 32
ICMP Protocol
Internet Control Message Protocol (ICMP) is the protocol responsible for detecting network error
conditions and reporting on them. ICMP reports on:
Transport Layer
The TCP/IP transport layer protocols ensure that packets arrive in sequence and without
error, by swapping acknowledgments of data reception, and retransmitting lost packets.
TCP Protocol
This transmission consists of a starting point, which opens the connection, the entire
transmission in byte order, and an ending point, which closes the connection.
TCP attaches a header onto the transmitted data. This header contains a large number of
parameters that help processes on the sending machine connect to peer processes on the
receiving machine.
TCP confirms that a packet has reached its destination by establishing an end-to-end
connection between sending and receiving hosts.
UDP Protocol
UDP, the other transport layer protocol, provides datagram delivery service.
It does not provide any means of verifying that connection was ever achieved between
receiving and sending hosts. Because UDP eliminates the processes of establishing and
Page 33
verifying connections, applications that send small amounts of data use it rather than
TCP.
Application Layer
The application layer defines standard Internet services and network applications that
anyone can use. These services work with the transport layer to send and receive data.
There are many applications layer protocols, some of which you probably already use.
1.
Standard TCP/IP services such as the ftp, tftp, and telnet commands
2.
3.
4.
5.
6.
TCP is a connection-oriented protocol; both ends of a connection keep strict track of all
data transmitted, so that any lost or jumbled segments can be retransmitted or reordered
as necessary to maintain reliable transport.
To compensate for limited buffer space (where received data is temporarily stored until
the appropriate application can process it), TCP hosts agree to limit the amount of
unacknowledged data that can be in transit at any given time.
This is referred to as the window size, and is communicated via a 16-bit field in the TCP
header.
At the start of the connection, both hosts allocate 32 KB of buffer space for incoming
data, so the initial window size for each is 32,768.
Page 34
Host A needs to send data to host B. It can tell from host B's advertised window size that
it can transmit up to 32,768 bytes of data (in intervals of the maximum segment size, or
MSS) before it must pause and wait for an acknowledgment.
Assuming an MSS of 1460 bytes, host A can transmit 22 segments before exhausting
host B's receive window.
When acknowledging receipt of the data sent by host A, host B can adjust its window
size.
For example, if the upper-layer application has only processed half of the buffer, host B
would lower its window size to 16 KB.
Page 35
If the buffer was still entirely full, host B would set its window size to zero, indicating
that it cannot yet accept more data.
On a LAN with high bandwidth and extremely low delay, windows are rarely stressed as
there are typically very few segments in transit between two endpoints at any given time.
Both hosts advertise the maximum window size of 65,535 bytes (the maximum value of a
16-bit unsigned integer).
We can calculate the potential amount of data in transit in one direction at one point in
time as bandwidth * delay: 10,000,000 bps divided by 8 bits per byte, multiplied by 0.08
seconds equals 100,000 bytes.
In other words, if host A begins transmitting to host B continuously, it will have sent
100,000 bytes before host B receives the first byte transmitted.
Page 36
However, because our maximum receive window is only 65,535 bytes, host A must stop
transmitting once this number has been reached and wait for an acknowledgment from
host B.
Congestion in a network occurs because routers and switches have queues-buffers that
hold the packets before and after processing.
A router for example, has an input queue and an output queue for each interface. When a
packet arrives at the incoming interface, it undergoes three steps before departing as:
i.
The packet is put at the end of the input queue while waiting to be checked.
ii.
The processing module of the router removes the packet from the input queue once it
reaches the front of the queue and uses its routing table and the destination address to
find the route.
iii.
The packet is put in the appropriate output queue and waits its turn to be send.
There are 2 issues: i) if the rate of packet arrival is higher than the packet processing rate,
the input queues become longer and longer, ii) if the packet departure rate is less than the
packet processing rate, the output queues become longer and longer.
Page 37
The window spans a portion of the buffer containing bytes received from the process.
The bytes inside the window are the bytes that can be in transit i.e. they can be sent
without worrying about acknowledgement.
The imaginary window has two walls named right and left.
Opening a window means moving the right wall to the right. This allows more new bytes
in the buffer that are eligible for sending.
Closing the window means moving the left wall to right. This means that some bytes
have been acknowledged and the sender need not worry about them.
Shrinking the window means moving right wall to left. This should not be allowed since
it revoke the eligibility of some bytes for sending. The left wall is also cannot be moved
to left since that number of acknowledgement received already.
The size of the window at one end is determined by two values: receiver window (rwnd)
and the congestion window (cwnd).
The receiver window is the value advertised by the other end in a segment containing
acknowledgement. i.e. TCP segment header contains a field as window size.
In that field the receiver can set the number of bytes it can accept before its buffer
overflows. Congestion window value is determined by the network to avoid congestion.
Page 38
Slow start: Sender starts with very slow rate of transmission, increases the rate rapidly
to reach a threshold.
ii.
Congestion avoidance: When the threshold is reached, the data rate is reduced to
avoid congestion.
iii.
It is based on the idea that the size of the cwnd starts with one maximum segment size
(MSS). This means that the sender can send only one segment.
After receipt of the acknowledgement for segment 1, the size of the congestion window is
increased by 1, i.e. cwnd is now 2.
Now two segments can be sent. When each acknowledgement is received, the size of the
window is increased by 1 MSS.
Page 39
If we look at the size of cwnd in terms of rounds, we find that the rate is exponential as shown
below:
Initially,
cwnd = 1
After round1,
cwnd = 21 = 2
After round2,
cwnd = 22 = 4
After round3,
cwnd = 23 = 8
When the size of window in bytes reaches this threshold, slow start stops and the next
phase starts.
Page 40
If we start with the slow-start algorithm, the size of the congestion window increases
exponentially.
To avoid congestion before it happens, we have to slow down this exponential growth.
TCP defines another algorithm called congestion avoidance, which undergoes an additive
increase instead of an exponential one.
When the size of the congestion window reaches the slow-start threshold, the slow-start
phase stops and the additive phase begins.
In this algorithm, each time the whole window of segments is acknowledged, the size of
the congestion window is increased by 1. It is shown in figure below.
In this case, after the sender has received acknowledgements for a complete window size
of segments, the size of the window is increased by one segment.
Page 41
If we look at the size of cwnd in terms of rounds, we find that the rate is additive as
shown below:
Initially,
cwnd = 1
After round1,
cwnd = 1+1 = 2
After round2,
cwnd = 2+1 = 3
After round3,
cwnd = 3+1 = 4
The only way the sender can guess that congestion has occurred is by the need to
retransmit a segment. However, retransmission can occur in one of the two cases: i) when
a timer times out, ii) when three ACKs are received.
In both the cases, the size of the threshold is dropped to one-half, a multiplicative
decrease.
If a time out occurs, there is a strong possibility of congestion, a segment has probably
been dropped in the network, and there is no news about the sent segments.
If three ACKs are received, there is a weaker possibility of congestion, a segment may
have been dropped, but some segments after that may have arrived safely since three
ACKs are received.
This is called fast retransmission and fast recovery. The steps taken are:
a. The value of threshold is set to one-half of the current window size.
b. cwnd is set to the size of one segment.
c. Starts the congestion avoidance phase.
Page 42
Every time data packet arrives at the receiving side, the receiver responds with an
acknowledgment, even if this sequence number has already been acknowledged.
Thus, when a packet arrives out of orderthat is, TCP cannot yet acknowledge the data
the packet contains because earlier data has not yet arrivedTCP resends the same
acknowledgment it sent the last time. This second transmission of the same
acknowledgment is called a duplicate ACK.
When the sending side sees a duplicate ACK, it knows that the other side must have
received a packet out of order, which suggests that an earlier packet might have been lost.
Since it is also possible that the earlier packet has only been delayed rather than lost, the
sender waits until it sees some number of duplicate ACKs and then retransmits the
missing packet.
In practice, TCP waits until it has seen three duplicate ACKs before retransmitting the
packet. It is shown in figure below.
Page 43
In this example, the destination receives packets 1 and 2, but packet 3 is lost in the
network.
Thus, the destination will send a duplicate ACK for packet 2 when packet 4 arrives, again
when packet 5 arrives, and so on. (To simplify this example, we think in terms of packets
1, 2, 3, and so on, rather than worrying about the sequence numbers for each byte.)
When the sender sees the third duplicate ACK for packet 2the one sent because the
receiver had gotten packet 6it retransmits packet 3. Note that when the retransmitted
copy of packet 3 arrives at the destination, the receiver then sends a cumulative ACK for
everything up to and including packet 6 back to the source.
Page 44