3. Networks

Network Protocols

Network Protocols 🌐

Introduction: Why do networks need rules?

Hello students, imagine a busy school cafeteria where hundreds of students are talking at once. If everyone shouted whenever they wanted, nobody would understand anything. A network is similar: computers, phones, printers, servers, and routers all need a shared set of rules so they can communicate clearly and reliably. Those rules are called network protocols.

A protocol is an agreed method for sending and receiving data. It tells devices how to format messages, when to send them, how to detect errors, and what to do if something goes wrong. Without protocols, the Internet would be chaotic and most communication would fail šŸ“”.

Learning objectives

By the end of this lesson, students, you should be able to:

  • explain the main ideas and terminology behind network protocols,
  • apply IB Computer Science SL reasoning to common protocol examples,
  • connect network protocols to other parts of networks,
  • summarize how protocols support communication, security, and reliability,
  • use real-world examples to show how protocols work.

What is a network protocol?

A network protocol is a set of rules that devices follow to communicate over a network. These rules define what each message means and what each device should do next. In practice, protocols make communication possible between devices made by different companies and running different operating systems.

Think about sending a text message. Your phone does not just throw random bits into the air. It follows rules for connecting to a mobile network, finding the recipient, sending the message, checking that it arrived, and handling failures. That process depends on many protocols working together.

Protocols are usually designed to solve specific communication problems. Some focus on moving data across a network, others on naming devices, checking errors, or protecting information. Many protocols work together as a protocol stack. For example, data may use the Internet Protocol for addressing, the Transmission Control Protocol for reliable delivery, and the Hypertext Transfer Protocol for web pages.

Core ideas and terminology šŸ“˜

To understand protocols, students, it helps to know several key terms.

Standardization

A protocol is useful only if different devices agree to use the same rules. This is why standards matter. Organizations such as the Internet Engineering Task Force (IETF) publish widely used Internet standards. Standardization allows a laptop from one brand and a server from another brand to communicate successfully.

Addressing

A network needs a way to identify the sender and receiver. At the Internet layer, this is usually done with an IP address. An IP address identifies a device on a network, so data can be routed to the correct destination.

Encapsulation

When data moves through a network, each layer adds its own control information. This is called encapsulation. For example, a message may be wrapped with headers that include source and destination addresses, sequence numbers, or protocol information. Each layer adds what it needs and later removes it at the receiving end.

Reliability

Some protocols are designed to make sure data arrives correctly. They may use acknowledgements, retransmission, and sequence numbers. These features are important when sending files, websites, or messages where missing data would cause problems.

Latency and throughput

Latency is the time it takes for data to travel from sender to receiver. Throughput is the amount of data transferred in a given time. Protocols influence both. A reliable protocol may add extra checks, which can increase latency but improve accuracy.

Important protocols in networks

There are many protocols in modern networks, but several are especially important in IB Computer Science SL.

TCP and UDP

Transmission Control Protocol (TCP) provides reliable communication. It checks that data arrives in order and resends lost packets if needed. TCP is often used for web browsing, email, and file transfer because these tasks need accuracy.

User Datagram Protocol (UDP) is faster and simpler than TCP, but it does not guarantee delivery or order. It is useful for live video, voice calls, and online gaming, where speed matters more than perfect delivery. If a small amount of data is lost, the user may not notice.

A useful comparison is a parcel service. TCP is like a delivery company that tracks each parcel, confirms receipt, and resends if necessary. UDP is more like dropping flyers quickly into mailboxes without checking whether each one was received.

IP

The Internet Protocol (IP) is responsible for addressing and routing packets across interconnected networks. IP breaks data into packets and helps routers move those packets toward the correct destination. However, IP by itself does not guarantee that packets arrive in the correct order or even arrive at all. That is why IP is often paired with TCP.

HTTP and HTTPS

Hypertext Transfer Protocol (HTTP) is used for transferring web pages and other web content. When you type a web address, your browser uses HTTP or, more commonly today, HTTPS.

