← IB Computer Science

A2.2 · Book pp. 127–135

Network architecture

Your level

How a network is laid out decides what happens when something breaks. Design it well and a failure goes unnoticed.

What you need to know

PointTopicLevel
A2.2.1Function and applications of network topologiesSL + HL
A2.2.2The function of serversHL
A2.2.3Compare and contrast networking modelsSL + HL
A2.2.4Concepts and applications of network segmentationSL + HL

Next: topologies →

A2.2.1 Network topologies

A topology is the layout of nodes and connections in a network.

  • Star: all nodes connect to one central device, usually a switch.
  • Mesh: every node links directly to the others. A partial mesh links only some of them.
  • Hybrid: a mix, such as meshed base stations with a star around each.

🔬 Lab: break the network

Select a node to fail or repair it. Orange nodes have failed, and grey nodes are cut off from the largest group.

FactorStarMeshHybrid
ReliabilityHub is a single point of failureVery high, with many pathsHigh. A failure affects only nearby clients
SpeedLimited by the central deviceHigh, with direct linksDepends on the design. Watch for bottlenecks
ScalabilityLimited by ports on the hubEach new node needs many linksHighly scalable and adaptable
CollisionsMinimal, with dedicated linksMinimal, with direct linksDepends on the design
CostLow at firstHigh, with so much cablingHigher to start, efficient long-term
Typical useHomes and small officesMilitary, aviation, disaster areasLarge enterprises and telecoms

links in a full mesh = n(n − 1) ÷ 2

⚠️ Common mistake

Learn to draw each topology, and always say why one suits the situation.

Next: servers →

Next: networking models →

HL A2.2.2 The function of servers

A server provides a service to other devices. Here it mostly means the software. One computer can run many servers at once, each on its own port: web on 80 and 443, FTP on 20 and 21, SSH on 22 and DNS on 53.

ServerFunctionScalabilityReliabilitySecurity
DNSTranslates domain names into IP addressesDistributed database and cachingMany redundant serversA frequent target, so it needs firewalls and intrusion detection
DHCPAssigns IP addresses and settingsAddress pools can be managed per networkDevices cannot join if it failsShould only answer on trusted networks
FileStores and shares files centrally through FTP, SFTP, SMB, NFS or AFPAdd drives and faster network cardsRAID can survive a failed driveRead-only or read-write permissions
MailStores email and exchanges it with other servers using SMTP and POP3Often outsourced to providersQueues and redundant systemsSPF names approved senders. DKIM adds a digital signature
ProxyActs for clients, and caches contentA reverse proxy spreads load across serversBalancing load gives fault toleranceShields internal devices from the internet
WebHosts pages, either static or generated at runtimeLoad spread across servers behind a reverse proxySites go down if it failsNeeds DDoS protection, and TLS for HTTPS

