0% found this document useful (0 votes)
5 views30 pages

Module-03

The document covers Mobile Networking, focusing on Wi-Fi security, Mobile IP, and Mobile TCP. It explains the mechanisms for IP packet delivery, agent advertisement, discovery, and registration processes in Mobile IP, emphasizing the importance of maintaining a permanent IP address for mobile devices. Additionally, it details tunneling and encapsulation techniques used to ensure uninterrupted communication as devices move between networks.

Uploaded by

batulchougle
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views30 pages

Module-03

The document covers Mobile Networking, focusing on Wi-Fi security, Mobile IP, and Mobile TCP. It explains the mechanisms for IP packet delivery, agent advertisement, discovery, and registration processes in Mobile IP, emphasizing the importance of maintaining a permanent IP address for mobile devices. Additionally, it details tunneling and encapsulation techniques used to ensure uninterrupted communication as devices move between networks.

Uploaded by

batulchougle
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Module-03 Mobile Networking

Wi-Fi security: WEP, WPA, Wireless LAN Threats, Securing Wireless Networks

• Medium Access Protocol Internet Protocol Transport layer

Mobile IP:

• IP Packet Delivery
• Agent Advertisement and Discovery
• Agent Registration
• Tunnelling and Encapsulation
• Reverse Tunnelling.

Mobile TCP:

• Traditional TCP
• Classical TCP Improvements like Indirect TCP
• Snooping TCP
• Mobile TCP
• Fast Retransmit/ Fast Recovery,
• Transmission/Timeout Freezing
• Selective Retransmission

5M Questions

1. What is reverse tunnelling.


2. Note on CDMA
3. Note on Snooping TCP.
4. Note on tunneling and encapsulation
5. Note on agent advertisement and discovery.

10M Questions

1. How is packet delivery achieved to and from mobile nodes. Mobile IP nw diag
2. Explain selective retransmission process at TCP.
3. Explain agent registration process. / Process of registration in mobile IP
4. Explain tunneling and encapsulation in brief. What are various types of
encapsulation techniques.
5. Explain mobile terminated and mobile originated calls in detail.
6. What is snooping tcp. What are its various adv and dis adv.
7. Explain mobile TCP with merits and demerits.
8. Explain the mechanism of IP packet delivery using mobile IP.
MOBILE IP:

Mobile IP is a network layer protocol that allows a mobile device (Mobile Node) to
maintain its permanent IP address while moving from one network to another.

In normal IP communication, the IP address is tied to a specific network location. If a


device changes its network, its IP address must also change. However, in Mobile IP, the
device can move across different networks without changing its IP address, ensuring
continuous communication.

Goals of Mobile IP

1. Flawless Device Mobility Using Existing IP Address

Mobile IP allows a device to continue using its original (home) IP address even when it
changes its location or connects to a different network.

This ensures that:

• Ongoing sessions are not interrupted

• Communication remains continuous

2. No Additional Addressing or Routing Requirements

Mobile IP maintains the same addressing and routing scheme as standard IP.

• No new addressing structure is required

• The device keeps its IP address in the usual format

• Complex routing changes (like host-specific routes) are avoided

This keeps the system simple and compatible with existing networks

3. Interoperability

Mobile IP devices can communicate with normal IP devices that do not support
mobility. Ensures backward compatibility

4. Transparency to Higher Layers

All mobility-related changes are handled at the network layer only.

• Transport layer (TCP/UDP) and applications remain unaffected

• Applications work exactly as they do in standard IP networks


5. Security

Mobile IP must include authentication mechanisms to ensure that:

• Only authorized devices can access the network

• Malicious users cannot misuse mobility features

IP PACKET DELIVERY:

In Mobile IP, packet delivery must ensure that a Mobile Node (MN) can communicate
with other nodes even when it changes its location. Since the MN keeps its original
(home) IP address, special mechanisms such as Home Agent (HA), Foreign Agent (FA),
and tunneling are used to deliver packets correctly.

Packet delivery is explained using four possible communication scenarios between a


Correspondent Node (CN) and a Mobile Node (MN).

Case 1: Data Transfer from Fixed CN to Mobile Node (MN)

Step 1: Packet Transmission- The Correspondent Node (CN) sends a packet to MN’s
home IP address. CN is unaware of MN’s current location.

Step 2: Routing to Home Network- The packet is routed through the Internet to the
Home Network of MN. It reaches the Home Agent (HA).

Step 3: Tunneling by HA- HA checks and finds that MN is not in home network. HA
encapsulates the packet: Adds a new header, Destination = COA (Care-of Address)
This process is called tunneling.

Step 4: Delivery by FA- The Foreign Agent (FA) receives the tunneled packet. FA
decapsulates it (removes extra header). Original packet is delivered to the MN.

Case 2: Data Transfer from MN to Fixed CN

Step 1: Packet Creation- MN sends packet using:

o Source = MN’s home IP

o Destination = CN’s IP

Step 2: Forwarding by FA- FA forwards the packet as a default router.

Step 3: Delivery to CN- Packet reaches CN through normal Internet routing. No


