Skip to main content
CBE Nexus · Undergraduate Computer Science

Chapter 8: Computer Networks and Data Communications

University computer networking notes covering network models, Ethernet, IP addressing and subnetting, routing, TCP and UDP, DNS, HTTP, wireless networking, security and performance.

Back to Computer Science course guide

Chapter overview and learning outcomes

This chapter develops the conceptual and practical foundations of computer networks and data communications. It connects theory with real systems, technical decision-making and responsible computing practice.

1. Network fundamentals and topologies

A computer network connects devices to exchange data and share services. Networks may be classified by geographic scope, ownership and purpose, including personal, local, metropolitan and wide area networks. Common topologies include star, bus, ring, mesh and tree. Topology affects fault tolerance, cost, scalability and traffic patterns. Network design begins with application requirements, number of users, performance targets, security boundaries and available infrastructure.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

2. Layered models: OSI and TCP/IP

Layering divides communication into functions with defined interfaces. The OSI reference model describes physical, data-link, network, transport, session, presentation and application layers. The TCP/IP model groups practical internet functions into link, internet, transport and application layers. Encapsulation adds headers as data moves down the stack; decapsulation removes them at the receiver. Layering supports interoperability, troubleshooting and independent protocol development, although real implementations do not always map perfectly to textbook boundaries.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

3. Signals, transmission media and data encoding

Data travel as electrical, optical or radio signals. Guided media include twisted-pair copper, coaxial cable and fibre-optic cable; unguided media include radio and microwave transmission. Bandwidth describes a channel's capacity, while throughput is the achieved data rate. Attenuation, interference, noise and propagation delay affect communication. Encoding and modulation map information onto signals. Engineers consider distance, environment, reliability, security and cost when selecting media.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

4. Data-link layer, Ethernet and switching

The data-link layer transfers frames across a local link and may provide addressing, error detection and media access control. Ethernet is widely used in wired local networks. MAC addresses identify interfaces at the link layer within relevant network contexts. Switches learn source addresses and forward frames toward destination ports. VLANs logically separate broadcast domains, improving organisation and containment when correctly configured. Frame checks detect some transmission errors but do not guarantee end-to-end reliability.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

5. IPv4, IPv6 and addressing

The internet protocol provides logical addressing and packet forwarding between networks. IPv4 uses 32-bit addresses, commonly written in dotted-decimal form; IPv6 uses 128-bit addresses and a hexadecimal notation. A prefix identifies the network portion of an address. Private IPv4 ranges are used inside networks and commonly translated at network boundaries. IPv6 provides a vastly larger address space and supports modern autoconfiguration and neighbour discovery mechanisms.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

6. Subnetting and network planning

Subnetting divides an address block into smaller logical networks. A prefix length indicates how many leading bits identify the network. For IPv4, the remaining host bits determine the address capacity, subject to network and broadcast conventions for ordinary subnets. Subnet design should account for current hosts, growth, routing boundaries and security zones. Document address plans and avoid overlapping allocations. Practice converting prefix lengths, masks, network addresses and host ranges carefully.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

7. Routing and internetworking

Routers forward packets between IP networks using routing tables. Routes may be statically configured or learned through routing protocols. Metrics can include hop count, bandwidth, delay or policy. Interior gateway protocols exchange information within an autonomous system; BGP supports inter-domain routing between autonomous systems. Routing loops, asymmetric paths, congestion and incorrect announcements can affect connectivity. Redundancy and route monitoring improve resilience but require careful design.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

8. Transport protocols: TCP and UDP

The transport layer provides communication between application processes. TCP offers a connection-oriented byte stream with sequencing, acknowledgements, retransmission and congestion control. UDP provides datagrams with lower protocol overhead but does not itself guarantee delivery, ordering or retransmission. Applications choose based on reliability, latency and traffic requirements. Port numbers help identify services and application endpoints. Security-sensitive applications must also protect data integrity and confidentiality.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

9. Application protocols: DNS, HTTP and email

DNS translates domain names into records such as addresses and mail exchangers using a distributed hierarchy and caching. HTTP defines request-response communication for web resources; HTTPS protects HTTP using TLS. Email commonly uses SMTP for message transfer and IMAP or POP3 for retrieval. Application protocols define message formats, methods, status codes and expected behaviour. Misconfiguration, weak authentication and unsafe content handling can expose services to attack.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

10. Wireless and mobile networks

Wireless local networks use radio channels and standards such as Wi-Fi; cellular systems provide wide-area mobile connectivity. Radio performance depends on frequency, channel width, interference, obstacles, antenna placement and client density. Encryption and authentication protect access, while guest networks and segmentation reduce exposure. Roaming, handover and shared-medium contention affect user experience. Site surveys and monitoring help identify coverage gaps and interference.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

11. Network security, monitoring and performance

