Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

unit-2 mc.pdf

Chargement dans…3

Consultez-les par la suite

1 sur 51 Publicité

Plus De Contenu Connexe

Similaire à unit-2 mc.pdf (20)


Plus récents (20)

unit-2 mc.pdf

  1. 1. 1 MOBILE COMPUTING Unit II Dr Gnanasekaran Thangavel
  2. 2. 2 UNIT II MOBILE INTERNET PROTOCOL AND TRANSPORT LAYER Overview of Mobile IP – Features of Mobile IP – Key Mechanism in Mobile IP – route Optimization. Overview of TCP/IP – Architecture of TCP/IP- Adaptation of TCP Window – Improvement in TCP Performance.
  3. 3. 3
  4. 4. Mobile IP • Mobile IP enables an IP node to retain the same IP address and maintain existing communications while traveling from one link to another. 4
  5. 5. 5 Mobile IP Tunnelin g
  6. 6. Mobile IP Components ❑ Mobile node (MN) ❑ Home agent (HA) ❑ Foreign agent (FA) ❑ Correspondent Node (CN) 6
  7. 7. Mobile node (MN) The Mobile Node is a device such as -a cell phone, -personal digital assistant, -or laptop whose software enables network roaming capabilities. 7
  8. 8. Home agent (HA) • Home Agent is a router on the home network serving as the anchor point for communication with the Mobile Node; • it tunnels packets from a device on the Internet, called a Correspondent Node, to the roaming Mobile Node. (A tunnel is established between the Home Agent and a reachable point for the Mobile Node in the foreign network.) 8
  9. 9. Foreign agent (FA) • The Foreign Agent is a router that may function as the point of attachment for the Mobile Node when it roams to a foreign network, delivering packets from the Home Agent to the Mobile Node. 9
  10. 10. Correspondent Node (CN) ● End host to which MN is corresponding (eg. a web server) 10
  11. 11. How Mobile IP Works The Mobile IP process has three main phases the following sections. ❖ Agent Discovery A Mobile Node discovers its Foreign and Home Agents during agent discovery. ❖ Registration The Mobile Node registers its current location with the Foreign Agent and Home Agent during registration. ❖ Tunneling A reciprocal tunnel is set up by the Home Agent to the care-of address (current location of the Mobile Node on the foreign network) to route packets to the Mobile Node as it roams. 11
  12. 12. Two IP addresses for mobile node ❑ Home address: static ❑ Care-of address: topologically significant address The care-of address is the termination point of the tunnel toward the Mobile Node when it is on a foreign network. The Home Agent maintains an association between the home IP address of the Mobile Node and its care-of address, which is the current location of the Mobile Node on the foreign or visited network 12
  13. 13. Features of Mobile IP ❑ Transparency : IP address should not be any effect of mobility on any ongoing communication ❑ Compatibility: It should compatible with existing Internet protocols. ❑ Security: It should provide users with secure communication over internet. ❑ Efficiency : It should neither result in large number of message nor should it incur too much computational overheads ❑ Scalability: It should also be scalable to support billions of moving hosts worldwide. 13
  14. 14. Key Mechanism in Mobile IP Three basic mechanisms 1. Discovering the care-of address 2. Registering the care-of address 3. Tunneling to the care-of address 14
  15. 15. 15 1.Discovery the care-of-address Extension of ICMP Router Advertisement • Home agents and foreign agents broadcast agent advertisements at regular intervals Allows for the detection of mobility agents Lists one or more available care-of addresses Informs the mobile node about special features Mobile node selects its care-of address Mobile node checks whether the agent is a home agent or foreign agent – Mobile node issues an ICMP router solicitation message
  16. 16. 16 Mobile IP Agent Advertisement Message
  17. 17. 17 2. Registration Once a mobile node has a care-of address, its home agent must find out about it
  18. 18. 18
  19. 19. 19 3. Tunneling to the care-of address
  20. 20. 20 Mobile IP Tunneling Across Internet
  21. 21. Tunneling takes place to forward an IP datagram from home agent to a care-of-address. ❑ When a home agent receives a packet addressed to a mobile host , it forwards the packet to the care-of-address using IP-within-IP(encapsulation) ❑ Using IP-within-IP, the home agent inserts a new IP header in front of the IP header of any datagram. ❑ Destination address is set to the home agent’s address. ❑ Source address is set to the home agents address. ❑ After stripping out the first header, IP processes the packet again. 21
  22. 22. 22 Two Tunneling Methods IP-within-IP Encapsulation Minimal Encapsulation
  23. 23. Route Optimization ❖ All the data packets to the mobile node go through the home agent. ❖ There will be a heavy traffic between HA and CN causing latency to increase. ❖ To overcome this problem the following route optimization needs • Enable direct notification of the corresponding host • Direct tunneling from the corresponding host to the mobile host. • Binding cache maintained at the corresponding host The association of the home address with care-of-address is called binding 23
  24. 24. Overview of TCP/IP ❑ TCP/IP protocol suite is a collection of a large number of protocols. ❑ The four layer of protocols are • Application layer • Transport layer • Internet layer • Network layer • TCP/IP allows any of the standard protocols to be used for network interface 24
  25. 25. 25
  26. 26. Architecture of TCP/IP TCP/IP protocol consists of four layers. 1. Application layer, 2.Transport layer, 3.Internet layer and 4. Network access layer 26
  27. 27. 1. Application layer: ❖ Establish communication with other applications which may be running on separate hosts. ❖ Example http,ftp and telnet. 2. Transport layer: ❖ The purpose of Transport layer is to permit devices on the source and destination hosts to carry on a conversation. Provides reliable end-to-end data transfer services. ❖ Also referred as host-to-host protocol. ❖ The main protocols included at Transport layer are I. TCP (Transmission Control Protocol) and II. UDP (User Datagram Protocol). 3. Internet layer ❖ Internet layer pack data into data packets known as IP datagrams, ❖ which contain source and destination address (logical address or IP address) information that is used to forward the datagrams between hosts and across networks. 27
  28. 28. 4. Network access layer ❖ The Network Access Layer of the TCP/IP model is associated with the Physical Layer (Layer 1) and the Data Link layer (Layer 2) of the OSI model. ❖ The Network Access Layer's function is to move bits (0s and 1s) over the network medium such as coaxial cable, optical fiber, or twisted pair copper wire. ❖ The OSI Physical layer is responsible for converting the frame into a stream of bits suitable for the transmission medium and synchronizes signals for the actual transmission. ❖ On the destination device, the Physical layer reassembles these signals into a data frame. ❖ The OSI Data Link layer is again subdivided into the following two sub layers according to their function: ❖ Media Access Control (MAC) Sublayer :— MAC sublayer provides an interface with the network adapter. ❖ Logical Link Control (LLC) Sublayer :— LLC sublayer is responsible for error-checking functions for frames delivered also responsible for managing links between communicating devices. 28
  29. 29. Comparison of TCP/IP and OSI network models 29
  30. 30. Comparison of TCP/IP and OSI network models 30
  31. 31. Adaptation of TCP Window ❑ TCP deploys a flow control technique to control congestion in a network. ❑ Traffic congestion occurs when the rate at which data is injected by a host into the network exceeds the rate at which data can be delivered to the network. I. Router buffer overflow. II. Receiver buffer overflow ❑ A flow control technique by TCP helps adapt the rate at sending host end and to prevent overrun at the slow receiver. ❑ The flow control mechanism by TCP called the sliding window protocol. 31
  32. 32. Improvements of TCP Performance Traditional networks ❑ Transport protocols typically designed for ● Fixed end-systems ● Fixed, wired networks ❑ TCP congestion control ● Packet loss in fixed networks typically due to (temporary) overload situations ● Routers discard packets as soon as the buffers are full ● TCP recognizes congestion only indirectly via missing acknowledgements ● Retransmissions unwise, they would only contribute to the congestion and make it even worse ● Slow-start algorithm as reaction 32
  33. 33. Classification of Schemes 33
  34. 34. TCP Slow Start ❑ Sender calculates a congestion window for a receiver ❑ Start with a congestion window size equal to one segment ❑ Exponential increase of the congestion window up to the congestion threshold, then linear increase ❑ Missing acknowledgement causes the reduction of the congestion threshold to one half of the current congestion window ❑ Congestion window starts again with one segment 12-Feb-16 34
  35. 35. Congestion avoidance ❑ It starts where slow start stops. ❑ Once congestion window reaches the congestion threshold level, then after that if an acknowledgement is received the window size is increased linearly ic the window size doubling is avoided. ❑ The TCP increases its rate linearly by adding one additional picket to its window at each transmission time. If congestion is detected at any point the TCP is reduces its transmission rate to half the previous value. Makes to right transmission rate. ❑ The is scheme is less aggressive than slow start phase. 12-Feb-16 35
  36. 36. Fast Retransmit/ Fast Recovery ❑ TCP sends an acknowledgement only after receiving a packet. ❑ If a sender receives several acknowledgements for the same packet, this is due to a gap in received packets at the receiver. ❑ However, the receiver got all packets up to the gap and is actually receiving packets ❑ Therefore, packet loss is not due to congestion, continue with current congestion window (do not use slow-start) 12-Feb-16 36
  37. 37. TCP in mobile networks • TCP assumes congestion if packets are dropped ● typically wrong in wireless networks, here we often have packet loss due to transmission errors ● furthermore, mobility itself can cause packet loss, if e.g. a mobile node roams from one access point (e.g. foreign agent in Mobile IP) to another while there are still packets in transit to the wrong access point and forwarding is not possible • The performance of an unchanged TCP degrades severely ● however, TCP cannot be changed fundamentally due to the large base of installation in the fixed network, TCP for mobility has to remain compatible ● the basic TCP mechanisms keep the whole Internet together 12-Feb-16 37
  38. 38. Indirect TCP (I -TCP) ❑ Indirect TCP or I-TCP segments the connection ● no changes to the TCP protocol for hosts connected to the wired Internet, millions of computers use (variants of) this protocol ● optimized TCP protocol for mobile hosts ● splitting of the TCP connection at, e.g., the foreign agent into 2 TCP connections, no real end-to-end connection any longer ● hosts in the fixed part of the net do not notice the characteristics of the wireless part mobile host access point (foreign agent) wired Internet “wireless” TCP standard TCP 12-Feb-16 38
  39. 39. I-TCP socket and state migration mobile host access point2 Internet access point1 socket migration and state transfer 12-Feb-16 39
  40. 40. Indirect TCP II ❑ Advantages ● no changes in the fixed network necessary, no changes for the hosts (TCP protocol) necessary, all current optimizations to TCP still work ● transmission errors on the wireless link do not propagate into the fixed network ● simple to control, mobile TCP is used only for one hop between, e.g., a foreign agent and mobile host ● therefore, a very fast retransmission of packets is possible, the short delay on the mobile hop is known ❑ Disadvantages ● loss of end-to-end semantics, an acknowledgement to a sender does not any longer mean that a receiver really got a packet, foreign agents might crash ● higher latency possible due to buffering of data within the foreign agent and forwarding to a new foreign agent 12-Feb-16 40
  41. 41. Snooping TCP (S-TCP) ▪ Transparent extension of TCP within the foreign agent ▪ buffering of packets sent to the mobile host ▪ lost packets on the wireless link (both directions!) will be retransmitted immediately by the mobile host or foreign agent, respectively (so called “local” retransmission) ▪ the foreign agent therefore “snoops” the packet flow and recognizes acknowledgements in both directions, it also filters ACKs ▪ changes of TCP only within the foreign agent (+min. MH change) „wired“ Internet buffering of data end-to-end TCP connection local retransmission correspondent host foreign agent mobile host snooping of ACKs 12-Feb-16 41
  42. 42. Snooping TCP II ❑ Data transfer to the mobile host ● FA buffers data until it receives ACK of the MH, FA detects packet loss via duplicated ACKs or time-out ● fast retransmission possible, transparent for the fixed network ❑ Data transfer from the mobile host ● FA detects packet loss on the wireless link via sequence numbers, FA answers directly with a NACK to the MH ● MH can now retransmit data with only a very short delay ❑ Advantages: ● Maintain end-to-end semantics ● No change to correspondent node ● No major state transfer during handover ❑ Problems ● Snooping TCP does not isolate the wireless link well ● May need change to MH to handle NACKs ● Snooping might be useless depending on encryption schemes 12-Feb-16 42
  43. 43. Mobile TCP(M-TCP) ❑ Special handling of lengthy and/or frequent disconnections ❑ M-TCP splits as I-TCP does ● unmodified TCP fixed network to supervisory host (SH) ● optimized TCP SH to MH ❑ Supervisory host ● no caching, no retransmission ● monitors all packets, if disconnection detected ● set sender window size to 0 ● sender automatically goes into persistent mode ● old or new SH reopen the window ❑ Advantages ● maintains semantics, supports disconnection, no buffer forwarding ❑ Disadvantages ● loss on wireless link propagated into fixed network ● adapted TCP on wireless link 12-Feb-16 43
  44. 44. Mobile TCP(M-TCP) 44
  45. 45. Fast retransmit/fast recovery ❑ Change of foreign agent often results in packet loss ● TCP reacts with slow-start although there is no congestion ❑ Forced fast retransmit ● as soon as the mobile host has registered with a new foreign agent, the MH sends duplicated acknowledgements on purpose ● this forces the fast retransmit mode at the communication partners ● additionally, the TCP on the MH is forced to continue sending with the actual window size and not to go into slow-start after registration ❑ Advantage ● simple changes result in significant higher performance ❑ Disadvantage ● further mix of IP and TCP (to know when there is a new registration), no transparent approach 12-Feb-16 45
  46. 46. Freeze-TCP • Mobile hosts can be disconnected for a longer time ● no packet exchange possible, e.g., in a tunnel, disconnection due to overloaded cells or mux. with higher priority traffic ● TCP disconnects after time-out completely • TCP freezing ● MAC layer is often able to detect interruption in advance ● MAC can inform TCP layer of upcoming loss of connection ● TCP stops sending, but does not assume a congested link ● MAC layer signals again if reconnected • Advantage ● scheme is independent of data and TCP mechanisms (Ack,SN) => works even with IPsec • Disadvantage ● TCP on mobile host has to be changed, mechanism depends on MAC layer 12-Feb-16 46
  47. 47. Selective retransmission ❑ TCP acknowledgements are often cumulative ● ACK n acknowledges correct and in-sequence receipt of packets up to n ● if single packets are missing quite often a whole packet sequence beginning at the gap has to be retransmitted (go-back-n), thus wasting bandwidth ❑ Selective retransmission as one solution ● RFC2018 allows for acknowledgements of single packets, not only acknowledgements of in-sequence packet streams without gaps ● sender can now retransmit only the missing packets ❑ Advantage: much higher efficiency ❑ Disadvantage ● more complex software in a receiver, more buffer needed at the receiver 12-Feb-16 47
  48. 48. Transaction oriented TCP • TCP phases ● connection setup, data transmission, connection release ● using 3-way-handshake needs 3 packets for setup and release, respectively ● thus, even short messages need a minimum of 7 packets! • Transaction oriented TCP ● RFC1644, T-TCP, describes a TCP version to avoid this overhead ● connection setup, data transfer and connection release can be combined ● thus, only 2 or 3 packets are needed • Advantage ● efficiency • Disadvantage ● requires changed TCP ● mobility no longer transparent 12-Feb-16 48
  49. 49. 49
  50. 50. References ❖ Book: Prasant Kumar Pattnaik, Rajib Mall, “Fundamentals of Mobile Computing”, PHI Learning Pvt. Ltd, New Delhi – 2012. ❖ http://www.omnisecu.com/tcpip/tcpip-model.php ❖ http://www.computernetworkhomeworkhelp.com/comparison-models/ ❖ http://www.tcpipguide.com/free/t_InternetProtocolMobilitySupportMobileIP.htm ❖ PPT: ❖ https://cs.uccs.edu/~chow/pub/master/ycai/mobile_computing_mtu.ppt ❖ http://www.slideshare.net/ayyakathir/it6601-mobile-computing-54556306 ❖ https:// cs.winona.edu/lin/cs313/CS313DataLink2.ppt 50
  51. 51. 51 Thank You Questions and Comments?