Welcome to Networking!

In this chapter, we are going to explore how computers talk to each other. Whether you are sending a WhatsApp message, streaming a movie, or playing an online game, you are using the principles of communication and networking. Don't worry if it seems like a lot of technical terms at first—we will break everything down using simple analogies and clear steps!

By the end of these notes, you’ll understand how data travels across the world and why the Internet doesn't just "break" when millions of people use it at once.

1. Communication Methods

Before computers can share files, they need a way to send bits (1s and 0s) from point A to point B. There are two main ways to do this: Serial and Parallel transmission.

Serial vs. Parallel

  • Serial Transmission: Data is sent one bit at a time over a single wire. Think of this like a single-lane road where cars (bits) follow each other in a line.
  • Parallel Transmission: Multiple bits are sent simultaneously over several wires. Think of this like an 8-lane highway where 8 cars can travel side-by-side.

Real-World Example: Your USB (Universal Serial Bus) cable uses serial transmission. Old printers used big, chunky "Parallel" cables.

Why is Serial usually better? You might think Parallel is faster because it sends more at once, but it has problems over long distances:
1. Skew: Bits might arrive at slightly different times because the wires aren't perfectly identical.
2. Crosstalk: Magnetic interference between wires bundled together can corrupt data.
Serial is cheaper, more reliable, and can actually reach higher speeds today!

Synchronous vs. Asynchronous

  • Synchronous: Data is sent in a steady stream timed to a system clock. Both the sender and receiver are "in sync."
  • Asynchronous: Data is sent when it's ready. To make sure the receiver knows when data starts and ends, we use Start and Stop bits.

Quick Review:
Start Bit: Alerts the receiver that a byte is coming.
Stop Bit: Signals the end of the byte so the receiver can prepare for the next one.

Key Takeaway

Serial is the "go-to" for modern communication because it avoids skew and crosstalk. Asynchronous transmission uses start/stop bits to manage data flow without a shared clock.

2. Communication Basics: The "Speed" of Data

We often talk about "fast internet," but in Computer Science, we need to be more specific. There are several terms you must know:

  • Baud Rate: The number of times the signal (electrical state) changes per second.
  • Bit Rate: The number of bits (1s and 0s) transmitted per second.
  • Bandwidth: The maximum capacity of a communication channel (how much data could it carry?).
  • Latency: The time delay between a request and a response (the "lag").
  • Protocol: A set of rules that allow two devices to communicate.

The Math Trick:
Bit rate can be higher than baud rate! If one signal change can represent 2 bits (e.g., using different voltage levels), then:
\( \text{Bit Rate} = \text{Baud Rate} \times \text{Number of bits per signal change} \)

Analogy: Imagine a person waving flags. Each wave is a Baud. If the person holds two different colored flags in each hand to mean different things, they are sending more "bits" per wave.

Important Relationship: Bit rate is directly proportionate to bandwidth. If you increase the bandwidth, you can increase the bit rate.

Key Takeaway

Speed isn't just one number. It’s a mix of how often the signal changes (Baud), how many bits move (Bit Rate), and the delay (Latency).

3. Network Topologies

A "topology" is just a fancy word for the layout or structure of a network.

Physical Star vs. Logical Bus

  • Physical Star Topology: Every device is connected to a central switch or hub. If one cable breaks, only that computer is affected.
  • Logical Bus Topology: Even if the wires look like a star, the network behaves like a bus. This means data is broadcast to everyone on the network simultaneously using a specific protocol.

