Cambridge AS & A Level9608

Communication and networking

Computer Science 9608 Chapter Notes

What this chapter covers

Communication and networking
ShareWhatsAppPost
Communication and networking notes

Unable to load PDF

The notes viewer could not load. Please refresh the page.

Read online free. Download a watermarked copy with a free account.

Read the notes

The full Communication and networking notes as text: skim, search, and jump between subtopics.

~18 min read

1. Network Topologies and LAN Hardware

A network topology is the arrangement of computers and devices on a network. Two common topologies for Local Area Networks (LANs) are bus and star. A bus topology connects all devices to a single central cable, called the bus or backbone. Data sent by one device travels along the bus and is seen by all other devices. A star topology connects every device to a central hub or switch. If a device sends data, it goes to the central device which then forwards it to the destination. To build a LAN, you need specific hardware. A Network Interface Card (NIC) is installed in each computer to provide a physical connection to the network. Devices are connected using cables (like twisted-pair Ethernet cables) or wirelessly. A hub is a simple central device for a star network that broadcasts any incoming data to all connected devices. A switch is a more intelligent device that learns the addresses of connected devices and sends data only to the intended recipient, improving efficiency and reducing traffic.

Key term

Topology: The physical or logical arrangement of nodes and connections within a network.

Examiner insight

Examiners reward clear, well-labelled diagrams for topologies. For a star topology, ensure you show a central device, and for a bus, show a single backbone cable with terminators.

Common pitfall

Confusing a hub with a switch. A hub broadcasts data to all devices, creating unnecessary traffic, whereas a switch intelligently sends it only to the intended recipient.

Fun fact

The 'bus' in bus topology is named after the electrical buses used inside computers to connect components, which also function as a shared communication pathway.

Worked example 14 marks

A small office with 5 computers is setting up a new LAN. Draw a diagram for a star topology and a bus topology that could be used. Label the key components.

  1. 1

    Star Topology Diagram: Draw a central box labelled 'Switch'. Draw 5 smaller boxes labelled 'Computer'. Draw a straight line from each computer to the central switch.

  2. 2

    Bus Topology Diagram: Draw a single horizontal line labelled 'Backbone Cable'. Draw a small vertical line at each end of the backbone, labelled 'Terminator'. Draw 5 smaller boxes labelled 'Computer' and connect each one to the backbone with a short line.

Worked example 23 marks

A school is upgrading its network from using hubs to using switches in its star topology. Explain one advantage of this change.

  1. 1

    A switch is more intelligent than a hub. It keeps a table of the unique MAC addresses of the devices connected to each of its ports.

  2. 2

    When a data frame arrives, the switch reads the destination MAC address and forwards the frame only to the port connected to the destination device.

  3. 3

    This reduces unnecessary network traffic (collisions) compared to a hub, which broadcasts the frame to all devices, leading to improved network performance and speed.

Recap

  • A network topology describes the layout of a network.
  • Bus topology uses a single backbone cable with terminators at each end.
  • Star topology connects all devices to a central device, like a hub or a switch.
  • A Network Interface Card (NIC) allows a computer to connect to a network.
  • A switch is more efficient than a hub because it sends data only to the intended device.

Quick check

  1. What is the function of a terminator in a bus topology?1 mark
  2. State the key difference between a hub and a switch.2 marks

2. Circuit Switching vs. Packet Switching

There are two fundamental methods for sending data across a network: circuit switching and packet switching. In circuit switching, a dedicated, end-to-end communication path is established between two devices for the duration of the conversation. This is like booking a private road from your house to a friend's; no one else can use it while you are. The traditional telephone system is a classic example. In contrast, packet switching breaks a message down into smaller, manageable blocks called packets. Each packet is given a header containing the destination address and a sequence number. These packets are then sent independently across the network. They can take different routes to the destination and may arrive out of order. The receiving device uses the sequence numbers to reassemble the original message. The internet is built on packet switching, which is highly efficient as it allows multiple users to share the same network resources.

Key term

Packet Switching: A method of grouping data into packets that are transmitted over a digital network, where each packet can take a different path to the destination.

Examiner insight

Students who can clearly contrast the two methods, mentioning dedicated paths (circuit) versus independent routing over shared paths (packet), score highly.

Common pitfall

Assuming that in packet switching, all packets from a single message will arrive in the correct order. They can arrive out of order and must be reassembled by the receiving device.

