0% found this document useful (0 votes)
152 views

Assignment 2

The document discusses several topics related to mobile IP: 1. It shows the packet delivery process when a mobile node moves to a foreign network, including the registration process and routing tables at the home and foreign agents. 2. It demonstrates IP-in-IP encapsulation/decapsulation when a packet is sent from a correspondent node to a mobile node via the home and foreign agents. 3. It discusses how a direct route can be optimized in mobile IP to avoid triangular routing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
152 views

Assignment 2

The document discusses several topics related to mobile IP: 1. It shows the packet delivery process when a mobile node moves to a foreign network, including the registration process and routing tables at the home and foreign agents. 2. It demonstrates IP-in-IP encapsulation/decapsulation when a packet is sent from a correspondent node to a mobile node via the home and foreign agents. 3. It discusses how a direct route can be optimized in mobile IP to avoid triangular routing.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Assignment-2: Mobile IP

1. Show the delivery of an IP packet (P) to a mobile node (MN) from a corresponding node (CN). Assume
mobile node is in foreign network and registered.
Consider IP addresses as:
CN---200.1.1.5/24,
HA---200.2.1.6/24,
FA---200.3.1.7/24,
MN old IP 200.2.1.10/24 and
MN gets care of address 200.3.1.7/24. Hardware address of FA = H-FA, HA = H-HA and of MN = H-MN. You
are also required to show table entries done at HA and at FA during the registration process when MN has
moved from the home network to the foreign network. If CN is in 200.2.1.0/24 network with an address
200.2.1.100/24, then how packet P will be send to MN from CN.
Ans.

Registration
- FA advertises service
- MN requests registration
- FA relays request to HN and assigns CoA
- HN accepts request and replies acceptance
- FA relays reply to MN
- Table entries
o HA
DestIP SubnetMask NextHop Interface
200.2.1.10 255.255.255.0 200.3.1.7 (FA) H-HA

o FA
DestIP SubnetMask NextHop Interface
200.3.1.7 (CoA) 255.255.255.0 Direct H-FA

Packet from CN to MN
- CN sends packet with DestIP – 200.2.1.10 (IP-MN) to HN
- HN encapsulates packet with DestIP – 200.3.1.7 (IP-CoA) to FA
- FA unwraps the packet and forwards the internal packet with DestIP – 200.2.1.10 (IP-MN) &
DestMAC – H-MN

Packet from CN to MN if CN is in same subnet as HN


- Same routing
- Triangle routing mention

2. If H.A address is 205.50.40.3 and F.A address is 208.80.70.4 show how IP-in-IP encapsulation/de-
capsulation will take place for a packet with S.A 196.6.5.3 and D.A as 205.50.40.6.
Ans.
CN (Source) sends packet to HN
- S.A. 196.6.5.3
- D.A 205.50.40.6
HN encapsulates packet in another packet with
- S.A. 205.50.40.3
- D.A. 208.80.70.4 (Assuming F.A = CoA)
o S.A. 196.6.5.3
o D.A 205.50.40.6
FN decapsulates packet and forwards packet with
- S.A. 208.80.70.4
- D.A. 205.50.40.6

3. How route is optimized for problem no.1 and show delivery of the packet on this optimized route.
Ans.
Direct Routing
- CN requests CoA of MN from HN
- HN replies with the CoA
- CN directly sends packet to FA
- FA forwards packet to MN

4. How two mobile nodes can use the same COA in mobile IP?
Ans.
In Mobile IP (Internet Protocol), a Care-of Address (CoA) is an IP address temporarily assigned to a mobile
node (MN) while it is away from its home network. The CoA allows the MN to continue communicating with
other nodes on the internet even when it is not within its home network's reach. It's important to note that
the CoA is assigned by the foreign network where the MN is currently located.
When two mobile nodes (MNs) are in the same foreign network and need to use the same CoA, it typically
means they are both visiting the same location and are behind the same Network Address Translator (NAT)
or firewall in that foreign network. Here's how they can share the same CoA:
1. Assignment by the Foreign Network: The CoA is assigned by the foreign network's NAT or firewall.
When MNs connect to this network, they receive an IP address from the foreign network's address
pool. If two MNs are behind the same NAT or firewall, they can both be assigned the same CoA.
2. NAT and Port Mapping: To distinguish traffic from different MNs sharing the same CoA, the NAT or
firewall performs Network Address Translation along with port mapping. Each MN can use different
source port numbers when communicating with external hosts. The NAT keeps track of which
internal MN is associated with which port number and routes incoming packets to the correct MN
based on the port number.
3. UDP and TCP Ports: In most cases, this port mapping is applied to UDP (User Datagram Protocol)
and TCP (Transmission Control Protocol) traffic, which are the two main transport layer protocols.
Since the combination of source IP, source port, destination IP, and destination port uniquely
identifies a communication session, the NAT can ensure that traffic is correctly directed to the
respective MNs.
4. CoA Remains the Same: While the two MNs may have different internal IP addresses (private IP
addresses within the foreign network), they both share the same CoA (the external IP address). The
foreign network's NAT or firewall maintains a mapping table to keep track of which internal MN
corresponds to which external CoA.
5. Bi-Directional Communication: Both MNs can communicate with external hosts using the same
CoA, and the NAT or firewall ensures that incoming packets addressed to the CoA are correctly
forwarded to the appropriate MN based on the port mapping.
It's important to note that while multiple MNs can share the same CoA when they are behind the same NAT
or firewall in a foreign network, each MN will still have its own unique Home Address (HoA) associated with
its home network. The CoA is only used temporarily while the MN is visiting a foreign network, and it allows
the MN to maintain connectivity even when it changes its physical location.

