internet applications, performance and security

67
Internet applications, performance and security Maria Kihl

Upload: others

Post on 12-Sep-2021

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Internet applications, performance and security

Internet applications,

performance and security

Maria Kihl

Page 2: Internet applications, performance and security

2

Book chapters

Forouzan 4th: 21.2, 24.2, 25.1-4, 27, 31.1

Forouzan 5th: 18.3, 19.2, 25.1, 26.1, 26.6, 31

Kihl: 8.8, 10.2, 11.2

Page 3: Internet applications, performance and security

Application layer paradigms

There are two basic user paradigms for Internet

applications:

• Client-server paradigm

• For example WWW, Online games, Web TV, Facebook

• Peer-to-peer paradigm

• For example BitTorrent, Voddler, Skype

• Some applications use both paradigms, for example

Spotify.

3

Page 4: Internet applications, performance and security

Client-server paradigm

4

Page 5: Internet applications, performance and security

Peer-to-peer paradigm

5 25.5

Page 6: Internet applications, performance and security

Example of application: WWW

• The idea of the World Wide Web (WWW) was

first proposed by Tim Berners-Lee in 1989 at

CERN, the European Organization for Nuclear

Research, to allow several researchers at different

locations throughout Europe to access each

others’ researches.

• The commercial Web started in the early 1990s.

6

Page 7: Internet applications, performance and security

Basic concept of WWW

WWW is based on three basic parts:

• Web documents (pages)

• HyperTextMarkup Language (HTML) is used for static web

documents

• Dynamic web documents are created with script languages (JSP,

CGI, ASP, etc.)

• Universal Resource Locator (URL)

• Standardized way to identify the location of web documents

• HyperText Transfer Protocol (HTTP)

• Protocol for access of web documents on a web server 7

Page 8: Internet applications, performance and security

Universal Resource Locator (URL)

A web document has four identifiers: Protocol, Host,

Port and Path. An URL is defined as:

protocol://host:port/path

When standard HTTP port 80 is used it is omitted, for

example:

http://www.mhhe.com/compsci/forouzan

8

Page 9: Internet applications, performance and security

Basic document retrieval process

9

Page 10: Internet applications, performance and security

HTTP

• HTTP is a text-based protocol with two basic types

of messages: Requests and Responses.

• HTTP sets up and uses a TCP connection

• HTTP 1.1 uses persistent connections which means that all

parts of the web document use the same TCP

connection.

10

Page 11: Internet applications, performance and security

Basic operation of HTTP 1.1

11

Page 12: Internet applications, performance and security

Formats of Requests and Responses

12

Page 13: Internet applications, performance and security

Cookies

• The original WWW was stateless, which means that

each request/response message is treated separately,

with no history of other messages.

• Cookies were introduced to be able to store

information about the client.

• Cookies introduces the concept of a user session.

• The creation and storage of cookies depend on the

implementation, but the concept is the same.

13

Page 14: Internet applications, performance and security

Example of cookies

14

Page 15: Internet applications, performance and security

Mapping from host name to IP address

• Application protocols use host names (for example

www.lth.se).

• However, TCP/IP uses IP addresses.

• The mapping from host name to IP addresses is

performed by Domain Name System (DNS).

15

Page 16: Internet applications, performance and security

Basic operation of DNS

16

Page 17: Internet applications, performance and security

17

Domain Name space

• DNS uses a hierarchical name space and the whole Internet is divided into domains and subdomains.

• A domain name is a sequence of labels separated with dots, e.g. www.telecom.lth.se.

Page 18: Internet applications, performance and security

18

Domain name space in DNS

root

Page 19: Internet applications, performance and security

Example of labels and domains

19

Page 20: Internet applications, performance and security

Domains and subdomains

20

Page 21: Internet applications, performance and security

21

Domain types

The domain name space is divided into three different

sections.

Page 22: Internet applications, performance and security

22

Generic domains

Page 23: Internet applications, performance and security

23

Country domains

