Slide 2 - Application Flashcards
Internet Protocol Stack
- Application
- Transport
- Network
- Link
- Physical
How many addresses has an IPV4 address ?
It has 32 bits and so 2^32 = 4294967296
What is needed to send or receive a message ?
An IP address (IPV4 or IPV6) and a port number
What does the Application Layer demands from the Transport Layer Services ?
- Data integrity;
- Throughput (some apps, e.g. multimedia, require a minimum amount of Throughput to be “effective”);
- Security;
- Timing;
Characteristics of the TCP service:
- Connection-oriented: setup required;
- Reliable transport between the sending and receiving process;
- Flow control: the sender won’t overwhelm the receiver;
- Congestion control: control transmission speed when network overloaded;
DOES NOT PROVIDE:
- Timing, minimum throughput or security.
Security in TCP
Vanilla TCP (& UDP) just send the cleartext passwords through the internet. The TLS (Transport Layer Security) is needed providing encryption, data integrity and end-point authentication.
If implemented in application layer, the apps use TLS libraries.
Client-Server Architecture
Server:
- Always-on host;
Client:
- Uses the IP address and port number to communicate.
- May be intermittently connected;
- Do not communicate directly with each other.
What does TCP provide ?
TCP provides a reliable, in-order transfer of bytes (“pipe”) between client and server.
What does UDP provide ?
UDP provides unreliable transfer of groups of bytes (“datagrams”) between client and server.
Characteristics of TCP:
- read() and write();
- Byte stream (and no byte is lost);
- Bytes read with read() may correspond to several write();
- Bytes written with write() may need to be read with several read();
Characteristics of UDP:
- sendto() and recvfrom();
- Preserves boundary between messages.
- Each message read with recvfrom() corresponds to a single one sendto();
- A message may be lost.
HTTP Overview
- HTTP is “stateless”, so the server maintains no information about past client requests.
- Uses TCP, by default using port 80.
What is a Web Page?
A Web page consists of objects:
- HTML file;
- JPEG images;
- Audio files, …
It has a base object ( HTML file), in which it may reference the other objects.
Each object is addressable by a URL (Uniform Resource Locator).
Types of HTTP connections
- Non-persistent HTTP or HTTP/1.0.
- Persistent HTTP or HTTP/1.1.
What is the Non-persistent HTTP ?
Non-Persistent HTTP or HTTP/1.0 can :
- At most one object is sent over a TCP connection;
- Browsers can open parallel connections (typically 5-10).
What is Persistent HTTP ?
Persistent HTTP or HTTP/1.1. can :
- Multiple objects can be sent over a single TCP connection;
- When using pipelining a browser can send requests as soon as it identifies them.
What is the response time in Non-persistent HTTP ?
RTT (round trip time):
- time for a small packet to travel from client to server and back.
Response time:
- One RTT to initiate TCP connection;
- One RTT for HTTP request and first few bytes of HTTP response to return;
- File transmission time.
Total = 2 X RTT + transmission time.
What are the issues of Non-persistent HTTP ?
- Requires 2 RTTs per object;
- OS overhead for each TCP connection (e.g. allocate buffers and variables);
- Browsers often open parallel TCP connections to fetch referenced objects.