Presentation is loading. Please wait.

Presentation is loading. Please wait.

Mobile IP-2 CS441 – Mobile & Wireless Computing

Similar presentations


Presentation on theme: "Mobile IP-2 CS441 – Mobile & Wireless Computing"— Presentation transcript:

1 Mobile IP-2 CS441 – Mobile & Wireless Computing
Department of Computer Science Southern Illinois University Carbondale CS441 – Mobile & Wireless Computing Mobile IP-2 Dr. Kemal Akkaya Some slides are adapted from: Dr. Ibrahim Korpeoglu, Bilkent University Mobile & Wireless Computing

2 Mobile Agent Discovery
How a mobile node discovers the home and foreign agents when it travels? Agents periodically broadcast their presence (advertisement) on a link ( a wireless link – , or a wired link – Ethernet) These broadcasts are agent advertisement messages. An agent advertisement message is an ICMP router advertisement message with special extension. The special extension is called Mobility Agent Extension. A mobile node receiving the advertisement understand from the IP addresses included in the advertisement: Whether it is in the home network or not? Whether it has moved to new location or not. This understanding is at the IP level A mobile already knows that it has moved at the physical link level if has moved. Mobile & Wireless Computing

3 Data Transfer to the Mobile Node in Mobile IP
HA 2 MN Internet home network 3 receiver FA foreign network 1. Sender sends to the IP address of MN, HA intercepts packet 2. HA tunnels packet to COA, here FA, by encapsulation 3. FA forwards the packet to the MN 1 CN sender Mobile & Wireless Computing

4 Agent Advertisement Message
Ver HL TOS Total Length Identification Flags Fragm. Offset TCP/IP Protocol Stack in a Host TTL Protocol Header Checksum IP Header Src Address Applications Dest Address Type Code Checksum ICMP Router Advertisement Message TCP UDP NAddr=0 Addr Size Lifetime Type Length Sequence Number ICMP IGMP Mobility Agent Extension IP Lifetime Flags Reserved Zero or more care-of-addresses ………. ARP RARP Link Layer FLAGS R: Registration requires (with the foreign agent) B: Foreign agent is busy H: The agent is home agent. F: The agent is foreign agent M: Minimum encapsulation G: GRE encapsulation V: Van Jacobson Header Compression Mobile & Wireless Computing

5 Registration After a mobile detects at the IP (ICMP) layer that it has moved to a new location, it starts registration procedure with the home agent. The aim of the registration is to let the home agent know mobile’s current care-of-address. Mobile obtains this care-of-address either from the foreign agent or from a server like DHCP server. Registration procedure consists of sending a Registration Request Message from mobile to home agent and a Registration Reply Message from home agent to mobile Registration messages has to go through Foreign agent. Foreign Agent just forwards these registration messages back and forth Foreign agent is a passive entity in registration. Registration messages sent over UDP to port number 434. Mobile & Wireless Computing

6 Registration Request Mobile & Wireless Computing 6 0 8 16 31 HA REQ FA
HA REQ FA Type Flags Lifetime REQ Home address Type: Type of the Mobile IP Message: 1 – Registration Request. Lifetime: Number of seconds registration is valid. Home address: The home IP address of the mobile Home agent: The IP address of the home agent. Care-of-address: The current IP address of the mobile – this is then end of the tunnel. Identification: Used for replay protection. Extensions: Security extensions can be added to protect from malicious people. Flags: S: Simultaneous binding. B: Broadcast – Home agent will tunnel broadcast datagrams to the mobile D: Mobile node is using a collocated care-of-address – that means there is no foreign agent and mobile node will decapsulate the packets itself. M: Mobile node requests the home agent to encapsulate the packets using Minimal Encapsulation G: Mobile node requests the home agent to encapsulate the packets using GRE Encapsulation MN Home agent Care-of--address Identification Extensions ….. Registration Request Format IP Header UDP Header Mobile IP Message Extensions Mobile & Wireless Computing

7 Registration Reply Mobile & Wireless Computing 7 RPL HA FA RPL
MN Type Code Lifetime Home address Home agent Type: 3 – Registration Reply Code: Indicates the result of registration Some code values: 0 registration accepted 66 insufficient resources at foreign agent 70 poorly formed request 130 insufficient resources at home agent 131 mobile node failed authentication Lifetime: The granted life time by home agent for registration Identification Extensions ….. Registration Reply Format Mobile & Wireless Computing

