Q.What is protocol in data communication? Explain with an example.
You're viewing a preview — the full solution, concept, methods & PYQ mapping are locked.
Start your 14-day free trial to unlock the full solution →A protocol is a set of rules and conventions that govern how devices communicate over a network, ensuring data is transmitted, received, and understood correctly.
Understanding Protocols
When two people have a conversation, they follow implicit rules: they speak the same language, take turns, confirm understanding, and agree on a topic. Without these conventions, communication breaks down. The same principle applies to computers exchanging data across a network.
A protocol in data communication is a formal set of rules that defines:
- Format: How data is structured (headers, payload, trailers)
- Order: The sequence of messages exchanged
- Actions: What to do when a message is sent or received
- Error handling: How to detect and recover from transmission errors
- Timing: When to send, how long to wait for a response
Protocols exist at every layer of network communication, from the physical transmission of bits to the application-level exchange of web pages or emails.
Key Elements of a Protocol
Every protocol specifies:
- Syntax — the structure and format of data (bit patterns, field sizes)
- Semantics — the meaning of each field and the actions triggered
- Timing — speed matching, sequencing, and timeouts
Without agreement on all three, two devices cannot communicate reliably.
Example: HTTP (HyperText Transfer Protocol)
HTTP is the protocol your browser uses to fetch web pages from a server. It defines exactly how a client requests a resource and how the server responds.
A typical HTTP exchange:
Client request:
GET /index.html HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0
Accept: text/html
Server response:
HTTP/1.1 200 OK
Content-Type: text/html
Content-Length: 1234
<html>
<body>Welcome to Example.com</body>
</html>
What the protocol specifies:
- Format: The request starts with a method (
GET), followed by the resource path, then the protocol version. Headers follow asName: Valuepairs. The response starts with the protocol version, a status code (200), and a reason phrase (OK). - Order: The client always sends the request first; the server responds only after receiving a complete request.
- Actions: A
GETmethod means "retrieve this resource." A200status code means "success; here is the data." …
Unlock everything free for 14 days
- Full step-by-step solutions
- Concept-first explanations
- Methods, shortcuts & mistakes
- PYQ mapping + timed mock tests
Full access for 14 days. No credit card required.