Menu

Earn Premium with Referrals

Invite your friends and earn Premium rewards through our referral program.

See how it works and start inviting friends.

Top 25 - Part 1
CN

Top 25 - Part 1

Practice core Computer Networks placement questions covering foundational networking concepts and essential theory.

1. What is the key functional difference between a Collision Domain and a Broadcast Domain?

  • Collision domain — a network segment where two devices transmitting at the same time collide. On a hub (shared medium), all ports are one collision domain.
  • Broadcast domain — the boundary within which a broadcast frame reaches every device. Broadcasts stop at routers (or VLAN boundaries).
                 NETWORK DOMAINS

       Collision Domain          Broadcast Domain
       ─────────────────          ────────────────

       [PC-A]                    [PC-A]
          │                         │
       [ HUB ]  ← all ports      [ Switch ]
       │  │  │                    │  │  │
     [PC] [PC] [PC]              [PC][PC][PC]
       │  │  │
       └──┴──┴──→
       ONE collision domain      ONE broadcast domain


       Switch:
       ┌───────────────────────────────┐
       │             SWITCH            │
       │                               │
       │ Port 1 → PC-A  = Collision 1 │
       │ Port 2 → PC-B  = Collision 2 │
       │ Port 3 → PC-C  = Collision 3 │
       └───────────────────────────────┘
                 │
                 └── One Broadcast Domain

Key takeaway:

Switch  → breaks Collision Domains
Router  → breaks Broadcast Domains
VLAN    → creates separate Broadcast Domains

2. Which of the following accurately describes the differences between a MAC address and an IP address?

  • MAC address — a 48-bit hardware address associated with the network interface. Operates at Layer 2.
  • IP address — a logical address assigned by software/network configuration. Operates at Layer 3 and can change depending on the network.
                  DEVICE
                    │
          ┌─────────┴─────────┐
          │                   │
      MAC Address          IP Address
       Layer 2              Layer 3
          │                   │
    "Who are you?"        "Where are you?"
          │                   │
   AA:BB:CC:DD:EE:FF     192.168.1.20
MACIP
Size48-bit32-bit (IPv4) / 128-bit (IPv6)
Layer2 (Data Link)3 (Network)
PurposeDevice/interface identificationLogical addressing & routing
ChangesUsually stableCan change
ExampleAA:BB:CC:DD:EE:FF192.168.1.20

Think:

MAC = your identity on the local network
IP  = your current network address

3. How does a Gateway differ fundamentally from a standard Router?

  • Router — connects networks using the same networking protocol, primarily forwarding IP packets between networks.
  • Gateway — acts as an entry/exit point and, in the broader sense, can translate between different protocols, systems, or architectures.
Router
────────────────────────────────────

Network A                Network B
192.168.1.0              10.0.0.0
     │                       │
     │       [ ROUTER ]      │
     └───────────┬───────────┘
                 │
          IP → IP forwarding


Gateway
────────────────────────────────────

IP Network
    │
    ▼
┌───────────┐
│  GATEWAY  │
│ Translator│
└─────┬─────┘
      │
      ▼
Different / Legacy System

Easy way to remember:

Router  = forwards traffic
Gateway = connects/possibly translates between different systems

4. What is the operational purpose of a Brouter (Bridging Router)?

A brouter is a hybrid device that combines the behavior of a bridge (Layer 2) and a router (Layer 3).

                 ┌──────────────┐
Incoming Traffic │   BROUTER    │
────────────────►│              │
                 └──────┬───────┘
                        │
             ┌──────────┴──────────┐
             │                     │
          Routable              Non-routable
          traffic                traffic
             │                     │
             ▼                     ▼
        ROUTE by IP            BRIDGE by MAC
          Layer 3                 Layer 2

So:

IP traffic       → Router behavior → Layer 3
Legacy traffic   → Bridge behavior → Layer 2

It is useful in networks carrying a mixture of routable and legacy/non-routable traffic.


  • Node — any device that participates in network communication.
  • Link — the communication path connecting two nodes.
        Link
   ────────────────
   │              │
   ▼              ▼
[Node A]        [Node B]
  PC              Router

A more complex network:

             [Router]
             /      \
            /        \
        [Switch]    [Server]
        /     \
       /       \
    [PC-A]    [PC-B]

Nodes = PC-A, PC-B, Switch, Router, Server
Links = cables / fiber / wireless connections

Remember:

Node = endpoint/device
Link = path between devices

6. How does the Address Resolution Protocol (ARP) function on a local network?

ARP resolves a known IP address into the corresponding MAC address on a local network.

The problem:

Application knows:
IP = 192.168.1.50