8 Care-of-Address Types
Normal Care-of-address The care-of-address that mobile obtains at a new location is the IP address of a foreign agent serving at that new location. Registration and communication has to go through foreign agent Co-located care-of-address There is no separate foreign agent present at the new location Mobile obtains an IP at the new location through some standard mechanisms like DHCP. This IP address is called collocated IP address. The foreign agent functionality is executed at the mobile node itself. The mobile node decapsulates the tunneled packets coming from home agent. Registration and communication is done directly between mobile and home agent. Mobile & Wireless Computing

9 Routing and Tunneling When a correspondent host sends an IP packet to a mobile (to its home address), packet is routed first to home agent of mobile through normal routing. Home agent intercepts the packet and encapsulates it and tunnels it to the care-of-address (tunnel exit point) of the mobile. The encapsulated packet is delivered to the care-of-address using normal routing. There are various encapsulation methods: IP-IP Encapsulation Minimal Encapsulation GRE (Generic Routing Encapsulation) Encapsulation. C Tunnel HA FA M Encapsulated IP Packet Mobile & Wireless Computing

10 IP-IP Encapsulation at Home Agent
Ver HL TOS Total Length Home agent encapsulated the IP packet inside another IP header and sends it to the care-of-address of mobile. Identification Flags Fragm. Offset Outer Header TTL Protocol=4 Header Checksum Src Address = Home agent addres Dest Address = Care-of-Address of M Ver HL TOS Total Length Identification Flags Fragm. Offset Inner Header TTL Protocol Header Checksum Src Address = Addr of C An IP packet is received at the home agent from a correspondent host for a mobile host. Dest Address = Addr of M IP PAYLOAD Mobile & Wireless Computing

11 IP-IP Decapsulation at the Care-of-Address
Ver HL TOS Total Length An encapsulated IP packet is received at the foreign agent (or at the mobile itself for a collocated care-of-address). Receiver understands that the packet is IP-IP encapsulated by looking at the protocol field (which is 4). Identification Flags Fragm. Offset Outer Header TTL Protocol=4 Header Checksum Src Address = Home agent addres Dest Address = Care-of-Address of M Ver HL TOS Total Length Identification Flags Fragm. Offset Inner Header TTL Protocol Header Checksum Src Address = Addr of C Dest Address = Addr of M Receiver forwards (not routes) the decapsulated IP packet to the mobile node using link-level mechanisms! IP PAYLOAD Mobile & Wireless Computing

12 Decapsulation again Mobile & Wireless Computing 12 Mobile Node
Foreign Agent APPS APPS Home Agent TCP/UDP TCP/UDP dst src dst src ds t src IP_M IP_C IP_F IP_H IP_M IP_C IP_H IP_F IP_M TUNNEL MAC_F IP_M IP_C MAC_F MAC_M MAC_M Mobile & Wireless Computing

13 Minimal Encapsulation at Home Agent
Tunneled to care-of-address Ver HL TOS Total Length Identification Flags Fragm. Offset Outer header TTL Proto=55 Header Checksum Ver HL TOS Total Length Src Address = Addr of home agent Identification Flags Fragm. Offset Dest Address = Care-of-addr of mobile TTL Protocol Header Checksum Protocol S Reserved Header Checksum Src Address = Addr of C Minimal Inner header Src Address = Addr of C Dest Address = Addr of M Dest Address = Addr of M IP PAYLOAD IP PAYLOAD Encapsulated using Minimal Encapsulation Method Packet comes from Correspondent host Mobile & Wireless Computing

14 Sending packets between mobile and foreign agent
When a mobile moves to a new location, a foreign should be broadcasting (IP and link layer broadcast) advertisements on the link (sub-network). Mobile will be able to receive this broadcast message and will learn: The IP address of the foreign agent (this will be the care-of-address of the mobile most of the time). The hardware (MAC or link-level address) of the foreign agent. When mobile sends a registration packet through this foreign agent, the foreign agent will learn: The home address of the mobile The hardware (MAC or link level) address of the mobile. The registration packet will be sent directly to the foreign agent by using the MAC address of the foreign agent (No need to do ARP request). Mobile & Wireless Computing

