Transcript Chapter 1

Building The Mobile Internet

Internet Sessions

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’..? 2

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… 3

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.

4

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’ 5

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 6

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 7

The Internet: Review of Characteristics

• Lets revisit the Internet and see if we can identify difficulties in making session mobility possible: 8

Network Routers Networks Network Network Network Network Figure 2-1: The Internet: A Network of Networks Hosts 9

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 10

Web Ethernet e-Mail IP DWDM Telnet WiFi Figure 2-3: IP Over Everything. Everything over IP 11

Bit 0 0 4 Net-id 8 12 16 20 Host-id 24 28 32 Figure 2-4: IP Addresses consist of a net-id and a host-id part.

12

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-3 CIDR Subnetting 13

Bit 0 0 Version 4 32 IHL 8 Identification 12 Type of Service 16 Flags 20 24 Total Length 28 Fragment Offset 64 Time to Live Protocol Header Checksum 96 IPv4 Source Address 32 128 IPv4 Destination Address 160 192 Options Padding Payload (variable length) The IPv4 Packet Format 14

Bit 0 0 Version 4 32 64 8 Traffic Class 12 Payload Length 16 20 Flow Label Next Header IPv6 Source Address 24 28 Hop Limit 32 128 192 256 IPv6 Destination Address 320 Payload (variable length) Figure 2-7 IPv6 Packet Format Documented in RFC 2460

Higher Layers Lower Layers Application Layer Transport Layer Internet Layer Data Link Layer Physical Layer Figure 2-8 The TCP/IP Five-Layer Model Application Layer Transport Layer Internet Layer Data Link Layer 16

Data Link Layer Internet Layer Transport Layer Application Layer Application data Figure 2-9 Data from Higher Layers Encapsulated Lower-layer Packets 17

Bit 0 0 32 64 4 8 Source Port 12 16 20 24 Destination Port 28 Length Checksum 32 Payload (variable length) Figure 2-10 UDP Datagram 18

Bit 0 0 32 64 96 128 160 4 Offset Reserved 8 Source Port Checksum 12 16 Sequence Number 20 24 Acknowledgment Number Flags Destination Port Window Size 28 Header Checksum Urgent Pointer Options (variable length 0-320 bits, depending on offset field) 32 Payload (variable length) Figure 2-11 TCP Packet 19

“ .

” .com

.net

.nl

webex.com

linksys.com

cisco.com

host1.cisco.com

host2.cisco.com

20

Building The Mobile Internet

• Important Details; – Socket API – Network Address Translation 21

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 22

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) 23

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) 24

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 globally-unique address.

• The translation process (NAT) breaks the normal communication between Internet hosts.

25

Sockets

• For an Application to connect to another Application on the Internet, requires an API.

• The API must create connections to other hosts; • The most common abstraction is the Socket; • The API associates a socket-identifier with the IP address of a host, and a Port; 26

Sockets, Protocols and Ports

Application 1 Application 2 Application 3 TCP Sockets TCP Ports 1 2 3 TCP Sockets bound to ports 65535 1 2 3 IP Sockets Protocols and Ports UDP Application 4 Socket references 65535

The Data Link Layer

• The Data Link layer or Network Interface Layer takes IP packets and encapsulates them for transport over the physical layer; • Ethernet has become the dominant Layer 2 protocol in many networks; 28

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 29

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.

30

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. 31

Sessions and Mobility

• A TCP communication is identified with the 5 tuple: – Local IP Address – Local Port – Remote IP Address – Remote Port – Socket Identifier 32

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 33

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 identfies the specific host, and also its location in the network.

• Not an issue until hosts start to move around…!

34

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 35

Accept that Application Sessions will Break

• Easy option • For some situations session breaks don’t matter • Nomadic mobility: Fouus on seamless access to different networks • User can switch networks seamlessly • However, sessions will not necessarily ‘stay up’ 36

Introduce a ‘Session Persistence ’ mechanism in the Application Layer

• Requires the Application to implement a session state; • Probably impractical • Maybe not desirable – Cookies in web browsers do this currently – Big security and privacy issues 37

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 chaange 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 38 2 packets in other layer 2 packets

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…?

39

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 40