Electronics & Telecommunication (University) is coming soon

We're still writing and reviewing the notes for every subject, and we'll open it when every subject is ready. Meanwhile you can practise aptitude, ask Aria about any subject, or see the branches that are ready.

Mobile IP

Mobile IP lets a moving device keep the same IP address while changing networks by using a Home Agent, Care-of Address and tunnelling or binding updates, important for continuous mobile sessions and mobility management.

Drafted with Aria, reviewed by the AiCanCode.org team · Updated . How we write and check our notes. Spotted an error? Use Give Feedback at the bottom of the page.

Why it matters

Mobile IP is used when a mobile host (smartphone, IoT device, laptop) must keep the same IP address and active connections while moving between IP networks. Engineers use Mobile IP ideas to design mobility management, reduce service interruption, and reason about overheads (delay, extra bytes, fragmentation) when routing packets for mobile nodes.

Key ideas

Start with definitions (every term defined before use):

  • Mobile Node (MN): a device that changes its point of attachment to the Internet but wants to keep the same IP address.
  • Home Network: the IP network that assigns the MN its permanent IP address (the home address).
  • Home Agent (HA): a router on the MN's home network that forwards packets destined for the MN when it is away from home.
  • Foreign Network: the new IP network where the MN is currently attached when away from home.
  • Care-of Address (CoA): an IP address that identifies the MN's current location in the foreign network. It may be an address of the MN itself (co-located) or of a Foreign Agent (FA) that helps forward traffic to the MN.
  • Tunneling (IP-in-IP): encapsulating the original IP packet inside a new outer IP header so that the packet can be routed to the CoA/FA; the outer header carries the destination of the tunnel (CoA or FA).
  • Binding: the association between the MN's home address and its current CoA; stored at the HA and optionally at Correspondent Nodes (CN) in route optimization.
  • Correspondent Node (CN): a peer that sends packets to the MN.
  • Route Optimization: techniques (especially in Mobile IPv6) that avoid triangle routing by informing the CN about the MN's CoA so the CN can send directly.

Mobile IP variants and assumptions:

  • Mobile IPv4 (MIPv4) originally used Foreign Agents and tunnelling via the HA; triangle routing (CN→HA→MN) is common unless route optimization is used.
  • Mobile IPv6 (MIPv6) was designed to improve route optimization, providing Binding Updates so CNs may send directly to the MN's CoA; IPv6 has a fixed 40-byte base header and extension headers.
  • Assume IP routing obeys usual shortest-path rules; delays are measured as packet transmission + propagation + queuing + processing. For exam derivations we normally approximate per-path delay by the measured or given RTT or one-way delay numbers.

