MC Sem-VI'C'Scheme PPT Chapter 3

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 87

MOBILE COMPUTING

SEM -VI(CSC603)

CHAPTER 3
By,
1
Prof. Urjashree Patil
SYLLABUS
 Chapter objectives: To introduce the basic concepts and principles in mobile
computing.

 Chapter outcomes: On successful completion of chapter learner should be able to,


1. To identify basic concepts and principles in mobile communication & computing and cellular architecture. 2
2. To describe the components and functioning of mobile networking.
3. To classify variety of security techniques in mobile network.
3.1 OVERVIEW
 Mobile Networking
 Medium Access Protocol
 Internet Protocol
 Transport layer

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.

 Fig. Hidden Terminal/Station Problem


HIDDEN TERMINAL PROBLEM ( Hidden Station Problem)
 The transmission range of A reaches B but not C.
 Similarly, the range of C reaches B but not A. Also the range of B
reaches both A and C.
 Now, the node A starts to send something to B and C doesn’t receive
this transmission.
 Now C also wants to send data to B and senses the carrier. As it
senses it to be free, it also starts sending to B.
 Hidden terminal problem occurs when two nodes that are outside
each other’s range performs simultaneous transmission to a node that
is within the range of each of them resulting in a collision.
 That means the data from both parties A and C will be lost during the
collision.
 Hidden nodes mean increased probability of collision at receiver end.
 One solution to avoid this is to have the channel sensing range much
greater than the receiving range. Another solution is to use the 10

Multiple Access with Collision Avoidance (MACA).


EXPOSED TERMINAL PROBLEM ( Exposed Station Problem)
 In this case, the node is within the range of a node that is transmitting,
and it cannot transmit to any node.

11

 Fig. Exposed Terminal/Station Problem


EXPOSED TERMINAL PROBLEM ( Exposed Station Problem)
 In this problem, B node is currently sending some data to node A.
 Now the other node C which is right now free want to send data to
node D which is outside the range of A and B.
 Now before starting transmission it senses the carrier and realizes that
the carrier is busy (due to interference of B’s signal).
 Hence, the C node postpones the transmission to D until it detects the
medium to be idle.
 However such a wait was un-necessary as A was outside the
interference range of C.
 Also a collision at B will be a weak enough to be unable to penetrate
into C.
 Exposed terminal problem occurs when the node is within the range of
a node that is transmitting and it cannot be transmitted to any node.
 Exposed node means denied channel access unnecessarily which
ultimately results in under-utilization of bandwidth resources. 12

 It also results in wastage of time-resource.


3.2 OVERVIEW
 Medium Access Control
 Motivation for specialized MAC
Introduction to multiple Access techniques
(MACA)

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

 Fig. Multiple Access with Collision Avoidance (MACA) Technique


INTRODUCTION TO MULTIPLE ACCESS
TECHNIQUES (MACA)
 The MACA protocol works with the condition that the stations are
synchronized and frame sizes and data speed are the same.
 It involves transmission of two frames for collision avoidance.
 RTS (request to send): A sender request the right to send from a receiver with a short RTS
packet before it sends a data packet.
 CTS (clear to send): The receiver grants the right to send as soon as it is ready to receive.

 Signalling packets contain


 sender address
 receiver address
 packet size
 Let us consider that a transmitting station STA has data frame to send to a
receiving station STB.
 The operation works as follows:
 Station STA sends a RTS frame to the receiving station.
 On receiving the RTS, station STB replies by sending a CTS frame.
 On receipt of CTS frame, station STA begins transmitting its data frame.
15
 After successful receipt of the data frame, station STB sends an ACK frame
(acknowledgement frame).
INTRODUCTION TO MULTIPLE ACCESS
TECHNIQUES (MACA)
 Any station than can hear RTS is close to the transmitting station and
remains silent long enough for the CTS, or waits for a certain time
period.
 If the RTS is not followed by a CTS, the maximum waiting time is the
RTS propagation time.
 Any station that can hear the CTS is close to the receiving station and
remains silent during the data transmission.
 It attempts for transmission after hearing the ACK.
 MACA is a non-persistent slotted protocol.
 This implies that if the medium is detected as busy, a station waits for
a random time period after the beginning of a time slot and then it
sends an RTS. This assures fair access to the medium.

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

Fig. 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

Fig. Mobile IP network


23
MOBILE IP BASIC TERMINOLOGIES
Mobile Node (MN) : Is an end system or router that can change its point of
attachment to the internet using mobile IP e.g. Laptop, PDA, etc.. that may
move about.
Correspondent Node (CN): It is fixed/mobile node that wants to communicate
with MN.
Home Network: Is the subnet, the MN belongs to with respect to its IP address.
Foreign Network: It is the current subnet the MN visits.
Foreign Agent (FA): It is router in current foreign network of MN which
forwards tunnelled datagrams to the MN.
Home Agent (HA)
 Router in home network of the MN, helps in forwarding

 Registers current MN location, tunnels IP datagrams to COA