tunnelling is required in this direction.
Case 3: Data Transfer from Mobile CN to MN

Step 1: Packet Sending- The CN sends the packet with its original IP address as the
source address and MN’s original IP address as the destination address

Step 2: Routing via HA- Since the CN is also in the visiting network, the FA responsible
for the CN sends the packet to the router responsible for the home network of MN.

Step 3: Tunneling- The HA of MN realizes that the MN is not in the home network. It then
encapsulates the received packet and forwards it to the COA with source address as
HA’s IP address and the destination address as COA.

Step 4: Final Delivery- The foreign agent (FA) of the MN receives this packet,
decapsulates it and forwards it to the MN.

Case 4: Data Transfer from MN to Mobile CN

Step 1: Packet Transmission- MN sends packet using its home IP.

Step 2: Routing- Packet is routed toward CN’s home network.

Step 3: CN’s HA Tunnelling- CN’s HA finds CN is not in home network. Packet is


tunnelled to CN’s COA.

Step 4: Delivery- FA of CN decapsulates and forwards packet.

AGENT ADVERTISEMENT AND DISCOVERY:

When a Mobile Node (MN) enters a network, it must determine:

• Whether it is in home network or foreign network

• The available Foreign Agents (FA)

• Obtain a Care-of Address (COA)

This process is called Agent Discovery, achieved using:

1. Agent Advertisement

2. Agent Solicitation

Agent Discovery Process

When MN starts or moves to a new network: It listens for agent messages, identifies
network type, Obtains COA and Registers with HA
1. Agent Advertisement

Agent Advertisement is a process in which Home Agents and Foreign Agents


periodically broadcast messages to announce their presence.

Working- Agents send ICMP Router Advertisement messages. These messages


include mobility extensions .MN listens and processes these messages

Information Contained

1. List of COAs available

2. Type of agent (Home or Foreign)

3. Services supported (encapsulation type)

4. Network details and preference level

5. Lifetime of advertisement

ICMP Fields

• Type = 9 → Router advertisement

• Code: 0 → Normal routing

16 → Mobile agent support

• #Addresses → Number of COAs

• Lifetime → Valid duration

• Preference level → Helps choose best FA

Mobility Extension Fields

• Type = 16

• Length → Depends on number of COAs

• Sequence number → Tracks updates

• Registration lifetime → Maximum allowed registration time

Flags Explanation

• R bit → Registration required M bit → Minimal encapsulation

• G bit → GRE encapsulation H bit → Home agent

• B bit → Agent busy

• T bit → Reverse tunneling supported F bit → Foreign agent


2. Agent Solicitation

If MN does not receive advertisement messages, it actively sends a solicitation request


to discover agents.

Working

Step 1: Solicitation Message- MN sends an ICMP solicitation message to the network.

Step 2: Agent Response- Nearby HA/FA respond with Agent Advertisement.

Step 3: COA Selection- MN selects the appropriate FA and obtains COA.

Functions of Agent Discovery

• Detects movement between networks

• Identifies home vs foreign network

• Helps obtain COA

• Enables registration with HA

Advantages

• Enables automatic network detection

• Reduces manual configuration

• Supports seamless mobility

AGENT REGISTERATION:

After agent discovery, the Mobile Node (MN) comes to know whether it is present in its
home network or in a foreign network. If the MN is in its home network, it
communicates like a normal IP device. But if the MN is in a foreign network, it must
inform its HA about its current location. This process is called registration.

When the MN moves to a foreign network, it obtains a Care-of Address (COA). This
COA represents the current location of the MN. The MN registers this COA with its Home
Agent. After successful registration, the HA creates a mobility binding.

The binding can be written as: Home Address of MN → Care-of Address

Using this binding, the HA can tunnel packets to the MN’s current foreign network.
✓ Types of Registration

1. Registration when COA is at Foreign Agent

In this case, the Care-of Address belongs to the Foreign Agent (FA). The MN does not
have its own separate COA. It uses the FA’s address as its COA.

Step 1: Agent Discovery- The MN first detects that it has entered a foreign network. It
may receive an Agent Advertisement from the FA or send an Agent Solicitation to
discover available agents.

Step 2: Registration Request to FA- The MN sends a Registration Request message to


the Foreign Agent. This message contains important information such as the MN’s
home address, Home Agent address, COA, lifetime, and identification value. The
Foreign Agent checks the request and then forwards it to the Home Agent. The FA acts a

Step 3: HA creates mobility binding- The HA receives the Registration Request and
verifies it. If the request is valid, the HA creates a mobility binding between the MN’s
home address and the COA.

Step 5: HA sends Registration Reply- The HA sends a Registration Reply message back
to the FA. This reply indicates whether the registration is accepted or denied.

Step 6: FA forwards reply to MN- The FA forwards the Registration Reply to the Mobile
Node. If the registration is accepted, the MN can now receive packets through the FA.

Step 7: Tunnel establishment- After successful registration, a tunnel is established


from the HA to the FA. Packets addressed to the MN’s home address are intercepted by
HA, encapsulated, and tunneled to the FA. The FA decapsulates them and forwards
them to the MN.

