Module-03
Module-03
Wi-Fi security: WEP, WPA, Wireless LAN Threats, Securing Wireless Networks
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
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.
Goals of Mobile IP
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.
Mobile IP maintains the same addressing and routing scheme as standard IP.
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
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.
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.
o Destination = CN’s IP
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.
1. Agent Advertisement
2. Agent Solicitation
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
Information Contained
5. Lifetime of advertisement
ICMP Fields
• Type = 16
Flags Explanation
Working
Advantages
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.
Using this binding, the HA can tunnel packets to the MN’s current foreign network.
✓ Types of Registration
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 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.
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.
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.
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.
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:
4. Home Address- This specifies the home address of the Mobile Node.
6. Identification- This value matches the reply with the original request.
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.
2. Encapsulation
• 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.
o The outer header, which is used for routing through the Internet
• 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:
Outer IP Header
• It contains:
• This header is used to route the packet through the Internet to the MN’s current
location.
Inner IP Header
• It contains:
Payload- The payload consists of the original data (TCP/UDP data) that was sent by
the CN.
✓ Fields of Outer Header (Important Explanation)
• IHL (Internet Header Length): Specifies the length of the outer header.
• 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).
• The Correspondent Node sends a packet addressed to the MN’s home IP.
• The outer header directs the packet to the COA (FA or MN).
MINIMAL ENCAPSULATION:
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.
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 5: Packet is sent through tunnel- The packet is forwarded through the tunnel
from HA to the COA.
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.
6. Original Destination Address- This field helps in restoring the original destination
address of the packet, which is the Mobile Node’s home address.
• Unlike IP-in-IP and minimal encapsulation (which mainly support IP), GRE is
more flexible and can encapsulate different network layer protocols.
• 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.
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.
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.
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.
12. Routing Field (Optional)- Contains routing information for source routing.
REVERSE TUNNELING:
• 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.
• 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
o Entry point → MN or FA
• Reverse tunnelling solves this by sending packets to the HA first, so that they
appear to originate from the home network.
2. Multicasting
• Reverse tunnelling allows packets to be sent through the HA, which handles
multicast transmission.
• 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.
• It simplifies routing by making packets appear as if they originate from the home
network.
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.
1. Congestion Control
• 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.
o cwnd is reset to 1
• 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.
TCP assumes that packet loss always occurs due to congestion. In wireless networks,
packet loss may occur due to: Bit errors, Signal fading, Interference
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.
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
✓ Working of I-TCP
• The Correspondent Host sends data using standard TCP toward the FA.
• The FA then forwards the packet to the Mobile Host over the wireless link.
• The FA forwards the packet to the Correspondent Host using standard TCP.
• 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 TCP connection state (like sequence numbers, ports, etc.) is also
transferred.
✓ 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.
✓ Disadvantages of I-TCP
• If the FA crashes after acknowledging packets but before delivering them to the
MH, data loss may occur.
SNOOPING TCP:
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
• 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.
• If the Mobile Host successfully receives a packet, it sends an ACK, which passes
through the FA and reaches the Correspondent Host.
• When the Mobile Host sends packets, the FA monitors the sequence numbers.
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 does not require changes at the Correspondent Host, making it easy to deploy.
• It does not fully isolate wireless and wired parts, so wireless delay can still affect
TCP performance.
• 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.
M-TCP is designed to handle these issues while still maintaining end-to-end TCP
semantics.
✓ Objectives of M-TCP
• It focuses on:
o Improving throughput
o Reducing delay
• The connection is logically divided into two parts (similar to I-TCP), but unlike I-
TCP:
• Communication:
• 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.
• The Supervisory Host detects the absence of ACKs and assumes disconnection.
4. Reconnection
• The SH detects this and restores the sender’s congestion window to its
previous value.
6. Advantages of M-TCP
7. Disadvantages of M-TCP
• Packet loss over wireless links is still handled by the sender, which may reduce
performance.
• 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
Working
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.
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).
• During such disconnections, packets cannot reach the Mobile Host (MH), and
acknowledgements (ACKs) are not received by the sender.
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 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
• In traditional TCP, when a packet is lost, the sender often retransmits multiple
packets, even if only one packet is missing.
• These packets may arrive at the receiver out of order due to network conditions.
• If a packet is lost:
• This is done using SACK blocks, which specify ranges of correctly received data.
• The sender retransmits only the missing packets, instead of retransmitting the
entire window.
6. Disadvantages