Care-of Address (COA): Defines the current location of MN.


 Address of the current tunnel end-point for the MN (at FA or MN)

 Two possibilities for the location of the COA

i. Foreign agent COA: IP address of FA.


24
ii. Co-located COA: Temporary IP address which act as COA.
MOBILE IP

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)

 University Question: List the entities of mobile IP and describe data


transfer from a mobile node to a fixed node and vice varsa?(10M)
 Explain the IP packet delivery with respect to mobile IP?(5M)
26
 How is packet delivery achieved to and from mobile node?(5M)
IP PACKET DELIVERY
 The mobile i.e. movement of MN from one location to
another has to be hidden as per the requirement of mobile IP.
CN may not know the exact location of MN.

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)

 University Question: Explain agent advertisement and discovery


registration in mobile network?(5M)
 Explain Agent advertisement in Mobile IP?(5M)
 How the agent could be discovered using Mobile IP? Give the
29
overlay of agent advertisement packet which includes mobility ?
(10M)
AGENT ADVERTISEMENT AND
DISCOVERY
 Mobile nodes use agent advertisements to determine their current
point of attachment to the Internet or to an organization's network.
 An agent advertisement is an ICMP router advertisement that has been
extended to also carry a mobility agent advertisement extension.
 A foreign agent can be too busy to serve additional mobile nodes.
However, a foreign agent must continue to send agent advertisements.
 This way, mobile nodes that are already registered with it will know
that they have not moved out of range of the foreign agent and that
the foreign agent has not failed.
 Also, a foreign agent that supports reverse tunnels must send it's
30
advertisements with the reverse tunnel flag set on.
AGENT ADVERTISEMENT AND
DISCOVERY
 A mobile node uses a method known as agent discovery to
determine the following information:
 When the node has moved from one network to another?
 Whether the network is the node's home or a foreign network?
 What is the foreign agent care-of address offered by each foreign
agent on that network?
 Mobility agents transmit agent advertisements to advertise their
services on a network.
 In the absence of agent advertisements, a mobile node can solicit
advertisements. This is known as agent solicitation.
 Agent solicitation messages are sent by MN itself to search an FA in
one of the following conditions,
 When no agent advertisement present
 The inter-arrival time of advertisement message is too high
 An MN has not received a COA by other means
31
 Any agent that receives the solicitation message, transmit a single
agent advertisement in response.
AGENT ADVERTISEMENT AND
DISCOVERY
 Home agents and foreign agent advertise their presence and services
using messages called agent advertisement.

Fig. Agent advertising message


 Type(8 bit) → set to 9 for ICMP
 Code(8 bit) → 16 or 0(if agent routes traffic from non-mobile nodes as well)
32
 Check sum(16 bit) → The 16-bit one's complement of the one's complement
sum of the ICMP /IRDP message.
AGENT ADVERTISEMENT AND
DISCOVERY
 #addresses(8 bit) → The number of router addresses advertised in
this message
 Address Size(8 bit) → The number of 32-bit words of information
per each router address
 Lifetime(16 bit) → The maximum number of seconds that the router
addresses may be considered valid.
 Router Address [i=1,2,3..](16 bit)→ The sending router's IP address
on the ith interface from which this message is sent.
 Preference level [i=1,2,…](16 bit) →The preferability of each Router
Address[i]
Till now what was done is standard ICMP procedure. After this we
move to the extra extension created i.e. mobility extension. The
fields in it are:
 Type(8 bit) → 16 (Mobility advertisement extension)

 Length(8 bit) → 6+ 4*(number of addresses)


33
 Sequence number(16 bit) → The count of Agent Advertisement
messages sent since the agent was initialized.
AGENT ADVERTISEMENT AND
DISCOVERY
 Registration lifetime(16 bit) → maximum lifetime in seconds a node
can request during registration.
 The following bits specify the characteristics of an agent in detail.
 R bit (registration): shows, if a registration with this agent is
required even when using a co-located COA at the MN.
 B bit (Busy): If the agent is currently too busy to accept new
registrations it can set the B bit.
 H and F bits(Home and Foreign): The following two bits denote
if the agent offers services as a home agent ( H ) or foreign agent
( F ) on the link where the advertisement has been sent.
 Bits M and G(Minimal and Generic encapsulation): specify the
method of encapsulation used for the tunnel. While IP-in-IP
encapsulation is the mandatory standard,
 r bit: It is set to zero and must be ignored.
 T bit(Reverse Tunneling): The new field T indicates that reverse
tunneling is supported by the FA. 34
3.3 OVERVIEW
 Mobile IP:
 IP Packet