Step-by-step: how packet delivery works (common exam derivation):

  1. MN boots on foreign network and obtains a CoA (via DHCP, SLAAC or FA-assisted assignment). In MIPv4, the MN discovers FAs using Agent Advertisements/Solicitations (Mobile IP extensions to ICMP Router Discovery) to learn care-of options and lifetimes. Draw: a box for Home Network with HA (label HA), a box for Foreign Network with FA (label FA) and a Mobile Node (MN) inside it; draw a Correspondent Node (CN) on some other network. Draw arrows: CN→HA (label: packet to MN's home address), HA encapsulates and tunnels to FA/CoA (arrow HA→FA or HA→MN labelled "tunnel"); FA decapsulates and forwards to MN. Reverse path: MN→FA→CN (may or may not be tunneled). In MIPv4, reverse tunneling to the HA is often required to satisfy ingress filtering; otherwise, packets sourced with the MN's home address from a foreign network may be dropped.
  2. MN registers its CoA with HA (Registration): MN sends Registration Request to HA (via FA if present), HA replies with Registration Reply. The HA stores binding (home address → CoA) for a lifetime.
  3. When route optimization is used, MN sends Binding Update to CN; CN stores binding and can send directly to CoA.

Derivations universities commonly ask for:

  • Tunnelling overhead and effect on MTU (derive total packet size after encapsulation and whether fragmentation occurs).
  • Extra latency caused by triangle routing (compare time via HA versus direct path and express extra delay formula).
  • Registration time in terms of RTT and processing time (compute registration latency and show how handover speed depends on signalling RTTs).

When a diagram is required in an answer, draw exactly the nodes and label arrows as above. On the home network box write "HA (Home Agent)" and beside the foreign network write "MN (mobile)" and "FA (Foreign Agent)" if used. Label packet flows with protocol actions: "Encapsulate IP-in-IP", "Decapsulate", "Binding update". If showing timings, annotate arrows with one-way delay or RTT values used in your calculation.

Formulas

S_tunnel = S_original + S_outer — where S_tunnel is the total packet size on the wire after tunnelling; S_original is original IP packet size (including its IP header), S_outer is outer IP header size; units: bytes. Applies when IP-in-IP encapsulation is used.

If S_tunnel > MTU_link then IP-layer fragmentation is required (IPv4): fragments = ceil((S_tunnel - S_outer) / (MTU_link - S_outer)). Each fragment carries its own outer IP header; for IPv4 all but the last fragment must have a payload size that is a multiple of 8 bytes. For IPv6, routers do not fragment packets; the source (or tunnel entry) must use Path MTU Discovery and, if needed, add an IPv6 Fragment extension header. Units: fragments (count).

T_reg = RTT(MN,HA) + T_proc_HA — registration latency: RTT between MN and HA plus HA processing time. Units: seconds. Assumes request and reply form one RTT and processing is additive.

T_via_HA = D(CN,HA) + D(HA,MN) — one-way delay for a packet sent from CN to MN when routed via HA. Units: seconds.

T_direct = D(CN,MN) — one-way delay if CN could send directly to MN's CoA.

Extra_delay_triangle = T_via_HA - T_direct — additional delay due to triangle routing. Units: seconds.

Definitions for symbols used above:

  • S_original: original IP packet size including headers (bytes).
  • S_outer: outer IP header length (bytes); typical values: IPv4 base header 20 bytes, IPv6 base header 40 bytes.
  • MTU_link: maximum transmission unit enforceable on the outgoing path (Path MTU), in bytes.
  • RTT(A,B): round-trip time between A and B (seconds).
  • D(X,Y): one-way delay from X to Y (seconds); if only RTT is given, often use D = RTT/2 assuming symmetric paths.
  • T_proc_HA: processing time at the HA (seconds).

Worked examples

Example 1 — Tunnelling and MTU (numerical) Given: original IPv4 packet (including original IP header) size S_original = 1490 bytes. Outer header for IPv4 tunnel S_outer = 20 bytes. Link MTU_link = 1500 bytes. Steps:

  1. S_tunnel = S_original + S_outer = 1490 + 20 (formula used above).
  2. S_tunnel = 1510 bytes.
  3. Compare with MTU: 1510 > 1500, so fragmentation occurs.
  4. fragments = ceil((S_tunnel - S_outer) / (MTU_link - S_outer)) = ceil((1510 - 20) / (1500 - 20)) = ceil(1490 / 1480) = 2. Answer: Two IP fragments will be transmitted; first fragment 1500 bytes (20-byte outer IPv4 header + 1480-byte payload), second fragment 30 bytes (20-byte outer IPv4 header + 10-byte remaining payload). Note: Fragmentation occurs at the IP layer; each fragment includes its own IP header (no separate fragmentation header in IPv4). Link-layer headers/trailers are additional on the wire but are not part of the IP Total Length.

Example 2 — Registration latency (numerical) Given: RTT(MN,HA) = 200 ms, HA processing T_proc_HA = 20 ms. Steps:

  1. Use T_reg = RTT(MN,HA) + T_proc_HA.
  2. T_reg = 200 ms + 20 ms = 220 ms. Answer: 220 ms registration latency (approx.) from sending registration request to receiving reply.

Example 3 — Triangle routing extra delay (theory + numeric) Given: Direct one-way delay D(CN,MN) = 150 ms. CN→HA delay D(CN,HA) = 80 ms. HA→MN delay D(HA,MN) = 100 ms. Steps:

  1. Compute T_via_HA = 80 + 100 = 180 ms.
  2. Compute Extra_delay_triangle = 180 - 150 = 30 ms. Answer: Triangle routing adds 30 ms extra one-way delay compared to direct delivery.

Common mistakes

  • Mixing IPv4 and IPv6 header sizes (IPv6 has a fixed 40-byte base header; IPv4 base header is 20 bytes without options).
  • Counting RTT twice when computing registration time (registration requires one RTT for request+reply, not two RTTs).
  • Assuming route optimization is always available: in practice it requires security (Binding Authorization); Mobile IPv6 supports it more directly than Mobile IPv4.
  • Not mentioning processing delays at HA/FA when asked for total handover time; signalling delays alone are not the whole story.

For your exam

Kinds of questions you will see:

  • Definitions: define MN, HA, CoA, tunnelling, binding, route optimization. A full answer gives short definition and one-sentence example of role.
  • Short notes: explain triangle routing, compare Mobile IPv4 vs Mobile IPv6, explain foreign agent role. Full marks requires diagram + steps of packet flow.
  • Derivations: compute tunnelling overhead effect on MTU (show formulas and fragmentation count), derive registration latency from RTT and processing times. Show units and justify approximations (e.g., symmetric delays -> one-way = RTT/2).
  • Numericals: given sizes/RTTs compute fragmentation count, registration time, and extra latency due to triangle routing. Show each step and final answer with units.
  • Diagrams: always draw networks (Home network with HA, Foreign network with MN/FA, Correspondent Node). Label arrows and annotate delays if required.

What full-marks answers include: clear definitions with bold term names, a neat diagram with labels, the formula used, each arithmetic step with units, and a final boxed/clearly marked answer. Mention any assumptions you make (e.g., symmetric RTT or ignored link-layer headers).

Quick check

  1. What is the role of the Home Agent (HA)?
  2. How does tunnelling affect the MTU and why does it cause fragmentation?
  3. What is triangle routing and why does route optimization help?

Answers: 1) HA stores binding (home address → CoA) and forwards packets to MN when away from home. 2) Tunnelling adds an outer IP header (extra bytes), increasing packet size; if the total exceeds link MTU the packet is fragmented. 3) Triangle routing sends CN→HA→MN (longer path); route optimization informs CN of MN's CoA so CN can send directly, reducing delay and path length.

Finished this topic? Mark it so your progress, study plan and readiness keep up.

Stuck on something here?