MC Sem-VI'C'Scheme PPT Chapter 3
MC Sem-VI'C'Scheme PPT Chapter 3
MC Sem-VI'C'Scheme PPT Chapter 3
SEM -VI(CSC603)
CHAPTER 3
By,
1
Prof. Urjashree Patil
SYLLABUS
Chapter objectives: To introduce the basic concepts and principles in mobile
computing.
3
MOBILE NETWORKING
A mobile network can be defined as a communications network that
is spread out over an immense land area around the world,
connected wirelessly by transceivers at fixed locations that are
known as cell sites or base stations.
In mobile networking main component for communication is
transceiver.
Transceivers communicate wirelessly based on the old principle of
radio signals.
Radio signals are electromagnetic radiation that includes light and
infrared waves. These signals are considered to be transverse waves
in that they have a frequency and a wavelength.
The feature of moving anywhere and still be able to access the
services is called mobility.
Making services mobile, requires modification and improvement in
existing protocols and existing architectures. 4
3.1 OVERVIEW
Mobile
Networking
Medium Access Protocol
Internet
Protocol
Transport layer
5
MEDIUM ACCESS PROTOCOL
Controls access to shared medium.
MAC protocols for wired network are ALOHA, Slotted ALOHA,
CSMA, CSMA/CD, Token bus, token ring.
Since wireless medium is shared medium, Design decisions need to be
taken for MAC protocol.
MAC protocols for wired networks cannot be used directly for wireless
networks.
Medium access control comprises all mechanisms that regulate user
access to a medium using SDM, TDM, FDM, or CDM.
MAC is thus similar to traffic regulations in the highway/multiplexing
example.
MAC belongs to layer 2, the data link control layer (DLC).
Layer 2 is subdivided into the logical link control (LLC) i.e. layer 2b
and the MAC i.e. layer 2a.
The task of DLC is to establish a reliable point to point or point to
multi-point connection between different devices over a wired or 6
wireless medium.
3.2 OVERVIEW
Medium Access Control
Motivation for specialized MAC
Introduction to multiple Access techniques (MACA)
University Questions:
Explain the need of specialized MAC in wireless communication.
What is hidden and exposed terminal problem? Discuss solutions to these 7
problem.
MOTIVATION FOR SPECIALIZED MAC
CSMA/CD is MAC protocol for wired network which cannot be used in
wireless network because collision is detected at sender.
In case of wired networks, signal strength is same all over the wire therefore
collision can be detected from anywhere.
In case of wireless networks, collision can be occurred because of following
two problems,
1. Hidden Terminal Problem
2. Exposed Terminal Problem
The reason for these two problems is the broadcast nature of the radio channel,
namely, all the nodes within a node’s transmission range receive its
transmission.
Collision detection is difficult because transmission power of antenna is higher 8
then receiving power.
HIDDEN TERMINAL PROBLEM ( Hidden Station Problem)
In this case, two nodes that are outside each-other’s range perform
simultaneous transmission to a node that is within the range of each of
them, hence, there is a packet collision.
11
13
INTRODUCTION TO MULTIPLE ACCESS
TECHNIQUES (MACA)
Multiple Access with Collision Avoidance (MACA) is a medium access
control (MAC) layer protocol used in wireless networks, with a view to
solve the hidden terminal problem and exposed terminal problem.
The MAC layer protocol IEEE 802.11 RTS/CTS has been adopted from
MACA.
14
16
MACA SOLVES HIDDEN AND EXPOSED
TERMINAL PROBLEM
17
3.1 OVERVIEW
Mobile Networking
Medium Access Protocol
Internet Protocol
Transport layer
18
University Exam: Write short note on Mobile IP?
MOBILE INTERNET PROTOCOL (IP)
Mobile IP is an open standard, defined by the Internet Engineering Task
Force (IETF).
It allows users to keep the same IP address, stay connected, and maintain
ongoing applications while roaming between IP networks.
Mobile IP is scalable for the Internet because it is based on IP—any media
that can support IP can support Mobile IP.
IP enables a computer to roam freely on the Internet or an organization's
network while still maintaining the same home address.
Consequently, computing activities are not disrupted when the user
changes the computer's point of attachment to the Internet or an
organization's network.
19
Instead, the network is updated with the new location of the mobile node.
NEED OF MOBILE IP
In IP networks, routing is based on stationary IP addresses.
A device on a network is reachable through normal IP routing by the IP
address it is assigned on the network.
The problem occurs when a device roams away from its home network and
is no longer reachable using normal IP routing.
This results in the active sessions of the device being terminated.
Mobile IP was created to enable users to keep the same IP address while
traveling to a different network (which may even be on a different wireless
operator), thus ensuring that a roaming individual could continue
communication without sessions or connections being dropped.
The mobile device can span different types of wireless and wireline
networks while maintaining connections and ongoing applications.
Remote login, remote printing, and file transfers are some examples of
applications where it is undesirable to interrupt communications while an
individual roams across network boundaries.
Also, certain network services, such as software licenses and access
privileges, are based on IP addresses. Changing these IP addresses could 20
compromise the network services.
MOBILE IP TOPOLOGY
21
MOBILE IP TOPOLOGY
The scenario shows how a datagram moves from one point to
another within the Mobile IP framework.
The Internet host sends a datagram to the mobile node using the
mobile node's home address (normal IP routing process).
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.
If the mobile node is on a foreign network, the home agent
forwards the datagram to the foreign agent.
The foreign agent delivers the datagram to the mobile node.
Datagrams from the mobile node to the Internet host are sent
using normal IP routing procedures.
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.
22
MOBILE IP BASIC TERMINOLOGIES
25
3.3 OVERVIEW
Mobile IP:
IP Packet Delivery
Agent Advertisement and Discovery,
Registration,
Tunneling and Encapsulation,
Reverse Tunneling,
Routing (DSDV,DSR)(Excluded from Syllabus)
27
Fig. IP Packet Delivery
IP PACKET DELIVERY
STEP 1: CN sends the packet as usual to the IP address of MN. With Source address
as CN and Destination address as MN .The internet, which does not have any
information of the current location of MN, routes the packet to the router responsible
for the home network of MN. This is done using the standard routing mechanisms of
the internet.
STEP 2: The HA now diverts the packet, knowing that MN is currently not in its
home network. The packet is not forwarded into the subnet as usual, but encapsulated
and tunneled to the COA. A new header is put in front of the old IP header showing
the COA as new destination and HA as source of the encapsulated packet.
STEP 3: The foreign agent (FA) now decapsulate the packet, i.e., removes the
additional header(newly added as COA as destination and HA as source), and
forwards the original packet with CN as source and MN as destination to the MN.
Again, for the MN mobility is not visible.
Finally the MN Receives the packet with the Source address as CN and Destination
address as MN.
STEP 4: The MN sends the packet MN as Source Address and CN as Destination
Address. 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. Simple
mechanism works if CN is Fixed at a location if it has got mobility then the above
Steps 1 to 3 are to be followed to deliver the packet from MN to CN. 28
3.3 OVERVIEW
Mobile IP:
IP Packet Delivery
Agent Advertisement and Discovery,
Registration,
Tunneling and Encapsulation,
Reverse Tunneling,
Routing (DSDV,DSR)(Excluded from Syllabus)
Registration,
Tunneling and Encapsulation,
Reverse Tunneling,
Routing (DSDV,DSR)(Excluded from Syllabus)
35
AGENT REGISTRATION
When the mobile node receives an agent advertisement, the mobile
node registers through the foreign agent, even when the mobile node
might be able to acquire its own co-located care-of address.
Once the care-of-address is achieved the mobile node registers it
with its Home agent and informs about the current location where
the packets intended for it can be forwarded.
The mobile node sends a registration request to the
Home Agent with its Care-of–address information.
The Home Agent receives this request and accepts or reject it and
accordingly sends a registration reply back to the mobile node.
36
The process of registration request depends on the location of COA.
AGENT REGISTRATION
Case 1: When care-of-address is of foreign agent
a. The Mobile node sends a registration request to foreign agent and at the same time requests for
forwarding services.
b. FA forwards the registration request to the Home agent of that mobile node.
c. HA either accepts or rejects the request and sends a registration reply to the FA. 37
43
3.3 OVERVIEW
Mobile IP:
IP Packet Delivery
Agent Advertisement and Discovery,
Registration,
45
Fig. Tunneling in Mobile IP
TUNNELING AND ENCAPSULATION
Requirement of Tunneling.
Consider a situation when a Correspondent Node (CN) wants to send an IP
packet to a Mobile Node (MN). All the CN knows about this MN is its IP
address.
The CN is totally unaware of the MN’s location. (Which in fact is a major
requirement of Mobile IP) and so sends it as usual to MN’s IP address.
The internet routes this packet to the Home router of the MN also called as
Home Agent (HA).
The HA now knowing that the MN is not in its home network send encapsulates
and tunnels it to the COA.
The Care-of-address (COA) defines the current location of the MN from an IP
point of view (e.g. when a person Mr. XYZ stays as a guest in someone else’s
home , the letters he receive will be marked as Mr. XYZ ,C/O i.e. care-of Mr.
ABC)
Since internet routes are created based on the header contents of an IP packet, to
route it from HA to COA, we need a new to create header for the packet to be
transmitted.
The new header on top of the original header is made. Now this will enable us to 46
set a new direct route (a tunnel) to the MN from the HA as it is roaming.
TUNNELING AND ENCAPSULATION
Encapsulation: Tunnelling has two primary functions: encapsulation of the
data packet to reach the tunnel endpoint, and decapsulation when the packet
is delivered at that endpoint.
The default tunnel mode is IP Encapsulation within IP Encapsulation.
Optionally, GRE and minimal encapsulation within IP may be used. Let us
study minimal encapsulation technique.
The HA takes the original packet with the MN as destination, puts it into the
data part of a new packet and sets the new IP header in such a way that the
packet is routed to the COA.
The new header is also called the outer header for obvious reasons.
Additionally, there is an inner header which can be identical to the
original header as this is the case for IP-in-IP encapsulation, or the inner
header can be computed during encapsulation.
47
Figure: IP encapsulation
TYPES OF ENCAPSULATION
Three types of encapsulation protocols are specified for Mobile IP:
IP-in-IP encapsulation: required to be supported. Full IP header
added to the original IP packet. The new header contains HA
address as source and Care of Address as destination.
Minimal encapsulation: optional. Requires less overhead but
requires changes to the original header. Destination address is
changed to Care of Address and Source IP address is maintained as
is.
Generic Routing Encapsulation (GRE): optional. Allows packets
of a different protocol suite to be encapsulated by another protocol
48
suite.
IP-IN-IP ENCAPSULATION
The entire IP datagram sent by the internet host is inserted in a new
IP datagram as the payload.
49
51
Fig. Minimal encapsulation
MINIMAL ENCAPSULATION
The inner header is different for minimal encapsulation.
The type of the following protocol and the address of the MN are needed.
If the S bit is set, the original sender address of the CN is included as
omitting the source is quite often not an option.
No field for fragmentation offset is left in the inner header and minimal
encapsulation does not work with already fragmented packets.
53
Fig. Generic routing encapsulation
GENERIC ROUTING ENCAPSULATION
(GRE)
Reverse Tunneling,
Routing (DSDV,DSR)(Excluded from Syllabus)
57
REVERSE TUNNELING
A mobile node can request a reverse tunnel between its foreign
agent and its home agent when the mobile node registers.
58
Fig. Reverse Tunneling
REVERSE TUNNELING
A reverse tunnel is a tunnel that starts at the mobile node's care-of address and
terminates at the home agent.
However, intermediate routers might check for a topologically correct source address. If
an intermediate router does check, you should set up a reverse tunnel.
By setting up a reverse tunnel from the mobile node's care-of address to the home agent,
you ensure a topologically correct source address for the IP data packet.
Router accepts often only “topological correct“ addresses (firewall!)
• A packet from the MN encapsulated by the FA is now topological correct
• Furthermore multicast and TTL problems solved (TTL in the home network correct,
but MN is to far away from the receiver)
Reverse tunneling does not solve
• Problems with firewalls, the reverse tunnel can be abused to circumvent security
mechanisms (tunnel hijacking)
• Optimization of data paths, i.e. packets will be forwarded through the tunnel via the HA
to a sender (double triangular routing)
The standard is backwards compatible
• The extensions can be implemented easily and cooperate with current implementations 59
without these extensions
• Agent Advertisements can carry requests for reverse tunnelling
3.4 OVERVIEW
Mobile TCP
Traditional TCP,
Classical TCP Improvements like Indirect TCP,
Snooping TCP & Mobile TCP,
Fast Retransmit/ Fast Recovery,
Transmission/Timeout Freezing,
Selective Retransmission
60
TRADITIONAL TCP
61
TRADITIONAL TCP
Transport protocols typically designed for
- Fixed end-systems
- Fixed, wired networks
Research activities
62
TRADITIONAL TCP
1. TCP congestion control
- Timeouts/Packet loss typically due to (temporary) overload
- Routers discard packets when buffers are full
- TCP recognizes congestion only indirectly via missing ACKs
retransmissions unwise, since they increase congestion
- slow-start algorithm as reaction
2. TCP slow-start
- Sender calculates a congestion window for a receiver
- Start with a congestion window size equal to one segment (packet)
- Exponentially increase congestion window till congestion threshold,
then linear increase
- Timeout/missing acknowledgement causes reduction of congestion
threshold to half of the current congestion window
63
- Congestion window starts again with one segment
TRADITIONAL TCP
3. TCP fast retransmit/fast recovery
- TCP sends an ACK only after receiving a packet
- If sender receives duplicate ACKs, this is due to gap in received
packets at the receiver
- Receiver got all packets up to the gap and is actually receiving
packets
- Conclusion: packet loss not due to congestion, retransmit, continue
with current congestion window (do not use slow-start)
4. Implication on Mobility
TCP assumes congestion if packets are dropped
- Typically wrong in wireless networks, here we often have packet
loss due to transmission errors
- Furthermore, mobility can cause packet loss, if e.g. a mobile node
roams from one access point (e.g. foreign agent in Mobile IP) to
another while packets in transit to the old access point and forwarding 64
is not possible
3.4 OVERVIEW
Mobile TCP
Traditional TCP,
Classical TCP Improvements like Indirect TCP,
Snooping TCP & Mobile TCP,
Fast Retransmit/ Fast Recovery,
Transmission/Timeout Freezing,
Selective Retransmission
Fig. I-TCP
The example shows a mobile host connected via a wireless link to an access
point (AP). Also access node is connected to the internet via the wired
Internet.
66
INDIRECT TCP
Standard TCP is used to connect to the AP from fixed computer. No
computer over the internet recognizes any change to the TCP.
The Access point acts as a proxy of mobile host and terminates the
TCP connection.
Therefore, the fixed computer now sees the AP as mobile host; on
other hand the mobile host sees AP as the fixed computer.
In between the AP and the mobile host a special TCP adapted to
wireless links is used.
A change in TCP is not needed as even as unchanged TCP produces
the same round trip time.
Such segmentation methods can be used is connection between
mobile node and correspondent host when host is at the FA. So
during handover, control transfers from one FA to another FA in the
nearby cell. 67
INDIRECT TCP
Acknowledgements:
Here the correspondent node (i.e. Sender) does not notice the
wireless link or segmentation of the connection.
The foreign Agent (FA) becomes or acts as a proxy and relays data
in both directions.
When the CN sends data, FA sends back a acknowledgement to it.
When the mobile host receives a packet from FA, the mobile host
also sends back an acknowledgement.
This acknowledgement is a local acknowledgement. It will not be
forwarded to the CN.
If a packet is lost in wireless transmission (i.e. no acknowledgement
received) then FA will try re-transmitting it again.
68
INDIRECT TCP
Advantages of I-TCP:
I-TCP does not require any changes in TCP protocol as used by the
different hosts in network.
Because of a strict partition between the two connections,
transmission error on the wireless link will not propagate to the
wired link. Therefore, flow will always be in a sequence.
The delay between the FA and Mobile host is small and if optimized
properly, precise time-outs can be used to carry out retransmission
of lost packets.
Different solutions can be implemented and tested between the FA
and mobile host without jeopardizing the stability of the internet.
With two partitions, we can use a different transport layer protocol
in the second half with the FA acting as a translator.
69
INDIRECT TCP
Dis-advantages of I-TCP:
The end-to-end connection for which TCP has been designed will
fail if the Foreign Agent (FA) crashes.
The foreign agent (FA) must be a trusted entity as the TCP
connections end at this point.
In practical terms increased handover latency may be much more
problematic. (During handover from old FA to new FA, some delay
will occur. During this period, some extra data will come at old FA.
This data also needs to be send!!).
70
3.4 OVERVIEW
Mobile TCP
Traditional TCP,
Classical TCP Improvements like Indirect TCP,
Snooping TCP & Mobile TCP,
Fast Retransmit/ Fast Recovery,
Transmission/Timeout Freezing,
Selective Retransmission
72
Fig. Snooping TCP
SNOOPING TCP
Method:
Here, the foreign agent instead of terminating all packet with destination
mobile host, it buffers (i.e. temporarily stores all these packets). In addition
to this, it also ‘snoops’ each packet flowing in both the directions for
reading acknowledgements.
Buffering towards the mobile host is carried out so that a retransmission
can be done in case of missing acknowledgements
The FA buffers every packet until an acknowledgement is received from the
mobile host.
If the foreign agent does not receive an acknowledgement within the
stipulated time, the packet or the acknowledgement has been lost.
73
In such a situation, the FA can directly retransmit the packet without
waiting for the correspondent host.
SNOOPING TCP
Transparency:
To maintain transparency i.e. the communication happens only
between the correspondent node (CN) and the mobile host, the FA
doesn’t send acknowledgement to the correspondent host as in I-TCP.
The acknowledgement is send by the Mobile host itself. The FA keeps
on monitoring it.
When the data flows for mobile host to CN, the FA snoops and checks
the sequence of acknowledgement number. If a gap is found, FA sends
signal to re-transmit.
Advantages of Snoop-TCP:
The original TCP sematic i.e. end-to-end connection is preserved.
The correspondent node need not be changed as all the new
enhancements are made in the FA.
During handover form on cell to another, there is no need to transfer
the previous incoming data (as in I-TCP)
74
In handover, the next foreign Agent (FA) need not use the same
enhancements used here i.e. follow Snoop-TCP method.
SNOOPING TCP
Dis-Advantages of Snoop-TCP:
If any encryption is applied at both ends, the snooping and buffering
process would be a waste of time as no data can be read by FA.
Does not fully isolate wireless link error from the fixed network
(e.g. problems like congestion and interference may cause a delay in
retransmission).
The Mobile host needs to be modified to handle the NACK signals
(No Acknowledgement) for reverse traffic (i.e. from MH to Sender)
75
3.4 OVERVIEW
Mobile TCP
Traditional TCP,
Classical TCP Improvements like Indirect TCP,
Snooping TCP & Mobile TCP,
Fast Retransmit/ Fast Recovery,
Transmission/Timeout Freezing,
Selective Retransmission
77
Fig. M-TCP
MOBILE TCP
Here in this approach, we assume that the error bit rate is less as
compared to other wireless links.
So if any packet is lost, the retransmission has to occur from the
original sender and not by the SH. (This also maintains the end-to-
end TCP semantic)
The SH monitors the ACKs (ACK means acknowledgement) being
sent by the MH. If for a long period ACKs have not been received,
then the SH assumes that the MH has been disconnected (maybe
due to failure or moved out of range, etc...).
If so the SH chokes the sender by setting its window size to 0.
Because of this the sender goes into persistent mode i.e. the sender’s
state will not change no matter how long the receiver is
disconnected.
This means that the sender will not try to retransmit the data.
Now when the SH detects a connectivity established again with the
78
MH (the old SH or new SH if handover), the window of the sender
is restored to original value.
MOBILE TCP
Advantages:
Maintains the TCP end-to-end semantics. (No failed packet
retransmission is done by the SH .All job handled by original
sender)
Does not require the change in the sender’s TCP.
If MH disconnected, it doesn’t waste time in useless transmissions
and shrinks the window size to 0.
No need to send old buffer data to new SH in case of handover (as
in I-TCP).
Disadvantages:
M-TCP assumes low bit error which is not always true. So, any
packet loss due to bit-errors occurring, then its propagated to the
sender.
Modifications are required for the MH protocol software.
79
3.4 OVERVIEW
Mobile TCP
Traditional TCP,
Classical TCP Improvements like Indirect TCP,
Snooping TCP & Mobile TCP,
Fast Retransmit/ Fast Recovery,
Transmission/Timeout Freezing,
Selective Retransmission
80
FAST RETRANSMIT/ FAST
RECOVERY
Change of foreign agent often results in packet loss
TCP reacts with slow-start although there is no congestion
Disadvantage
The insufficient isolation of packet losses.
If the handover from one foreign agent to another takes a longer time,
the correspondent host will have already started retransmission.
81
Cooperation required between IP and TCP, no transparent approach
3.4 OVERVIEW
Mobile TCP
Traditional TCP,
Classical TCP Improvements like Indirect TCP,
Snooping TCP & Mobile TCP,
Fast Retransmit/ Fast Recovery,
Transmission/Timeout Freezing,
Selective Retransmission
82
TRANSMISSION/TIMEOUT
FREEZING
Mobile hosts can be disconnected for a longer time
No packet exchange possible, e.g., in a tunnel, disconnection due to
overloaded cells with higher priority traffic
TCP disconnects after time-out completely
TCP freezing
MAC layer is often able to detect interruption in advance
Advantage
It offers a way to resume TCP connections even after longer interruptions of
the connection.
It is independent of any other TCP mechanism, such a acknowledgements or
sequence numbers, so it can be used together with encrypted data.
Disadvantage 83
TCP on mobile host has to be changed, mechanism depends on MAC layer
3.4 OVERVIEW
Mobile TCP
Traditional TCP,
Classical TCP Improvements like Indirect TCP,
Snooping TCP & Mobile TCP,
Fast Retransmit/ Fast Recovery,
Transmission/Timeout Freezing,
Selective Retransmission
84
SELECTIVE RETRANSMISSION
TCP acknowledgements are often cumulative
ACK n acknowledges correct and in-sequence receipt of packets up to n
If single packets are missing quite often a whole packet sequence beginning
at the gap has to be retransmitted (go-back-n), thus wasting bandwidth
Selective retransmission as one solution
RFC2018 allows for acknowledgements of single packets, not only
acknowledgements of in-sequence packet streams without gaps
Sender can now retransmit only the missing packets
Advantage
A sender retransmits only the lost packets.
This lowers bandwidth requirements and is extremely helpful in slow
wireless links.
The gain in efficiency is not restricted to wireless links and mobile
environments.
Disadvantage
85
More complex software in a receiver, more buffer needed at the receiver
COMPARISON BETWEEN DIFFERENT CLASSICAL TCP:
86
CHAPTER 3
FINISHED
THANK TOU.
87