🔬 Lab: a DNS lookup with caching

    The cache starts empty, so the first lookup goes up the chain.

    ✍️ Try it

    Run nslookup example.com on Windows or host example.com on a Mac. To do the same in Python:

    # pip install dnspython
    import dns.resolver
    
    domain = "www.example.com"
    try:
        for record in dns.resolver.resolve(domain, "A"):
            print(record.to_text())
    except dns.resolver.NXDOMAIN:
        print("That domain does not exist.")

    ✏️ Book correction

    The book says dns.resolver is built in, and imports it as dnspython. It is a third-party package: install dnspython with pip, then use import dns.resolver, as above.

    Proxy and reverse proxy

    A proxy acts for clients, so a school can cache common pages and reduce traffic. A reverse proxy sits in front of servers, spreading requests across them and caching common replies.

    Next: networking models →

    A2.2.3 Networking models

    In the client-server model, clients request services and servers provide them. In peer-to-peer, each device is both client and server.

    FactorClient-serverPeer-to-peer
    ControlCentralized, easy to manage and updateNo central authority, hard to coordinate
    FailureServer is a single point of failureNo single point of failure, but peers may vanish
    SecurityManaged in one place, but a breach exposes everythingPatches and settings are hard to keep in step
    CostExpensive server hardware and softwareCheap, as peers share the load
    ScalingUpgrade the serverEach peer adds capacity
    ExamplesWeb, email, online bankingBitTorrent, voice calls, blockchain

    🔬 Lab: who shares a 1 GB file fastest?

    Client-server (server uploads 100 MB/s)
    Peer-to-peer (each user also uploads 5 MB/s)

    A simplified model with fast downloads. The first time grows with every user, while peers add upload capacity as they join.

    Next: segmentation →

    A2.2.4 Network segmentation

    Segmentation splits a network into smaller, logically separate parts. It improves security, keeps heavy traffic contained and makes management easier.

    SubnettingVLANs
    Separates byRanges of IP addressesLogical groups, often using MAC addresses or logins
    ExampleStaff on 192.168.0.x, students on 192.168.1.xA guest VLAN and a staff VLAN on the same switches
    SecurityA user might change their IP address to move subnetMembership is controlled, so it is stronger
    ReachShares the same equipmentCan even span several sites, for example over a VPN

    🔬 Lab: same subnet?

    A /24 means the first 24 bits name the network. Set it to /16 and these two devices share a network.

    ⚠️ Common mistake

    Segmentation is the general idea. Subnetting and VLANs are two ways of doing it.

    Next: review →

    Quick quiz

    1. What happens if the switch in a star network fails?
    2. How many links does a full mesh of 5 nodes need?
    3. Which topology suits a large campus with reliable backbone links?
    4. Which model would you avoid for online banking?
    5. Which is a benefit of peer-to-peer?
    6. Which best describes network segmentation?
    7. A VLAN is…
    8. With a /24 mask, are 192.168.0.5 and 192.168.1.5 on the same subnet?

    HL Extra questions

    1. Which server turns www.example.com into an address?
    2. A reverse proxy acts on behalf of…
    3. What does RAID do?
    4. What does SPF let a domain owner do?

    Exam-style questions

    These are written for this site in the style of Paper 1. Answer on paper first, then open the mark points.

    1. Outline three benefits of a star topology for a small office. [3]

      Mark points
      • A cable failure affects only one device [1].
      • It costs little for a small number of nodes [1].
      • Each device has its own link, so there is minimal risk of collisions [1].
    2. A rescue service needs a network that keeps working after any one link fails. Justify a mesh topology. [3]

      Mark points
      • Each node has several paths [1].
      • Traffic can be rerouted if one link or node fails [1].
      • The extra cost of links is justified because communication is critical [1].
    3. Explain one disadvantage of peer-to-peer for online banking. [2]

      Mark points
      • There is no central authority to keep the records consistent and secure [1].
      • So balances could be inconsistent or a peer could be unavailable when needed [1].
    4. Compare client-server and peer-to-peer networking. [4]

      Mark points
      • Client-server has central control, while peers are equal [1].
      • A server is a single point of failure, while P2P spreads the risk [1].
      • Servers cost more, but P2P has no such hardware cost [1].
      • Servers are easier to secure and manage, but P2P capacity grows with each peer [1].
    5. Explain how VLANs improve a school network. [3]

      Mark points
      • Staff and students are placed in separate logical networks on the same hardware [1].
      • Traffic is isolated, so students cannot reach staff servers [1].
      • Broadcast traffic stays within a VLAN, which reduces congestion [1].

    HL Exam-style questions

    1. Describe how a client finds the IP address of a website through DNS. [3]

      Mark points
      • The client sends the domain name to its configured DNS server [1].
      • If the server does not know, it asks another server up the chain [1].
      • The address is returned to the client and cached for later requests [1].
    2. Describe a proxy server and a reverse proxy, and give one benefit of each. [4]

      Mark points
      • A proxy makes requests on behalf of clients [1].
      • It can cache content, which reduces external traffic [1].
      • A reverse proxy receives requests on behalf of servers [1].
      • It spreads load across servers, which improves scalability [1].