But Ethernet needs:
MAC = ??

ARP solves this:

PC-A
IP: 192.168.1.10
MAC: AA:AA:AA
   │
   │  ARP Request (Broadcast)
   │  "Who has 192.168.1.50?"
   ▼
┌──────────────────────────────────┐
│          LOCAL NETWORK           │
│                                  │
│ PC-B        PC-C        PC-D     │
│  │           │           │       │
│  └───────────┴───────────┘       │
│                                  │
│ PC-B owns 192.168.1.50           │
└──────────────────────────────────┘
   │
   │ ARP Reply (Unicast)
   │ "192.168.1.50 = BB:BB:BB"
   ▼
PC-A stores mapping in ARP cache

The flow is:

Known IP
   ↓
ARP Request (Broadcast)
   ↓
Owner of IP responds
   ↓
ARP Reply
   ↓
IP → MAC mapping cached
   ↓
Ethernet frame can be sent

ARP works within the local network. Routers do not forward ARP broadcasts across networks.


7. What is the correct structural sequence for the 4-step DHCP lease process?

The DHCP process is remembered as DORA:

D → Discover
O → Offer
R → Request
A → Acknowledge

Full sequence:

               DHCP SERVER
                    │
                    │
Client              │
  │                 │
  │── DISCOVER ────►│
  │   "Any DHCP     │
  │    server?"     │
  │                 │
  │◄──── OFFER ─────│
  │   "Use this IP" │
  │                 │
  │── REQUEST ─────►│
  │   "I want it"   │
  │                 │
  │◄──── ACK ───────│
  │   "Approved!"   │
  │                 │
  ▼
IP lease active

DORA =

Discover → Offer → Request → Acknowledge

8. What catastrophic network event does Spanning Tree Protocol (STP) prevent by blocking redundant switch ports?

STP prevents Layer 2 switching loops, which can cause broadcast storms.

Without STP:

        ┌───────────┐
        │  Switch A │
        └─────┬─────┘
             / \
            /   \
           ▼     ▼
     ┌────────┐ ┌────────┐
     │Switch B│ │Switch C│
     └────┬───┘ └───┬────┘
          \         /
           \       /
            └─────┘
               ▲
               │
             LOOP

A broadcast could circulate:

Broadcast
   ↓
Switch A
   ↓
Switch B
   ↓
Switch C
   ↓
Switch A
   ↓
Switch B
   ↓
...
   ↓
ENDLESS LOOP

STP blocks one redundant path:

        Switch A
        /      \
       /        \
      ▼          ▼
 Switch B      Switch C
      \          /
       \        /
        ──X────
        BLOCKED

No active Layer 2 loop

If the active path fails, STP can activate the backup path.

Remember:

STP = prevents switching loops
      ↓
Prevents broadcast storms

9. What is the primary network efficiency benefit of Piggybacking?

Piggybacking puts an ACK together with an outgoing data frame instead of sending a separate ACK.

Without piggybacking:

A                              B
│                              │
│────── DATA ─────────────────►│
│                              │
│◄───── ACK ───────────────────│
│                              │
│────── DATA ─────────────────►│
│                              │

With piggybacking:

A                              B
│                              │
│────── DATA ─────────────────►│
│                              │
│◄──── DATA + ACK ─────────────│
│                              │

One frame does two jobs:

Normal:
DATA  +  ACK
  ↓      ↓
2 frames

Piggybacking:
DATA + ACK
     ↓
 1 frame

Benefit:

Fewer frames
     ↓
Less overhead
     ↓
Better bandwidth efficiency

10. Which communication mode allows simultaneous bidirectional data transmission between two endpoints?

The answer is Full-Duplex.

Simplex
────────────────

A ─────────────► B

Only one direction


Half-Duplex
────────────────

A ─────────────► B
A ◄───────────── B

Both directions,
but NOT at the same time


Full-Duplex
────────────────

A ─────────────► B
A ◄───────────── B

Both directions
AT THE SAME TIME

Examples:

Simplex       → Keyboard → Computer
Half-Duplex   → Walkie-talkie
Full-Duplex   → Telephone call

11. What is a Virtual Local Area Network (VLAN), and what are its primary administrative benefits?

A VLAN logically divides one physical switch into multiple isolated networks.

Without VLANs:

             Physical Switch
        ┌──────────────────────┐
        │ PC PC PC PC PC PC    │
        │ Everyone together    │
        └──────────────────────┘

