Computer Science · Topic 07

Computer Networks and the Internet

Explore how computers communicate, how information travels between devices, and how the Internet connects networks around the world.

1. What Is a Computer Network?

A computer network is a group of interconnected devices that communicate and share information or resources.

Networks allow devices to share files, printers, applications, and Internet connections.

Basic components

A network is not simply a collection of devices. The devices must have a way to exchange data using compatible communication rules.

2. Types of Networks

PAN — Personal Area Network Connects devices around one person, such as a phone and wireless earbuds.
LAN — Local Area Network Connects devices in a limited area, such as a home, school, or office.
MAN — Metropolitan Area Network Connects networks across a city or metropolitan area.
WAN — Wide Area Network Connects networks across large geographical areas.

The Internet is a global network of interconnected networks. It uses technologies and protocols that allow many different networks to communicate.

3. Network Topologies

A network topology describes how devices and connections are arranged physically or logically.

Star topology

       Computer A
            |
Computer B--Switch--Computer C
            |
        Computer D

Devices connect to a central switch or hub. A failure of one device's link usually does not disconnect the others, but a central-device failure can disrupt the network.

Bus topology

[Computer A]---[Computer B]---[Computer C]---[Computer D]

Devices share a common communication backbone. This is simple in concept, but backbone problems can affect the connected devices.

Ring topology

Computer A ---- Computer B
     |                |
Computer D ---- Computer C

Devices form a loop. How a failure affects the network depends on the specific ring technology and whether redundancy is provided.

Mesh topology

Devices have multiple interconnections. A full mesh connects every device directly to every other device; a partial mesh connects only selected pairs.

Real networks may combine several topologies. The best arrangement depends on cost, reliability, scale, and performance requirements.

4. Networking Devices

DeviceMain function
Router Forwards packets between different IP networks.
Switch Connects devices in a LAN and forwards Ethernet frames using MAC addresses.
Wireless access point Allows compatible wireless devices to connect to a network.
Modem Adapts signals for a particular communication service, depending on the technology.
Firewall Filters network traffic according to security rules.
Repeater Regenerates or repeats signals to extend a communication link.

Home networking equipment sometimes combines router, switch, wireless access point, and other functions in a single device.

5. Wired and Wireless Communication

Wired networks

Wired networks carry signals through physical media, such as Ethernet cables or fibre-optic cables.

Wireless networks

Wireless networks transmit data through electromagnetic waves. Wi-Fi and Bluetooth are common examples, although they serve different needs.

Wireless does not mean the network has no cables at all. A Wi-Fi access point may still use a wired connection to the rest of the network.

6. How Data Travels

Data sent over many computer networks is divided into units such as packets. Each packet carries information needed to deliver and process it.

Sending device
      |
      v
Data divided into packets
      |
      v
Network devices forward packets
      |
      v
Destination receives the data
      |
      v
Data is reassembled or processed

Different packets may take different routes. Protocols and receiving applications handle delivery, ordering, and recovery where required.

Bandwidth, throughput, and latency

A high-bandwidth connection can still feel slow if latency is high, packet loss is significant, or the server is overloaded.

7. IP Addresses and MAC Addresses

IP address

An Internet Protocol (IP) address identifies a network interface for communication at the IP layer. Routers use destination IP addresses to forward packets between networks.

Examples of IPv4 addresses include 192.168.1.10.

IPv6 uses a larger address space. An example of IPv6 notation is 2001:db8::1; the 2001:db8::/32 range is reserved for documentation examples.

MAC address

A Media Access Control (MAC) address is a link-layer identifier used by network interfaces on technologies such as Ethernet and Wi-Fi. A typical displayed format is 00:1A:2B:3C:4D:5E.

IP addressMAC address
Used for IP-layer addressing and routing.Used for link-layer delivery on a local network technology.
IPv4 uses 32-bit addresses; IPv6 uses 128-bit addresses.Common Ethernet MAC addresses are 48 bits.
May change when network configuration changes.Often assigned to an interface, though software can sometimes change or randomize it.

8. DNS and Domain Names

Domain Name System (DNS) helps translate domain names, such as example.com, into information used to locate Internet services, including IP addresses.

You enter a domain name
          |
          v
Device checks available DNS information
          |
          v
A DNS resolver looks up the required record
          |
          v
The address is returned
          |
          v
The device can attempt to connect to the destination

DNS records include A records for IPv4 addresses, AAAA records for IPv6 addresses, and MX records for mail servers.

DNS lookup is one part of opening a website. A browser must still establish a connection and exchange data with the relevant service.

9. Important Network Protocols

A protocol defines rules for exchanging information between systems.

ProtocolPurpose
IPAddresses and forwards packets between networks.
TCPProvides a reliable, ordered byte stream between applications.
UDPProvides datagram transport without TCP's built-in delivery and ordering guarantees.
HTTPTransfers web resources and other application data.
HTTPSHTTP protected using TLS for encryption and authentication.
DNSLooks up domain-related records.
DHCPAutomatically provides IP configuration to clients on many networks.
SMTPUsed to send and relay email.
SSHProvides secure remote login and other secure network services.

10. The TCP/IP Model

The TCP/IP model describes networking functions in layers. A common four-layer teaching model is shown below.

LayerExamplesRole
Application HTTP, DNS, SMTP Supports services used by applications.
Transport TCP, UDP Communication between applications on hosts.
Internet IP Logical addressing and packet routing between networks.
Link Ethernet, Wi-Fi Communication over a local link and its physical medium.

Some models split the link layer into data-link and physical layers. The key idea is that each layer provides services to the layer above it.

11. The Internet and the World Wide Web

The Internet is the global system of interconnected networks. The World Wide Web (WWW) is a collection of linked resources accessed over the Internet, commonly through web browsers.

The Web is one service that uses the Internet. Email, online gaming, file transfer, and many other services also use the Internet.

12. Network Security Basics

Network security protects devices, communication, and information from unauthorized access, disruption, or modification.

HTTPS helps protect data in transit and authenticate the website through its certificate, but it does not automatically make a website trustworthy or safe from every threat.

13. Knowledge Check

Try answering each question before revealing the answer.

1. What does LAN stand for?

Local Area Network.

2. What is the main role of a router?

It forwards packets between IP networks.

3. What does DNS help a device find?

DNS provides records associated with domain names, including IP addresses.

4. Which protocol provides reliable, ordered delivery as a byte stream?

TCP.

5. What is the difference between the Internet and the Web?

The Internet is the interconnected network infrastructure; the Web is a service that uses it to access linked resources.

6. What does HTTPS add to HTTP?

TLS protection that provides encryption in transit and helps authenticate the server.

7. Which measure helps prevent unauthorized network access?

Measures include a properly configured firewall, strong authentication, secure Wi-Fi settings, and timely software updates.

Key Takeaways