Network security uses segmentation, firewalls, secure protocols, authentication, access control, patching, intrusion detection and incident response. Threats include spoofing, eavesdropping, denial of service, malware and misconfiguration. Performance analysis distinguishes bandwidth, throughput, latency, jitter, packet loss and availability. Tools such as packet captures, logs and interface counters support diagnosis, but capture only authorised traffic and protect sensitive traces. Resilience requires tested backups and recovery procedures.

Applied example: Consider a realistic university, business or public-service information system. Identify the users, inputs, outputs, constraints and failure conditions. Trace the relevant operation from beginning to end, record what the system should guarantee, and explain how the design can be tested. Compare a reasonable alternative and discuss trade-offs in performance, reliability, security, cost and maintainability.

Learning activity: Create a labelled diagram or small worked example, explain the terminology in your own words, and prepare one test question that checks application rather than simple recall.

Figure 1. Encapsulation across layers
Application message→Transport segment or datagram→IP packet→Link-layer frame→Physical signal

Conceptual learning diagram. Interpret each stage in the context of the chapter topic.

Figure 2. Packet forwarding
Source host creates IP packet→Router checks destination prefix→Routing table selects next hop→Packet forwarded toward destination

Conceptual learning diagram. Interpret each stage in the context of the chapter topic.

Figure 3. TCP connection overview
Connection establishment→Ordered data transfer→Acknowledgement and retransmission→Connection termination

Conceptual learning diagram. Interpret each stage in the context of the chapter topic.

Practical laboratory activity

  1. Choose a small scenario related to the chapter and write a clear problem statement.
  2. Identify assumptions, inputs, outputs, constraints and expected behaviour.
  3. Draw a model, flow diagram, schema or sequence of operations.
  4. Use an appropriate programming language, database, simulator or network tool where relevant.
  5. Test normal, boundary and failure cases; record observations and explain discrepancies.
  6. Submit a concise report with methods, results, limitations and recommendations.

Use authorised software, sample data and test environments. Do not access systems or information without permission.

Worked reasoning and self-assessment

Begin by defining the problem and its constraints. Work through a small example manually before relying on a tool. State the expected result, show intermediate steps and verify the outcome independently. For system-design questions, justify the selected approach and discuss at least one alternative. For performance questions, identify the workload and metric being measured. For security questions, describe the threat, the control and the residual risk.

Examination and revision questions

Answer each question with precise definitions, diagrams, calculations or technical examples where appropriate.

  1. What is a computer network?

    Show answer guidance

    A set of connected devices that exchange data and share services.

  2. What is encapsulation?

    Show answer guidance

    Adding protocol information as data moves through communication layers.

  3. Name the seven OSI layers.

    Show answer guidance

    Physical, data-link, network, transport, session, presentation and application.

  4. What does an IP address identify?

    Show answer guidance

    A logical network-layer address used to identify an interface for packet delivery.

  5. What is subnetting?

    Show answer guidance

    Dividing an IP address block into smaller network prefixes.

  6. Differentiate a switch and router.

    Show answer guidance

    A switch forwards frames within a link-layer network; a router forwards packets between IP networks.

  7. What is DNS?

    Show answer guidance

    A distributed naming system that maps domain names to records such as IP addresses.

  8. Differentiate TCP and UDP.

    Show answer guidance

    TCP provides a reliable ordered byte stream; UDP provides datagrams without built-in delivery guarantees.

  9. What is a port number?

    Show answer guidance

    A transport-layer identifier used to direct traffic to an application endpoint.

  10. What is HTTPS?

    Show answer guidance

    HTTP protected by TLS to provide transport confidentiality and integrity and server authentication.

  11. Define network latency.

    Show answer guidance

    The time taken for data to travel from source to destination or for a defined round trip.

  12. What is packet loss?

    Show answer guidance

    Packets that fail to reach the intended destination or are discarded along the path.

  13. What is a VLAN?

    Show answer guidance

    A logical segmentation of a switched network into separate broadcast domains.

  14. Why use network segmentation?

    Show answer guidance

    To limit unnecessary traffic and restrict the spread or reach of security incidents.

  15. What is bandwidth?

    Show answer guidance

    The capacity of a communication channel to carry data per unit time.

Revision checklist

Further study and references

Use current university textbooks, peer-reviewed research, official standards and vendor or project documentation. Verify software versions, protocol specifications and security guidance against authoritative sources because technical systems change. Cite the edition and publication details of materials used in assignments, and distinguish established facts from assumptions or illustrative examples.

Academic and responsible-use note: These notes support undergraduate learning and do not replace your university's course outline or laboratory rules. Respect privacy, intellectual property, software licences and institutional policies. Conduct experiments only on systems and datasets for which you have permission.

Return to the full Computer Science course guide

Official Education References

Use these official organisations for curriculum guidance, examinations and further learning information.