2. Registration when COA is Co-located

In this case, the MN obtains its own Care-of Address, usually through DHCP. This
address is called a co-located COA. Here, registration is simpler because the MN can
communicate directly with the HA without requiring FA support.

Step 1: MN enters foreign network

The Mobile Node detects that it is not in its home network. The MN may try to discover a
Foreign Agent. If no FA responds, or if the MN receives an advertisement where direct
registration is allowed, it uses co-located COA registration.

Step 3: MN obtains co-located COA- The MN obtains a temporary IP address from the
foreign network, usually using DHCP. This address becomes the MN’s current COA.
Step 4: MN sends Registration Request directly to HA- The MN sends the Registration
Request directly to its Home Agent. The request contains its home address, HA
address, co-located COA, lifetime, and identification.

Step 5: HA creates binding- The HA verifies the request and creates a mobility binding
between the MN’s home address and the co-located COA.

Step 6: HA sends Registration Reply- The HA sends a Registration Reply directly to the
MN. If accepted, registration is successful.

Step 7: Tunnel establishment- The HA tunnels packets directly to the MN’s co-located
COA. Since the MN itself has the COA, it performs decapsulation.

✓ Registration Request Message

The Registration Request message is sent by the MN to register its current COA with the
Home Agent.

1. Type- This field identifies the message as a Registration Request. Its value is set to 1.

2. S bit- If set it indicates that the MN wants the Foreign Agent to retain previous
mobility bindings.

3. B bit- If this bit is set, it indicates that the MN wants to receive broadcast packets that
are received by the Home Agent in the home network.

4. D bit- If this bit is set, it means the MN will perform decapsulation itself. This is used
in co-located COA registration.

5. Lifetime- This field specifies the validity period of the registration in seconds. After
this time expires, the registration is deleted automatically. Therefore, the MN must
renew registration before expiry.

6. Home Address- This is the permanent IP address of the Mobile Node.

7. Home Agent- This is the IP address of the Home Agent.

8. COA- This is the current Care-of Address of the MN.

9. Identification- This is a 64-bit value generated by the MN. It is used to match


registration requests with replies and to protect against replay attacks.
✓ Registration Reply Message

The Registration Reply message is sent by the Home Agent in response to the
Registration Request. It informs whether the registration request is accepted or
rejected.

1. Type-This field identifies the message as a Registration Reply. Its value is set to 3.

2. Code- This field indicates the result of the registration request. It tells whether the
registration is successful or denied.

Registration successful:

• Code 0: Registration accepted

• Code 1: Registration accepted, but simultaneous mobility bindings are not


supported

Registration denied by FA:

• Code 65: Administratively prohibited

• Code 66: Insufficient resources

Registration denied by HA:

• Code 129: Administratively prohibited

• Code 131: Mobile node failed authentication

3. Lifetime- This gives the time for which registration is valid.

4. Home Address- This specifies the home address of the Mobile Node.

5. Home Agent- This specifies the IP address of the Home Agent.

6. Identification- This value matches the reply with the original request.

TUNNELING AND ENCAPSULATION:

In Mobile IP, a Mobile Node (MN) can move from its home network to a foreign network
while still using its permanent home IP address. When a Correspondent Node (CN)
sends data, it uses the MN’s home IP address and is unaware of the MN’s current
location. Therefore, a mechanism is required to forward packets from the Home Agent
(HA) to the MN’s current location, which is achieved using tunnelling and
encapsulation.
1. Tunneling

• Tunneling is the process of creating a virtual path (tunnel) between the Home
Agent and the Mobile Node’s current location (COA). It allows packets to be
forwarded correctly even when the MN is not present in its home network.

• When the MN moves to a foreign network, it registers its Care-of Address (COA)
with the HA. After this, whenever a packet for MN arrives at the HA, the HA does
not deliver it locally but forwards it through a tunnel to the COA.

• The tunnel behaves like a logical connection or pipeline through which packets
travel from HA to MN. The packet is not modified internally but is carried inside
another packet during transmission.

• The starting point of the tunnel is always the Home Agent, while the ending
point depends on the type of COA. If the COA is associated with a Foreign Agent,
then the FA becomes the tunnel endpoint. If the MN uses a co-located COA, then
the MN itself acts as the endpoint.

• Tunneling ensures that communication remains uninterrupted and that the MN


can receive packets even when it changes its network location.

2. Encapsulation

• Encapsulation is the technique used to implement tunneling. It involves adding


a new IP header to the original packet, so that it can be routed to the Care-of
Address.

• The original packet sent by the CN contains the source address as CN’s IP and
the destination address as MN’s home IP. However, this packet cannot directly
reach the MN in the foreign network.

• The Home Agent takes this original packet and encapsulates it inside a new
packet by adding an outer header. In this new header, the source address is the
HA and the destination address is the COA.

• Thus, the packet now has two headers:

o The outer header, which is used for routing through the Internet

o The inner header, which is the original packet from CN to MN

• This encapsulated packet is then transmitted through the tunnel from HA to the
COA.
3. Decapsulation

