Font size
WorksheetsApplication Layer Quiz
Total questions: 125
Worksheet time: 1hrs 3mins
Which layer of the OSI model provides services directly to user applications?
Session Layer
Transport Layer
Application Layer
Network Layer
Which of the following is NOT a function of the Application Layer?
Email communication
Routing data
Domain name resolution
Web browsing
Which protocol is used for browsing websites?
FTP
HTTP
SMTP
DNS
The Application Layer protocols communicate with which OSI layer below them?
Session Layer
Network Layer
Transport Layer
Data Link Layer
Which of the following is an application layer protocol?
IP
ARP
ICMP
SMTP
Which layer does DNS operate in?
Network
Application
Transport
Session
The Application Layer in TCP/IP corresponds to which OSI layers?
Application, Presentation, Session
Transport
Network
Data Link
Which of these is not an Application Layer protocol?
HTTP
TCP
FTP
DNS
What kind of addressing does the Application Layer use?
IP addresses
Application-specific identifiers (e.g., domain names)
MAC addresses
Port numbers
Which protocol is used for resolving domain names?
SMTP
FTP
DNS
HTTPS
What port does HTTP use by default?
443
20
80
53
Which method in HTTP is used to retrieve data from a server?
GET
POST
PUT
DELETE
Which protocol ensures secure HTTP communication?
FTP
HTTPS
DNS
TLS
HTTPS is HTTP over which protocol?
SSH
IPsec
TLS
SSLv2
Which port does HTTPS operate on by default?
25
443
21
53
Which HTTP method is used to submit data to a server?
GET
POST
HEAD
CONNECT
HTTP is considered a ______ protocol.
Stateful
Stateless
Secure
Encrypted
Which protocol handles the TLS handshake in HTTPS?
HTTP
TCP
TLS
FTP
Which version introduced multiplexing in HTTP?
HTTP/1.0
HTTP/2
HTTP/1.1
HTTP/3
What does the HTTP status code 404 mean?
OK
Unauthorized
Not Found
Bad Request
Which component of HTTPS provides encryption and data integrity?
HTTP
TLS
DNS
FTP
What is sent in the first step of TLS handshake?
ServerHello
ClientHello
Certificate
Cipher suite
Which part of HTTPS verifies the identity of the server?
Digital Certificate
IP Address
DNS
Port Number
What is the purpose of header compression in HTTP/2?
Reduce latency
Enable streaming
Secure data
Assign ports
What protocol enables real-time communication over HTTP?
FTP
WebSockets
DNS
POP3
Which port does DNS use?
21
53
80
443
Which DNS record maps a domain to an IPv4 address?
MX
A
AAAA
NS
Which record maps to an IPv6 address?
A
AAAA
MX
CNAME
Which DNS record is used for mail server info?
CNAME
MX
A
TXT
What is the first place checked during DNS resolution?
Local DNS cache
Root server
TLD server
Authoritative DNS server
What type of DNS query expects the full answer from a resolver?
Recursive
Iterative
Broadcast
Forwarding
What DNS technology encrypts queries over HTTPS?
DNSSEC
DoH
DNS over TLS
CDNs
Which component maintains the domain's actual IP records?
Recursive Resolver
Root Server
Authoritative DNS Server
TLD Server
What does a CNAME record do?
Maps alias to canonical domain
Stores IP address
Resolves mail server
Points to DNS server
Which DNS record is queried to find the nameservers?
NS
A
MX
PTR
Which port does FTP control connection use?
20
21
25
53
Which mode in FTP initiates both connections from client side?
Active
Passive
Binary
ASCII
Which command logs into an FTP session?
USER
QUIT
LIST
RETR
Which command uploads a file to server in FTP?
RETR
STOR
LIST
QUIT
Which command lists files in FTP?
USER
LIST
STOR
DATA
Which variant of FTP uses SSH for secure transmission?
SFTP
FTPS
FTP
SCP
Which port does FTP data connection use in active mode?
20
21
22
443
Which FTP variant uses TLS for security?
SFTP
FTPS
HTTP
SSH
What is the purpose of the QUIT command in FTP?
Restart session
Upload file
Change directory
Close connection
What is the difference between active and passive FTP?
Command syntax
Who initiates the data connection
Encryption method
Ports used for control
Which protocol is used for sending emails?
IMAP
POP3
SMTP
HTTP
What is the default unencrypted SMTP port?
587
465
25
21
Which command starts an SMTP session?
HELO
RCPT
QUIT
Which SMTP command specifies the sender?
MAIL FROM
RCPT TO
DATA
QUIT
Which protocol is commonly used with SMTP for email retrieval?
FTP
HTTP
IMAP
DNS
What is the purpose of RCPT TO command?
Specifies recipient
Starts message
Terminates session
Authenticates client
What happens during the DATA command in SMTP?
Terminates session
Sends the email content
Authenticates sender
Lists folders
Which port is typically used for SMTP with TLS?
465
587
25
443
SMTP is a ______ protocol.
Push
Pull
Secure
Real-time
What is the primary security reason for TLS 1.3 dropping support for RSA key exchange?
It was too slow
It lacked forward secrecy
It used outdated ciphers
It failed to support ECC
What TLS extension allows multiple HTTPS websites to share the same IP address securely?
ALPN
OCSP
SNI
HSTS
Which of the following BEST explains the benefit of Zero-RTT in TLS 1.3?
Reduces memory usage
Enables faster reconnects
Improves DNS caching
Prevents replay attacks
Which of the following protocols supports transport over UDP instead of TCP?
HTTP/2
FTP
HTTPS
HTTP/3 (QUIC)
What is a major security risk with TLS 1.3's Zero-RTT mode?
Certificate spoofing
Replay attacks
MITM attacks via DNS
Downgrade attacks
What problem in HTTP/1.1 does HTTP/2 multiplexing solve?
Head-of-line blocking
Port exhaustion
Statelessness
Certificate revocation
Why is head-of-line blocking not a problem in HTTP/3?
It uses pipelining
It's built on UDP with QUIC streams
It opens multiple TCP connections
It compresses headers
Which HTTP header is responsible for maintaining persistent connections?
Connection: keep-alive
Content-Length
Accept-Encoding
Transfer-Encoding
ALPN is used during TLS handshake to:
Encrypt headers
Resolve domains
Negotiate application protocol (e.g., HTTP/1.1 vs HTTP/2)
Verify MAC
Why does HTTP/3 achieve lower latency than HTTP/2 in lossy networks?
Uses aggressive retransmission
Avoids TCP's retransmission delays via QUIC
Larger congestion window
Uses asymmetric encryption
Which DNS record maps an alias (like mail.example.com) to the actual domain?
A
CNAME
MX
PTR
What does DNS over HTTPS (DoH) achieve?
Avoids round trips
Encrypts DNS queries over HTTPS
Eliminates recursion
Prevents HTTP spoofing
Your server supports FTP uploads but users can't download files. What should you check first?
File permissions
TLS cert
Passive mode firewall rules
Domain name expiry
Which protocol combination is best suited for sending AND receiving secure emails?
SMTP + POP3
SMTP + FTP
SMTP + IMAP over TLS
DNS + SMTP
How does DNS caching help in scaling a globally distributed application?
Lowers CPU usage
Reduces query latency
Prevents DNS poisoning
Avoids load balancing
Your app can curl an IP, but not the domain name. What's most likely the issue?
HTTPS expired
TLS cipher suite mismatch
DNS resolution failure
Firewall blocked port
A browser shows "NET::ERR_CERT_DATE_INVALID" when loading a secure website. What's the cause?
TLS cipher mismatch
Expired certificate
OCSP failure
DNSSEC error
In a microservice setup, how would you secure communication between services?
Use FTP
Use mutual TLS (mTLS)
SSH tunnels
TCP with firewall
How can you avoid downtime when switching domain traffic to a new IP?
Use FTP
Disable DNS cache
Lower TTL before change
Use POP3
You enabled HTTPS on your web server, but clients still connect via HTTP. What could enforce HTTPS?
OCSP
DNSSEC
TLS 1.3
HTTP Strict Transport Security (HSTS)
What does a CA (Certificate Authority) do?
Encrypts messages
Issues and signs digital certificates
Routes traffic
Provides DNS records
Which field in a certificate holds the domain the certificate is valid for?
Issuer
Key Usage
Common Name (CN) or SAN
Signature
How is integrity maintained in TLS transmissions?
Asymmetric keys
SNI extension
Message Authentication Codes (MAC)
Base64 encoding
A MITM attack is suspected on public Wi-Fi. Which protocol protects against this and how?
DNS - encryption
HTTPS - certificate validation & TLS
FTP - passive mode
SMTP - port 25
Which one prevents an attacker from downgrading a TLS connection to a weaker version?
TLS_FALLBACK_SCSV
ALPN
MAC
DNS TTL
You're using a CDN + HTTPS. What's the benefit of certificate pinning?
Prevents fake certs from being accepted
Caches DNS entries
Improves TLS handshake speed
Hides server IP
Your TLS handshake is failing due to unsupported cipher suites. What should you do first?
Increase DNS TTL
Adjust server TLS configuration to include client-supported ciphers
Change domain
Disable SNI
TLS certificates are updated, but old clients still see expired ones. Why?
DNS hasn't propagated
Server-side caching or CDN not purged
Private key mismatch
Key size too small
How does DNS TTL affect blue-green deployment?
Forces email verification
Controls how fast traffic switches between environments
Enables FTP cache
Invalidates certificates
Which combination makes your API endpoint most secure and production-ready?
HTTP + FTP
HTTPS + DNSSEC + mTLS
FTP + POP3
DNS + SSH + TLS 1.0
What is the purpose of the TCP 3-way handshake?
To terminate the connection
To establish a reliable connection
To compress headers
To avoid routing loops
What causes retransmission in TCP?
Timeout or duplicate ACKs
Port mismatch
UDP handshake failure
Header checksum
What TCP mechanism prevents overwhelming a slower receiver?
RTT estimation
Congestion Avoidance
Flow Control (Sliding Window)
SYN flooding
In TCP, a window size of 0 indicates what?
Receiver can't accept data now
Transmission complete
Packet lost
Sender should close connection
TCP sequence numbers are used to:
Encrypt the packet
Ensure ordered delivery
Validate domain names
Address processes
How many steps are involved in TCP connection termination?
2
4
3
1
What flag is set when closing a TCP connection?
URG
FIN
SYN
PSH
TCP congestion control algorithm that starts slow and grows exponentially:
Slow Start
Additive Increase
Fast Recovery
Linear Scaling
Which algorithm kicks in after triple duplicate ACKs in TCP?
Slow Start
Fast Retransmit
Go-Back-N
Checksum
TCP congestion avoidance grows the window size how?
Exponentially
Linearly
Logarithmically
Statically
When TCP detects loss through timeout, it:
Reduces congestion window
Increases window
Sends duplicate ACKs
Ignores
Which value in TCP header helps implement congestion control?
Port number
Congestion Window (cwnd)
Checksum
TTL
If cwnd = 4, and ACKs for all are received, what will cwnd be next in Slow Start?
5
8
6
3
What TCP strategy prevents the sender from flooding the network?
Port blocking
Congestion control
DNS caching
Header compression
Flow control operates between:
Sender and receiver
Switch and router
Application and transport
DNS and HTTP
Which congestion control phase occurs after loss detection?
Recovery
Transmission
Initiation
Discovery
Which transport layer protocol does NOT guarantee delivery?
TCP
UDP
ICMP
HTTP
What is the size of the UDP header?
20 bytes
8 bytes
12 bytes
16 bytes
UDP is preferred over TCP in which scenario?
Bank transaction
Video streaming
File upload
Web login
Which of these is NOT a field in the UDP header?
Source Port
Length
Sequence Number
Checksum
Which application typically uses UDP?
SSH
DNS
HTTPS
SFTP
UDP is called connectionless because:
It requires more time to connect
It does not establish handshakes
It uses ICMP
It maintains sessions
Which of the following is true about UDP?
Reliable, but unordered
Secure
Low overhead
Uses congestion control
VoIP applications prefer UDP because:
Speed matters more than reliability
It uses SSL
TCP consumes less power
DNS is not needed
Which of the following uses UDP by default?
TFTP
Telnet
SSH
FTP
UDP is best for applications that:
Need error correction
Send small amounts of reliable data
Tolerate packet loss and require speed
Require sequencing
Which is better for sending a large image file?
TCP
UDP
ICMP
FTP over UDP
YouTube streaming prefers:
TCP
UDP
SMTP
ICMP
A multiplayer game would use:
TCP
UDP
FTP
HTTP
Which protocol is suitable for sending secure login details?
TCP
UDP
FTP
SMTP
DNS uses UDP because:
Queries are small and need fast response
It avoids handshake
TCP is slow
TCP fails for port 53
Why does TCP use a 3-way handshake instead of 2-way?
Simpler to implement
To prevent half-open connections & replay
Due to encryption
For port scanning
How does TCP detect packet loss?
TTL
Timeout or triple duplicate ACKs
DNS resolution
Port mismatch
In a video call, packets are lost. Why is UDP still used?
Cheaper than TCP
Delay is worse than occasional loss
UDP is more secure
It uses encryption
How would you secure UDP traffic?
You can't
Use TCP fallback
Use DTLS (Datagram TLS)
Use HTTPS
In what case would you choose TCP over UDP in mobile apps?
Voice streaming
Chat messaging with delivery tracking
Video buffering
Gaming
What causes SYN flood attacks in TCP?
Incomplete handshake
Port blocking
UDP retries
DNS poisoning
In a firewall, port 443 is open. What traffic can pass?
FTP
HTTPS (TCP)
DNS
UDP voice
How does NAT affect UDP traffic in VoIP apps?
Improves latency
Encrypts traffic
May block or reroute due to dynamic port mapping
Forces TCP fallback
You want to build a messaging app. Which transport layer protocol would you choose and why?
TCP - reliability and order
UDP - fast response
ICMP - low latency
SMTP - standard protocol
You need to measure UDP vs TCP bandwidth. Which tool should you use?
iperf3
Wireshark
curl
traceroute