Fun fact

Packet switching was co-invented in the 1960s to create a communication network that could survive a nuclear attack. If one part of the network was destroyed, data could simply be routed around it.

Worked example 13 marks

A video streaming service uses the internet to deliver movies. Explain why packet switching is more suitable for this than circuit switching.

  1. 1

    Packet switching is more efficient for 'bursty' data like video streaming, as network resources (bandwidth) are only used when packets are actually being sent. A dedicated circuit would be wasteful during pauses.

  2. 2

    It is more resilient. If one path becomes congested or fails, packets can be dynamically rerouted through other paths, ensuring the stream continues.

  3. 3

    It allows the network to be shared by many users simultaneously, making it a more cost-effective way for the service to reach a large audience compared to establishing a dedicated circuit for every viewer.

Worked example 23 marks

Describe what happens when a connection is made using circuit switching.

  1. 1

    Step 1 (Connection Setup): A dedicated path or 'circuit' is established from the sender to the receiver through various switches in the network. Resources (e.g., bandwidth) are reserved along this path.

  2. 2

    Step 2 (Data Transfer): Data is transmitted along this dedicated, exclusive path.

  3. 3

    Step 3 (Connection Teardown): Once the communication is complete, the circuit is terminated, and the reserved resources are released for others to use.

Recap

  • Circuit switching establishes a dedicated, temporary connection for communication.
  • Packet switching breaks data into packets that are sent independently over shared network paths.
  • The internet is a packet-switched network.
  • Packets contain header information, including the destination address and sequence number.
  • Packet switching is more efficient and robust for most modern data communication.

Quick check

  1. Give one example of a service that traditionally used circuit switching.1 mark
  2. What two key pieces of information must a data packet contain?2 marks

3. Protocols and the TCP/IP Stack

A protocol is a set of rules that governs how data is transmitted and received between devices. Without protocols, communication would be chaotic, like two people trying to talk without a shared language. To manage the complexity of network communication, protocols are organised into a 'stack' or 'suite' of layers. The most common model for the internet is the TCP/IP suite, which has four layers.

  1. Application Layer: This is the top layer, where user-facing applications operate. Protocols here include HTTP (for web browsing) and SMTP (for email).
  2. Transport Layer: This layer ensures data is delivered reliably and in the correct order. It breaks large messages into smaller segments. The two main protocols are TCP (Transmission Control Protocol), which is reliable and connection-oriented, and UDP (User Datagram Protocol), which is faster but less reliable.
  3. Network Layer (or Internet Layer): This layer is responsible for addressing and routing packets across the network from the source to the destination. Its main protocol is IP (Internet Protocol), which uses IP addresses.
  4. Link Layer (or Network Interface Layer): This is the lowest layer, responsible for the physical transmission of data over the network medium (e.g., Ethernet cable, Wi-Fi). It deals with physical addresses (MAC addresses).

Key term

Protocol: A set of rules or procedures that govern the transmission of data between two or more devices in a network.

Examiner insight

Clearly linking each TCP/IP layer to its primary function and a key protocol (e.g., Network layer to IP addressing and routing) is key to getting full marks.

Common pitfall

Mixing up the layers or their functions, for example, placing IP addressing in the Transport layer instead of the Network layer.

Worked example 18 marks

Explain the function of each of the four layers of the TCP/IP protocol suite.

  1. 1

    Application Layer: Provides network services to user applications. It defines protocols for specific tasks, like HTTP for web browsing or FTP for file transfer.

  2. 2

    Transport Layer: Provides host-to-host communication. It is responsible for reliability, flow control, and error correction. It uses protocols like TCP (reliable) or UDP (unreliable).

  3. 3

    Network Layer: Responsible for logical addressing (IP addresses) and routing packets across multiple networks from source to destination.

  4. 4

    Link Layer: Responsible for the physical transmission of data. It handles how data is placed onto the physical network medium and deals with physical (MAC) addressing.

Recap

  • Protocols are essential rules for network communication.
  • The TCP/IP model organises protocols into four layers: Application, Transport, Network, and Link.
  • The Application Layer interacts with user software.
  • The Transport Layer (TCP/UDP) manages the connection and data flow.
  • The Network Layer (IP) handles addressing and routing between networks.
  • The Link Layer (Ethernet) manages physical transmission on the local network.

