The idea
Everything below the application layer exists so that a program on one host can talk to a program on another. The application layer is the part users actually touch: the browser, the mail client, the file transfer tool. It asks the transport layer for service and gets nothing else from below.
Two questions shape every application protocol in this module. Who starts the conversation and who waits for it? And which transport protocol carries it, TCP or UDP? The rest of the module is a tour of the standard answers.
How it works
Where the application layer sits
The lecture places the application layer at the top of the TCP/IP suite. It provides services to Internet users and receives services from the transport layer. The other four layers make the application layer’s services possible.
Each lower layer has a narrower job:
- The data link layer (Layer 2) is node to node communication.
- The network layer (Layer 3) is host to host communication.
- The transport layer is process to process communication. It provides logical communication between applications or processes running on different hosts.
At the application layer the connection between two processes is logical. The two ends behave as if they talk directly, though the data crosses every layer below.
How it works
Adding and removing protocols
The layered design lets the Internet add, remove or replace a protocol in any layer. The lecture gives the conditions:
- A protocol added to a layer must use the services of a protocol in the layer below.
- Removing a protocol means changing whichever protocol in the next layer up used its services.
- Application layer protocols provide services to no other protocol in the suite, so they can be removed easily.
- New application layer protocols can be added easily as long as they can use the services of the transport layer protocols.
How it works
Client-server and peer-to-peer
In the client-server paradigm the service is provided by a server process, and that process must be running all the time. The client initiates contact and requests service. The server provides the requested service. The lecture’s examples are the World Wide Web, the file transfer protocol (FTP) and email.
In the peer-to-peer (P2P) paradigm there is no central server. Responsibility is shared between peers, and a computer can both provide and receive services. The lecture’s examples are Skype, BitTorrent, IPTV and Internet telephony.
| Client-server | Peer-to-peer | |
|---|---|---|
| Central server | Yes, running at all times | None |
| Who provides service | The server | Any peer, which can also receive service |
| Examples | World Wide Web, FTP, email | Skype, BitTorrent, IPTV, Internet telephony |
| Drawbacks | Needs a powerful server because load concentrates there. The server may break down. Only suits services that can return some type of income. | Security and applicability |
| Strengths | Not listed on the slide | Scales well and is cost-effective |
How it works
Client-server programming and the socket interface
A client-server program needs a set of instructions that tell the lowest four layers of the TCP/IP suite to open the connection, send and receive data from the other end, and close the connection. These instructions form an Application Programming Interface (API). It sits between the process at the application layer and the operating system, which encapsulates the lower four layers.
The socket interface is one such API. A socket is not a physical entity. It is an abstraction, created and used by the application program. The application can use a socket the same way it uses other data sources and sinks.
For process-to-process communication, the application layer sees only two sockets. The client treats its socket as the thing that gives the response. The server treats its socket as the thing that sends the request. Two processes communicate through a pair of socket addresses.
How it works
Choosing a transport protocol
When you write a new application you decide which transport protocol it uses, and the choice seriously affects what the application processes can do. The lecture lists the two options:
- TCP: connection-oriented, reliable, with flow control, error control and congestion control.
- UDP: connectionless, unreliable, simple, small delay and low overhead.
The standards table in the lecture pairs common applications with their protocol. Its columns extracted interleaved from the slide, so the pairing below follows the row order of the extraction.
| Application | Application protocol | Transport | IETF standard |
|---|---|---|---|
| Email transfer | SMTP | TCP (port 25, per the SMTP slide) | RFC 821 / 5321 / 6409 |
| Email delivery | POP3 / IMAP4 | TCP | RFC 1939 / RFC 3501 |
| Remote access | Telnet | TCP | RFC 854 |
| Remote access | SSH | TCP | RFC 4251 |
| Web | HTTP 1.1 / 2.0 | TCP | RFC 2068 / 7230 / 7235, RFC 7540 |
| File transfer | FTP | TCP | RFC 959 |
| File transfer | SFTP | TCP | Tunneled in SSH |
| Instant messaging | XMPP | TCP | RFC 6120 / 6121 |
| VoIP | SIP | TCP / UDP | RFC 3261 |
| Video streaming | RTSP | RTP / UDP | RFC 2326 / 3550 |
How it works
Transport service requirements
Applications differ in what they need from the transport layer: whether data loss is acceptable, how much bandwidth they use, and whether timing matters. The lecture’s table is badly scrambled in the extraction, so only the readings that are unambiguous are given here.
- Email, web and file transfer need no data loss, take elastic bandwidth (they use what is available) and are not time sensitive.
- Remote access needs no data loss, with elastic bandwidth and a timing
need under
150 ms. - VoIP is loss tolerant. The lecture quotes
150 mswith an ITU-T reference, and audio and video bandwidth ranges (5 Kbto1 Mbfor audio,1 Kbto5 Mbfor video as the slide prints them). - Interactive games are given as
~100 ms. Financial applications are marked “Depends” for timing.
Where marks get lost
A table column you cannot trust
Do not memorise a loss, bandwidth and timing row for every application from this page. The slide’s table did not survive text extraction, and this page does not fill the gaps from memory. If a question asks for the full table, check the lecture slide itself.
In the exam
- Layer scope: data link is node to node, network is host to host, transport is process to process.
- Client-server: the server must run all the time and the client starts the contact. Know all three drawbacks, including that it only suits services that can return some income.
- P2P: no central server, shared responsibility, scales well and is cost-effective, with security and applicability as the cons.
- Socket: say “abstraction” and “API between the application process and the operating system”. Not a physical entity.
- TCP versus UDP: TCP is connection-oriented and reliable with three controls (flow, error, congestion). UDP is connectionless and unreliable with small delay and low overhead.
Aside
The lecture describes the socket interface in concept only. It names no socket functions and shows no code, so none are given here.
Check yourself
- The application layer provides services to users and receives them from the transport layer. Transport is process to process, network is host to host, data link is node to node.
- Client-server needs an always-running server and concentrates load. P2P has no central server and trades that for security and applicability problems.
- A socket is an abstraction, the API between an application process and the operating system.
- TCP gives reliability and three controls. UDP gives small delay, simplicity and low overhead.