• When the encapsulated packet reaches the destination (FA or MN), the outer
header is removed. This process is called decapsulation.

• After removing the outer header, the original packet is obtained and delivered to
the Mobile Node.

• If the COA belongs to a Foreign Agent, then the FA performs decapsulation. If the
COA is co-located, then the MN itself performs decapsulation.

IP-in-IP ENCAPSULATION:

• IP-in-IP encapsulation is the simplest tunneling technique. In this method, the


entire original IP datagram is enclosed inside another IP datagram, so that it
can be routed to the Mobile Node’s current location.

✓ Structure of IP-in-IP Encapsulation

Outer IP Header

• This header is added by the Home Agent.

• It contains:

o Source address → IP address of HA

o Destination address → Care-of Address (COA)

• This header is used to route the packet through the Internet to the MN’s current
location.

Inner IP Header

• This is the original IP header created by the Correspondent Node.

• It contains:

o Source address → CN’s IP address

o Destination address → MN’s home IP address

• This header remains unchanged during transmission.

Payload- The payload consists of the original data (TCP/UDP data) that was sent by
the CN.
✓ Fields of Outer Header (Important Explanation)

• Version (Ver): Indicates the IP version (IPv4 = 4).

• IHL (Internet Header Length): Specifies the length of the outer header.

• DS/TOS: Copied from the inner header to maintain service quality.

• Total Length: Represents the complete size of the encapsulated packet.

• TTL (Time to Live): Defines the lifetime of the packet; it must be sufficient for the
packet to reach the tunnel endpoint.

• Protocol Field: Set to indicate that the payload is another IP packet (IP-in-IP).

• Checksum: Used for error detection in the outer header.

✓ Working of IP-in-IP Encapsulation

• The Correspondent Node sends a packet addressed to the MN’s home IP.

• The packet reaches the Home Agent through normal routing.

• The HA encapsulates the original packet inside a new IP packet.

• The outer header directs the packet to the COA (FA or MN).

• The encapsulated packet travels through the tunnel.

• At the destination, the outer header is removed (decapsulation).

• The original packet is delivered to the Mobile Node.

MINIMAL ENCAPSULATION:

Minimal encapsulation is a tunneling technique used in Mobile IP to forward packets


from the Home Agent (HA) to the Care-of Address (COA) of the Mobile Node. Unlike
IP-in-IP encapsulation, minimal encapsulation does not add a completely new IP
header containing all fields again. Instead, it adds only the minimum required
information, so the packet overhead is reduced.

Basic Concept

In minimal encapsulation, the original IP header is not completely copied into a new IP
packet. Instead, the original header is modified and a small extra header is inserted.

The packet mainly contains:


• A modified outer IP header

• A minimal encapsulation header

• The original sender/destination information if required

• The original TCP/UDP payload

This makes the packet smaller than IP-in-IP encapsulation.

✓ Working of Minimal Encapsulation

Step 1: Packet reaches Home Agent- The Correspondent Node sends a packet to the
Mobile Node’s home address. Since the MN is away from the home network, the packet
reaches the Home Agent.

Step 2: HA prepares the packet for tunneling-The Home Agent must forward the
packet to the Mobile Node’s current COA. For this, HA modifies the IP header and
inserts a minimal encapsulation header.

Step 3: Destination address is changed- In the modified IP header, the destination


address is changed from the MN’s home address to the Care-of Address. This allows
normal Internet routing to deliver the packet to the tunnel endpoint.

Step 4: Minimal header is inserted- A small minimal forwarding header is inserted


between the modified IP header and the original payload. This header stores only the
necessary information required to restore the original packet at the tunnel endpoint.

Step 5: Packet is sent through tunnel- The packet is forwarded through the tunnel
from HA to the COA.

Step 6: Decapsulation- At the tunnel endpoint, either the FA or MN removes the


minimal encapsulation header and reconstructs the original IP packet. The packet is
then delivered to the Mobile Node.

✓ Important Fields in Minimal Encapsulation

1. Type / Protocol Field- The outer IP header has a protocol field that indicates minimal
encapsulation. Its value is generally set to 55.

2. Source Address- The source address is usually the IP address of the Home Agent.

3. Destination Address- The destination address is the Care-of Address of the Mobile
Node.
4. S Bit- The S bit indicates whether the original sender’s IP address is included in the
minimal encapsulation header.

If S = 0, the original sender’s IP address can be omitted.

If S = 1, the original sender’s IP address is included in the header.

6. Original Destination Address- This field helps in restoring the original destination
address of the packet, which is the Mobile Node’s home address.

GENERIC ROUTING ENCAPSULATION:

• Generic Routing Encapsulation (GRE) is a general-purpose encapsulation


mechanism that allows packets of one protocol to be carried inside another
protocol.

• Unlike IP-in-IP and minimal encapsulation (which mainly support IP), GRE is
more flexible and can encapsulate different network layer protocols.

✓ Working of GRE Encapsulation

• When a packet destined for the Mobile Node arrives at the Home Agent, the HA
realizes that the MN is not in the home network.