With VLANs:

             ONE PHYSICAL SWITCH
        ┌──────────────────────────┐
        │                          │
        │ VLAN 10 → SALES          │
        │ [PC][PC][PC][PC]         │
        │                          │
        │ VLAN 20 → IT             │
        │ [PC][PC][PC][PC]         │
        │                          │
        │ VLAN 30 → HR             │
        │ [PC][PC][PC][PC]         │
        │                          │
        └──────────────────────────┘

Think of it as:

1 physical switch
       ↓
┌──────┼──────┐
↓      ↓      ↓
VLAN10 VLAN20 VLAN30
Sales   IT     HR

Benefits:

VLAN
 │
 ├── Security
 │      ↓
 │   Departments isolated
 │
 ├── Less broadcast traffic
 │      ↓
 │   Broadcast stays inside VLAN
 │
 └── Flexibility
        ↓
     Logical grouping without
     changing physical cables

12. What are the three core principles defined by the CIA Triad in network security?

The CIA Triad consists of:

             CIA TRIAD
                │
      ┌─────────┼─────────┐
      │         │         │
      ▼         ▼         ▼
Confidentiality Integrity Availability
      │         │         │
      ▼         ▼         ▼
   Keep it    Keep it   Keep it
    secret     correct   reachable

Confidentiality

Only authorized people
        ↓
can read the data

Example:
Encryption + Access Control

Integrity

Data should not be
changed illegally

Example:
Hashing + Digital Signatures

Availability

System should be
accessible when needed

Example:
Backups + Redundancy

Easy memory trick:

C = Confidential → Secret
I = Integrity    → Correct
A = Availability → Accessible

13. What is the operational difference between Symmetric and Asymmetric Encryption?

Symmetric encryption uses one shared key:

             SAME KEY
                │
                ▼
Plaintext ──► [🔑] ──► Ciphertext
                           │
                           ▼
                        [🔑]
                           │
                           ▼
                       Plaintext

The same key is used for encryption and decryption.

Asymmetric encryption uses a key pair:

              KEY PAIR
                 │
       ┌─────────┴─────────┐
       ▼                   ▼
 Public Key           Private Key
       │                   │
       │ Encrypt           │ Decrypt
       ▼                   ▼
   Plaintext ─────────► Ciphertext

Comparison:

             SYMMETRIC          ASYMMETRIC
             ──────────         ──────────
Keys         One shared key     Public + Private
Speed        FAST               SLOWER
Key sharing  Difficult          Easier
Examples     AES                RSA, ECC

Real-world systems commonly combine them:

Asymmetric encryption
        ↓
Securely establish/exchange a key
        ↓
Symmetric encryption
        ↓
Encrypt large amounts of data efficiently

14. What is the main difference between TCP and UDP protocols?

TCP is connection-oriented and reliable.

UDP is connectionless and best-effort.

TCP
────────────────────────────────

Client                         Server
  │                              │
  │──── SYN ────────────────────►│
  │◄─── SYN-ACK ────────────────│
  │──── ACK ────────────────────►│
  │                              │
  │════ Reliable Data ═════════►│
  │◄════ ACK / Retransmission ══│
  │                              │


UDP
────────────────────────────────

Client                         Server
  │                              │
  │──── DATA ──────────────────►│
  │──── DATA ──────────────────►│
  │──── DATA ────────────────X  │
  │                              │
  │       No handshake           │
  │       No ACK                 │
  │       No retransmission      │
TCPUDP
ConnectionYesNo
ReliabilityReliableBest-effort
OrderingYesNo guarantee
RetransmissionYesNo
OverheadHigherLower
Typical usesWeb, email, file transferGaming, VoIP, streaming, DNS

Easy memory:

TCP = Trust / Correctness
UDP = Urgency / Speed

15. What happens when a user enters a website address (URL) in a browser?

The browser goes through several steps:

        User enters:
        https://example.com
                │
                ▼
        ┌─────────────┐
        │ DNS Lookup  │
        └──────┬──────┘
               │
               ▼
          IP Address
        93.184.216.34
               │
               ▼
        ┌─────────────┐
        │ TCP Handshake│
        └──────┬──────┘
               │
               ▼
        ┌─────────────┐
        │ TLS Handshake│
        │   (HTTPS)   │
        └──────┬──────┘
               │
               ▼
        HTTP Request
          GET /
               │
               ▼
            Server
               │
               ▼
        HTTP Response
               │
               ▼
        Browser renders
           the page

Step by step:

1. URL entered
       ↓
2. DNS finds the IP address
       ↓
3. TCP connection established
       ↓
4. TLS encryption established
   (for HTTPS)
       ↓
5. Browser sends HTTP request
       ↓
6. Server sends response
       ↓
7. Browser renders the webpage

My Private Notes

Notes are auto-saved locally to this device.