Chapter 2 nternet“Sessions' Imagine yourself talking on your mobile phone while driving to the office.On the drive to the office,your mobile phone is connected to a number of different cell towers,and the network somehow has to make sure that the"communication session"ends up at the mobile phone regardless of its location.Apart from the fact that phoning while driving is probably not a good idea from a safety point of view,you have perhaps always taken for granted that you could keep talking without losing your connection to the person on the other end of the line.In reality it is,because of the way the Internet works.hard to enable this kind of se amless,real-time mobility.The be when This so-called session mobility is one of the more challenging issues in enabling the mobile Internet,a pervasive Internet Protocol-based network that links fixed and mobile nodes,whether they are sensors or servers,standalone,distributed,battery,or line powered.This chapter provides a high-level overview of the way the Internet works and explains where the difficulties lie in making session mobility possible.This back- ground will enable you to appreciate these challenges as well as help you understand the approaches to mobility presented in Part II of this book. The Internet and Communication The conisting of many Hosts (araditional rerm nat are connected to a n onnected to on l type of hos one network an tht forard d om oe nerorkt the ohee Routers ar 2-1.Two hosts from different networks that want to communicate with each other do so by using the TCP/IP protocol suite,so named after two of the most important protocols in that suite,TCP and IP (explained in more detail later in this chapter).Today.TCP/IP is also used between hosts that are connected to the same network. From<www.wowebook.com>
ptg Chapter 2 Internet “Sessions” Imagine yourself talking on your mobile phone while driving to the office. On the drive to the office, your mobile phone is connected to a number of different cell towers, and the network somehow has to make sure that the “communication session” ends up at the mobile phone regardless of its location. Apart from the fact that phoning while driving is probably not a good idea from a safety point of view, you have perhaps always taken for granted that you could keep talking without losing your connection to the person on the other end of the line. In reality it is, because of the way the Internet works, hard to enable this kind of seamless, real-time mobility. The problem becomes even harder when sessions need to be kept alive when moving across different types of access networks (for example, from cellular to Wi-Fi) or networks belonging to different operators. This so-called session mobility is one of the more challenging issues in enabling the mobile Internet, a pervasive Internet Protocol–based network that links fixed and mobile nodes, whether they are sensors or servers, standalone, distributed, battery, or line powered. This chapter provides a high-level overview of the way the Internet works and explains where the difficulties lie in making session mobility possible. This background will enable you to appreciate these challenges as well as help you understand the approaches to mobility presented in Part II of this book. The Internet and Communication The Internet is a network consisting of many smaller networks. Hosts (a traditional term for all computers that are connected to a network) are connected to one or more of these smaller networks. Routers are a special type of hosts that are connected to more than one network and that forward data from one network to the other, as illustrated in Figure 2-1. Two hosts from different networks that want to communicate with each other do so by using the TCP/IP protocol suite, so named after two of the most important protocols in that suite, TCP and IP (explained in more detail later in this chapter). Today, TCP/IP is also used between hosts that are connected to the same network. From <www.wowebook.com>
14 Building the Mobile Internet Network Routers Networks Network Network ☐Hosts Network Figure 2-1 Network Elements That Constitute the Interner The networks that form the Internet use many different hardware technologies,and many different applications can be used on the Internet. Packet Switching Versus Circuit Switching Traditional telephone networks use a technology called circuir swirching.That is.for a given communi munication sessio hat the ation session;at the same time,that has ad e reserved for this one commur dvantage. Even when the circuit is not used (that is,for example,when both parties are silent in a phone conversa- tion),the capacity of the circuit is reserved. TCP/IP networks use a different approach-connectionless packet switching.The data of a communication session here is divided into small units called packers,which each con- tain enough information to enable the network to decide how to send it to the receiving end of the communication.All packets are being sent independently to the receiver,and the receiver reas embles the packets to reconstruct the original data.Figure2-2illustrates this process Network 、 →口 ■口 Original Data Packetized Data Re-Assembled Original Data Figure 2-2 Dividing Data into Packets at tbe Sender and Reassembling at the Receiver From <www.wowebook.com>
ptg Figure 2-1 Network Elements That Constitute the Internet The networks that form the Internet use many different hardware technologies, and many different applications can be used on the Internet. Packet Switching Versus Circuit Switching Traditional telephone networks use a technology called circuit switching. That is, for a given communication, a dedicated circuit is created between the two endpoints of a communication session. The advantage of this approach is that the circuit can be reserved for this one communication session; at the same time, that has a disadvantage. Even when the circuit is not used (that is, for example, when both parties are silent in a phone conversation), the capacity of the circuit is reserved. TCP/IP networks use a different approach—connectionless packet switching. The data of a communication session here is divided into small units called packets, which each contain enough information to enable the network to decide how to send it to the receiving end of the communication. All packets are being sent independently to the receiver, and the receiver reassembles the packets to reconstruct the original data. Figure 2-2 illustrates this process. 14 Building the Mobile Internet Network Network Network Network Network Routers Networks 0 Hosts Original Data Network Packetized Data Re-Assembled Original Data Figure 2-2 Dividing Data into Packets at the Sender and Reassembling at the Receiver From <www.wowebook.com>
Chapter 2:Internet"Sessions"15 The benefit of this approach is that the same network communication path can be used for multiple communication sessions(multiplexing).The downside is that the order of packets might not be preserved,resulting in packets being received out of order,and that the delivery of the packets is"best effort."Other communications might use all the avail- able resources,and thus packets might be dropped or delayed,or the connection can fail completely.For these reasons,it is difficult to provide guaranteed behavior.The cost ben- efits from sharing capacity,however,usually outweigh the potential problems,resulting in almost all modern networks using packet-switching technology.it is often easier and cheaper to increase capacity than to move to a connection-based model,with the excep mobile works that have limited capacity because of physical limitation IP over Everything,Everything over IP The pivot point of TCP/IP-based communications is the Internet Protocol (IP)that is used to transport packets from source to destination.As illustrated in Figure 2-3.IP shields the versa(note that this is a simplified vers Web E-Mail Telnet P Ethemnet DWD WiFI Figure 2-3 IP over Everytbing.Everything over IP In other words,when a new data-link transport technology is developed,ensuring that IP runs on top of it will allow all existing applications to be used.Furthermore,when an perhaps the every clever student can now develop his own application.At the same time,the applica tion that worked over a slow 2-Mbps X.25 time-division multiplexing(TDM)-based net- work continues to work over the 10-Gbps or more optical networks that are used nowa- days. From<www.wowebook.com>
ptg The benefit of this approach is that the same network communication path can be used for multiple communication sessions (multiplexing). The downside is that the order of packets might not be preserved, resulting in packets being received out of order, and that the delivery of the packets is “best effort.” Other communications might use all the available resources, and thus packets might be dropped or delayed, or the connection can fail completely. For these reasons, it is difficult to provide guaranteed behavior. The cost benefits from sharing capacity, however, usually outweigh the potential problems, resulting in almost all modern networks using packet-switching technology. It is often easier and cheaper to increase capacity than to move to a connection-based model, with the exception of some mobile networks that have limited capacity because of physical limitations of the wireless spectrum. IP over Everything, Everything over IP The pivot point of TCP/IP-based communications is the Internet Protocol (IP) that is used to transport packets from source to destination. As illustrated in Figure 2-3, IP shields the underlying network technology from the applications that run on the network and vice versa (note that this is a simplified version of the actual protocol stack). Chapter 2: Internet “Sessions” 15 Web E-Mail Telnet Ethernet DWD WiFi IP Figure 2-3 IP over Everything, Everything over IP In other words, when a new data-link transport technology is developed, ensuring that IP runs on top of it will allow all existing applications to be used. Furthermore, when an application developer makes sure that his or her application uses IP packets for communication between nodes, it will automatically work on all IP networks. This abstraction layer that IP provides between the transport layer and the applications is perhaps the single most important reason why the Internet has become so dominant. Instead of having to wait for an operator to make a certain service available to the users, every clever student can now develop his own application. At the same time, the application that worked over a slow 2-Mbps X.25 time-division multiplexing (TDM)–based network continues to work over the 10-Gbps or more optical networks that are used nowadays. From <www.wowebook.com>
16 Building the Mobile Interne Addresses A host on the Internet that wants to communicate with another host needs to be able to globally addres the Paddress.(Strict this is entirel becau se of the chapter.)Internet commu ication is packets f addr s to a destination I as well as its location in the network.This means that if a host is at the same time con- nected to two networks,it will,by definition,also have at least two IP addresses,one for each of its network interfaces.Another important consequence of using the same identi- fier for both the host itself and its location in the network is that if a host that is attached to one network moves to another network,it must change its IP address. Routers use the IP address of the destination of a communication session to determine how to for ard the IP packets from the source to the destination.In its s most sim form,a IP p cke ress, a destination IP addre nd payload containing the applicatio data Routers use the destina on IP addr ress to fo ward the packets to the receiv er.The receiver copies the source IP address from a received packet into the destination address to send any return packets. IPv4 Addresses The most commonly used addressing scheme on the Internet today is Internet Protocol version 4.or IPv4.documented in RFC 791'. IPv4 addresses are 32-bit binary numbers usually written in the so-called dotted decimal notation,a representation of the binary number that is easier for humans to remember.In dotted-decimal notation,the IP address is separated into four 8-bit chunks,each separat- or examl the binary representaion0001010 0000000000000000 is writtenin decimal representation as 10.0.0.1. IP addresse sare composed of two parts:a network identifier (ne id)and a host identifie (host-id).The net-id is the same for all hosts on a particular network In the early days of the Internet,the boundary between the network and the host part of the IP address was at fixed 8-bit positions,resulting in so-called Class A networks(first 8 bits reserved for net-id,24 bits for host-id).Class B networks(16 bits net-id,16 bits host- id),and Class C networks(24 bits net-id,8 bits host-id).This scheme is pretty rigid.If an organization has,for example,300 hosts(more than the 256 addresses that can be fo med with the 8 bits available for host-ids in a Class C network),the IP address registry would have to assign it a Class B network that can be used to address over 65.000 hosts.a large waste of usable addresses. shortage.To overcome this,the protocols s were redesigned to allow a split between net-id and host-id at an arbitrary bit position.This system is called classless interdomain routing (CIDR).documented in RFC 1518.Associated with From <www.wowebook.com>
ptg Addresses A host on the Internet that wants to communicate with another host needs to be able to uniquely identify that host. Therefore, on the Internet, every host is associated with a globally unique address—the IP address. (Strictly speaking, this is not entirely true because of the use of Network Address Translation (NAT), as will be explained later in this chapter.) Internet communication is about sending IP packets from a source IP address to a destination IP address. The IP address is both used to identify the host itself as well as its location in the network. This means that if a host is at the same time connected to two networks, it will, by definition, also have at least two IP addresses, one for each of its network interfaces. Another important consequence of using the same identifier for both the host itself and its location in the network is that if a host that is attached to one network moves to another network, it must change its IP address. Routers use the IP address of the destination of a communication session to determine how to forward the IP packets from the source to the destination. In its most simple form, an IP packet consists of a source IP address, a destination IP address, and some payload containing the application data. Routers use the destination IP address to forward the packets to the receiver. The receiver copies the source IP address from a received packet into the destination address to send any return packets. IPv4 Addresses The most commonly used addressing scheme on the Internet today is Internet Protocol version 4, or IPv4, documented in RFC 7911 . IPv4 addresses are 32-bit binary numbers usually written in the so-called dotted decimal notation, a representation of the binary number that is easier for humans to remember. In dotted-decimal notation, the IP address is separated into four 8-bit chunks, each separated by a dot. For example, the binary representation 00001010 00000000 00000000 00000001 is written in decimal representation as 10.0.0.1. IP addresses are composed of two parts: a network identifier (net-id) and a host identifier (host-id). The net-id is the same for all hosts on a particular network. In the early days of the Internet, the boundary between the network and the host part of the IP address was at fixed 8-bit positions, resulting in so-called Class A networks (first 8 bits reserved for net-id, 24 bits for host-id), Class B networks (16 bits net-id, 16 bits hostid), and Class C networks (24 bits net-id, 8 bits host-id). This scheme is pretty rigid. If an organization has, for example, 300 hosts (more than the 256 addresses that can be formed with the 8 bits available for host-ids in a Class C network), the IP address registry would have to assign it a Class B network that can be used to address over 65,000 hosts, a large waste of usable addresses. When the Internet became popular in the 1990s, this waste of usable address space resulted in a looming address shortage. To overcome this, the protocols were redesigned to allow a split between net-id and host-id at an arbitrary bit position. This system is called classless interdomain routing (CIDR), documented in RFC 15182 . Associated with 16 Building the Mobile Internet From <www.wowebook.com>
Chapter 2:Internet"Sessions"17 an IP address is now a network mask that indicates how many bits of the IP address(the so-called prefix)are used to indicate the net-id and how many belong to the host-id (the suffix).So,in the example of the organization with 300 hosts,instead of moving from 256 addresses to 65.536 addresses,it can now go to 2*256=512 addresses.This togeth er with NAT(discussed later in this chapter)has resulted in postponing the date at which all available address space will ultimately be exhausted.Figure 2-4 shows the division between net-id(here 11 bits)and host-id. Bit o 3 7 11 1519 2327 31 0 Net-id Host-id 10.0.0.018 10.1.0.0116 102.0.0116 10.3.0.0116 10.1.0.0124 10.1.10124 10.12.0124 10.1.2.012810.1.2128/28 Figure 2-5 Aggregation and Subnetting In essence.IPv4 packets consist of a host IP address.a destination IP address,and the .Some add added to indicate the by transporting th packet,and so on.Figure 2-6 illustrates the format of an IPv4 packet. From<www.wowebook.com>
ptg an IP address is now a network mask that indicates how many bits of the IP address (the so-called prefix) are used to indicate the net-id and how many belong to the host-id (the suffix). So, in the example of the organization with 300 hosts, instead of moving from 256 addresses to 65,536 addresses, it can now go to 2 * 256 = 512 addresses. This together with NAT (discussed later in this chapter) has resulted in postponing the date at which all available address space will ultimately be exhausted. Figure 2-4 shows the division between net-id (here 11 bits) and host-id. Chapter 2: Internet “Sessions” 17 Bit Net-id Host-id 0 3 7 11 15 19 23 27 31 0 Figure 2-4 IP Addresses Consist of a net-id and a host-id Part With CIDR, networks are described in the form IP address/number of bits for net-id. For example, 10.0.0.0/16 (pronounced as 10.0.0.0 slash 16) indicates all IP addresses between 10.0.0.0 and 10.0.255.255. Incidentally, in this notation, the old Class A networks are designated with /8, Class B with /16, and Class C with /24. Two or more networks can be combined (this is called aggregation) into a larger network of networks. For example, 10.0.0.0/16 and 10.1.0.0/16 together is the same as 10.0.0.0/15. Conversely, a large network can be divided into smaller subnetworks (this is called subnetting). Figure 2-5 illustrates network aggregation and subnetting. 10.0.0.0 / 8 10.1.0.0 / 16 10.2.0.0 / 16 10.3.0.0 / 16 10.1.0.0 / 24 10.1.1.0 / 24 10.1.2.0 / 24 10.1.2.0 / 28 10.1.2.128 / 28 Figure 2-5 Aggregation and Subnetting In essence, IPv4 packets consist of a host IP address, a destination IP address, and the payload containing the application data. Some additional fields are added to indicate the fact that it is an IPv4 packet, a checksum to detect defects caused by transporting the packet, and so on. Figure 2-6 illustrates the format of an IPv4 packet. From <www.wowebook.com>