• The HA prepares the packet for tunneling by adding a new outer IP header,
where:

o Source = HA

o Destination = COA

• After adding the outer header, the HA inserts a GRE header between the outer
header and the original packet.

• The encapsulated packet is then forwarded through the tunnel to the COA.

• At the tunnel endpoint (FA or MN), the GRE header and outer header are
removed, and the original packet is delivered.

✓ GRE Header Fields (Important Explanation)

The GRE header is placed after the outer IP header and contains several fields that
control encapsulation.
1. Protocol Type (Protocol field)- This field specifies the type of payload carried inside
GRE. It indicates which protocol is encapsulated (e.g., IP, IPv6, etc.).

2. C bit (Checksum Present)- If this bit is set, a checksum field is present. The
checksum is used for error detection of the GRE header and payload.

3. R bit (Routing Present)- If set, it indicates that routing fields are present in the
header. These fields can be used for source routing.

4. K bit (Key Present)- If this bit is set, a key field is included in the header. This key can
be used for identification or authentication of the tunnel.

5. S bit (Sequence Number Present)

• If set, a sequence number field is present.

• This helps in maintaining the order of packets.

6. Recursion Control (rec field)- This field specifies the number of times encapsulation
can be applied recursively. It prevents infinite encapsulation loops.

7. Version (ver field)- Specifies the version of GRE being used. Typically set to 0.

8. Checksum (Optional)- Used for detecting errors in transmission.

9. Offset Field- Used along with routing fields. Indicates the position of the routing
information.

10. Key Field (Optional)- Used for identifying different tunnels. Helpful in security and
traffic separation.

11. Sequence Number (Optional)- Helps in maintaining proper packet sequence


during transmission.

12. Routing Field (Optional)- Contains routing information for source routing.

REVERSE TUNNELING:

• In normal Mobile IP operation, when a Mobile Node (MN) sends packets to a


Correspondent Node (CN), the packets are sent directly through the foreign
network using standard IP routing.

• However, in some situations, direct transmission is not possible or not


desirable due to security or routing constraints.
• To handle such cases, an optional mechanism called Reverse Tunneling is
used.

• Reverse tunneling is the process of creating a tunnel from the Mobile Node (or
Foreign Agent) to the Home Agent.

• Instead of sending packets directly to the CN, the MN sends packets to the
Foreign Agent (FA), which encapsulates them and tunnels them back to the HA.

• The HA then forwards these packets to the CN using normal routing.

✓ Working of Reverse Tunneling

• When reverse tunneling is enabled, the MN does not send packets directly to the
Internet.

• The MN sends packets to the FA, which acts as the tunnel entry point.

• The FA encapsulates the packets and sends them through a tunnel to the HA.

• The HA receives the tunneled packets, decapsulates them, and forwards them to
the CN using standard IP routing.

• This ensures that all outgoing traffic from MN appears to originate from its home
network.

✓ Tunnel Formation

• The reverse tunnel is established between:

o Entry point → MN or FA

o Exit point → Home Agent (HA)

• If COA is FA-based → FA performs encapsulation

• If COA is co-located → MN performs encapsulation

✓ Need for Reverse Tunnelling

1. Ingress Filtering / Firewalls

• Some networks implement security mechanisms that block packets if the


source IP address does not belong to that network.
• Since the MN sends packets with its home IP address while being in a foreign
network, such packets may be rejected.

• Reverse tunnelling solves this by sending packets to the HA first, so that they
appear to originate from the home network.

2. Multicasting

• In multicast communication, the MN must be part of a multicast group in its


home network.

• If the MN is in a foreign network, it may not be able to directly send multicast


packets.

• Reverse tunnelling allows packets to be sent through the HA, which handles
multicast transmission.

3. TTL (Time-To-Live) Problem

• When the MN moves away from the home network, the distance increases.

• The TTL value of packets may not be sufficient to reach the destination directly.

• Reverse tunnelling treats the tunnel as a single hop, thus solving TTL-related
issues.

6. Advantages of Reverse Tunnelling

• It ensures compatibility with security mechanisms like firewalls and ingress


filtering.

• It allows proper handling of multicast communication.

• It simplifies routing by making packets appear as if they originate from the home
network.

7. Problems / Disadvantages of Reverse Tunnelling

• Reverse tunnelling introduces triangular routing in reverse direction, increasing


delay.

• It increases network overhead, since packets travel through HA instead of taking


a direct path.
TRADITIONAL TCP:

Traditional TCP (Transmission Control Protocol) was originally designed for wired
networks with fixed nodes. It provides reliable, connection-oriented communication
using acknowledgements, retransmissions, and congestion control mechanisms.

✓ Working of Traditional TCP

1. Congestion Control

• In a wired network, packet loss is assumed to be caused by congestion (buffer


overflow at routers).

• When packets arrive faster than a router can forward them, the buffer becomes
full and packets are dropped.

• The receiver detects missing packets and sends acknowledgements only for
correctly received packets.

• The sender observes missing acknowledgements and assumes congestion.

• To reduce congestion, TCP reduces its transmission rate significantly.

2. Slow Start Mechanism