Delivery
 Agent Advertisement and Discovery,

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

Fig. Registration process of mobile node with FA COA


 It involves four steps :

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

d. FA relays this reply to the mobile node.


AGENT REGISTRATION
 During the registration process, the Home agent maintains mobile binding
containing the Home address, Care-of-address and registration lifetime. This is
called binding of the mobile node.
 Registration lifetime is negotiated during registration process and represents
validity of registration in seconds. It cannot be greater than provided with agent
advertisement.
 The registration is valid till that period and is automatically deleted after the
lifetime expires.
 The MN registers again before the binding period expires when it moves to another
foreign network or when it returns to the Home network. This prevents mobility
bindings of the nodes which are no longer used.
 The registration can be unsuccessful if there are too many tunnels at HA and it
cannot handle more requests or when there is authentication failure or HA is not 38
reachable to FA.
AGENT REGISTRATION
 Case 2: If the mobile node uses co-located address it can directly
send request to the Home Agent.

Fig. Registration process of mobile node with HA


 It involves following steps :
a. The Mobile node sends a registration request to Home agent and at
the same time requests for forwarding services.
39
b. Home Agent either accepts or rejects the request and sends a
registration reply to the Mobile Node.
AGENT REGISTRATION REQUEST MESSAGE
 UDP packets used for the registration request and reply.

Fig. Registration request format


 Type = 1 for registration request ·
 8 bits per flag as follows
• S bit is set if MN wants previous mobility bindings to be retained hence
permitting simultaneous binding.
• B bit is set if MN wishes to receive broadcast messages which the HA receives in
Home network.
• D bit indicates that MN uses co-located address hence take part in tunnels
40
decapsulation at the end point.
• M bit indicates that the mode of encapsulation is minimal encapsulation.
AGENT REGISTRATION REQUEST
MESSAGE
• G bit indicates generic routing encapsulation.
• T bit indicates reverse tunneling from the FA
• r & x are set to zero
• Life time = validity of registration in seconds. A zero indicates the
deregistration and all the bits set to one indicates infinite time.
 Remaining fields are
• Source address of packet which is interface address of MN.
• Destination address is that of FA or HA depending on type of COA.
• COA of the MN at the new agent.
• Identification which is generated by mobile node to uniquely
identify a request and match it with registration reply. This field
protects against replay attacks of registrations.
• Extensions contain parameter for authentication.
41
AGENT REGISTRATION REPLY
MESSAGE

Fig. Registration reply format


 UDP datagram for reply contains following words:
· Type field =3
· Code = result of registration as specified in Table
· Lifetime= For how much time in seconds the registration will be
42
valid in case it was successful
AGENT REGISTRATION REPLY
MESSAGE

43
3.3 OVERVIEW
 Mobile IP:
 IP Packet Delivery
 Agent Advertisement and Discovery,
 Registration,

Tunneling and Encapsulation,


 Reverse Tunneling,
 Routing (DSDV,DSR)(Excluded from Syllabus)

 University Question: Describe tunneling and encapsulation in Mobile IP?


(5M)
 Why is mobile IP packet required to be forwarded through tunnel?
Explain minimal and generic technique of encapsulation of mobile IP?
(10M)
 Discuss how tunneling work for mobile IP using IP-in-IP encapsulation? 44
(5M)
TUNNELING AND ENCAPSULATION
 Tunneling is the process of creating a tunnel by the HA to the COA
to route packets to the Mobile Node as it roams.
 It establishes a pipe (a data stream between two connected ends)
wherein the data is inserted and moves in FIFO order.

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

Fig. IP-In-IP encapsulation


IP-IN-IP ENCAPSULATION
 Ver.(Version): The version field ver is 4 for IP version 4
 IHL(Internet Header Length): the internet header length (IHL) denotes
the length of the outer header in 32 bit words.
 DS(TOS) Differentiated Services is just copied from the inner header
 Length field covers the complete encapsulated packet.
 TTL have no special meaning for mobile IP and are set according to RFC
791. TTL must be high enough so the packet can reach the tunnel endpoint.
 IP-in-IP: is the type of the protocol used in the IP payload. This field is set
to 4, the protocol type for IPv4 because again an IPv4 packet follows after
this outer header.
 IP checksum: is calculated as usual.
 The next fields are the tunnel entry as source address (the IP address of the
HA) and the tunnel exit point as destination address (the COA).
 Advantages: Simple to implement and default encapsulation
mechanism.
 Disadvantages: Most of the outer header fields are same as inner 50
header so it increases redundancy.
MINIMAL ENCAPSULATION
 Avoids repetition of identical fields • e.g. TTL, IHL, version, DS (RFC 2474,
old: TOS)
 Only applicable for non fragmented packets, no space left for fragment
identification

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.

 Advantages: Lower overhead as compared to IP-In-IP encapsulation