Quick check

  1. Which layer of the TCP/IP model is responsible for routing packets across the internet?1 mark
  2. Name the two main protocols at the Transport Layer.2 marks

4. Common Application Layer Protocols

The Application Layer of the TCP/IP stack contains the protocols that we interact with most directly. They provide the rules for specific internet services.

  • HTTP (Hypertext Transfer Protocol): The foundation of the World Wide Web. When you enter a URL in your browser, it uses HTTP to send a request to the web server and receive the webpage files (HTML, CSS, images) in response.
  • FTP (File Transfer Protocol): A protocol designed specifically for transferring files between computers over a network. It can be used to upload files to a server or download them from it. It often requires a username and password for authentication.
  • SMTP (Simple Mail Transfer Protocol): The standard protocol for sending email. When you click 'send' on an email, your email client uses SMTP to push the message to your mail server, which then uses SMTP to forward it to the recipient's mail server.
  • POP3 (Post Office Protocol version 3): A protocol used for retrieving email. When your email client checks for new mail, it can use POP3 to connect to the mail server and download messages to your computer. Once downloaded, the messages are typically deleted from the server.

Key term

HTTP (Hypertext Transfer Protocol): The protocol used for transmitting hypermedia documents, such as HTML, which forms the foundation of data communication for the World Wide Web.

Examiner insight

For questions about email, examiners look for the crucial distinction between the sending protocol (SMTP) and receiving protocols (POP3/IMAP).

Common pitfall

Stating that POP3 is used for sending emails. Remember: SMTP sends, while POP3 (or IMAP) retrieves.

Worked example 14 marks

A user sends an email with a photo attachment to a friend. Identify and describe the roles of two application layer protocols involved in this process.

  1. 1

    Protocol 1: SMTP (Simple Mail Transfer Protocol). This protocol is used to send the email. The user's email client uses SMTP to transfer the email message and its attachment to their outgoing mail server.

  2. 2

    Protocol 2: POP3 (Post Office Protocol 3) or IMAP. This protocol is used by the recipient to retrieve the email. The friend's email client will use POP3 to connect to their incoming mail server and download the message and attachment.

Recap

  • HTTP is the protocol for accessing websites on the World Wide Web.
  • FTP is a protocol specifically for transferring files.
  • SMTP is the standard protocol for sending emails.
  • POP3 is a common protocol for retrieving emails from a server.
  • These protocols all operate at the Application Layer of the TCP/IP stack.

Quick check

  1. Which protocol would your browser use to request a webpage from a server?1 mark
  2. Which protocol sends email, and which protocol can be used to receive it?2 marks

5. Ethernet, MAC Addresses, and CSMA/CD

Ethernet is the dominant technology for wired Local Area Networks (LANs), operating at the Link Layer of the TCP/IP stack. Every device that can connect to a network has a Network Interface Card (NIC) with a unique, built-in address called a MAC (Media Access Control) address. This is a 48-bit hexadecimal number that is permanent and globally unique, like a device's fingerprint. On a local network, switches use MAC addresses to forward data frames to the correct device. In older or simpler networks that used a shared medium (like a bus topology or a hub), a method was needed to manage how devices shared the cable without their transmissions colliding. This method is CSMA/CD (Carrier Sense Multiple Access with Collision Detection). The process is:

  1. Carrier Sense: Listen to the network cable to check if it's busy. If it's clear, proceed. If not, wait.
  2. Multiple Access: All devices on the network have permission to transmit.
  3. Collision Detection: While transmitting, listen to see if another device started transmitting at the same time, causing a 'collision'. If a collision is detected, both devices stop transmitting, wait for a random, short period, and then go back to step 1.

Key term

MAC Address: A unique identifier assigned to a network interface controller (NIC) for use as a network address in communications within a network segment.

Examiner insight

A clear, step-by-step description of the CSMA/CD process is often required. Use the full name first, then the acronym.

Common pitfall

Confusing a MAC address with an IP address. MAC is physical, permanent, and used for local communication; IP is logical, can be temporary, and is used for routing across the internet.

Worked example 14 marks