• Slow start is used when a connection begins or after congestion is detected.

• TCP maintains a parameter called congestion window (cwnd). Initially, cwnd is


set to one segment.

• After each successful acknowledgement, cwnd increases, doubling the


transmission rate. This results in exponential growth of the sending rate.

• Once cwnd reaches a threshold value (congestion threshold), the growth


becomes linear instead of exponential.

• If packet loss occurs:

o cwnd is reset to 1

o threshold is set to half of the previous cwnd

3. Fast Retransmit and Fast Recovery

• TCP detects packet loss in two ways:

o Timeout expiration & Duplicate acknowledgements


• If multiple duplicate ACKs are received, TCP assumes packet loss but not severe
congestion. The sender immediately retransmits the missing packet without
waiting for timeout. This is called fast retransmit.

• After retransmission, TCP avoids going back to slow start and instead continues
with a reduced window. This is called fast recovery.

4. Implication on Mobility

Traditional TCP does not consider mobility-related issues. It assumes a stable path
between sender and receiver, which is not true in mobile environments.

3. Limitations of Traditional TCP in Wireless/Mobile Networks

1. Misinterpretation of Packet Loss

TCP assumes that packet loss always occurs due to congestion. In wireless networks,
packet loss may occur due to: Bit errors, Signal fading, Interference

TCP unnecessarily reduces transmission rate even when there is no congestion.

2. Mobility (Handover Issues)

When a mobile node moves from one network to another (handover), packets may be
lost. TCP interprets this as congestion and reduces the sending rate. This leads to poor
performance and reduced throughput.

3. High Delay (Latency)

Wireless networks have higher delay compared to wired networks. TCP’s


retransmission timers may expire unnecessarily due to delay.

4. Limited Bandwidth

Wireless networks have limited and variable bandwidth. TCP’s congestion control
mechanism reduces the transmission rate frequently. This leads to inefficient utilization
of available bandwidth.

5. Frequent Disconnections

Wireless links may experience temporary disconnections. TCP interprets


disconnections as congestion and reduces its window size. This causes a drop in
performance even after reconnection
INDIRECT TCP:

Indirect TCP (I-TCP) is a technique designed to improve TCP performance in wireless


and mobile environments. Traditional TCP performs poorly over wireless links because
it assumes packet loss is due to congestion, while in reality losses may occur due to bit
errors, fading, or mobility. I-TCP solves this problem by splitting the TCP connection into
two separate connections, isolating the wireless part from the wired network.

✓ Working of I-TCP

Case 1: Correspondent Host → Mobile Host

• The Correspondent Host sends data using standard TCP toward the FA.

• The FA receives the packet and immediately sends an acknowledgement to the


fixed host, even before delivering it to the mobile host.

• The FA stores (buffers) the packet temporarily.

• The FA then forwards the packet to the Mobile Host over the wireless link.

• If an error occurs on the wireless link:

o The FA performs local retransmission instead of the fixed host


retransmitting.

• Once the Mobile Host sends acknowledgement:

o The FA removes the packet from its buffer.

Thus, wireless errors are hidden from the fixed network.

Case 2: Mobile Host → Correspondent Host

• The Mobile Host sends data to the FA.

• The FA acknowledges the packet immediately to the Mobile Host.

• If packet loss occurs on the wireless link:

o The Mobile Host can quickly retransmit because delay is small.

• The FA forwards the packet to the Correspondent Host using standard TCP.

• If loss occurs in wired network:

o Standard TCP mechanisms handle retransmission.


Case 3: Handover (Mobility Support)

• When the Mobile Host moves to a new location, it connects to a new FA.

• The new FA registers with the old FA and obtains connection information.

• The old FA forwards all buffered packets to the new FA.

• The TCP connection state (like sequence numbers, ports, etc.) is also
transferred.

This process is called socket migration and state transfer.

• The handover is transparent to the Correspondent Host, meaning no new


connection is required.

✓ Advantages of I-TCP

• I-TCP does not require changes in standard TCP used in wired networks.

• It isolates wireless errors, so they do not affect the wired network performance.

• It allows fast local retransmission, improving efficiency.

✓ Disadvantages of I-TCP

• It breaks end-to-end TCP semantics, since acknowledgements are sent by FA


and not by the actual receiver.

• If the FA crashes after acknowledging packets but before delivering them to the
MH, data loss may occur.

• It introduces additional delay during handover, especially due to buffering and


transfer of data.

SNOOPING TCP:

Snooping TCP (S-TCP) is an enhancement of TCP designed to improve performance over


wireless links. It was proposed to overcome the drawbacks of Indirect TCP, especially
the problem of breaking end-to-end TCP semantics.

In Snooping TCP, a Foreign Agent (FA) or Base Station monitors (snoops) TCP packets
and acknowledgements, but does not split the connection. Thus, the end-to-end TCP
connection remains intact, unlike I-TCP.
✓ Working of Snooping TCP

Case 1: Correspondent Host → Mobile Host

• The Correspondent Host sends packets using standard TCP over the wired
network.