Page 24: Internet applications, performance and security

24

Domain Name Servers

The domain name space is stored in special DNS servers. The

servers are distributed and each domain or subdomain have

their own servers.

Page 25: Internet applications, performance and security

25

From name to address (1)

angel2.angelnet.se

angel1.heavennet.se

1. angel2.angelnet.se ?

ns.heavennet.se

Page 26: Internet applications, performance and security

26

From name to address (2)

angel1.heavennet.se

angel2.angelnet.se

ns.heavennet.se sunic.sunet.se

2. angel2.angelnet.se ?

3. Ask ns.angelnet.se

Page 27: Internet applications, performance and security

27

From name to address (3)

angel1.heavennet.se

angel2.angelnet.se

ns.heavennet.se

ns.angelnet.se

4. angel2.angelnet.se ?

5. IP = 194.52.54.47

Page 28: Internet applications, performance and security

Network Performance

A good network performance is crucial for most

applications. Two factors of a network or system that

influence the performance are:

Delay

Throughput

Both these factors are dependent on the load on the

network or system.

Page 29: Internet applications, performance and security

Congestion

Congestion (Overload) occurs when the number of

packets sent to a system is greater than the number of

packets the system can handle.

System Arrivals (packets/sec)

Capacity (packets/sec)

Arrivals > Capacity Congestion (Overload)

Page 30: Internet applications, performance and security

Queuing delay

All routers and servers have buffers where jobs are stored in

wait for service. When the load increases, the buffers fill up,

and the queuing delay increases. Finally, packets will be

dropped due to full buffers.

Page 31: Internet applications, performance and security

Delay as a function of load

The delay will increase exponentially to the load.

This can be shown with queuing theory.

Page 32: Internet applications, performance and security

Throughput as a function of load

During overload, the throughput declines sharply.

Long delays casues retries from hosts or routers. All

dropped packets also cost capacity.

Page 33: Internet applications, performance and security

Internet Control Message Protocol

(ICMP)

The IP protocol has no error-reporting or error-

correcting mechanism. The IP protocol also lacks a

mechanism for host and management queries.

The Internet Control Message Protocol (ICMP) has

been designed to compensate for the above two

deficiencies.

It is a companion to the IP protocol.

Page 34: Internet applications, performance and security

ICMP in the TCP/IP stack

Page 35: Internet applications, performance and security

ICMP message

Two types of messages:

Error-reporting messages

Query messages

Page 36: Internet applications, performance and security

Encapsulation

The ICMP message is encapsulated in an IP datagram:

Page 37: Internet applications, performance and security

Error-reporting

When an error in the IP datagram delivery is detected, ICMP

reports the error to the source of the IP datagram. The error

message includes the IP header and first 8 bytes of the original

datagram.

Page 38: Internet applications, performance and security

Some Error reporting messages

Destination unreachable: A router cannot route a datagram or a host cannot deliver a datagram.

Source quench: A datagram is discarded due to congestion.

Time exceeded: A datagram has been discarded since its TTL value has reached 0.

Redirection: A host has the wrong default router, and needs to update its routing table.

Page 39: Internet applications, performance and security

Some ICMP Query messages

Echo-request and Reply: Is used to determine if two systems

(hosts or routers) have connection on the IP level.

Timestamp request and reply: Is used to determine the

round-trip time (RTT) between two systems.

Router-Solicitation and Advertisment: Is used by a host to

find the routers that are connected to its network.

Page 40: Internet applications, performance and security

Debugging Tools

There are several tools that can be used in the Internet

for debugging. Some of them are:

Ping

Traceroute

Page 41: Internet applications, performance and security

Ping

The Ping program uses ICMP echo-request and reply

messages to find information about a destination.

Page 42: Internet applications, performance and security

Traceroute

Traceroute (in UNIX) or Tracert (in Windows) can be

used to trace the route of a packet from the source to

the destination.

It manipulates the TTL field in the IP header and uses

two ICMP messages: Time Exceeded and Destination

