Download
slide1 n.
Skip this Video
Loading SlideShow in 5 Seconds..
Mobile Internet Protocol PowerPoint Presentation
Download Presentation
Mobile Internet Protocol

Mobile Internet Protocol

75 Vues Download Presentation
Télécharger la présentation

Mobile Internet Protocol

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. Mobile Internet Protocol Internet Engineering Task Force (IETF) standard communications protocol that is designed to allow mobile device users to move from one network to another while maintaining a permanent IP address. Mobile IPv4 is described in IETF RFC 3344 (Obsoleting both RFC 3220 and RFC 2002), and updates are added in IETF RFC 4721. Mobile IPv6 is described in IETF RFC 3775 • Course Name : Networking Level(UG/PG): UG • Author : Phani Swathi Chitta • Mentor : Aruna Adil *The contents in this ppt are licensed under Creative Commons Attribution-NonCommercial-ShareAlike 2.5 India license

  2. Learning Objectives After interacting with this Learning Object, the learner will be able to: • Explain how Mobile Internet Protocol (MIP) works

  3. Definitions of the components/Keywords: 1 • Although the Internet offers access to information sources worldwide, typically we do not expect to benefit from that access until we arrive at some familiar point--whether home, office, or school. However, the increasing variety of wireless devices offering IP connectivity, such as PDA’s, hand held, and digital cellular phones, is beginning to change our perceptions of the Internet. • Having the Internet available to us as we move, will give us the tools to build new computing environments wherever we go. However, there are still some technical obstacles that must be overcome before mobile networking can become widespread. The most fundamental is the way the Internet Protocol, the protocol that connects the networks of today's Internet, routes packets to their destinations according to IP addresses. These addresses are associated with a fixed network location much as a non mobile phone number is associated with a physical jack in a wall. When the packet's destination is a mobile node, this means that each new point of attachment made by the node is associated with a new network number and, hence, a new IP address, making transparent mobility impossible. Mobile IP (RFC 3344) is a standard proposed to solve this problem 2 3 4 5

  4. Definitions of the components/Keywords: 1 • Mobile IP : A standard that allows users with mobile devices whose IP addresses are associated with one network to stay connected when moving to a network with a different IP address. When a user leaves the network with which his device is associated (home network) and enters the domain of a foreign network, the foreign network uses the Mobile IP protocol to inform the home network of a care-of address to which all packets for the user's device should be sent. • Mobile IP is most often found in wireless WAN environments where users need to carry their mobile devices across multiple LANs with different IP addresses. • We propose to simulate the Mobile IP protocol using Java as implementation language. • How Mobile IP works: Mobile IP can be thought of as a cooperation of three major subsystems. First, there is a discovery mechanism defined so that mobile computers can determine their new attachment points (new I P addresses) as they move from place to place within the Internet. Second, once the mobile computer knows the IP address at its new attachment point, it registers with an agent representing it at its home network. Lastly, mobile IP defines simple mechanisms to deliver data-grams to the mobile node when it is away from its home network. 2 3 4 5

  5. Definitions of the components/Keywords: Entities & Terminologies 1 The following defines several entities and terms needed to understand Mobile IP as defined in RFC 3344: Mobile Node (MN): It is an end system that can change its point of attachment to the Internet using Mobile IP .It keeps its IP address and can communicate with any other system in the Internet. Correspondent Node (CN): The end system with which the MN communicates is called CN. It can be a fixed or a mobile node. Home network: It is the subnet to which the MN belongs. Foreign network: The current subnet that the MN visits and is not the home network. Foreign Agent (FA): It provides several services to the MN during its visit. The FA can have the COA acting as the tunnel endpoint and forwards packets to the MN. It is not necessary to have a FA. It is typically implemented on the router for the subnet the MN attaches to. Care-of-address (COA): It defines the current location of the MN from an IP point of view. All packets sent to the MN are delivered to the COA and not directly to the MN. Packet delivery is done using a tunnel and COA marks the tunnel endpoint. There are two possibilities for the location of the COA. 2 3 4 5

  6. Definitions of the components/Keywords: 1 Foreign agent COA: The COA is the IP address of the FA. The FA acts as the tunnel endpoint and forwards packets to the MN. Many MN using the FA can share this COA. Co-located COA: The COA is co-located if the MN temporarily acquires an additional IP address using DHCP which acts as the COA. This address is topologically correct and the tunnel endpoint is at the MN. Home agent (HA): The HA provides several services to the MN and is located in the home network. The tunnel for the packets starts at the HA. It maintains a location registry i.e. the current COA informs it of the MN’s location. It can be implemented on the router that is responsible for the home network or on any node in the subnet. 2 3 4 5

  7. 1 2 3 4 5

  8. Definitions of the components/Keywords: Data Packet: Version(VER): Defines the version of IP protocol.Currently the version is 4. Header length(HLEN): Defines the total length of the datagram header in 4-byte words. Differentiated Services(DS): Defines the type of service--Normal , Minimize Cost,Maximize reliability,Maximize throughput,Minimize Delay. Total length: Defines the total length(header plus data) of the IP Datagram in bytes. Identification: This field is used in fragmentation.It identifies a datagram originating from the source host. 1 2 3 4 5

  9. Definitions of the components/Keywords: 1 Flags: This field is also used in fragmentation.This is a three-bit field.The first bit is reserved.The second bit is called the do not fragment bit.The third bit is called the more fragment bit. Fragmentation offset: This 13-bit field shows the relative position of this fragment with respect to the whole datagram. Time to live(TTL): A datagram has a limited lifetime in its travel through an internet.This field is designed to hold a timestamp,which is decremented by each visited router.The datagram is discarded when the value becomes zero. Protocol: This 8-bit field defines the higher-level protocol that uses the services of the IP layer. Checksum: The error detection method used by most TCP/IP protocols is called the checksum.The checksum in the IP packet covers only the header,not the data. Source address: The 32-bit field defines the IP address of the source. Destination address: The 32-bit field defines the IP address of the destination. 2 3 4 5

  10. Definitions of the components/Keywords: Request Packet: Type: this field is set to 1 for registration request S: this bit is used by MN to specify if it wants the HA to retain prior mobility bindings B: this bit is used to indicate that an MN also wants to receive the broadcast packets which have been received by the HA in the home network D: this bit is used to indicate that the MN takes care of the decapsulation at the tunnel endpoint since its using a co-located COA M: this bit denotes the use of minimal encapsulation G: this bit denotes the use of generic encapsulation r: this field is set to 0 T: this field indicates reverse tunneling x: this field is set to 0 home address: this field gives the fixed IP address of the MN 1 2 3 4 5

  11. Definitions of the components/Keywords: 1 home agent: this field gives us the IP address of the HA COA: this field gives the address of the tunnel endpoint Identification: this field is generated by the MN to identify a request and match it with registration replies. Its used for protection against replay attacks of registrations. Extensions: this field atleast contains parameters for authentication. Reply Packet: 2 3 4 5

  12. Definitions of the components/Keywords: 1 Type: this field is set to 3 for registration reply Code: this field indicates the result of the registration request lifetime: this field denotes the validity of the registration in seconds home address: this field gives the fixed IP address of the MN home agent: this field gives us the IP address of the HA Identification: this field is generated by the MN to identify a request and match it with registration replies. Its used for protection against replay attacks of registrations. Extensions: this field atleast contains parameters for authentication. 2 3 4 5

  13. Definitions of the components/Keywords: Advertisement Packet: 1 2 3 4 5

  14. Definitions of the components/Keywords: type: is set to 16. length: depends on the number of COAs provided with the messages. sequence number: shows the total number of advertisements sent since initialization. Registartion lifetime: the agent can specify the maximum lifetime in seconds a node can request during registration. R: shows whether the registration with this agent is required even when using a colocated COA at the MN. B: It is set when the agent is currently too busy to accept registrations. H: If the agent offers services as Home Agent. F: If the agent offers services as the Foreign Agent. M: used to specify Minimal Encapsulation. G: used to specify Generic Routing Encapsulation. r: is set to 0 and must be ignored. T: indicates reverse tunneling. 1 2 3 4 5

  15. Definitions of the components/Keywords: The following fields contain the COAs advertised. Remote host & mobile host communication: Now let us assume that the MN has moved out from its Home Network.The communication process in this situation can be categorised in three phases: 1 2 3 4 5

  16. Definitions of the components/Keywords: 1 • Agent Discovery: • The first phase in mobile communication, agent discovery, consists of two subphases. • (i) A mobile host must discover (learn the address of)a home agent before it leaves its home network. • (ii) A mobile host must also discover a foreign agent after it has moved to a foreign network. • This discovery consists of learning the care-of address as well as the foreign agent's address. • The discovery involves two types of messages : advertisement and solicitation. • Agent Advertisement: For the first method,foreign agents and home agents advertise their presence periodically using agent advertisement messages.These advertisement messages can be seen as a beacon broadcast into the subnet.For these advertisements Internet Control Message Protocol(ICMP) messages are used with some mobility extensions. 2 3 4 5

  17. Definitions of the components/Keywords: • Agent Solicitation: If no agent advertisements are present or the inter-arrival time is too high,and a MN has not received a COA by other means,the mobile node must send agent solicitations.These solicitations are based on RFC 1256 for router solicitations.Care must be taken to ensure that these solicitation messages do not flood the network.Typically,a MN can send out three solicitations, one per second,as soon as it enters a new network.If a node does not receive an answer to its solicitations it must decrease the rate of solicitations exponentially to avoid flooding the network until it reaches a maximum interval between solicitations(typically one minute). • This phase of Agent Discovery can be well understood through animations of Registration in demo section. • Registration: • The second phase in mobile communication is registration.After a mobile node has moved to a foreign network and discovered the foreign agent,it must register. • There are four aspects of registration : • (1)The mobile node must register itself with the foreign agent. • (2)The mobile node must register itself with its home agent. This is done normally by the COA providing entity (foreign agent/DHCP server) on behalf of the mobile node. • (3)This registration between MN and HA is for a particular lifetime. Therefore mobile node must renew registration if it has expired. • (4)The mobile node must cancel its registration (deregistration) when it returns home. 1 2 3 4 5

  18. Definitions of the components/Keywords: 1 Registration: Timimg Diagram 2 3 4 5

  19. Definitions of the components/Keywords: 1 ROUTING AND TUNNELING: The home agent, after a successful registration, will begin to attract datagrams destined for the mobile node and tunnel each one to the mobile node at its case-of address. The tunneling can be done by one of several encapsulation algorithms. Encapsulation is a very general technique used for many different reasons, including multicast, multiprotocol operations, authentication, privacy, defeating traffic analysis, and generalpolicy routing. ENCAPSULATION: Encapsulation is the mechanism of taking a packet consisting of packet header and data putting it into the data part of a new packet.The reverse operation,taking a packet out of data part of another packet,is called decapsulation. 2 3 4 5

  20. Definitions of the components/Keywords: 1 • 1.IP-in-IP encapsulation: In the case of mobile IP, the values of the fields in the new header are selected naturally, with the care-of address used as the destination IP address in the tunnel header. The encapsulating IP header indicates the presence of the encapsulated IP datagram by using the value 4 in the outer protocol field. The inner header is not modified except to decrement the TTL by 1. 2 3 4 5

  21. Definitions of the components/Keywords: • IP-in-IP encapsulation:Description 1 2 3 4 5

  22. Definitions of the components/Keywords: 1 Ver:The version of IP is 4. Internet Header Length(IHL): denotes the length of the outer header in 32 bit words. DS(TOS): is just copied from the inner header. length: covers the complete encapsulated packet. TTL: Time to live must be high enough so that the packet can reach the tunnel end point. IP-in-IP: is the type of the protocol used in the IP payload. IP checksum is calculated as usual. IP address of HA is the tunnel entry as source address. Care-of-address of COA is the tunnel exit point as destination address(the COA). 2 3 4 5

  23. Definitions of the components/Keywords: • 2.Minimal encapsulation: Redundant fields of IP-in-IP Encapsulation are removed here. • Minimal encapsulation: Description • Redundant fields of IP-in-IP Encapsulation are removed here. • The inner header is different for minimal encapsulation.The type of the following protocol and the address of the MN are needed.If the S bit is set,the original sender address of the CN is included as omitting the source is quite often not an option.No field for fragmentation offset is left in the inner header and minimal encapsulation does not work with already fragmented packets. 1 2 3 4 5

  24. Definitions of the components/Keywords: • 3.GRE Routing encapsulation: 1 2 3 4 5

  25. Definitions of the components/Keywords: • GRE Routing encapsulation: Description 1 2 3 4 5

  26. Definitions of the components/Keywords: • Generic Routing encapsulation(GRE) allows the encapsulation of packets of one protocol suite into the payload portion of a packet of another protocol suite. • The packet of one protocol suite with the original packet header and data is taken and a new GRE header is prepended. Together this forms the new data part of the new packet.Finally, the header of the second protocol suite is put in front. • GRE Header starts with several flags indicating if certain fields are present or not.A minimal GRE Header uses only 4 bytes. • C: Checksum Field contains a valid IP checksum of the GRE header and the payload. • R: The R bit indicates if the offset and routing fields are present and contain valid information. • offset: The offset represents the offset in bytes for the first source routing entry. • The routing field,if present, has a variable length and contains fields for source routing.If the C bit is set, the offset field is also present, and the offset field is valid only if R is set respectively. • key: This field is used for authentication. If this field is present,the K bit is set. 1 2 3 4 5

  27. Definitions of the components/Keywords: • S: The sequence number bit S indicates if the sequence number field is present, if the s bit is set, strict source routing is used. Sequence number may be used by a decapsulator to restore packet order. • The recursion control (rec.) is an important field that additionally distinguishes GRE from IP-in-IP and minimal encapsulation. This field represents a counter that shows the number of allowed recursive encapsulations. The default value of this field should be 0,thus allowing only one level encapsulation. • The reserved fields contains 0 for the GRE version and must be ignored on reception. • The version field contains 0 for the GRE version. • The following 2 byte protocol field represents the protocol of the packet following the GRE header. • The standard header of the original packet follows with the source address of the correspondent node and the destination address of mobile node. 1 2 3 4 5

  28. Definitions of the components/Keywords: • Mobile IP Operation: • First, CN wants to send message to the MN. It sends IP packets destined for the MN's home address.These packets will be forwarded to the home network (1 and 2) by normal routing. After that, the HA makes a tunnel (encapsulates the original packets inside a new IP packet), and forwards the packets (3) to the COA (The source IP address is the HA address, and the destination IP address is the COA). After taking off the outer header, the FA forwards the packets directly to the MN by link layer address if it is the FCOA (4). However, if it is the CCOA, the HA forwards the packets directly to the MN where the packets are deencapsulated. Finally, the MN sends the packets back to the CN as usual (5, 6, and 7). 1 2 3 4 5

  29. Definitions of the components/Keywords: 1 • Optimization: • With the basic Mobile IP protocol all packets to the MN have to go through the HA. This can cause unnecessary overheads for the network between CN and HA, but also between HA and FA(or COA), depending on the current location of the MN.if the Firewall is setup, a firewall does not allow an outgoing packet whose source address is different from its network addresses. This inefficient behavior of a non-optimized mobile IP is called triangular routing. The triangle is made of the three segments, CN to HA, HA to COA/MN, and MN back to CN. • Triangular Routing Problem can be seen in the Demo section • One way to optimize the route is to inform the CN of the current location of the MN. The CN can learn the location by caching it in a binding cache which is a part of the local routing table for the CN. Binding cache solution can be seen in demo section. • Now, consider the situation when the MN changes its FN. 2 3 4 5

  30. Definitions of the components/Keywords: • DHCP( Dynamic Host Configuration Protocol ) • The Dynamic Host Configuration Protocol (DHCP) is a network protocol that is used to configure devices which are connected to a network (known as hosts) so that they can communicate on an IP network. It involves clients and a server operating in a client-server model. • The DHCP server maintains a database of available IP addresses and configuration information. When the server receives a request from a client, the DHCP server determines the network to which the DHCP client is connected, and then allocates an IP address or prefix that is appropriate for the client, and sends configuration information appropriate for that client. DHCP servers typically grant IP addresses to clients only for a limited interval. • It enables a server to automatically assign an IP address to a computer from a defined range of numbers (i.e., a scope) configured for a given network. DHCP assigns an IP address when a system is started, for example: • 1. A user turns on a computer with a DHCP client. • 2. The client computer sends a broadcast request (called a DISCOVER or DHCPDISCOVER), looking for a DHCP server to answer. • 3. The router directs the DISCOVER packet to the correct DHCP server. 1 2 3 4 5

  31. Definitions of the components/Keywords: 1 • 4. The server receives the DISCOVER packet. Based on availability and usage policies set on the server, the server determines an appropriate address (if any) to give to the client. The server then temporarily reserves that address for the client and sends back to the client an OFFER (or DHCPOFFER) packet, with that address information. The server also configures the client's DNS servers, WINS servers, NTP servers, and sometimes other services as well. • 5. The client sends a REQUEST (or DHCPREQUEST) packet, letting the server know that it intends to use the address. • 6. The server sends an ACK (or DHCPACK) packet, confirming that the client has a been given a lease on the address for a server-specified period of time. 2 3 4 5

  32. Master Layout 1 Simulation Area Control Area 0 • Select the methods • Mobile Host Communication • Agent Discovery and Registration • IP Packet delivery • Optimization: Triangular Routing • Optimization: Binding Cache • Optimization: MN moves – FN to FN • Complete process 2 3 Fig. A • Give START and RESET buttons • Give a text area to display the status of the simulation • For Mobile Host Communication refer slides 34 – 42 • For Agent Discovery and Registration refer slides 43 – 62 • For IP Packet delivery refer slides 63 – 72 • For Optimization: Triangular Routing refer slides 73 – 83 • For Optimization: Binding Cache refer slides 84 – 102 • For Optimization: MN moves – FN to FN refer slides 103 – 142 • For Complete process refer slides 143 – 228 • Initially show the statement “ please select the method from the given box above” in the explanation area. Once method is selected, go to the respective slides and show the animation accordingly 4 5

  33. Step 1: Mobile Host Communication 1 IP packet delivery (When MN is in HN) 2 3 START READ ME 4 5

  34. Text to be displayed in READ ME: Consider that a CN wants to send an IP packet to the MN. CN doesn't know anything about the MN's current location and sends the packet with the MN's IP address as the destination address and its own address as the source address.The packet is routed to the router responsible for the home network of MN. The HA will intercept the packet and direct it towards the MN.

  35. Step 2: Mobile Host Communication 1 2 3 4 5

  36. Step 3: Mobile Host Communication 1 2 3 4 5

  37. Step 4: Mobile Host Communication 1 2 3 4 5

  38. Step 5: Mobile Host Communication 1 2 3 4 5

  39. Step 6: Mobile Host Communication 1 2 3 4 5

  40. Step 7: Mobile Host Communication 1 2 3 4 5

  41. Step 8: Mobile Host Communication 1 2 3 4 5

  42. Step 1: Agent Discovery and Registration 1 2 Data Packet Request Packet Reply Packet Advertisement Packet 3 START READ ME 4 5

  43. Text to be displayed in READ ME: Registration MN discovers that it has moved from one Network to another by using one of the two methods: 1.Agent Advertisement :Foreign Agents and Home Agents advertise their presence periodically by broadcasting into the subnet.This is one way for the MN to discover its location. 2.Agent Solicitation :If no agent advertisements are present or the inter-arrival time is too high,and MN has not received a COA by other means,the MN must send agent solicitations. The main purpose of registration is to inform the HA of the current location for correct forwarding of packets.Registration can be done in 2 ways: 1.If COA is at FA,MN sends its registration request containing the COA to FA which is forwarding the request to the HA.The HA now sets up a mobility binding containing the mobile node's home IP address and the current COA.Additionally,the mobility binding contains the lifetime of the registration, which is negotiated during the registration process.Registration expires automatically after the lifetime and is deleted. 2.If the COA is co-located,registration is simpler.The MN may send the request directly to the HA and vice versa. UDP packets are used for registration requests and reply.

  44. Step 2: Agent Discovery and Registration 1 2 3 4 5

  45. Step 3: Agent Discovery and Registration 1 2 3 4 5

  46. Step 4: Agent Discovery and Registration 1 2 3 4 5

  47. Step 5: Agent Discovery and Registration 1 2 3 4 5

  48. Step 6: Agent Discovery and Registration 1 2 3 4 5

  49. Step 7: Agent Discovery and Registration 1 2 3 4 5