Describe the CSMA/CD method and explain its use in a network.

  1. 1

    CSMA/CD stands for Carrier Sense Multiple Access with Collision Detection. It is a protocol used to control access to a shared transmission medium in a network like Ethernet.

  2. 2

    Carrier Sense: A device first listens to the network to check if any other device is currently transmitting. If the channel is free, it starts sending its data.

  3. 3

    Multiple Access: Multiple devices are on the same shared network and have equal access to transmit.

  4. 4

    Collision Detection: If two devices transmit simultaneously, a collision occurs. The devices detect this collision, immediately stop transmitting, and send a jam signal. They then each wait for a random period of time before attempting to transmit again, reducing the chance of another immediate collision.

Worked example 24 marks

Explain the difference between a MAC address and an IP address.

  1. 1

    A MAC address is a physical, permanent address burned into the NIC at the factory. An IP address is a logical address assigned to a device by network software, which can be temporary (dynamic).

  2. 2

    A MAC address is used for communication within a local network segment (Link Layer). An IP address is used for routing packets across different networks on the internet (Network Layer).

Recap

  • Ethernet is a standard Link Layer protocol for wired LANs.
  • Every network device has a unique, physical MAC address.
  • Switches use MAC addresses to direct traffic efficiently on a local network.
  • CSMA/CD is a protocol for managing access on a shared network medium.
  • In CSMA/CD, devices listen before talking and have a procedure to recover from collisions.

Quick check

  1. What does the 'CS' part of CSMA/CD stand for?1 mark
  2. Is a MAC address a physical or logical address?1 mark

6. Peer-to-Peer (P2P) File Sharing

Most internet activity uses a client-server model, where a central server holds data and multiple clients request it. Peer-to-Peer (P2P) networking offers an alternative. In a P2P network, each computer, or 'peer', can act as both a client (requesting data) and a server (providing data). The BitTorrent protocol is a popular example of P2P used for sharing large files. Here's how it works: A large file is broken into many small pieces. A central server, called a 'tracker', doesn't hold the file itself but keeps a list of which peers have which pieces. When you want to download the file, your BitTorrent client contacts the tracker to get a list of peers. Your client then downloads different pieces of the file from many different peers simultaneously. At the same time, your client uploads the pieces you already have to other peers who need them. This distributed approach is highly efficient for large files, as the download speed is not limited by a single server's bandwidth.

Key term

Peer-to-Peer (P2P): A distributed network architecture in which individual nodes (peers) connect and share resources directly with each other without the need for a central server for data transfer.

Examiner insight

Answers that highlight the decentralized nature of data transfer in BitTorrent (downloading from multiple sources at once) and the simultaneous uploading demonstrate a strong understanding.

Common pitfall

Thinking that BitTorrent is completely serverless. While the file transfer itself is peer-to-peer, it usually relies on a central 'tracker' server to coordinate the peers.

Fun fact

Many large tech companies, like Facebook and Twitter, use BitTorrent internally to distribute code and updates to their thousands of servers quickly and efficiently.

Worked example 14 marks

A user wants to download a large open-source software installation file. Explain how using the BitTorrent protocol can be more efficient than downloading it from a single web server.

  1. 1

    In a traditional download, the user's speed is limited by the bandwidth of the single server and the number of other people downloading from it.

  2. 2

    With BitTorrent, the file is split into pieces. The user downloads these pieces from multiple other users (peers) simultaneously.

  3. 3

    This combines the upload bandwidth of many sources, often resulting in a much faster overall download speed.

  4. 4

    As the user downloads pieces, they also upload them to others, which helps distribute the file and reduces the load on any single source.

Recap

  • P2P networks allow connected computers (peers) to share resources directly.
  • The BitTorrent protocol is a popular method for P2P file sharing.
  • In BitTorrent, a file is split into pieces, which are downloaded from multiple peers at once.
  • A 'tracker' server helps peers find each other but does not store the file.
  • Peers simultaneously download pieces they need and upload pieces they have.

Quick check

  1. In a P2P network, can a computer be both a client and a server?1 mark
  2. What is the role of a tracker in the BitTorrent protocol?1 mark

7. Wireless Networking and Security