Unreachable to find the route of a packet.

Page 43: Internet applications, performance and security

Traceroute, example

Page 44: Internet applications, performance and security

Network Security

There are five concepts that relates to network

security:

Page 45: Internet applications, performance and security

Message confidentiality (Privacy)

Message confidentiality (or privacy) means that the

transmitted message must make sense to only the

intended receiver. To all others, the message must be

unreadable.

Privacy is usually achieved by encryption of the

message.

Page 46: Internet applications, performance and security

Encryption, example

Page 47: Internet applications, performance and security

Message Integrity

Message Integrity means that the message must arrive

at the receiver exactly as it was sent. There must be no

changes during the transmission, neither accidently nor

maliciously.

Message Integrity can be achieved with message

digests.

Page 48: Internet applications, performance and security

Message digest

Page 49: Internet applications, performance and security

Message Authentication

In message authentication the receiver needs to be

sure of the sender’s identity and that an imposter has

not sent the message.

Message authentication can be achieved with a keyed

hash function that constructs an encrypted message

digest, also called a digital signature.

Page 50: Internet applications, performance and security

Digital signature

Page 51: Internet applications, performance and security

Message Nonrepudiation

Message nonrepudiation means that a sender must not

be able to deny sending a message that he or she, in

fact, did send.

Message nonrepudiation can be solved with a trusted

third party and the use of digital signatures.

Page 52: Internet applications, performance and security

Trusted center for nonrepudiation

Page 53: Internet applications, performance and security

Entity Authentication

Entity authentication is a technique designed to let one

party prove the identity of another party. An entity can

be a person, a process, a client, or a server.

The simplest solution is to use passwords. Another

solution is a so called challenge-response

authentication.

Page 54: Internet applications, performance and security

Challenge-response authentication

Rb = Random bit sequence (Nonce)

Page 55: Internet applications, performance and security

Internet security protocols

The following three security protocols ensure

Authentication and Confidentality on different layers:

IPSec: Security for IP.

SSL/TLS: Security for TCP.

PGP: Security for Email (SMTP).

These protocols will be studied in the course Internet Protocols.

Page 56: Internet applications, performance and security

Some bonus material: Research on Internet

user behavior and traffic volumes

• In collaboration with Acreo AB, we are involved in

European Research projects related to Internet

traffic monitoring and modelling.

• We have published some papers on Internet user

behavior patterns and generated traffic volumes.

56

Page 57: Internet applications, performance and security

Investigated network

57

Residential network in Sweden with about 2600 households

(FTTH and DSL). The measurements shown were performed

in 2007, 2009, and 2012.

Page 58: Internet applications, performance and security

Total traffic volumes

58

Page 59: Internet applications, performance and security

Traffic volume ratios

59

Page 60: Internet applications, performance and security

WWW usage

60

Which types of web sites are people using the most?

Page 61: Internet applications, performance and security

Major changes since 2007

• More video streaming.

• Less BitTorrent (but still much!)

• Facebook has increased the ratio for social media

sites.

61

Page 62: Internet applications, performance and security

World of Warcraft traffic pattern

62

Page 63: Internet applications, performance and security

WoW session lengths

63 Longest session identfied was 28 hours...

Page 64: Internet applications, performance and security

Some results on Facebook

• Recently, I supervised a master project that analysed

Facebook user behavior.

• The objective was to analyse how users

upload/download pictures, and ”like” patterns.

• Measurements during 6 days in the network shown

before (May 2012).

64

Page 65: Internet applications, performance and security

Ranking of downloaded pictures

65

The graph shows a ranking of the pictures downloaded by

users at least 50 times.

Page 66: Internet applications, performance and security

Popularity ranking

Identification and ranking of the Facebook users that

are most downloaded by other users.

66 There are a few users with a huge amount of followers.

Page 67: Internet applications, performance and security

Ranking of Likes

There are a few users that are heavy ”like”-users. The

most active user ”liked” 760 times in the measurement

period.

67