15 Broadcasted Mobile Agent Advertisement
Mobile Node - M Foreign Agent - FA Mobile Node receives broadcast frame and learns the MAC and IP address of the FA. It stored this info. Broadcasted Mobile Agent Advertisement FA periodically broadcasts advertisements. MAC broadcast address is used. No need for ARP. Mobile Node sends a registration request message directly to FA. It is not using ARP protocol to obtain the MAC address of FA. FA learns the MAC address of a mobile from the registration request message. Learns also the home address of the mobile. This info is stored. Registration Request Registration Reply Reply is sent directly to the MAC address of mobile. No need for ARP. DATA Mobile node sends data Directly to the MAC address of FA. No ARP needed. FA sends data directly to the MAC address of FA. No ARP needed. DATA Mobile & Wireless Computing

16 Sending Data from Foreign Agent to Mobile
Node Foreign Agent APPS Other Fields UDP TCP/UDP Dst Src IP Payload IP_M IP_C …. IP_F IP_M MAC_F IP Payload IP_M IP_C …. type MAC_F MAC_M MAC_M Src (6 b ytes) Dst (6 bytes) IP Header Ethernet Header (link level header) Mobile & Wireless Computing

17 Sending Data from Mobile to Foreign Agent
Node Foreign Agent APPS APPS Other Fields IP Payload TCP/UDP TCP/UDP Src Dst …. IP_M IP_C IP Payload IP_F IP_M MAC_F MAC_M type …. IP_M IP_C IP Payload MAC_F MAC_M Dst (6 bytes) Src (6 b ytes) IP Header Ethernet Header (link level header) Mobile & Wireless Computing

18 How to attract packets at the Home network
Physical Home Network Proxy ARPing enabled MAC_R IP_M MAC_H Internetwork Router Proxy ARP table Home Agent IP Payload IP_M IP_C …. MAC_H An IP Packet came from a correspondent host destined to a Mobile Host Broadcast ARP Request Who has IP_M Unicast ARP Reply I have IP_M, My MAC addr=MAC_H IP Packet put into a Ethernet Frame IP Payload IP_M IP_C type MAC_R MAC_H Mobile & Wireless Computing

19 Proxy ARPing The packet comes to the last router that the home subnetwork is connected to. The router will try ro resolve the IP address of Mobile (IP_M) into the corresponding MAC layer address (Hardware address). For this pupose, it will broadcast an ARP request packet Since the mobile is not at home subnet, it will not be able to answer ARP request. Home agent will answer instead of the Mobile node. In order to do this, home agent should be configured to do proxy ARPing. Home agent replies to the ARP request with an ARP reply, including its MAC address (MAC_H) as the MAC level address corresponding to the IP address of the Mobile. The router, upon receiving the ARP reply, will send the IP packet to the MAC address of the home agent. In this way, the home agent attracts the IP packets that are destined to the mobile node. Mobile & Wireless Computing

20 Example: Gratuitous ARP
Correspondent Host (IP_C) (IP_X, MAC_X) (IP_H, MAC_H) Host X IP_M  MAC_M Home Agent IP_M  MAC_H INTERNET Home Subnet Router REGISTRATION (IP_R, MAC_R) IP_M  MAC_M (IP_M, MAC_M) IP_M  MAC_H Broadcast Gratuitous ARP Request (IP_M, MAC_M) IP_M ..... IP_M MAC_H 1 Prot type Hw type MAC_H FFFFFF Target IP Target MAC Sender MAC Sender IP Home Agent Broadcast an Gratuitous ARP Request on the LAN. Any receiveing host will update its ARP cache. Mobile & Wireless Computing

21 Problems with Mobile IP
Problem 1 : Triangular Routing CN sends all packets via HA to MN Higher latency and network load “Solution” – comes with Mobile IPv6 CN learns the current location of MN Direct tunneling to this location HA or MN informs a CN about the location of MN Problem of the solution Cache consistency problems! MN moves to a new network (handoff) See next slide Security problems! COA is provided Mobile & Wireless Computing

22 Problems with Mobile IP
Problem 2 : Change of FA (COA) or Handoff Packets on-the-fly during the change can be lost “Solution” New FA informs old FA to avoid packet loss, old FA buffers and then forwards remaining packets to new FA This information also enables the old FA to release resources for MN Solutions to Problems : Mobile IPv6 – Comes with IPv6 Mobile IPv6 comes with stronger security Thus, route optimization is a default!! No need for FOA MN takes care of everything No Triangular Routing Mobile & Wireless Computing


Download ppt "Mobile IP-2 CS441 – Mobile & Wireless Computing"

Similar presentations


Ads by Google