5. In what conditions home agent intercepts the ARP packet destined for mobile host. Explain proxy ARP
in mobile IP. Explain the usage of gratuitous ARP too.
Ans.
When the Home agent gets ARP request to know the MAC of MN which is already shifted and registered on
a Foreign node, to prevent unnecessary broadcasts the home agent acts like a proxy and sends a proxy ARP
reply to the CN with the MAC of Home agent itself acting like a proxy.

Proxy ARP in Mobile IP:


Proxy ARP in Mobile IP is the mechanism where the Home Agent responds to ARP requests for the mobile
host's IP address with its own MAC address. It acts as a proxy, allowing devices in the foreign network to
communicate with the MH even though it's not physically present in that network. This enables seamless
mobility for the MH as it moves between networks.
Gratuitous ARP is a technique used in networking where a device sends an ARP request for its own IP
address. In the context of Mobile IP, Gratuitous ARP can serve several purposes:
 Updating ARP Caches: When a mobile host changes its care-of address (CoA) due to movement to a
new foreign network, it can send a Gratuitous ARP with its new CoA. This helps update the ARP
caches of devices in its vicinity so that they know the MH's new location without waiting for an ARP
request.
 Address Validation: Gratuitous ARP can also be used as a form of address validation. When a device
sends a Gratuitous ARP, it announces its presence and IP address to the network. If another device
responds to that ARP request claiming the same IP address, it can indicate a potential IP address
conflict.
In the context of Mobile IP, Gratuitous ARP can help mobile hosts maintain connectivity by proactively
updating the network about their new location (CoA) and ensuring that devices in the foreign network are
aware of the change.

6. “IP address change required by network layer during mobility creates problem for TCP” Discuss.

Ans.
When a mobile device moves from one network to another, such as from its home network to a foreign
network, it may be assigned a different IP address due to network layer mobility management protocols like
Mobile IP or Dual-Stack Mobile IPv6. This IP address change can introduce challenges for TCP (Transmission
Control Protocol) connections, which rely on stable endpoint addresses to maintain their stateful
connections. Here are the key issues and challenges that arise when IP addresses change during mobility:
1. Connection Disruption: When a mobile device changes its IP address during handover between
networks, any existing TCP connections using the previous IP address may be disrupted. This
interruption in connectivity can lead to packet loss and temporarily interrupted data transfers.
2. Session State Invalidation: TCP connections rely on a set of parameters that include the source and
destination IP addresses and port numbers. Changing the IP address of one endpoint invalidates the
session state associated with that IP address. As a result, any stateful information related to the
connection at the previous IP address must be discarded or updated to reflect the new IP address.
This can be particularly problematic for long-lived connections or applications that require low-
latency communication.
3. TCP Timeout and Retransmissions: When a TCP connection is disrupted due to an IP address
change, it can lead to timeout events and retransmissions of unacknowledged packets. These
retransmissions can consume network resources and may lead to inefficient use of the network.
4. Route Optimization: Some mobility management protocols, like Mobile IP, employ techniques such
as route optimization to minimize the impact of IP address changes. However, these techniques can
introduce additional complexity and may not be universally supported in all networks.
5. NAT Traversal: In some scenarios, network address translation (NAT) may be involved in changing
the device's IP address. NAT can complicate the handling of TCP connections, especially if the NAT
binding information is not properly updated or if the NAT devices have limited state management
capabilities.
6. Application-Level Adaptations: To mitigate the impact of IP address changes on TCP, applications
may need to be designed to handle such changes gracefully. Techniques like connection pooling,
session persistence, and the use of higher-layer protocols like SCTP (Stream Control Transmission
Protocol) that are more mobile-friendly can be employed.
7. Recovery Time: The time required for a TCP connection to recover from an IP address change can
vary based on network conditions, the mobility management protocol in use, and the application's
ability to adapt. This recovery time can be a significant factor for real-time or interactive
applications.
In summary, the change of IP addresses required by the network layer during mobility can create problems
for TCP connections, primarily due to the disruption of established connections and the need to update or
recreate session state. To address these challenges, mobility management protocols and application-level
adaptations are used to minimize the impact of IP address changes and maintain the continuity of
communication during mobile device handovers.

You might also like