Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Mobile computing unit-5


Published on

IV B.Tech I Sem CSE&IT JNTUK R10 regulation students have Mobile computing paper. This slides especially contains UNIT - 5 total material required for end exams

Published in: Education, Technology
  • Be the first to comment

Mobile computing unit-5

  1. 1. UNIT – V MOBILE IP NETWORK LAYER Ramesh Babu Palepu Amrita Sai Institute of Science & Technology
  2. 2. Objective: We know that OSI is the basic model for networking which has seven layers and TCP/IP is the most prominent one today with five layers. One of the layer in both the models is the networks layer, which has Internet Protocol (IP). This IP used in this layer governs the way of networking in the Internet and provides global internet connectivity. In mobile communications the mobile systems can also utilize Mobile Internet Protocol for identification of nodes as well as reliable packet transmission.
  3. 3. OSI FUNCTIONALITIES • First we consider the basic model of networking OSI. Here the data transmitted between the nodes is suitably encoded and decoded at the both ends. The following are OSI layers functions. 1.Physical Layer: It is used to sending and receiving the data in the form of signals, over the wire or fiber optics or wirelessly. 2.Data Link Layer: It is used to link source and destination computers by using MAC address.
  4. 4. These two layers in OSI is usually associated with physical communication media or radio interface and switching infrastructure. 3. 3. 3. Network Layer: It facilitates the routing of data through chain of routers. This layer choosing a path among the large number of paths available between source and destination. 4. Transport Layer: It facilitates the sequencing of data packets and enabling the repeat transmission if required.
  5. 5. 5. Session Layer: It is used to define the transaction and session to establish end-toend connectivity. 6. Presentation Layer: It defines the data encoding formats. 7. Application Layer: It support various user applications over the network, such as web browsers, mail transfer, file transfer etc. This layer may also defines the application content and data of a port. Here each port may support different applications.
  6. 6. • In the service point of view, we know that to transmit the data we should establish the connection. • Sender side in OSI, the physical network transmit the data from one application to another application through various intermediate layers. • At each layer the data is suitably encoded by adding the headers and then transmitted into the lower layers. • At the receiver side, the encoded bits in the header field are decoded at each layer before the data passing to the next upper layer.
  7. 7. so at the both ends the corresponding layers is take care of encoding, dividing, and assembling of the data. USER DATAGRAM PROTOCOL (UDP) • The User Datagram Protocol (UDP) is a connectionless, unreliable transport protocol. It does not add any thing to the services of IP except providing process-toprocess communication. It also poor in error checking. It is very simple protocol with minimum overhead, and takes less interaction between the sender and receiver.
  8. 8. •UDP packets are called user datagrams, which are having fixed size header of 8 bytes. The following diagram shows format of user datagram. •Source port Number: This port number used by the process running on the sender system. It is 16 bit long and ranges from 0 to 65,535. if the sender is a client then the port number is a ephemeral port number.
  9. 9. • Suppose the sender is a server it port number is well known port number. • Destination Port Number: This port number used by the process running on the destination system. It also 16 bit. If the destination system is a server, the port number is well known port number, otherwise it is a ephemeral port number. • Length: It is also a 16 bit field that defines total length of the packet including header and data. The length of the packet from 0 to 65,535 bytes.
  10. 10. Actually the length of UDP packet is always less than 65,535 bytes because UDP datagram stored in IP datagram whose total length also 65,535 bytes. • Checksum: This field is used to detect errors over the entire user datagram including header and data.
  11. 11. UDP Operation: The User Datagram Protocol supports the following services; Connectionless services: We know that UDP provide connectionless service, it means each packet sent by UDP is an independent one. There is no relationship between the different user datagrams even if they are coming from the same source process and going to the same destination process.
  12. 12. • The user datagrams are not numbered and there is no connection establishment and connection termination mechanism. So the datagrams between source and destination can travel on different paths. Flow and Error Control: The UDP is a very simple and unreliable protocol. There is no flow control and hence there is no window mechanism. Sometimes the receiver may overflow with incoming packets. There is no error control mechanism in UDP except checksum. So the sender does not know whether the data is lost or duplicated.
  13. 13. • Suppose if the receiver detects the errors through the checksum then simply that packet is discarded. Encapsulation and Decapsulation: To send the data from one process to another process the UDP encapsulate and deccapsulates the packets in IP datagram. Queuing: In UDP queues are associated with ports. The following diagram shows queues in UDP.
  14. 14. • At the client side when a transmission process starts, it request a port number from the operating system, at the time the OS creates incoming and outgoing queues and associate with that process.
  15. 15. • Suppose if a process wants to communicate with multiple processes, it obtain only one port number and finally use one outgoing and incoming queue. • The queues are opened by the client are identified by ephemeral port numbers. The queues functions as long as process running, when the process terminates, the associate queues are destroyed.
  16. 16. Uses of UDP: The following are some of the uses of UDP protocol. 1.UDP is suitable for the processes that request and response communication. 2.UDP is suitable for the processes with internal flow and error control mechanisms. 3.UDP is a suitable transport protocol for multicasting. 4.UDP is used for management processes such as SNMP 5.UDP is used for some route updating protocols.
  17. 17. Transmission Control Protocol • Transmission Control Protocol (TCP) is a process-to-process connection oriented protocol. It creates virtual connection between two TCPs which are in sender and receiver. It also supports error control and flow control mechanisms in transport level. TCP Services: The following are the different services offered by the TCP to its above layer (Application Layer). Process-to-Process communication: TCP provides process-to-process communication by using port numbers.
  18. 18. Stream Delivery Service: TCP is a stream oriented protocol. It allows the sending process to deliver the as a stream of bytes and allows receiving process to obtain data as a stream of bytes. • TCP creates an environment in which the two processes seem to be connected by an imaginary tube that carries their data across the internet. The following diagram show stream delivery. (Diagram 23.13)
  19. 19. Sending and Receiving Buffers: The sending and receiving process may not happen at the same speed in data transmission. So the TCP need buffers for storage. • There are two buffers, one is sending buffer and another one is receiving buffer in each direction. • These buffers may also useful in error control and congestion control. • one of the method to implement the buffers is circular array, each location capacity is one byte. The following diagram shows sending and receiving buffers.
  20. 20. • (Diagram 23.14) • The above diagram shows movement of data in one direction. At the sending side the buffers has three kinds of chambers. Some of the chambers are empty, which can be filled by the sending process. Some of the chambers have data that has been sent but not yet acknowledged. TCP keep the data in this chambers until it receives an acknowledgement. Some of the chambers have data that has to be sent by the TCP. • Once the bytes are acknowledged, then the chambers are recycled and available for use of sending process.
  21. 21. • The buffers at the receiving side has two parts, some of the chambers are empty to be filled by data received from the network. Other chambers have data that can be read by the receiving process. TCP Segment: TCP groups number of bytes together into a packet called segment. TCP adds header to each segment and send the segment to IP layer for transmission. The segments are encapsulated in IP datagram and then transmitted. • If the segments may be received out of order, lost, corrupted and resent, all these are handled by TCP.
  22. 22. • In TCP all the segments should not necessarily same size. Full duplex communication: TCP offers full duplex service, in which data can flow in both directions at the same time. Connection oriented service: We know that TCP is a connection oriented protocol. When transmitting the data the following activities occur; 1.The two TCPs establish a connection between them. 2.Data are exchanged in both directions. 3.The connection is terminated.
  23. 23. Reliable Service: TCP is a reliable transport protocol. It uses acknowledgement mechanism to check safe arrival of data. TCP FEATURES The TCP has several features, the following are some of them; Numbering system: The TCP keep track the segments being transmitted or received, for this purpose TCP has two fields, one is sequence number and other is acknowledgement number, these two numbers refer the byte numbers but not segment numbers.
  24. 24. • TCP numbered all the data bytes that are transmitted. The numbering is independent in each direction. The numbers does not start from 0. instead TCP generates random numbers between 0 to 232–1 for assign number of first byte. • After the bytes have been numbered, TCP assigns a sequence number to each segment that is being sent. The sequence number is the number of the first byte carried in that segment. • If the segment carries use data and control information it has sequence number. If the
  25. 25. segment does not carry user data, it does not logically define sequence number. • Some segments only carry the control information need a sequence number to allow an acknowledgement from the receiver. • In TCP the nodes are used acknowledgement number to conform the data has been received. Here the acknowledgement number is the number of next byte that a node expect to receive and acknowledgement number is cumulative, that is the receiver successfully received last byte with some number then it adds 1 to it.
  26. 26. Flow control: TCP provides flow control. The receiver controls, the volume of data to be sent by the sender. This prevents the receiver from the overflow. The TCP numbering system may also used for byte oriented flow control. Error control: To provide reliable services, TCP has error control mechanism. During error detection total segment is considered as a single data unit. Error control is byte oriented. Congestion control: TCP considers the congestion of network into account.
  27. 27. The amount of data sent by the sender not only controlled by the receiver but also determined by the level of congestion over the network. TCP SEGMENT • A packet in TCP is called a segment. The segment consists of 20 to 60 bytes header, followed by data from application layer. If the header is 20 bytes, there are no options, suppose the header is 60 bytes it contains options. The following diagram shows the header format of TCP.
  28. 28. • (Diagram 23.16) Source port address: This is a 16 bit field that defines the port number of the application program at the sender side. Destination port address: This is a 16 bit field that defines the port number of the application program at the receiver side. Sequence number: This is a 32 bit field that represents number assigned to the first byte of the segment. • We know that TCP is a stream oriented protocol, to ensure the connectivity each transmitted byte has a number.
  29. 29. • During the connection establishment, each party in use a random number generator to create an initial sequence number (ISN), which is different in each direction. Acknowledgement number: This is a 32 bit field represents the byte number that the receiver is expecting to receive from the source. • suppose the receiver successfully received byte number x from the source, then it sends x+1 as the acknowledgement number.
  30. 30. Header length: This is a 4 bit field indicates the number of 4 byte words in TCP header. We know that the length of TCP header is 20 to 60 bytes so the value of the field ranges from 5 to 15. Reserved: This is a 6 bit field reserved for future. Control: This field contains six different control bits or flags. One or more flags can set at a time. • These control bits are used for flow control, connection establishment, termination, connection abortion and mode of data transfer in TCP.
  31. 31. • (Diagram 23.17) Window size: This field defines the size of the window, in bytes that the sender should maintain. The length of this filed is 16 bits, so the maximum size of the window is 65,535 bytes. This is the size of the receiving window determined by the receiver. Checksum: This 16 bit field contains checksum to identify and correct the transmission errors. Urgent pointer: This 16 bit field is valid when urgent flag is set. This flag is used when the segment contains urgent data.
  32. 32. Options: There can be up to 40 bytes of optional information in TCP header. TCP CONNECTION • TCP is a connection oriented protocol. It establishes a virtual path between the source and destination. All the segments belongs to a message are sent through this virtual path. Using the single virtual path facilitates acknowledgement process as well as retransmission of damaged or lost segments. If the segments arrives out of order TCP holds it until the missing one arrive.
  33. 33. Connection establishment: TCP transmits the data in full duplex mode. When two TCPs in two machines are connected those can transmit the data simultaneously. It mean that the both parties in communication get approval from one another before transmitting the data. • Connection establishment in TCP is done through three way handshaking. Let us consider a client wants to communicate with server by using TCP. • Now the process starts with the server. The server tells its TCP that is ready to accept the connection, this is called passive open.
  34. 34. • Now the client program issues a request to the server, is known as active open. It represent, the client wish to connect to the open server. Now the TCP starts the three way handshaking. • To implement the three way handshaking few fields of TCP segment are necessary, such as sequence number, acknowledgement number, control flags, and window size. • The following diagram shows the three way handshaking process. (Diagram 23.18)
  35. 35. 1. The client sends the first segment, a SYN segment, in which SYN flag is set. This segment is for synchronization of sequence numbers. It consumes one sequence number. When data transmission starts the sequence number is incremented by 1. 2. The server sends second segment SYN+ACK by setting the two flag bits, this segment has dual purpose, it servers as a SYN for communication in other direction and ACK for previous SYN segment. It consumes one sequence number.
  36. 36. 3. Now the client sends the third segment, it just acknowledgement (ACK). It acknowledges the receipt of second segment. The ACK segment does not consume any sequence number. Simultaneous Open: It is a rare situation occur when both sender and receiver issue an active open. In this case both TCPs transmit SYN+ACK segments to each other, then a single connection established between them. Synchronization Flooding Attack: One more problem occur during connection establishment is SYN flood attack.
  37. 37. • This happen when an attacker sends a large number of SYN segments to a server and pretending them those are from different client by using the fake IP address. • Now the server allocate the necessary resources and creating communication tables for each fake request. This leads to the server run out of the service. This attack is known as the denial of service. Data Transfer in TCP: After the connection establishment, bidirectional data transfer can takes place. The client and server send and receive data and acknowledgements.
  38. 38. • The following diagram shows data transfer in TCP (Diagram 23.19) • Let we explain this concept with an example, here the client sends the 2000 bytes of data in two segments, each one have 1000 bytes and the server sends 2000 bytes of data in a single segment. Here we should carefully observe the sequence and acknowledgement numbers. • In TCP data transmission acknowledgements are piggybacked.
  39. 39. • The data segments send by the client have set the PUSH flag, so that the server knows to deliver the data to the server process as soon as they are received. • There are many methods to terminate the TCP connection; 1.Three way handshaking. 2.Four way handshaking. 3.Half close. TCP Flow Control: TCP uses sliding window protocol to handle the flow control. We know that in sliding
  40. 40. • One is Go-Back-N and other is selective repeat. • Some times TCP sliding window looks like Go-Back-N because TCP does not have any negative acknowledgements and some time it follow selective repeat because the receiver holds the out of order segments until missing one arrives. • The following diagram shows working of sliding window in TCP. •(Diagram 23.22)
  41. 41. • The window has three activities, open, closed and shrunk, these activities are in the control of the receiver, the sender should obey the commands of the receiver in this situation. • Open window means moving the window’s right wall to the right. This operation allows more data bytes are eligible for sending. • Closing the window means moving the left wall of the window to the right. This means, the sender already acknowledge some bytes of data, so those are removed from the window.
  42. 42. • Shrunk means moving the window’s right wall to the left. This action is generally not allowed because it reject the eligibility of byte for sending and left wall cannot moves left because already send bytes again get the eligibility for sending. (Data duplication may happen). • The size of the sliding window is determined by the two parameters receiver window size and congestion window size. Here receiver window size is determined by the receiver and congestion window size is determined by the network.
  43. 43. Congestion Control: • First we discuss general congestion control mechanisms in the Network. The congestion is a situation in which the network is unable to deliver the data to the destination. • Congestion control refers techniques and mechanisms that can either prevent the congestion before it happens or remove the congestion after it has happened. • In broad sense we can divide the congestion control in two categories; 1.Open loop congestion control. 2.Closed loop congestion control.
  44. 44. Open loop congestion control: The open loop congestion control policies are applied to prevent the congestion before it happens. In this situation congestion control is handled by either sender or receiver. Retransmission Policy: We know that retransmission is an unavoidable situation in the networks. The sender retransmits the data when a packet is lost or corrupted. The retransmission may also increase the congestion over the network. So we choose good retransmission policy. In the retransmission policy, retransmission timers are adjusted to optimize the efficiency and prevent the
  45. 45. Window policy: The type of window used at the sender side is also effect the congestion. To prevent the congestion selective repeat the window is best one. Acknowledgement policy: The acknowledgement policy imposed by the receiver may also effect the congestion. • There are several mechanisms in acknowledgement policy; 1. The receiver not immediately acknowledge each and every packet send by the sender, it may slow down the sender and prevent the congestion.
  46. 46. 2. The receiver send an acknowledgement only if it has a packet to be sent or special timer expires. 3. The receiver may acknowledge only N packets at a time. Discarding policy: The good discarding policy may prevent the congestion as well as keep the integrity of the data. For example, discarding less sensitive packets in audio transmission when congestion is likely to happen, is not harmful to audio quality and the congestion is alleviated.
  47. 47. Admission policy: In this policy switches in the network, first check the resource requirement and current flow of the network and then admit the future transmissions. The admission policy give much importance to the quality of service. Closed loop congestion control: Closed loop congestion control mechanism try to alleviate congestion after it happens. Backpressure: In this technique, a congestion node stops receiving data from the immediate upstream node, it may cause the upstream nodes become congested.
  48. 48. • so the upstream nodes reject the data from their upstream nodes. Now the backpressure is propagates in opposite direction of data flow finally reaches the source. Now the source node identifies the congestion the suspends the data transmission. (Diagram 24.6) Choke Packet: The drawback in the backpressure is delay of intimation regarding the congestion. • In Choke packet method a packet is sent by the congested node to the source directly.
  49. 49. •(Diagram 24.7) Implicit signaling: In this method, no communication between the congested node and the source. Here the source guesses that there is a congestion in the network from other symptoms. For example, suppose the source sends the packets and there is no acknowledgement for a while indicates the congestion over the network. Explicit signaling: This method is different from choke packet but explicitly send a congestion signal to the source or destination.
  50. 50. • In explicit signaling, the signal may also carry the data. The signaling is two types; 1.Backward signaling: A signal bit sent in the direction opposite to the data flow. The bit can warn the sender and slow down the data transmission. 2.Forward signaling: A signal bit sent in the direction of data packet. This bit inform about the congestion to the destination. Now the receiver slow down the acknowledgements or follow some other policies to mitigate the congestion.
  51. 51. TCP Congestion Control: Congestion Window: We know that the size of the sender window is determined by the receiver and we also consider the current transmission state of the network. Now the sender has two pieces of information, that is receiver advertize window size and congestion window size. So the actual size of the sender window is the minimum of these two. Actual window size = Minimum(rwnd, cwnd)
  52. 52. Congestion policy: TCPs congestion handling policy is implemented in three phases; Slow start, Congestion detection, and Congestion avoidance. • At first the sender starts with very slow rate of transmission, but increases the rate rapidly to reach threshold. When threshold is reached, the data rate is reduced to avoid congestion. Finally if congestion is detected, the sender goes back to slow-start or congestion avoidance phase based on how congestion is detected.
  53. 53. Slow Start : Exponential Increase: One of the TCP congestion control algorithm is slow start. In this method the size of the congestion window starts with one maximum segment size (MSS). The size of MSS determined during the connection establishment time. The following diagram shows slow start, exponential increase; (Diagram 24.8)
  54. 54. • Here the size of window increases one MSS each time, an acknowledgement is received. That is the window starts slowly but grows exponentially. • we will explain with an example, initially the sender starts with one segment, after getting the acknowledgement of segment-1, the congestion window size is incremented by 1. which mean now the congestion window size is 2 now these two segments can be sent. When acknowledgement is received the size of window increased by 4 segments and soon.
  55. 55. • The slow start not continue indefinitely, a threshold is stop this phase. The sender maintain ‘ssthresh’ variable, when window size reached threshold, slow start stops and next phase starts. Congestion avoidance: To avoid congestion before it happen, we should slow down the exponential growth, this is done by congestion avoidance algorithm. • The congestion avoidance algorithm makes additive increase instead of exponential increase. After the slow start phase the additive increase phase starts.
  56. 56. Congestion Detection: Multiplicative Decrease: If congestion occurs, the congestion window size must decreased. Now the sender should retransmit the particular segment. However the retransmission occurs in two cases; 1.When timer times out. 2.When three ACKs are received. In both cases the size of threshold is dropped to half.
  57. 57. MOBILE IP • We know that the host or node within the network should not get any packet if it moves out of the network. • In mobile environment the nodes are always in moving between several areas, and our goal is, where ever the node is, should get the services of the network. To make it possible the node should have a topologically correct address (IP). • There are several ways to assign a topologically correct address (IP) to a mobile node.
  58. 58. • One quick solution to assign topologically correct IP to the mobile node use of DHCP. So, the mobile node visits the new location it gets the new IP. Here the problem is, no body knows the new IP, it is impossible to find a node on network, which just changed its address. • The next solution is use of Dynamic DNS, which maps the logical name with IP address. But as per the considerations of the DDNS, the IP has no special interest for services offering.
  59. 59. • The DNS should take certain time to map the logical name to an IP address. This approach does not work, because, the mobile node moves quit often and DNS not designed for frequent updates of routing tables. • There is one more sever problem, that is changing of the IP address causes breaking of TCP connection. We know that a TCP connection is identified by a socket address. • Another solution for assigning topologically correct address is, creation of specific routers for mobile nodes.
  60. 60. • But it is possible, theoretically onlychanging routing tables all over the world to create specific routes to a mobile node. Here we does not scale how many routers to be fit, because large volumes of nodes day by day connected to the network. • One more basic problem with this approach is, the routers are basically designed for fast forwarding the packets, but not for updating of routing tables. • So the above trails are not working to assign a correct IP address to a mobile node, now we can design a new standard with following requirements.
  61. 61. Specifications (Requirements) of Mobile IP: 1. Compatibility: We know that today all the computers that connects to the internet are working on the TCP/IP. The new standard cannot change the applications or network protocols are already in use and it should work with current operating system. It should not introduce new software for the routers, but it may propose enhancement of router capabilities. It should not require special media or MAC/LLC protocols, it should compatible with non mobile IP addresses.
  62. 62. 2. Transparency: We know that the mobility is invisible for the many higher layer protocols, so higher layers should continue its work even if the mobile node change its point of attachment to the network. Suppose the interruption of service (disconnection) is too long, TCP is unable to procure the connectivity. The new technology should aware the higher layers about the changing the point of attachment of a mobile node as per the requirements.
  63. 63. 3. Scalability and efficiency: The new technology should not vulnerable the efficiency of the network. It may not generate too many messages flooding the network and special care should taken on lower bandwidths. The mobile IP should scalable for large number of participants in the whole network. 4. Security: We know that mobility has many security problems, here the minimum requirement is all the information regarding mobile IP management should authenticate. The IP layer sure that if it forward a packet to a mobile host this host should receive the packet.
  64. 64. • The IP layer should guarantee that the IP address of a receiver is correct. It should preventing the fake IP addresses or attacks. Entities and Terminology: Mobile Node (MN): A Mobile node is an end system or a router that can change its point of attachment with the network from time to time. The MN keeps its IP address and can continuously communicate with other systems within the network. Correspondent Node (CN): The communication partner of MN is correspondent node. It is fixed or mobile.
  65. 65. Home Network: The home network is subnet the MN belongs to with respect of its IP address. No mobile IP support is needed in home network. Foreign Network: The foreign network is the current subnet the MN visits and which is not the home network. Foreign Agent (FA): The FA can provide all the services to the MN during its visit to the foreign network. The FA has COA (Care Of Address) act as a tunnel end point for forwarding packets to the MN. It also provide security to MN because it is a default router.
  66. 66. Care of Address (COA): The COA defines the current location of the MN from IP point of view. All the IP packets to the MN are delivered to the COA, not directly to the MN. Here the packet delivery takes through tunneling method, so COA is act as a tunnel endpoint. There are two types of COAs; Foreign Agent COA: This COA is located at FA. It mean the COA is an IP address of FA. Now FA acts as a tunnel endpoint and then forward the packets to MN.
  67. 67. Co-located COA: When MN in the foreign network, suppose it obtain temporary additional IP address, which act as COA is known as co-located COA. If this address is topologically correct, then the MN acts as a tunnel endpoint. Home Agent (HA): The HA provides several services to MN and is located in the home network. Actually the tunneling of packets to MN starts at HA. The HA maintains a location register has an information of MN’s current location. There are three alternatives for the implementation of HA.
  68. 68. • HA can be implemented on a router, which is responsible for home network. Really it is a best position, because without optimizing the IP all the packets for MN go through the router. • Generally changing of router software is not possible, so HA can implemented on any arbitrary node in the subnet. One disadvantage of this method is if the MN is the foreign network, the packets are double crossing the router. • Home network is not necessary at all. The HA could again on router, but only act as a
  69. 69. manager for MN belonging to a virtual home network. With this solution all the MNs are always in foreign network. IP packet Delivery (Working of IP): Let us consider an example network as shown in the diagram. (Diagram 8.2) Here correspondent node wants to send IP packets to MN and it does not know anything about MN’s current location and sends the packets as usual to the IP address of MN. It mean CN sends IP packets containing MN’s IP address is des-
  70. 70. -tination address and CN’s IP address as source address. • Now as usually, the router at correspondent network forward the packets to the home agent which is in the home network. • The HA intercepts the packet, and identifies that the MN is currently not in home network. • Now the packet is encapsulated by COA and tunneled to foreign network. Here new IP is put in front of the old IP with new destination IP (COA).
  71. 71. • The foreign agent now decapsulate the packet, it removes the additional header and forward the packet with CN as source address and MN as destination address to the MN. • Now transmitting the data from MN to CN is very simple, MN sends the packet with its own IP address as source address and CN’s address as destination address. Here the router in foreign network (FA) act as a default router and forward the packets.
  72. 72. Packet Delivery & Handover Management: • Here we consider, during the communication in between the correspondent node (CN) and the mobile node (MN) which are moving around different networks and the CN may be the fixed or mobile, how the services are handed over between the different networks. CASE-1: CN is a fixed node and MN in home network. • Let we consider CN is a fixed node in its own network, (corresponding network) and
  73. 73. MN is also in home network, now CN transmits the connection establishment message using IP protocol, through CA (corresponding agent) to the home agent (HA) of MN. • In this message source IP address is the IP address of CN and destination IP address is the IP address of MN. • Now the HA receives and then delivers it to the MN, the HA also receives the response from MN and send back to CN.
  74. 74. CASE-2: CN is a mobile node in its home network, and MN is also in its home network. • In this case the CN transmit the packet for connection establishment to HA of MN through CA. • Here source IP address is the IP address of CN, and destination IP address is the IP address of MN. • Now the HA receives and then delivers it to the MN, the HA also receives the response from MN and send back to CN.
  75. 75. CASE-3: CN is fixed in its home network and MN is in the foreign network. • CN transmits the connection establishment message using IP protocol, through CA (corresponding agent) to the home agent (HA) of MN. In this message source IP address is the IP address of CN and destination IP address is the IP address of MN. • Now HA of MN receives the packet for MN and identifies that the MN is not available in home network. So HA encapsulate the receiving packet with new IP header which
  76. 76. source address is IP address of CN and destination address is the care of address (COA) of MN in the foreign network. • Now the foreign agent (FA) receives the packet with new header and decapsulate it, then deliver to the MN. • To send back the information from MN to CN, the MN is able to directly transfers the data to CN through FA, because the IP address of CN is available at MN after decapsulating the packet – That is the source address is turned as destination address in reply.
  77. 77. CASE-4: CN is mobile node at foreign network and MN is at the home network. • In this case the CN sends the connection establishment message to the HA of MN through the FA where it is located. • Once the connection established, the data is exchanged between the HA and FA. CASE-5: CN is mobile node at foreign network and MN is at the foreign network. • In this case, we carefully considered that the CN is at the foreign network FA1 and MN is at another foreign network FA2.
  78. 78. • Now the CN sends the connection establishment packet through FA1 to the HA of MN. But MN recognizes that MN is not available in home network, so it encapsulate the packet with new header and then transmit to the FA2. • Now the data transmissions are carried in between the FA1 and FA2. CASE-6: CN is mobile node in its home network and MN is the at the foreign network. • This case is similar to CASE-3 except the CN is mobile node in its home netwrok.
  79. 79. Location Management: • We know that the mobile node always moving between the different network, here one of the initial problem is, how to find out a mobile node when it is moved into other networks. The mobile IP describes two procedures to discover the MN in foreign networks; one is agent advertisement and other is agent solicitation. Agent Advertisement: In this method, the home and foreign agents advertise their presence periodically using special advertisement message.
  80. 80. • This advertisement message can broadcast into the entire subnet. To frame this message we use Internet Control Message Protocol (ICMP) with some mobility extensions. • The routers in the fixed network can also obey this protocol and advertise their routing services periodically to the attached links. The following diagram shows the agent advertisement packet with mobility extension (Diagram 8.3)
  81. 81. • Here the upper part represents the ICMP packet and the lower part consists extensions needed for mobility. • Here TTL field of the IP packet is set to 1, to avoid forwarding the packet to the next node. The IP destination address is set according to standard router advertisement, it may be a multicast address or broadcast address. • The type field of ICMP is set to 9. The code field is 0, if the agent route the packets from non mobile nodes, or code is 16 it means the agent route the traffic only from mobile nodes.
  82. 82. • # address field represents, the number of addresses advertised with the packet. The Life time field indicates the length of the time this advertisement is valid. Preference levels for each address help a node to choose the router that is most eager to service to a new node. • In the extension field contains, type is set to 16, length is depending on the number of COA (care of addresses) advertise with the message, sequence number indicates, the total number of advertisements sent since initialization. The registration life
  83. 83. a node can request during registration. • The bit R shows, the registration with the agent is required even when MN using colocated COA. B bit shows, the agent is currently too busy to accept the new registration. The bit H indicates, the agent works as a home agent, F indicates the agent works as foreign agent. The bits M and G specifies the method of encapsulation, G represents generic encapsulation, M represents minimal encapsulation. The V bit specified use of header compression ‘r’ bit set to 0, and ignored. T bit indicates reverse tunneling.
  84. 84. • Now a mobile node in the subnet an receive agent advertisement from either its home agent or a foreign agent. This is one way for MN to discover the location. Agent Solicitation: If no agent advertisement is present or the MN has not received a COA, or the inter arrival time is too high, then the mobile node sends the agent solicitation. • The solicitations are based on the RFC 1256 protocol and we must ensure that the solicitation messages do not flood the network.
  85. 85. • In agent solicitation, the MN search for FA endlessly sending out solicitation messages. Generally a mobile node send three solicitations per second. • If the node does not receive an answer to its solicitations it must decrease the rate of solicitations exponentially to avoid flooding the network unit it reaches a maximum interval between solicitations.