• These packets reach the Foreign Agent, which buffers them temporarily before
forwarding to the Mobile Host.

• The FA also monitors ACKs coming from the Mobile Host.

• If the Mobile Host successfully receives a packet, it sends an ACK, which passes
through the FA and reaches the Correspondent Host.

• If the FA does not receive an ACK within a certain time:

o It assumes packet loss over the wireless link

o It performs local retransmission from its buffer

This retransmission is faster than waiting for the Correspondent Host.

• If duplicate ACKs are generated due to packet loss:

o The FA filters these duplicate ACKs

o This prevents the Correspondent Host from unnecessarily triggering


congestion control

Case 2: Mobile Host → Correspondent Host

• When the Mobile Host sends packets, the FA monitors the sequence numbers.

• If the FA detects a gap in sequence numbers (indicating packet loss):

o It sends a negative acknowledgement (NACK) to the Mobile Host

o The Mobile Host immediately retransmits the missing packet

• The FA forwards packets to the Correspondent Host using normal TCP.

• Packet reordering is handled by TCP at the receiver side.

The FA does not send acknowledgements to the Correspondent Host on behalf of the
Mobile Host. It only forwards the ACKs received from the Mobile Host. This ensures
that: The end-to-end reliability of TCP is preserved. If FA fails, the normal TCP timeout
mechanism still works
✓ Advantages of Snooping TCP

• It preserves end-to-end TCP semantics, unlike I-TCP.

• It does not require changes at the Correspondent Host, making it easy to deploy.

• It improves performance by local retransmissions over wireless link.

✓ Disadvantages of Snooping TCP

• It does not fully isolate wireless and wired parts, so wireless delay can still affect
TCP performance.

• It requires the FA to understand and process TCP headers, increasing complexity.

• It assumes support for mechanisms like NACK, which may not be available in all
systems.

MOBILE TCP:

Mobile TCP (M-TCP) is a modification of traditional TCP designed specifically for mobile
and wireless environments. The main problem in wireless networks is frequent
disconnections and high delay, which degrade TCP performance.

• Traditional TCP assumes packet loss is due to congestion, but in wireless


networks, loss can occur due to link errors or disconnections.

M-TCP is designed to handle these issues while still maintaining end-to-end TCP
semantics.

✓ Objectives of M-TCP

• M-TCP aims to improve overall communication performance in mobile networks.

• It focuses on:

o Improving throughput

o Reducing delay

o Maintaining end-to-end TCP semantics

o Providing efficient handling of disconnections and handovers


3. Basic Concept

• M-TCP introduces a special intermediate node called a Supervisory Host (SH)


between the Correspondent Host (CH) and the Mobile Host (MH).

• The connection is logically divided into two parts (similar to I-TCP), but unlike I-
TCP:

o The SH does not break the TCP connection

o It only monitors and controls the sender’s behavior

• Communication:

o CH ↔ SH → uses standard TCP

o SH ↔ MH → uses modified TCP suitable for wireless link

SH acts as a controller, not a proxy.

4. Working of Mobile TCP

1. Normal Data Transmission

• The Correspondent Host sends packets to the Mobile Host through the
Supervisory Host.

• The SH monitors all packets but does not generate its own acknowledgements.

• The Mobile Host sends ACKs directly to the Correspondent Host through SH.

End-to-end TCP connection is preserved.

2. Handling Packet Loss

• If packet loss occurs due to wireless errors:

o The original sender (CH) retransmits the packet

• SH does not perform local retransmission like I-TCP or Snooping TCP.

This ensures strict end-to-end reliability.

3. Handling Disconnection (Key Feature)

• When the Mobile Host gets disconnected:


o It cannot send ACKs to the sender

• The Supervisory Host detects the absence of ACKs and assumes disconnection.

• SH sets the sender’s congestion window to zero by sending an appropriate


control signal.

This forces the sender into persist mode, where:

• The sender stops sending data

• The connection is not terminated

• The state of TCP is preserved

4. Reconnection

• When the Mobile Host reconnects:

o It resumes sending ACKs

• The SH detects this and restores the sender’s congestion window to its
previous value.

• The sender resumes transmission at full speed without slow start.

This avoids unnecessary performance degradation.

6. Advantages of M-TCP

• End-to-end TCP semantics are fully preserved, unlike I-TCP.

• It avoids unnecessary retransmissions during disconnections.

• It handles disconnections efficiently by freezing the sender state.

• It does not require forwarding buffered data during handover, reducing


complexity.

7. Disadvantages of M-TCP

• Packet loss over wireless links is still handled by the sender, which may reduce
performance.

• It does not provide local retransmission, unlike Snooping TCP.


FAST RETRANSMIT AND FAST RECOVERY

• Fast Retransmit and Fast Recovery are TCP mechanisms designed to improve
performance when packet loss occurs.

• In traditional TCP, packet loss is detected only after a timeout, which leads to
unnecessary delay and reduction in transmission rate.

• These mechanisms allow TCP to detect packet loss earlier and recover faster
without drastically reducing throughput.

2. Fast Retransmit

• Fast Retransmit is a mechanism in which TCP retransmits a lost packet before