as it avoids redundancy.

 Disadvantage: It does not support fragmentation to deal with smaller


path maximum transmission units.(MTU)
52
GENERIC ROUTING ENCAPSULATION
(GRE)
 Generic routing encapsulation (GRE) allows the encapsulation of packets of
one protocol suite into the payload portion of a packet of another protocol
suite.
 Below figure shows this procedure. The packet of one protocol suite with the
original packet header and data is taken and a new GRE header is prepended.
 Together this forms the new data part of the new packet.
 Finally, the header of the second protocol suite is put in front.
 Below figure shows on the left side the fields of a packet inside the tunnel
between home agent and COA using GRE as an encapsulation scheme
according to RFC 1701.
 The outer header is the standard IP header with HA as source address and
COA as destination address.

53
Fig. Generic routing encapsulation
GENERIC ROUTING ENCAPSULATION
(GRE)

Fig. Protocol fields for GRE according to RFC 1701 54


GENERIC ROUTING ENCAPSULATION
(GRE)
 The protocol type used in this outer IP header is 47 for GRE.
 The other fields of the outer packet, such as TTL and TOS, may be copied
from the original IP header.
 However, the TTL must be decremented by 1 when the packet is decapsulated
to prevent indefinite forwarding.
 The GRE header starts with several flags indicating if certain fields are present
or not. A minimal GRE header uses only 4 bytes; nevertheless, GRE is flexible
enough to include several mechanisms in its header.
 C bit - if the checksum field is present and contains valid information
 R bit - if the offset and routing fields are present and contain valid
information.
 K bit – Key field used for authentication, if this field is present, the K bit is
set.
 S bit – Sequence number bit
 S bit – Strict source routing
 Rec bit - Represents a counter that shows the number of allowed recursive 55
encapsulations.
GENERIC ROUTING ENCAPSULATION
(GRE)
 Rsv (Reserved): Reserved for future use and set as 0.
 Ver.(Version): It is set to 0 for GRE.
 Protocol: Indicates the protocol used by the packet following the GRE
header.
 Checksum: Contains a valid IP checksum of the GRE header and the
payload(Present only when C bit is set)
 Offset: It represents the offset in bytes for the first source routing
entry.(Present only when R bit is set)
 Key: Contains a key that can be used for authentication.(Present only
when K bit is set)
 Routing: It is a variable length field and contains the fields for source
routing.
 Advantages:
 GRE supports other network layer protocols in addition to IP.
56
 It allows more than one level of encapsulation.
3.3 OVERVIEW
 Mobile IP:
 IP Packet Delivery
 Agent Advertisement and Discovery,
 Registration,
 Tunneling and Encapsulation,

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

- How to improve TCP performance in wireless networks


- Maintain congestion control behaviour
- Efficient retransmissions

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

 University Question: Explain I-TCP in detail.(10M)


 Explain merits and Demerits of Indirect TCP? (5M)
65
CLASSICAL TCP IMPROVEMENTS LIKE
INDIRECT TCP
 I-TCP segments a TCP onto fixed part and wireless part.

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

 University Question: Explain snooping TCP and merits and


demerits.(10M)
 Explain functioning of SNOOP-TCP, give advantages and 71
disadvantages od both.(10M)
SNOOPING TCP
 One of the main feature of I-TCP also goes on to become its major
disadvantage i.e. segmentation of TCP.
 To overcome it but also to provide enhanced feature a new TCP was
designed which worked completely transparent and also left the
TCP end-to-end connection intact.
 The new idea for making an enhancement is to buffer the data close
to the mobile host to perform fast local retransmission in case of
packet loss. A good place to carry out this enhancement is at the
foreign agent (FA).

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

 University Question: Explain M-TCP in detail.(5M)


76
 Explain Mobile TCP with its merits and demerits.(5M)
MOBILE TCP
 The M-TCP splits up the connection into two parts:
 An unmodified TCP is used on the Standard host-Supervisory Host
section
 An optimized TCP is used on the Supervisory Host- Mobile Host section.
 The Supervisory Host (SH) adorns the same role as the proxy (Foreign
Agent) in I-TCP.
 The SH is responsible for exchanging data to both the Standard host and the
Mobile host.

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

Forced fast retransmit


 As soon as the mobile host has registered with a new foreign agent,
the MH sends duplicated acknowledgements on purpose
 This forces the fast retransmit mode at the communication partners

 Additionally, the TCP on the MH is forced to continue sending with


the actual window size and not to go into slow-start after registration
Advantage
 Simple changes result in significant higher performance.

 Foreign agent or correspondent host need not to be changed.

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

 MAC can inform TCP layer of upcoming loss of connection

 TCP stops sending, but does not assume a congested link

 MAC layer signals again if reconnected

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

You might also like