* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Download PPT
Net neutrality law wikipedia , lookup
Point-to-Point Protocol over Ethernet wikipedia , lookup
IEEE 802.1aq wikipedia , lookup
Multiprotocol Label Switching wikipedia , lookup
TCP congestion control wikipedia , lookup
Network tap wikipedia , lookup
Asynchronous Transfer Mode wikipedia , lookup
Airborne Networking wikipedia , lookup
Distributed firewall wikipedia , lookup
Piggybacking (Internet access) wikipedia , lookup
List of wireless community networks by region wikipedia , lookup
Computer network wikipedia , lookup
Wake-on-LAN wikipedia , lookup
Deep packet inspection wikipedia , lookup
Cracking of wireless networks wikipedia , lookup
Zero-configuration networking wikipedia , lookup
UniPro protocol stack wikipedia , lookup
Internet protocol suite wikipedia , lookup
Recursive InterNetwork Architecture (RINA) wikipedia , lookup
COM594: Mobile Technology Lecture Week 2 Building The Mobile Internet Internet Sessions 3 A Common Scenario ? You are cycling to University Talking on your mobile You pass many ‘cell-towers’ on the journey Each time you move between cell-towers you lose the call. You have to stop and make the call again You think..’This is a really cool service’..? 4 A Common Scenario ?? On long journeys you need to contact a new cell-phone provider and sign up for a temporary contract. When you are on an international train and streaming a movie, it stops periodically and you have to contact a new company and arrange a new contract before continuing with the movie. Then the movie starts over from the beginning… 5 Sessions I don’t think this would be widely accepted What users expect (even demand) is seamless real-time mobility. This has become known as ‘Session-mobility’ The Internet was not designed to enable the implementation of this kind of provision. 6 The Internet and the Mobile-Internet Things get even more challenging when moving through differing types of access network. e.g. from Wi Fi to Cellular, or between different operators. What we need is a ‘New Internet’ A ‘Mobile-Internet’ 7 The Mobile-Internet The Mobile-Internet must be a Pervasive IP-based network that can link fixed and mobile nodes, Nodes, can have many characteristics and types 8 The Mobile Internet Nodes may be:Sensors; Servers; Stand-alone or Distributed; Battery-powered or Mains Powered; User initiated or Self Initiating Permanent or Temporary State-of-the-Art, or Legacy 9 The Internet: Review of Characteristics Lets revisit the Internet and see if we can identify difficulties in making session-mobility possible: 10 Computers Connected to the Internet are called Hosts Routers are special hosts, that are connected to more than one network, and that transmit data from one network to another. Hosts communicate using the TCP/IP protocol suite Network Routers Networks Network Network Network Hosts Network Figure 2-1: The Internet: A Network of Networks This infrastructure supports much of the current mobile communication but it was not designed for that purpose. Our objective is to highlight design weaknesses and consider what solutions might be possible 11 Packet Vs Circuit Switching Circuit switching is used by traditional telephone circuits Circuit dedicated to only 1 end-to-end communication for the duration of the session This justified Packet Switching using TCP/IP The key benefit of TCP/IP is that it enables multiple communication sessions over the same communications channel (Multiplexing). A problem is that the order of the packets is not necessarily preserved and so re-ordering is required at the receiver Network Original data Packetized data Re-assembled original data Figure 2-2: Packet-switching: Dividing a data Source into Packets at the Sender, and Reassembling the Data-Source at the Receiver 12 IP Over Everything. Everything over IP The key concept in the implementation of TCP/IP is Internet Protocol (IP) that is used to transport data bits from source to destination. IP shields the underlying network technology from the applications that run on the network. It also makes the physical network invisible to the applications. Web e-Mail Telnet Application WiFi Data Link IP Ethernet DWDM 13 Addresses For true IP networking, and Internetworking to be possible every host on the Internet must be associated with a globally-unique IP address IPv4 has a 32-bit wide address. This means that there are exactly 232 possible IP addresses available. It has become clear that this is not enough. IPv4 has been superseded by IPv6. This has a 128 bit word. So there are 2128 unique IP addresses in this scheme. Do you think this will be enough? Think about the potential demand generated by the ‘Internet of Things’. Can you see any problems with the implementation of the IPv6 concept? 14 A problem with IP addressing is that an IP address has two functions. Firstly it is used to identify a host. Secondly, and at the same time, it is used to identify the location of the host. As it turns out, this simple design decision made some 40 years ago, is a serious problem for mobility Bit 0 0 4 8 Net-id 12 16 20 24 28 Host-id Figure 2-4: IP Addresses consist of a net-id and a host-id part. Same for all hosts in a particular network 32 15 In the initial implementation of the Internet IP addresses were split at a predefined and fixed boundary. In this system networks were forced into rigid Classes For example, Class A networks had the first 8-bits of the IP address represent the net-ID and the remaining 24-bits available for hosts. This meant that a Class A network could have 2^24 hosts, or 16,777,216 hosts. The net ID determined that 2^8 = 256 such networks could exist. A class B network had a 16/16 split and so 2^16= 65,536 networks each with 65,536 hosts could be implemented Class C networks had 24-bits for the net-id with 8-bits for the hosts. So 16,777,216 networks were available with 256 hosts each 16 Classless Interdomain Routing (CIDR) Subnetting 10.0.0.0 / 8 10.1.0.0 / 16 10.2.0.0 / 16 Class C 10.3.0.0 / 16 Class A Class B 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 Subnetting: A Large network can be divided into smaller subnetworks Aggregation: 2 or more networks can be combined into a larger network 17 The IPv4 Packet Format Bit 0 0 4 Version The IPv4 packet consists of a host IP address, a destination IP address, the payload containing the application data and additional fields to support routing, transportation and errorchecking functions. 8 IHL 16 12 20 Type of Service 24 28 Total Length 31 Identification Flags Fragment Offset 63 Time to Live Protocol 95 IPv4 Source Address 127 IPv4 Destination Address Header Checksum 159 Options Padding 191 Payload (variable length) 31 18 IPv6 New version of the Internet Protocol defined by the Internet Engineering Task Force due to the foreseen shortage of IPv4 address space. It has a much larger address space by using 128-bit instead of 32. IPv6 contains other features to automatically assign addresses to hosts and to make routing more efficient Bit 0 32 64 0 4 Version 8 12 16 20 Traffic Class 24 28 32 Flow Label Next Header Payload Length Hop Limit IPv6 Source Address 128 192 IPv6 Destination Address 256 320 Payload (variable length) Figure 2-7 IPv6 Packet Format Documented in RFC 2460 20 Network Address Translation A cornerstone of Internet implementation is that every host should have a unique IP address. Currently, this is not strictly the case; Networks use Internal IP addressing; Not exposed to the Internet 21 Network Address Translation Perceived Benefits? Security: IP address of specific user hidden! Easier Network set-up with large address ranges ‘internal’ to the local network. Reduces demand for Global IP addresses (Won’t be needed with IPv6) 22 Network Address Translation Disadvantages: Internal and External IP addresses must be unique Special range of IP addresses reserved for Internal use: 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 Translation Process required (NAT) 23 NAT Communication across the Internet requires interaction between globally unique IP addresses A host with a locally-unique IP address communicating with a remote host, requires IP address translation at a host which has a globallyunique address. The translation process (NAT) breaks the normal communication between Internet hosts. 24 TCP/IP 5-Layer Model The Layered structure of the TCP/IP ‘Stack’ has been the prime reason for its success. Each layer is independent of the other layers. Each layer receives a service from the layer immediately below it, and provides a service to the layer above it. 25 TCP/IP 5-Layer Model The data in any one layer, is carried as a payload in the ‘packets’ of the layer below it. (this is called Encapsulation) Data in the higher layers is ‘largely opaque’ to the layers below it. The phrase largely opaque recognizes the fact that it is sometimes useful to ‘leak’ information from one layer to another. This strictly is in violation of the layered-principle. 26 Application Layer Application Layer Transport Layer Transport Layer Internet Layer Internet Layer Data Link Layer Data Link Layer Higher Layers Lower Layers Physical Layer Figure 2-8 The TCP/IP Five-Layer Model 27 Data Link Layer Internet Layer Transport Layer Application Layer Application data Figure 2-9 Data from Higher Layers Encapsulated Lower-layer Packets 28 Layer 1: Physical Layer Not strictly speaking part of the TCP/IP model. This layer carries the actual data over the transmission medium. For each hardware technology , an addressing mechanism must be defined to transport information over LANs or WANs. These hardware addresses must be unique inside a specific network and for a specific technology, but not necessarily globally (IP takes care of global comms) 29 Layer 2: Data Link Layer Also called the network interface layer, is responsible for accepting IP packets from the Internet Layer (above) and encapsulating them in a protocol that is specific for the Layer 1 network technology Examples of Protocols: Ethernet, Address Resolution Protocol (ARP), Layer 2 Tunneling Protocol (L2TP), Point to Point(PPP), Digital Subscriber Line (DSL), Integrated Services Digital Networks (ISDN), etc. 30 Ethernet (IEEE802.3) • Ethernet (IEE 802.3) implements a unique MAC address to the physical interface card • The MAC address is unique, • Specified by the hardware manufacturer • Cannot be used for Interdomain routing 31 Address Resolution Protocol To map an IP address to a hardware address requires an Address Resolution Protocol (ARP). Typically a host receiving an IP address broadcasts a message to all the hosts to which it is connected asking for the mac address that the IP address is associated with. The specific host responds with its MAC address. 32 ARP and Caching In an effort to improve efficiency, host routers cache MAC-IP associations If a host changes its IP address it could respond with its cached address rather than its new address. 33 Layer 3: Internet Layer Responsible for handling the communication between hosts on the Internet. (It performs a routing function) It accepts a packet from the transport layer, turns it into an IP packet and hands it to Layer 2 (and vice versa) 34 Layer 4: Transport Layer Responsible for providing communication between application on different hosts. Takes the data stream that comes from a program and divides it into packets. It includes information on what application transmits the data and which application at the receiving host is supposed to receive it it uses an abstract endpoint of a communication: the protocol port 35 Layer 4: Transport Layer Examples of Ports: TCP Port 80: used for HTTP TCP Port 25: used for Simple Mail Transfer Protocol (SMTP) Examples of Transport Layer Protocols: Datagram Congestion Control Protocol (DCCP), Stream Control Transmission Protocol (SCTP), Transmission Control Protocol (TCP) and User Datagram Protocol (UDP) 36 UDP Datagram UDP is the main example of a transport protocol that is unreliable: Bit At the transport level the receiver host will not acknowledge receipt of packets and there are no measures to limit (for example) the data rate at which packets are sent in order to take the available bandwidth into consideration. If reliable connections are needed, they will have to be implemented by the application. The main advantage of UDP is that the protocol can be very simple and therefor efficient and fast 0 0 4 8 12 16 20 24 Source Port Destination Port 32 Length Checksum 64 Payload (variable length) 28 32 37 TCP Packet This is the most reliable transport protocol. TCP relieves application programmers of the burden to have to implement delivery confirmation and error detection Bit 0 0 4 8 12 16 20 24 Source Port 28 Destination Port 32 Sequence Number 64 TCP Will: • Make sure that the sender is informed if a packet doesn’t reach its destination • Adapt the rate of sending packets to the available bandwidth • Correct errors in transport (by asking for packet re-transmissions) Acknowledgment Number 96 128 160 Offset Reserved Checksum Flags Window Size Header Checksum Urgent Pointer Options (variable length 0-320 bits, depending on offset field) Payload (variable length) 32 38 Layer 5: Application Layer Layer at which the user application exists and that uses TCP/IP networks to communicate over. The Applications interact with one of the protocols in the transport layer to send and receive data 39 Layer 5: Application Layer Examples of Application Layer Protocols: File Transfer Protocol (FTP), Network Time Protocol (NTP), Post Office Protocol (POP) Internet Message Access Protocol (IMAP), Session Initiation Protocol (SIP), Simple Mail Transfer Protocol (SMTP), Simple Object Access Protocol (SOAP), Secure Shell (SSH), Dynamic Host Configuration Protocol (DHCP), Domain Name System (DNS), Hypertext Transfer Protocol (HTTP) and Telnet. 40 Socket API Some kind of Application Programming Interface (API) is needed to create an application that connects to another application on the Internet. The API needs to be capable of creating connections to other hosts or wait for incoming connections from other hosts. Most operating systems have implemented an abstraction of an endpoint for a communication session called a socket 41 Socket API The O/S or the program itself associates a socket identifier with the IP address of the host and a port. If it wants to connect to a remote host, it has to associate a remote address and port with the socket identifier as well This process is called binding. Sockets, Protocols and Ports Application 1 Application 2 Application 3 Application 4 Socket references TCP Sockets TCP Ports Sockets bound to ports 1 2 3 1 65535 2 3 65535 UDP TCP IP Sockets Protocols and Ports 43 Sessions and Mobility A TCP communication is identified with the 5 tuple: Local IP Address Local Port Remote IP Address Remote Port Socket Identifier 44 Sessions and Mobility Use of Socket API An important consequence of the way that applications use TCP/IP through the socket API: If the IP address of a host changes, the identifier for the session must also change 45 Sessions and Mobility The entire structure was built on the implicit assumption that IP addresses were essentially fixed and that Hosts did not change location. If a host moves they need a new IP address; If a host gets a new IP address then the Socket ID for the communication must change Therefore the session breaks 46 Sessions and Mobility Another consequence of the TCP/IP inherent design is that an IP address in fact performs two functions; It is a location-identifier It is an end-point-identifier In other words, an IP address identifies the specific host, and also its location in the network. Not an issue until hosts start to move around…! 47 Building the Mobile Internet Building the mobile internet is really about finding solutions for the fact that communication sessions are tied to a specific transport session and thus a set of IP addresses. A number of strategies can be followed: 48 Strategies Accept that application sessions will break; Introduce an application layer ‘session-persistence’ mechanism Keep the same IP address when moving; Introduce a new Layer Redesign the TCP/IP protocol stack to achieve separation of locators and end-point identifiers 49 Accept that Application Sessions will Break Easy option For some situations session breaks don’t matter (i.e. receiving your email). Nomadic mobility: Focus on seamless access to different networks (does not require session persistence) User can switch networks seamlessly However, sessions will not necessarily ‘stay up’ 50 Introduce a ‘Session-Persistence’ mechanism in the Application Layer Requires the Application to implement a session state not bound to the transport layer; Probably impractical Maybe not desirable Cookies in web browsers do this currently Big security and privacy issues 51 Keep the same IP Address when Moving The IP layer is an abstraction layer on top of the physical infrastructure, When a host moves, it must change its IP address so that a source knows where to route its packets This can be done to an extent by ‘tunneling’. Make multiple physical layers look like one layer to the IP layer by encapsulating layer 2 packets in other layer 2 packets 52 Introduce a New Layer Consider implementing a session layer between the TCP layer and the Application Layer. This is akin to revisiting the ISO-OSI Seven layer model which had a Session Layer above the TCP layer and under the Application layer. Perhaps we used the wrong stack after all…? 53 Redesign TCP/IP to Separate Location ID and Host ID A fairly fundamental approach Separate entities to describe A node Its location Possible in theory Difficult to implement Maybe the only realistic way forward Explored in some detail later