the retransmission timeout expires.

• It is based on the observation of duplicate acknowledgements (duplicate ACKs).

Working

• When packets are sent in sequence and one packet is lost:

o The receiver continues to send ACKs for the last correctly received
packet.

• As a result, the sender receives multiple duplicate ACKs for the same sequence
number.

• When the sender receives three duplicate ACKs, it assumes that:

o A packet has been lost

o The network is still delivering packets (so not a complete failure)

• Instead of waiting for timeout, the sender immediately:

o Retransmits the missing packet

This reduces delay and improves efficiency.

3. Fast Recovery

• Fast Recovery is used after Fast Retransmit to avoid going back to slow start
phase.

• It helps TCP to recover quickly from packet loss while maintaining a reasonable
transmission rate.
Working

• After detecting packet loss via duplicate ACKs and performing fast retransmit:

o The sender reduces the congestion window, but not to 1 (unlike slow
start).

• The congestion threshold is set to:

o Half of the current congestion window

• Instead of restarting from slow start:

o TCP continues transmission with a reduced but non-zero window size

• For each additional duplicate ACK:

o The congestion window is increased slightly

o This allows continuous transmission of packets

• Once a new ACK for the retransmitted packet arrives:

o TCP exits fast recovery

o Normal congestion avoidance continues

This avoids drastic reduction in throughput.

TRANSMISSION / TIMEOUT FREEZING IN DETAIL

• In wireless and mobile networks, one major problem is temporary


disconnection, which may occur due to:

o Handover, Signal fading, Coverage loss

• During such disconnections, packets cannot reach the Mobile Host (MH), and
acknowledgements (ACKs) are not received by the sender.

• In traditional TCP, absence of ACKs leads to timeout, which is wrongly


interpreted as congestion.

• This results in:

o Reduction of congestion window

o Entry into slow start

o Degradation of performance
• Transmission freezing (also called timeout freezing) is a technique where the
sender temporarily pauses transmission and freezes its timers during
disconnection.

• Instead of reducing the transmission rate, TCP maintains its current state until
the connection is restored.

The main idea is: “Do not treat disconnection as congestion.”

3. Working of Transmission Freezing

Step 1: Detection of Disconnection

• The network (usually a base station, foreign agent, or supervisory host) detects
that the Mobile Host is temporarily unreachable.

• This may be due to: Handover between cells and Weak signal conditions

Step 2: Notification to Sender

• The intermediate node informs the sender about the disconnection.

• This can be done using special control messages or TCP modifications.

Step 3: Freezing the Transmission

• Once the sender is informed:

o It stops sending new packets

o It freezes its retransmission timers

o It does not reduce congestion window

The sender enters a paused state instead of assuming congestion.

Step 4: Disconnection Period

• During this time:

o No packets are transmitted

o No retransmissions are triggered

o The TCP state (window size, sequence numbers) is preserved

Step 5: Resumption of Transmission

• When the Mobile Host reconnects:

o The intermediate node informs the sender


• The sender:

o Resumes transmission from the same state

o Continues sending packets at previous rate

No slow start is required, so performance is maintained.

SELECTIVE RETRANSMISSION PROCESS IN TCP:

• In traditional TCP, when a packet is lost, the sender often retransmits multiple
packets, even if only one packet is missing.

• This happens because TCP uses cumulative acknowledgements, where the


receiver only acknowledges the last correctly received in-order packet.

• To improve efficiency, TCP uses a mechanism called Selective Retransmission,


where only the lost packets are retransmitted instead of the entire window.

This significantly improves performance, especially in networks with high delay or


packet loss.

3. Working of Selective Retransmission

Step 1: Transmission of Packets

• The sender transmits multiple packets (segments) in sequence based on the


congestion window.

• These packets may arrive at the receiver out of order due to network conditions.

Step 2: Detection of Packet Loss

• If a packet is lost:

o The receiver detects a gap in sequence numbers

• Instead of discarding out-of-order packets, the receiver:

o Stores them in a buffer

Step 3: Sending Selective Acknowledgements

• The receiver sends acknowledgements indicating:

o Which packets have been received successfully


o Which packet(s) are missing

• This is done using SACK blocks, which specify ranges of correctly received data.

Step 4: Identification of Missing Packets

• The sender analyzes the SACK information and identifies:

o The exact sequence numbers of missing packets

Step 5: Selective Retransmission

• The sender retransmits only the missing packets, instead of retransmitting the
entire window.

• Other correctly received packets are not retransmitted, avoiding redundancy.

Step 6: Completion of Transmission

• Once the missing packets are received:

o The receiver can reconstruct the complete data sequence

o Normal TCP communication continues

5. Advantages of Selective Retransmission

• Reduces unnecessary retransmissions, saving bandwidth.

• Improves throughput, especially in wireless networks.

• Efficient in networks with high latency or high error rate.

• Makes better use of available network resources.

6. Disadvantages

• Requires additional complexity in sender and receiver.

• Needs support for SACK option in TCP.

• Requires buffer space at receiver to store out-of-order packets.

You might also like