Did you know? Most modern office networks are physically a Star (because it's easier to manage) but can be configured to act Logically as a bus!

Network Types: Client-Server vs. Peer-to-Peer

  • Client-Server: A central Server provides services (like files or emails) to Clients (the computers you use). The server is the "boss."
  • Peer-to-Peer (P2P): Every computer has equal status. There is no central boss. Computers share files directly with each other.
Key Takeaway

Star networks are reliable because they have a central point. Client-server is great for central control, while Peer-to-Peer is great for quick, equal sharing.

4. Wireless Networking (WiFi)

WiFi allows devices to connect without cables. To make this work, you need two things:
1. A Wireless Network Adapter in your device.
2. A Wireless Access Point (WAP) to receive the signals.

Staying Secure

Wireless signals travel through walls, so anyone nearby could "listen in." We secure them using:
1. WPA/WPA2: Strong encryption for your data.
2. SSID Broadcast: Disabling this hides the network name.
3. MAC Address Filtering: Only allowing specific "hardware IDs" to connect.

How WiFi handles "Traffic Jams" (CSMA/CA)

If two devices talk at the exact same time, the signals crash (a collision). WiFi uses Carrier Sense Multiple Access with Collision Avoidance (CSMA/CA).
1. The device listens to see if the channel is idle.
2. If busy, it waits a random amount of time and tries again.
3. RTS/CTS (Optional): The sender sends a "Request to Send" and waits for a "Clear to Send" from the Access Point. This prevents the "Hidden Node" problem where two devices can't see each other but both see the Access Point.

Key Takeaway

WiFi is convenient but needs encryption (WPA2). It uses CSMA/CA to make sure devices take turns talking so data doesn't crash.

5. The Internet and How It Works

The Internet is a network of networks. It uses Packet Switching to move data efficiently.

What's in a Packet?

When you send a file, it is chopped into small chunks called packets. Each packet contains:
1. Header: Contains the sender and receiver IP addresses, packet number, and Protocol.
2. Payload: The actual data (part of your photo or message).
3. Trailer: Contains error-checking data (like a checksum).

Routers and Gateways

  • Router: A device that looks at the IP address on a packet and sends it toward its destination.
  • Gateway: Used when two networks use different protocols. It "translates" the data so it can pass through.

The Phonebook of the Internet (DNS)

Computers use IP Addresses (like 192.168.1.1), but humans prefer Domain Names (like google.com).
The Domain Name System (DNS) is like a giant phonebook that looks up the IP address for any URL you type in.

Quick Review Box:
FQDN: Fully Qualified Domain Name (e.g., www.example.com).
IP Address: A unique numerical label for each device on a network.

Key Takeaway

Packet switching makes the internet reliable. Routers move packets, and DNS translates names into numbers.

6. The TCP/IP Stack

To keep things organized, networking is split into 4 layers. Think of this like the steps of sending a physical letter.

Mnemonic: All Taxis Need Lights

  1. Application Layer: Where the protocols like HTTP, FTP, and SMTP live. This is what your browser uses.
  2. Transport Layer: Uses TCP to split data into packets and handle error checking. It uses Port Numbers to find the right application (e.g., Port 80 for web).
  3. Network Layer: Uses IP to add the sender and receiver IP addresses. It routes the packets across the internet.
  4. Link Layer: The physical hardware (cables, NIC). It uses MAC Addresses to move data between devices on the same local network.

Important Term: A Socket is the combination of an IP Address and a Port Number (e.g., 192.168.1.1:80). It defines a specific path to a specific app.

Key Takeaway

The 4-layer stack ensures that each part of the communication process has a specific job, making the system flexible and organized.

7. Standard Protocols to Memorize

AQA wants you to know these specific ones:

  • HTTP/HTTPS: For web pages (S stands for Secure/Encrypted).
  • FTP: For transferring files between a client and a server.
  • POP3: For retrieving emails (it deletes them from the server once downloaded).
  • SMTP: For sending emails.
  • SSH: For Remote Management. It allows you to log into another computer securely over a network.
Key Takeaway

Each protocol has a single job. If you are sending mail, use SMTP. If you are browsing the web securely, use HTTPS.

8. IP Addresses: v4 vs v6

IPv4: Uses 32-bit addresses (e.g., 192.168.0.1). We ran out of these because there are too many devices in the world!
IPv6: Uses 128-bit addresses. This provides trillions of trillions of new addresses.

Private IP and NAT

Most devices in your house have a Private (non-routable) IP. These cannot be seen from the internet.
Your router has a Public (routable) IP.
Network Address Translation (NAT): Your router translates your private IP to its public IP so you can use the internet. This saves IP addresses and adds security.

Quick Review:
DHCP: Automatically assigns an IP address to your device when you join a network.
Port Forwarding: Tells the router to send internet traffic for a specific port to a specific device on your private network (useful for gaming servers!).

Key Takeaway

IPv6 solved the "address shortage." NAT allows many devices to share one public IP address.

9. Web Applications (CRUD and REST)

When you use a web app (like Instagram), you are performing CRUD operations:

  • Create (POST)
  • Retrieve (GET)
  • Update (PUT)
  • Delete (DELETE)

REST is a way of designing APIs so that programmers can use these standard HTTP methods to talk to a database. Usually, data is sent in JSON format because it is compact and easy for humans to read compared to XML.

Key Takeaway

CRUD is the logic (what you want to do), and REST is the style (how you do it using the web).

Don't worry if this seems tricky at first! Networking is like a puzzle—once you see how the layers and protocols fit together, the whole "picture" of the Internet starts to make sense.