Week 9 · Lesson 1

The Application Layer

Everything below this layer exists to serve it. The Application layer is where users and their programs meet the network — and where almost every exam question about ports lives. Learn exactly which protocol uses which port and on which transport, and you have already claimed a large block of easy marks.

CCNA 200-301 Domain 1.0 Network Fundamentals Verified 2026-10-11
Part 1

Layer 7: the interface between people and packets

In the OSI model, the Application layer (7) is the top of the stack. It is the layer through which a user’s data enters the network and through which received data is handed back to a program. The layers below it — transport, network, data link, physical — do all the routing and delivery, but they have no idea what the data means. Only Layer 7 does. Your browser sends GET /index.html HTTP/1.1; the network below happily moves those bytes without understanding them.

Definition — Application layer. The Application layer is the interface between the applications people actually use (browsers, email clients, messaging apps) and the underlying network services. It provides the protocols that give the data its structure and meaning.
The seven OSI layers · select one to see its job

Two important clarifications for the exam:

What belongs to each collapsed layer? Presentation (6) deals with data format, encoding, compression, and encryption; Session (5) manages the dialogue between two hosts — establishing, maintaining, and tearing down sessions. Both are folded into TCP/IP’s Application layer, which is why certificates, TLS handshakes, and compression appear so close to the application in practice.

Part 2

Application, service, and protocol

Three words that are routinely confused. Keep them straight and your answers to “what is this process doing?” questions will be coherent: the application starts, the service opens a socket and listens, and the protocol governs every message that crosses that socket.

TermMeaningExample
ApplicationThe program the user runs.Chrome, Outlook, curl
ServiceA background process that is always listening and provides a function to clients.The httpd web daemon, the DHCP server daemon
ProtocolThe rules of exchange that the application and service both follow.HTTP, SMTP, DNS, FTP
Which word am I looking at? · select an example

Note. A service is identified on a server by its listening port; a protocol is identified on a packet by the port number in the transport header. That is why the port registry is laughingly called the service name and port number registry — each well-known port binds a service (and therefore its protocol) to a number.
Part 3

Client–server and peer-to-peer

Application-layer traffic follows one of two architectural models. The exam expects you to recognise both and to give an example of each.

Definitions. Client–server: a dedicated server provides a service; many clients request it. Requests go to the server, which holds the authoritative data and returns responses. Peer-to-peer (P2P): any participant (peer) acts as both client and server; each peer can request from and provide to others with no central authority.
CharacteristicClient–serverPeer-to-peer
RolesFixed: one server, many clientsDynamic: every peer serves and requests
CentralisationA dedicated (often admin-managed) serverNo central server or coordinator
ScalabilityServer capacity is the bottleneckScales well — more peers add capacity
Security / managementCentral control, easy to secure and back upNo central control, hard to secure or back up
Protocol examplesHTTP/HTTPS (web), SMTP/POP3/IMAP (email), DNSBitTorrent (file sharing), older Skype
Who talks to whom? · select a model

Exam tip. When a question describes any host sharing directly with any other — no central server, no single administrator — the answer is peer-to-peer. When it describes a centralised service that many clients query, the answer is client–server. In BitTorrent, the tracker is a lightweight central server, but the actual file transfer is purely peer-to-peer: each leecher is also a seeder.
Part 4

Sessions, sockets, and ports

Two hosts that want to talk first establish a session. In OSI terms the Session layer (5) does the establishing, maintaining, and tearing down; the Presentation layer (6) handles encoding so both sides understand each other; and the Application layer (7) produces the actual data. In the TCP/IP model all of this happens inside the single Application layer — but the mechanism that carries a session is the socket.

Definition — socket. A socket is the combination of an IP address and a port number (usually written IP:port, for example 203.0.113.10:443). A TCP or UDP connection is defined by two sockets: source socket and destination socket.

The destination port tells the receiving host which service should get the data; the source port is usually an ephemeral (short-lived) port chosen by the client so the server knows where to reply. The server then demultiplexes: arriving data on port 443 goes to the web server, on port 25 to the mail server, on port 53 to the DNS service. One IP address can host dozens of services at once precisely because ports separate them.