Wireless networking allows devices to connect and communicate using radio waves instead of physical cables. The most common technology for wireless LANs is Wi-Fi. A typical setup involves a Wireless Access Point (WAP), which broadcasts a radio signal. Devices like laptops and smartphones with wireless NICs can connect to the WAP, which in turn is usually connected to a wired network and the internet. Advantages: Mobility and convenience (no cables), easy to add new devices. Disadvantages: Generally slower and less reliable than wired connections, susceptible to interference from other devices, and poses greater security risks as the signal can be intercepted by anyone in range. To manage access, Wi-Fi uses CSMA/CA (Carrier Sense Multiple Access with Collision Avoidance). Unlike wired Ethernet where collisions can be detected, it's difficult in radio. So, CSMA/CA tries to avoid collisions in the first place, often by having a device send a short 'request to send' signal before transmitting its data. Security is vital. WPA2 (Wi-Fi Protected Access 2) and the newer WPA3 are security protocols that encrypt the data sent over the air, preventing eavesdropping. Using a strong password is essential.

Key term

Wireless Access Point (WAP): A networking hardware device that allows other Wi-Fi devices to connect to a wired network.

Examiner insight

When comparing wired and wireless networks, examiners expect balanced answers that cover aspects like security, speed, reliability, and convenience.

Common pitfall

Confusing CSMA/CD (used in older wired Ethernet) with CSMA/CA (used in wireless networks). The 'A' for Avoidance is key, as detecting collisions is difficult in a wireless environment.

Worked example 12 marks

A coffee shop wants to offer internet access to its customers. Identify one advantage and one disadvantage of providing a wireless network compared to a wired one in this scenario.

  1. 1

    Advantage: Convenience. Customers can easily connect their various devices (laptops, phones, tablets) without needing physical cables or ports at every table.

  2. 2

    Disadvantage: Security risk. The network is open to anyone in range, which could allow malicious users to eavesdrop on unencrypted traffic or attempt to gain access to other users' devices if the network is not properly secured.

Worked example 23 marks

Explain why wireless networks use CSMA/CA instead of CSMA/CD.

  1. 1

    CSMA/CD (Collision Detection) relies on a station being able to listen while it sends, to detect if its signal is corrupted by another transmission.

  2. 2

    In a wireless environment, a station's own powerful transmission can drown out the much weaker incoming signals from other stations, making it impossible to reliably detect a collision while it is happening (this is known as the 'hidden node problem').

  3. 3

    Therefore, wireless networks use CSMA/CA (Collision Avoidance), which is a proactive approach. It uses mechanisms like 'Request to Send/Clear to Send' to reserve the channel before transmitting, reducing the chance of collisions occurring in the first place.

Recap

  • Wireless networks like Wi-Fi use radio waves to connect devices.
  • A Wireless Access Point (WAP) connects a wireless network to a wired network.
  • Advantages include mobility, while disadvantages include security risks and potential interference.
  • Wi-Fi uses CSMA/CA (Collision Avoidance) to manage access to the airwaves.
  • WPA2 and WPA3 are essential security protocols that encrypt wireless traffic.

Quick check

  1. What device connects a wireless LAN to a wired LAN?1 mark
  2. State one security measure you should use on a home Wi-Fi network.1 mark

End-of-chapter exercise

Test yourself on the whole chapter. Work through these before moving on.

  1. Define the terms 'protocol' and 'packet' in the context of computer networking.2 marks
  2. Draw a diagram of a star network topology with 5 nodes and label the central device.2 marks
  3. Compare and contrast circuit switching and packet switching, giving a suitable application for each.4 marks
  4. Explain the role of a router in a packet-switched network.3 marks
  5. A user types a web address into their browser and presses Enter. Describe the roles of DNS and HTTP in the process of displaying the webpage.4 marks
  6. Describe the function of the Transport Layer and the Network Layer in the TCP/IP protocol suite.4 marks
  7. An office uses a wired Ethernet LAN with a shared bus topology. Describe the process of CSMA/CD that allows multiple computers to share the network medium while managing collisions.5 marks
  8. Explain why a MAC address and an IP address are both needed for a computer to communicate on the internet. In your answer, you should refer to the layers of the TCP/IP stack.6 marks
  9. A company is concerned about the security of its new wireless network. Describe two distinct security risks associated with wireless networks and suggest a measure to mitigate each risk.4 marks
  10. Compare the client-server model of file access (e.g., using FTP) with the peer-to-peer model (e.g., using BitTorrent). Discuss one advantage and one disadvantage of each model for distributing a large, popular file.6 marks

Go deeper

Practise and revise with member-only material for this chapter.

Free notes are just the start.

Unlock every Workbook and Chapter at a Glance, and generate your own worksheets and predicted papers.

Explore plans

Related chapters