HTTPS is HTTP combined with encryption using Transport Layer Security. The ā€œSā€ stands for secure. It protects data from being read or changed by attackers while it travels across the network. This matters when entering passwords, making online purchases, or logging into school systems šŸ”’.

DNS

The Domain Name System (DNS) translates human-readable names like www.example.com into IP addresses. People remember names more easily than numbers, so DNS makes the Internet easier to use. Without DNS, users would need to memorize the IP address of every website they visit.

SMTP, POP, and IMAP

Email depends on several protocols. Simple Mail Transfer Protocol (SMTP) is used to send email. Post Office Protocol (POP) and Internet Message Access Protocol (IMAP) are used to receive email. These protocols show how different rules can support different parts of the same service.

How protocols work together

Protocols rarely work alone. A single action, such as opening a website, may involve many protocols at once.

Here is a simple example:

  1. You type a domain name into your browser.
  2. DNS finds the IP address for that site.
  3. TCP creates a reliable connection between your device and the server.
  4. HTTP or HTTPS requests the web page.
  5. IP routes the packets across multiple networks.

This layered approach is powerful because each protocol has a clear job. If one part changes, other parts can often stay the same. That is one reason the Internet can grow and support billions of devices.

Example: Online shopping

When students uses an online shopping website, several protocols work behind the scenes. DNS finds the site, HTTPS protects payment details, TCP helps ensure forms and order data arrive correctly, and IP moves packets across the network. If the site is slow, that may be due to high latency, congestion, or a problem in routing. Understanding protocols helps explain what is happening and where a problem might occur.

Protocols, security, and reliability

Protocols are not only about sending data; they also help protect and stabilize communication.

Security

Some protocols include encryption and authentication. Encryption turns readable data into unreadable data for anyone without the correct key. Authentication helps confirm that a device or user is who they claim to be. HTTPS is a strong everyday example because it helps protect websites from interception and tampering.

Error handling

Networks are not perfect. Data can be corrupted by noise, dropped during congestion, or delayed by overloaded devices. Protocols use error detection methods, such as checksums, to find damaged data. Some protocols request retransmission if data is missing or incorrect. This improves reliability, especially for important tasks like document downloads or exam registration systems.

Congestion control

When too much data is sent at once, a network can become congested. Some protocols reduce sending speed when they detect congestion. This helps prevent packet loss and keeps the network more stable for everyone.

Applying IB Computer Science reasoning

In IB Computer Science SL, you may need to explain why a particular protocol is suitable for a task.

For example:

  • Video call: UDP is often suitable because low delay is more important than perfect delivery.
  • File transfer: TCP is suitable because the file must arrive correctly and in order.
  • Website login: HTTPS is suitable because passwords and personal data need encryption.
  • Finding a website: DNS is suitable because users need names translated into IP addresses.

When answering exam questions, students, focus on purpose, features, and advantages. A strong answer does more than name a protocol; it explains why that protocol fits the situation.

Conclusion

Network protocols are the rules that make communication across networks possible. They define how data is formatted, sent, received, checked, and protected. Core protocols such as TCP, UDP, IP, DNS, HTTP, HTTPS, and SMTP each solve different communication problems. Together, they support the Internet, local networks, email, web browsing, and many other services.

For IB Computer Science SL, network protocols are important because they connect the ideas of data transmission, network structures, internet systems, security, and reliability. If you understand what each protocol does and why it is used, you can explain how networks operate in the real world.

Study Notes

  • A protocol is a set of rules for communication between devices.
  • Protocols allow devices from different manufacturers to work together.
  • TCP provides reliable, ordered delivery of data.
  • UDP is faster but does not guarantee delivery or order.
  • IP handles addressing and routing of packets.
  • DNS translates domain names into IP addresses.
  • HTTP transfers web content; HTTPS adds encryption and security.
  • SMTP sends email, while POP and IMAP receive email.
  • Encapsulation means each network layer adds control information.
  • Latency is delay; throughput is the amount of data transferred per time.
  • Protocols improve security through encryption and authentication.
  • Protocols improve reliability through error detection, acknowledgements, and retransmission.
  • Real networks use many protocols together in layers to complete one task.

Practice Quiz

5 questions to test your understanding