User programs (applications) Browser Mail client DNS client HTTP / HTTPS SMTP / POP3 / IMAP DNS Socket = source IP:port → destination IP:port 192.168.1.10:53124 → 93.184.216.34:80 TCP (reliable) UDP (fast) The program does not know routing. It talks to the stack via a socket. Protocols format the data and name their destination by well-known port. Destination port = well-known service. Source port = ephemeral. Port number selects which application the transport delivers to.
Which service gets this packet? · select the destination service

Part 5

How L7 rides on L4 well-known ports

The Application layer does not add IP addresses or do routing — that is the Network layer’s job. What Layer 7 effectively does is name a destination service using a well-known port that the Transport layer puts in its header. The application binds to a port, TCP/UDP listens on that port, and any packet carrying that destination port is delivered to the application.

Port numbers are grouped into three ranges (RFC 6335):

Protocol lookup · select a protocol

Why is DNS on UDP while HTTP is on TCP? The answer is the nature of the exchange: one small request, one small reply, no way to retransmit meaningfully later → UDP; large, ordered, must-arrive-complete data (web pages, email, files) → TCP. A single DNSSEC response can exceed UDP’s 512-byte limit, so DNS also falls back to TCP (Lesson 3 covers this). The exam will ask you to pick the transport by reading the application’s needs, so train the mapping both ways: format to protocol, protocol to port, port to transport.

ProtocolPort(s)TransportTypical use
DNS53TCP and UDPName resolution; UDP for queries, TCP for zone transfers and large responses
DHCP67 / 68UDPIP configuration; 67 = server, 68 = client
HTTP80TCPWeb browsing, unencrypted
HTTPS443TCPWeb browsing over TLS, encrypted
FTP20 / 21TCPFile transfer; 21 = control, 20 = data (active mode)
TFTP69UDPTrivial, unauthenticated file transfer (for example switch IOS backup)
SMTP25TCPEmail transfer between mail servers
POP3110TCPEmail download to the client
IMAP4143TCPEmail kept on the server, folders synced to the client
Telnet23TCPRemote terminal, cleartext (insecure)
SSH22TCPEncrypted remote terminal and file transfer
NTP123UDPTime synchronisation
SNMP161 / 162UDPNetwork management; 161 = agent queries, 162 = traps
Exam tip. Use context to disambiguate the twins: 20 vs 21 (FTP data vs control), 67 vs 68 (DHCP server vs client), 161 vs 162 (SNMP agent vs traps). And remember the security pair: Telnet (23) and HTTP (80) are cleartext; SSH (22) and HTTPS (443) are encrypted. If a question asks for the “secure alternative”, SSH and HTTPS are the expected answers.
Warning — do not confuse these. FTP uses two TCP sessions (control + data). DHCPv4 uses ports 67/68; DHCPv6 (for IPv6) uses 546/547 instead — a favourite retrieval trap. IMAPS is 993 and POP3S is 995; the exam sometimes offers 993/995 as distractors, so be ready to say which is which.
Part 6 · Your turn

Review

Check what you have learned with these review questions.

Review · 6 questions

Sources

Sources & references

  1. Cisco. CCNA (200-301) Exam Topics, Network Fundamentals — application layer and ports. cisco.com.
  2. Cotton, M., Eggert, L., Touch, J., Westerlund, M. & Cheshire, S. RFC 6335: IANA Procedures for the Management of the Service Name and Transport Protocol Port Number Registry (2011), defines the System (0–1023), User (1024–49151) and Dynamic (49152–65535) ranges. rfc-editor.org/rfc/rfc6335.
  3. IANA. Service Name and Transport Protocol Port Number Registry (authoritative port assignments for 20/21, 22, 23, 25, 53, 67/68, 69, 80, 110, 123, 143, 161/162, 443). iana.org/assignments/service-names-port-numbers.
  4. Mockapetris, P. RFC 1035: Domain Names — Implementation and Specification (1987), §4.2 (UDP/TCP usage for port 53). rfc-editor.org/rfc/rfc1035.
  5. Postel, J. & Reynolds, J. RFC 959: File Transfer Protocol (1985), defines control port 21 and data port 20. rfc-editor.org/rfc/rfc959.

Target exams: CCNA 200-301 v1.1 · CyberOps Associate 200-201. Last content verification: 2026-10-11.