Courses Job Ready Program Fresher Trainings AI For Class 7 to 12 Corporate Training Placements Tutorials
Free Learning Resources

IT Tutorials & Interview Prep

Free guides, interview Q&As, and job responsibility breakdowns — curated by industry veterans to help you crack MNC interviews

254+
Tutorial Articles
18
Topic Categories
100%
Free to Read
← Back to CCNA

Networking Fundamentals

CCNA Last Updated: Oct 13, 2026

Table of Contents

  • 1. Introduction to Computer Networking
  • 2. Types of Networks (PAN, LAN, MAN, WAN)
  • 3. Key Networking Concepts & Technical Terms
  • 4. Network Topologies
  • 5. The OSI Model — 7 Layers Explained in Depth
  • 6. The TCP/IP Model — 4 Layers Explained
  • 7. OSI vs TCP/IP — Detailed Comparison
  • 8. Data Encapsulation & Decapsulation
  • 9. Important Networking Protocols
  • 10. IP Addressing Basics (IPv4 vs IPv6)
  • 11. TCP vs UDP
  • 12. Key Takeaways / Important Points
  • 13. Scenario-Based Questions (with Answers & Reasons)
  • 14. Interview Questions — Basic & Practical

 

1. Introduction to Computer Networking

Definition

A computer network is a collection of two or more computers, servers, mobile devices, or other electronic devices that are connected together through communication links (wired or wireless) so that they can share data, resources, and information with each other. In simple words, whenever two or more devices are linked in a way that lets them talk to each other and exchange information, we call that a network.

What is Networking?

Networking is the practice of connecting computing devices together and setting up the rules, hardware, and software needed so that those devices can communicate reliably. It covers everything from the physical cables and Wi-Fi signals that carry data, to the logical addressing (like IP addresses) and rules (called protocols) that decide how the data is packaged, sent, and understood by the receiving device. Without networking, every computer would be an isolated island unable to share anything with the outside world.

Why do we need Networking?

Networking exists because sharing information and resources is far more efficient than keeping everything isolated. Businesses need networks to let employees share files, printers, and applications; the internet itself is one giant global network that lets billions of people communicate, shop, learn, and work together. Without networks, we would need to physically carry data on a disk from one machine to another, which is slow, unsafe, and simply impossible at global scale.

Why Networking Matters — Quick Reasons

  • Resource sharing: printers, files, internet connections can be shared instead of duplicated on every machine.
  • Communication: email, video calls, chat, and social media all depend on networks.
  • Centralised data management: databases and servers can be accessed by many users at once.
  • Cost saving: shared hardware and software licences reduce organisational costs.
  • Remote access: employees can work from anywhere using VPNs and cloud networks.

When is Networking Used?

Networking is used every single time a device needs to exchange data with another device—this could be as simple as two laptops sharing a file over Wi-Fi or as complex as a bank processing thousands of transactions per second across continents. It is used continuously: when you open a browser, send a WhatsApp message, stream a video, print a document from your laptop to a shared office printer, or swipe a card at a shopping mall, networking protocols are working in the background.

Where is Networking Used?

Networking is used everywhere technology exists—homes (Wi-Fi routers connecting phones, laptops, and smart TVs), offices (LANs connecting employee computers to shared servers and printers), colleges and schools (campus networks for labs and Wi-Fi), data centres (thousands of servers networked together to run cloud services), hospitals (connecting medical devices and patient record systems), and across the entire globe through the internet, which connects millions of smaller networks together.

Who uses Networking? (Stakeholders)

  • End Users: everyday people using phones, laptops, and smart devices to browse, chat, and stream.
  • Network Engineers/Administrators: professionals who design, configure, secure, and maintain networks.
  • Businesses & Organisations: rely on networks for internal communication, operations, and customer service.
  • Internet Service Providers (ISPs): companies like Jio, Airtel, or Comcast that provide internet connectivity.
  • Developers: build applications (web apps, APIs, games) that run over networks.
  • Governments: manage large-scale infrastructure, defence, and public service networks.

 

2. Types of Networks (PAN, LAN, MAN, WAN)

Networks are commonly classified by the geographic area they cover. This classification helps engineers pick the right technology, cabling, and protocols for a given situation — a network inside one room needs a very different design compared to a network that spans an entire country.

Figure: Networks grow in scale from PAN → LAN → MAN → WAN

PAN (Personal Area Network)

A Personal Area Network is the smallest type of network, typically covering a range of just a few metres around a single person. It connects an individual's personal devices to each other, usually using Bluetooth, USB, or infrared, without needing any large infrastructure.

Example: Connecting your smartphone to your wireless earbuds or smartwatch via Bluetooth is a PAN.

LAN (Local Area Network)

A Local Area Network connects devices within a small, limited geographic area such as a single building, office, or home. LANs are usually owned and managed by a single organisation or individual, offer very high speed, and use Ethernet cables or Wi-Fi for connectivity.

Example: All the computers and printers connected inside one office floor through a Wi-Fi router form a LAN.

MAN (Metropolitan Area Network)

A Metropolitan Area Network spans a larger area than a LAN, typically covering a city or a large campus. It usually connects multiple LANs together, for example linking different branch offices of the same company located across a city, often using fibre-optic cabling for higher speed over longer distances.

Example: A cable TV network or a university connecting all its campus buildings spread across a city is a MAN.

WAN (Wide Area Network)

A wide area network covers the largest geographic area—often spanning cities, countries, or even continents. The internet itself is the biggest example of a WAN. WANs connect multiple LANs and MANs together, usually through leased telecom lines, satellites, or undersea fiber-optic cables, and are typically slower and more expensive per unit of bandwidth than a LAN.

Example: A multinational company connecting its offices in Mumbai, London, and New York into one network is a WAN.

Comparison Table: PAN vs LAN vs MAN vs WAN

FeaturePANLANMANWAN
Coverage AreaA few meters (personal)One building/officeA city/large campusCountry/global
OwnershipIndividualSingle organizationOne or a few organizationsMultiple organizations/ISPs
SpeedLow-MediumVery highHighComparatively lower
Technology UsedBluetooth, USB, IREthernet, Wi-FiFiber optics, WiMAXSatellite, leased lines, fiber
ExamplePhone + earbudsOffice networkCity cable networkThe Internet

 

3. Key Networking Concepts & Technical Terms

Before diving into the OSI and TCP/IP models, it is important to understand the basic building-block terms used throughout networking. Each term below is explained in simple language with a real-life example so that even a complete beginner can build a strong foundation.

Node

A node is any device connected to a network that can send, receive, or forward data—this includes computers, printers, routers, switches, and smartphones. Every device that participates in a network, no matter how small its role, is called a node on that network.

Example: A printer connected to the office Wi-Fi is a node on that LAN.

IP Address

An IP (Internet Protocol) Address is a unique numerical label assigned to every device connected to a network that uses the Internet Protocol for communication. It works like a postal address for your device, allowing other devices to know exactly where to send data. IP addresses can be IPv4 (like 192.168.1.1) or the newer IPv6 format.

Example: Your laptop might have a private IP address like 192.168.1.5 inside your home network.

MAC Address

A MAC (Media Access Control) Address is a unique physical identifier burned into a device's network interface card (NIC) by its manufacturer. Unlike an IP address, which can change depending on the network you connect to, a MAC address is generally permanent and is used at the Data Link layer to identify devices within the same local network.

Example: A Wi-Fi card's MAC address might look like 00:1A:2B:3C:4D:5E.

Protocol

A protocol is a set of formal rules and conventions that define how data is formatted, transmitted, and received between devices on a network. Just like humans need a common language and etiquette to communicate clearly, devices need protocols to understand each other — without agreed protocols, one device's data would be meaningless gibberish to another.

Example: HTTP is the protocol that lets your browser and a website server exchange web page data.

Router

A router is a networking device that connects two or more different networks together and forwards data packets between them, choosing the best path for the data to travel. Routers operate mainly at the Network layer and use IP addresses to decide where to send incoming traffic, making them essential for connecting a home or office network to the wider internet.

Example: The Wi-Fi router at home connects your local devices to your ISP's network (the internet).

Switch

A switch is a networking device used within a single LAN to connect multiple devices and intelligently forward data only to the specific device it is intended for, based on MAC addresses. This is far more efficient than older hub-based networks, because a switch reduces unnecessary traffic and collisions by learning which device sits on which port.

Example: An office switch connects 24 employee computers so they can all talk to each other directly.

Hub

A hub is a very basic, older networking device that connects multiple devices in a LAN but simply repeats and broadcasts any incoming data to all connected ports, regardless of the intended destination. Because it does not intelligently direct traffic like a switch, hubs are inefficient, cause more collisions, and have mostly been replaced by switches in modern networks.

Example: An old-style hub would send one computer's data to all 8 connected ports, even if only one needed it.

Gateway

A gateway is a device or software that acts as an entry and exit point between two different networks that use different protocols, essentially translating data so the two networks can understand each other. A gateway is often the point where a local network connects to an outside network like the internet.

Example: A home router often also acts as the default gateway between your home LAN and your ISP's network.

DNS (Domain Name System)

DNS is often called the 'phonebook of the internet.' It is a system that translates human-friendly website names (like www.google.com) into machine-friendly IP addresses that computers actually use to locate each other on a network. Without DNS, we would have to remember long strings of numbers to visit any website.

Example: Typing www.wikipedia.org into your browser triggers a DNS lookup that finds its IP address.

Firewall

A firewall is a security device or software that monitors and controls incoming and outgoing network traffic based on a defined set of security rules, acting as a barrier between a trusted internal network and untrusted external networks like the internet. Firewalls help block malicious traffic, unauthorised access attempts, and certain types of cyberattacks.

Example: A company firewall might block all incoming traffic except on specific ports needed for business apps.

Bandwidth

Bandwidth refers to the maximum amount of data that can be transmitted over a network connection in a given amount of time, usually measured in bits per second (like Mbps or Gbps). Think of it like the width of a water pipe — a wider pipe (higher bandwidth) lets more water (data) flow through per second.

Example: A 100 Mbps internet plan can theoretically transfer up to 100 megabits of data every second.

Latency

Latency is the time delay between sending a request from one device and receiving a response, usually measured in milliseconds (ms). Low latency means data travels quickly with minimal delay, which is critical for real-time applications like video calls, online gaming, and stock trading, where even small delays are noticeable.

Example: A latency of 20ms in an online game feels smooth, while 300ms causes noticeable lag.

Port (Networking)

A port is a virtual, numbered endpoint within a device that is used to direct network traffic to the correct application or service running on that device. While an IP address identifies the device, the port number identifies which specific program on that device should receive the data.

Example: Web traffic typically uses port 80 (HTTP) or port 443 (HTTPS) to reach a web server application.

Packet

A packet is a small, formatted unit of data that is transmitted over a network. Before large pieces of data (like a video file or webpage) are sent, they are broken down into smaller packets, each containing a piece of the actual data plus header information like source and destination addresses, which helps them travel independently and get reassembled correctly at the destination.

Example: A large photo you send on WhatsApp is broken into many small packets before it leaves your phone.

Client-Server Model

The client-server model is a way of structuring network applications where one program (the client) requests a service or resource, and another program (the server) provides that service or resource. The server is usually a powerful, always-on machine, while clients are the everyday devices (like your phone or laptop) that consume the service.

Example: Your browser (client) requests a webpage from Google's servers (server), which respond with the page content.

 

4. Network Topologies

A network topology is the physical or logical arrangement of devices, cables, and connections in a network — essentially, the 'shape' of the network. Choosing the right topology affects cost, reliability, scalability, and ease of troubleshooting, which is why network designers carefully pick a topology based on the organisation's needs.

TopologyDescriptionAdvantageDisadvantage
BusAll devices share a single central cable (the 'bus').Simple and cheap to set up.One cable failure breaks the whole network.
StarAll devices connect individually to a central switch/hub.Easy to manage; one device failing does not affect others.If the central switch fails, the whole network goes down.
RingDevices are connected in a closed loop, data travels in one direction.Data flow is orderly, reduces collisions.One broken connection can disrupt the entire ring.
MeshEvery device connects directly to every other device.Extremely reliable; multiple backup paths.Very expensive and complex to wire and manage.
HybridA combination of two or more topologies.Flexible; combines advantages of multiple types.Can become complex and costly to design.

 

5. The OSI Model — 7 Layers Explained in Depth

Definition

The OSI (Open Systems Interconnection) Model is a conceptual framework that standardises how different networking systems communicate with each other by dividing the entire communication process into seven distinct layers. Each layer has a specific job, and data passes through all seven layers — from the sender's Application layer down to the Physical layer, across the network, and back up through all seven layers on the receiver's side.

Who created it, and when?

The OSI model was developed by the International Organization for Standardization (ISO) and was formally published in 1984. It was created to provide a common reference framework so that networking hardware and software from different vendors around the world could be designed to work together, instead of every company inventing its own incompatible way of communicating.

Why does the OSI Model exist?

Before standard models like OSI existed, different manufacturers built networking equipment that often could not communicate with equipment from other manufacturers. The OSI model solves this by breaking down the complex task of network communication into seven manageable, independent layers, each with clearly defined responsibilities. This makes it far easier to design, troubleshoot, and teach networking concepts, because problems can be isolated to a specific layer instead of the entire system.

Figure: The 7 layers of the OSI Model, from Application (Layer 7) down to Physical (Layer 1)

Layer 7: Application Layer

The Application layer is the topmost layer of the OSI model and is the one closest to the end user. It provides the interface through which software applications (like your web browser, email client, or file-transfer app) can access network services. This layer does not include the actual applications themselves, but rather the protocols and services that let those applications communicate over a network.

Key Protocols/Devices: HTTP, HTTPS, FTP, SMTP, POP3, IMAP, DNS, Telnet

PDU (Data Unit Name): Data

Example: When you open a browser and visit a website, the Application layer protocol HTTP/HTTPS is what structures that request and response.

Layer 6: Presentation Layer

The Presentation layer acts as a translator between the application and the network. It is responsible for data formatting, encryption/decryption, and compression, ensuring that data sent from one system can be properly understood by another system, even if they use different data formats internally. It essentially prepares data to be 'presented' correctly to the Application layer.

Key Protocols/Devices: SSL/TLS, JPEG, GIF, MPEG, ASCII, EBCDIC

PDU (Data Unit Name): Data

Example: When your browser shows a padlock icon (HTTPS), the encryption happening for a secure connection is handled at the Presentation layer via SSL/TLS.

Layer 5: Session Layer

The Session layer is responsible for opening, managing, and closing a 'session' — a continuous exchange of information — between two devices. It keeps track of whose turn it is to send data, manages synchronisation, and ensures the conversation between devices stays organised, especially useful for long file transfers where the connection must be re-established if interrupted.

Key Protocols/Devices: NetBIOS, RPC, PPTP, SIP

PDU (Data Unit Name): Data

Example: During a video call, the Session layer maintains the ongoing connection between both participants for the duration of the call.

Layer 4: Transport Layer

The Transport layer is responsible for end-to-end communication, delivery of complete messages, error checking, and flow control between two devices. It decides whether data should be sent reliably (guaranteeing delivery and correct order, using TCP) or quickly without guarantees (using UDP). This layer also breaks larger chunks of data into smaller segments and reassembles them at the destination.

Key Protocols/Devices: TCP, UDP

PDU (Data Unit Name): Segment

Example: When downloading a file, TCP (Transport layer) makes sure every single piece arrives and is reassembled in the correct order, even if some pieces take a different path.

Layer 3: Network Layer

The Network layer is responsible for logical addressing and routing — deciding the best path for data to travel from the source device to the destination device, potentially across multiple interconnected networks. This is the layer where IP addresses are used, and routers operate primarily at this layer to forward packets between different networks.

Key Protocols/Devices: IP (IPv4/IPv6), ICMP, IGMP, routers

PDU (Data Unit Name): Packet

Example: When you access a website hosted in another country, the Network layer determines the route your data packets take across the internet to reach that server.

Layer 2: Data Link Layer

The Data Link layer is responsible for node-to-node data transfer within the same local network and handles error detection from the Physical layer. It packages raw bits into structured frames, uses MAC addresses to identify devices on the local network, and controls how devices access the shared transmission medium to avoid data collisions.

Key Protocols/Devices: Ethernet, PPP, MAC addressing, switches

PDU (Data Unit Name): Frame

Example: A switch in your office reads the MAC address in each frame to know exactly which computer on the LAN should receive that data.

Layer 1: Physical Layer

The Physical layer is the lowest layer of the OSI model and deals with the actual physical connection between devices — cables, connectors, radio frequencies, voltages, and the raw transmission of bits (0s and 1s) as electrical, optical, or radio signals. This layer has no understanding of the meaning of the data; it simply moves raw bits from one point to another.

Key Protocols/Devices: Ethernet cables, fibre optics, Wi-Fi radio signals, hubs, NICs

PDU (Data Unit Name): Bits

Example: The Ethernet cable plugged into your computer, or the Wi-Fi radio signal from your router, operates at the Physical layer.

Easy Way to Remember the OSI Layers

  • Top to Bottom (7→1): All People Seem To Need Data Processing (Application, Presentation, Session, Transport, Network, Data Link, Physical).
  • Bottom to Top (1→7): Please Do Not Throw Sausage Pizza Away (Physical, Data Link, Network, Transport, Session, Presentation, Application).

Summary Table: OSI Model Layers

Layer #Layer NamePDUFunction (Short)Example Protocols
7ApplicationDataUser-facing services & appsHTTP, FTP, SMTP, DNS
6PresentationDataFormatting, encryption, compressionSSL/TLS, JPEG
5SessionDataManages sessions/connectionsNetBIOS, RPC
4TransportSegmentEnd-to-end delivery, reliabilityTCP, UDP
3NetworkPacketLogical addressing & routingIP, ICMP
2Data LinkFrameMAC addressing, local deliveryEthernet
1PhysicalBitsRaw signal/bit transmissionCables, Wi-Fi

 

6. The TCP/IP Model — 4 Layers Explained

Definition

The TCP/IP (Transmission Control Protocol/Internet Protocol) Model is a practical, real-world networking framework that describes how data is transmitted over the internet. Unlike the OSI model, which is mostly theoretical and used as a teaching/reference tool, TCP/IP is the actual model implemented and used by the modern internet and almost all real networks today.

Why is TCP/IP used in practice?

TCP/IP was developed earlier than OSI (in the 1970s, by the US Department of Defense's ARPANET project) and was built to be practical and functional rather than strictly theoretical. Because the internet grew up using TCP/IP from the very beginning, it became the de facto global standard, while OSI remains extremely valuable as a conceptual and teaching model for understanding networking in detail.

Figure: TCP/IP's 4 layers mapped against OSI's 7 layers

Application Layer

The Application layer in TCP/IP handles everything from user interaction to data formatting and session management — combining responsibilities that OSI splits across three separate layers. This is where actual network-aware applications and the protocols they use to communicate (like web browsing or email) operate.

OSI Mapping: Combines OSI's Application, Presentation, and Session layers

Key Protocols: HTTP, HTTPS, FTP, SMTP, DNS, Telnet, SSH

Transport Layer

The Transport layer manages end-to-end communication between devices, just like in the OSI model. It decides whether to use a connection-oriented, reliable method (TCP) that guarantees delivery, or a fast, connectionless method (UDP) that does not guarantee delivery but is quicker — making it suitable for different types of applications.

OSI Mapping: Matches OSI's Transport layer

Key Protocols: TCP, UDP

Internet Layer

The Internet layer is responsible for logical addressing (IP addresses) and routing data packets across different networks to reach their destination, exactly like the OSI Network layer. This is the layer that makes the global internet possible, allowing data to hop across many interconnected networks worldwide.

OSI Mapping: Matches OSI's Network layer

Key Protocols: IP (IPv4/IPv6), ICMP, ARP

Network Access Layer (Link Layer)

The Network Access layer (sometimes called the Link layer) combines the responsibilities of OSI's Data Link and Physical layers. It handles how data is physically transmitted over the network medium, including MAC addressing, framing, and the actual hardware signals sent over cables or radio waves.

OSI Mapping: Combines OSI's Data Link and Physical layers

Key Protocols: Ethernet, Wi-Fi (802.11), ARP, device drivers

 

7. OSI vs TCP/IP — Detailed Comparison

Although OSI and TCP/IP both describe how network communication happens in layers, they differ in their origin, structure, and practical use. Understanding these differences is a very common interview topic, so it is worth studying this comparison carefully.

AspectOSI ModelTCP/IP Model 
Full FormOpen Systems InterconnectionTransmission Control Protocol/Internet Protocol 
Number of Layers7 layers4 layers 
Developed ByISO (International Organization for Standardization)US Department of Defense (ARPANET) 
Year19841970s (practically adopted earlier) 
NatureTheoretical / reference modelPractical / implementation model 
UsageUsed mainly for teaching & understanding conceptsUsed as the actual model powering the internet 
ApproachLayer-specific, strict separation of dutiesMore flexible, some layers combine responsibilities 
ReliabilityIndependent of underlying technologyTied closely to Internet Protocol (IP) 
Layer DependencyEach layer depends strictly on the one below itLayers are relatively more independent in practice 
 

Important Point for Interviews

  • OSI is a conceptual reference model with 7 layers used mainly for understanding and teaching networking concepts.
  • TCP/IP is the practical model with 4 layers that is actually implemented and used to run the real-world internet.
  • Both models describe similar underlying concepts, just organised into a different number of layers.

 

8. Data Encapsulation & Decapsulation

What is Encapsulation?

Encapsulation is the process of wrapping data with the necessary protocol header (and sometimes trailer) information as it moves down through each layer of the OSI/TCP-IP model on the sender's side. At every layer, a new header (containing information that layer needs, like port numbers or IP addresses) is added on top of the data received from the layer above, like wrapping a letter inside envelope after envelope before it is posted.

What is Decapsulation?

Decapsulation is the reverse process that happens on the receiver's side — as the data moves up through each layer, the corresponding header added during encapsulation is read and then removed, until only the original application data remains. This allows each layer on the receiving device to correctly interpret the instructions meant specifically for it.

Figure: How data is wrapped (encapsulated) going down the stack, and unwrapped (decapsulated) going up the stack

Step-by-Step: Encapsulation Process

  1. Application layer creates the raw data (e.g., an email message or a webpage request).
  2. Transport layer adds a TCP or UDP header to the data, forming a Segment — this header includes source/destination port numbers.
  3. Network layer adds an IP header to the segment, forming a Packet — this header includes source/destination IP addresses.
  4. Data Link layer adds a frame header and trailer, forming a Frame — this includes source/destination MAC addresses.
  5. Physical layer converts the frame into raw Bits (electrical, optical, or radio signals) and transmits it over the medium.

Step-by-Step: Decapsulation Process (Reverse)

  1. Physical layer receives raw Bits from the transmission medium and passes them up.
  2. Data Link layer reads and removes the frame header/trailer, checking the MAC address to confirm the frame belongs to this device.
  3. Network layer reads and removes the IP header, checking that the packet's destination IP matches this device.
  4. Transport layer reads and removes the TCP/UDP header, and delivers the data to the correct application using the port number.
  5. Application layer receives the final, original data exactly as it was created by the sender's application.

 

9. Important Networking Protocols

A protocol is only useful if you know which OSI/TCP-IP layer it belongs to, what port it commonly uses, and what job it does. This table lists the most frequently asked-about protocols in both real work and interviews.

ProtocolFull FormLayerCommon PortPurpose
HTTPHyperText Transfer ProtocolApplication80Transfers unencrypted web page data
HTTPSHTTP SecureApplication443Transfers encrypted, secure web page data
FTPFile Transfer ProtocolApplication20/21Transfers files between computers
SMTPSimple Mail Transfer ProtocolApplication25Sends outgoing email
DNSDomain Name SystemApplication53Translates domain names to IP addresses
DHCPDynamic Host Config. ProtocolApplication67/68Auto-assigns IP addresses to devices
TCPTransmission Control ProtocolTransport—Reliable, ordered, connection-based delivery
UDPUser Datagram ProtocolTransport—Fast, connectionless delivery, no guarantee
IPInternet ProtocolNetwork/Internet—Logical addressing & routing of packets
ICMPInternet Control Message ProtocolNetwork/Internet—Error reporting & diagnostics (e.g., ping)
ARPAddress Resolution ProtocolData Link/Link—Maps an IP address to a MAC address

 

10. IP Addressing Basics (IPv4 vs IPv6)

An IP address uniquely identifies a device on a network, similar to how a home address identifies where you live. There are currently two versions of IP addressing in use: IPv4, the older and still most common version, and IPv6, the newer version created to solve IPv4's address shortage problem.

IPv4 (Internet Protocol version 4)

IPv4 is the fourth version of the Internet Protocol and uses a 32-bit address format, usually written as four decimal numbers separated by dots (e.g., 192.168.1.1). It supports roughly 4.3 billion unique addresses, which sounded like a lot in the 1980s but has since proven insufficient for the billions of internet-connected devices in use today.

Example: Your home router's IP address, like 192.168.0.1, is an IPv4 address.

IPv6 (Internet Protocol version 6)

IPv6 is the newer version of the Internet Protocol, designed to replace IPv4 and solve its address exhaustion problem. It uses a 128-bit address format, written as eight groups of hexadecimal digits separated by colons, and provides an almost unimaginably large number of unique addresses — enough to assign a unique address to every device that will ever exist.

Example: An IPv6 address looks like: 2001:0db8:85a3:0000:0000:8a2e:0370:7334.

FeatureIPv4IPv6
Address Length32-bit128-bit
FormatDecimal, dot-separated (e.g. 192.168.1.1)Hexadecimal, colon-separated
Total Addresses~4.3 billionVirtually unlimited (340 undecillion)
ConfigurationManual or via DHCPSupports auto-configuration
SecuritySecurity is optional (add-on, like IPSec)Security (IPSec) built into the protocol

 

11. TCP vs UDP

TCP and UDP are the two main protocols at the Transport layer, but they take very different approaches to delivering data. Choosing between them depends on whether an application needs guaranteed, ordered delivery (TCP) or needs speed more than reliability (UDP).

FeatureTCPUDP
Full FormTransmission Control ProtocolUser Datagram Protocol
Connection TypeConnection-oriented (handshake required)Connectionless (no handshake)
ReliabilityReliable — guarantees delivery & orderUnreliable — no delivery guarantee
SpeedSlower (due to error-checking overhead)Faster (minimal overhead)
Error CheckingExtensive error checking & retransmissionBasic error checking, no retransmission
Use CaseWeb browsing, email, file transferVideo streaming, online gaming, VoIP

 

12. Key Takeaways / Important Points

Must-Remember Points

  • A network is any group of devices connected together to share data and resources.
  • Networks are classified by size: PAN (personal) → LAN (local) → MAN (city) → WAN (global).
  • The OSI Model has 7 layers: Application, Presentation, Session, Transport, Network, Data Link, Physical.
  • The TCP/IP Model has 4 layers: Application, Transport, Internet, Network Access.
  • OSI is theoretical/reference; TCP/IP is the practical model that actually runs the internet.
  • Data is encapsulated (headers added) going down the stack on the sender's side, and decapsulated (headers removed) going up the stack on the receiver's side.
  • TCP is reliable but slower; UDP is fast but does not guarantee delivery.
  • IP addresses identify devices logically (can change); MAC addresses identify network hardware physically (usually fixed).
  • Common Application-layer protocols to remember: HTTP/HTTPS, FTP, SMTP, DNS, DHCP.
  • Routers work mainly at the Network layer; switches work mainly at the Data Link layer.

 

13. Scenario-Based Questions (with Answers & Reasons)

The following real-world scenarios test your practical understanding of networking concepts, not just memorised definitions. Try to answer each question yourself before reading the given answer and reasoning.

Q1. You open your browser and type www.example.com, but the page does not load, even though you can browse other websites by typing their IP address directly. What is most likely wrong?

Answer: The most likely issue is a DNS (Domain Name System) problem.

Why / Reason: Since browsing by IP address works fine, the actual network connection is healthy — the problem is specifically with translating the domain name into an IP address, which is exactly the job of DNS. This points to a DNS server issue rather than a general connectivity or hardware problem.

Q2. During a video call, the audio and video occasionally freeze or skip for a fraction of a second, but the call does not disconnect entirely. Which Transport layer protocol is likely being used, and why does this behaviour make sense?

Answer: The application is most likely using UDP (User Datagram Protocol).

Why / Reason: UDP does not guarantee delivery of every packet and does not retransmit lost data, prioritising speed over reliability. For real-time video/audio, occasionally dropping a tiny bit of data (causing a brief skip) is far less disruptive than TCP's approach of pausing everything to retransmit lost packets, which would cause bigger, more noticeable delays.

Q3. An office LAN has 20 computers connected through a switch. One computer's network cable is unplugged. Do the other 19 computers lose their connection to each other?

Answer: No, the other 19 computers continue to communicate with each other normally.

Why / Reason: A switch operates using a star topology logically, where each device has an independent connection to the central switch. Unplugging one device only affects that single device's connection; it does not disrupt the switch's ability to forward traffic between all the other connected devices.

Q4. A network administrator wants to assign a fixed, unique identifier to a new network printer that will never change, even if the printer is moved to a different network. Should they rely on the IP address or the MAC address, and why?

Answer: They should rely on the MAC address.

Why / Reason: A MAC address is burned into the device's hardware by the manufacturer and generally does not change, unlike an IP address, which is assigned based on the network the device is connected to and can change when the device moves to a different network or gets a new DHCP lease.

Q5. You are downloading a large software installer file, and even though your internet connection briefly drops for two seconds mid-download, the file still completes successfully without corruption. Which Transport layer protocol explains this reliability, and how?

Answer: This reliability is explained by TCP (Transmission Control Protocol).

Why / Reason: TCP establishes a connection-oriented session and keeps track of which segments of data have been successfully received. If some segments are lost during the brief connection drop, TCP detects the missing pieces and automatically retransmits them once the connection is restored, ensuring the complete file arrives intact.

Q6. A company wants to connect its Mumbai office and its New York office into a single network so that employees in both locations can access the same internal systems. What type of network are they building?

Answer: They are building a WAN (Wide Area Network).

Why / Reason: Since the two offices are in different countries, this connection spans a very large geographic area, which is the defining characteristic of a WAN. LAN or MAN would not be sufficient, as they only cover a single building/office or a city, respectively.

Q7. While troubleshooting, an engineer says, 'The issue is happening at Layer 2.' What kind of problem are they most likely describing, and which device would they check first?

Answer: They are likely describing a problem related to MAC addressing, frames, or local switching — a Data Link layer issue.

Why / Reason: Layer 2 of the OSI model is the Data Link layer, which is responsible for framing and MAC address-based delivery within a local network. The engineer would most likely check the switch first, since switches operate primarily at this layer and are responsible for directing frames to the correct device.

Q8. A user can successfully ping a server's IP address, but cannot open the website hosted on that server in their browser. At which layer is the underlying network connectivity clearly working, and where might the remaining problem lie?

Answer: Basic network connectivity is confirmed to be working up to the Network layer (since ping/ICMP succeeded), but the problem likely lies at a higher layer, such as the Transport layer (the web service port may be blocked or the server application may not be running) or the Application layer.

Why / Reason: A successful ping confirms that IP-level (Network layer) connectivity between the two devices exists. Since the website still does not load, the issue is not with basic routing/addressing, but rather with something above that layer — commonly a blocked port, a stopped web server application, or a firewall rule specifically blocking web traffic.

 

14. Interview Questions — Basic & Practical

Basic Interview Questions

Q1. What is a computer network?

Answer: A computer network is a group of two or more interconnected devices (computers, servers, phones, etc.) that can communicate and share data and resources with each other using communication links and agreed-upon protocols.

Q2. What is the difference between the internet and a network?

Answer: A network is any group of connected devices, whether small (like a home LAN) or large. The internet is a specific example of a network — actually a massive, global 'network of networks' that connects millions of smaller private and public networks together using standard protocols like TCP/IP.

Q3. What does OSI stand for, and how many layers does it have?

Answer: OSI stands for Open Systems Interconnection. It has 7 layers: Application, Presentation, Session, Transport, Network, Data Link, and Physical, going from the topmost (closest to the user) to the bottommost (closest to the physical hardware).

Q4. What does TCP/IP stand for, and how many layers does it have?

Answer: TCP/IP stands for Transmission Control Protocol/Internet Protocol. It has 4 layers: Application, Transport, Internet, and Network Access (also called the Link layer).

Q5. What is the main difference between a router and a switch?

Answer: A router connects different networks together and routes data between them using IP addresses (operating mainly at the Network layer), while a switch connects devices within the same local network and forwards data using MAC addresses (operating mainly at the Data Link layer).

Q6. What is an IP address?

Answer: An IP address is a unique numerical label assigned to a device on a network, used to identify that device and enable data to be correctly routed to it, similar to how a postal address identifies a home.

Q7. What is a MAC address?

Answer: A MAC address is a unique physical identifier assigned to a device's network interface card by its manufacturer, used to identify devices within a local network at the Data Link layer. Unlike an IP address, it typically does not change.

Q8. What is the difference between TCP and UDP?

Answer: TCP is a connection-oriented, reliable protocol that guarantees ordered delivery of data but is slower due to error-checking overhead. UDP is a connectionless, faster protocol that does not guarantee delivery, making it suitable for real-time applications like video calls and gaming.

Q9. What is DNS and why is it needed?

Answer: DNS (Domain Name System) translates human-readable domain names (like www.google.com) into machine-readable IP addresses. It is needed because humans find names easier to remember than long strings of numbers, but computers actually need the numerical IP address to locate and communicate with each other.

Q10. What is a firewall?

Answer: A firewall is a security device or software that monitors and filters incoming and outgoing network traffic based on predefined security rules, acting as a protective barrier between a trusted internal network and untrusted external networks.

Practical / Scenario-Style Interview Questions

Q11. If you type an IP address directly into your browser instead of a domain name, will the website still load? Explain.

Answer: Yes, in most cases the website will still load, because the browser primarily needs the IP address to locate the server — the domain name is just a human-friendly alias that DNS translates into that same IP address. However, some websites use 'shared hosting' or rely on domain-based routing (like virtual hosts), where multiple websites share one IP address; in such cases, visiting the bare IP might not load the specific site you intended.

Q12. Why does streaming video use UDP instead of TCP, even though UDP is less reliable?

Answer: Streaming video prioritises speed and real-time delivery over perfect reliability. If a tiny bit of video data is lost using UDP, the viewer might see a brief glitch, but the stream continues smoothly. If TCP were used instead, the entire stream would have to pause and wait for lost packets to be retransmitted, causing much more noticeable and disruptive buffering.

Q13. Explain what happens, step by step, when you type a URL into your browser and press Enter (from a networking perspective).

Answer: First, the browser checks if it already knows the IP address for that domain (cache), otherwise it performs a DNS lookup to get the server's IP address. Then, the browser initiates a TCP connection with the server (a three-way handshake), often followed by a TLS handshake if using HTTPS. Once connected, the browser sends an HTTP/HTTPS request for the webpage. The server processes this request and sends back the webpage data in packets, which travel back through the network layers, get reassembled, and are rendered on your screen.

Q14. Why can two devices on different networks have the same private IP address (like 192.168.1.5) without any conflict?

Answer: Private IP addresses (like those in the 192.168.x.x range) are only unique within their own local network, not globally. Since these private networks are isolated from each other by routers/NAT (Network Address Translation), the same private IP address can safely be reused across many different private networks without any conflict, because they never directly need to distinguish between each other on the wider internet.

Q15. A colleague says 'the internet is down' but you can still access an internal company file server. What does this tell you about where the problem likely is?

Answer: This tells you that the local network (LAN) itself is functioning correctly, since internal, local resources (the file server) are still reachable. The problem is more likely isolated to the connection between the local network and the external internet — for example, an issue with the router's WAN connection, the ISP, or DNS — rather than a problem within the local network infrastructure itself.

Q16. Why do network engineers say 'ping' is useful for basic troubleshooting? What layer does it work at?

Answer: Ping uses the ICMP protocol, which operates at the Network layer, to send a small test packet to a destination device and check if it responds. It is useful because it quickly confirms whether basic connectivity exists between two devices at the IP level, helping engineers isolate whether a problem is a fundamental connectivity issue or something higher up, like an application-level problem.

Q17. What is the practical difference between a private IP address and a public IP address?

Answer: A private IP address is used within a local, internal network (like a home or office) and is not directly reachable from the internet; it is meant for internal communication only. A public IP address is globally unique and is used to identify a device or network directly on the internet, allowing it to be reached from anywhere in the world.

Q18. Why might a website work perfectly on Wi-Fi but not load on mobile data, or vice versa?

Answer: This usually points to a network-specific issue rather than a problem with the website itself — for example, a firewall or DNS setting specific to one network, a captive portal on public Wi-Fi that hasn't been accepted yet, or the mobile carrier blocking/throttling certain types of traffic. Since the same device and browser are used in both cases, the variable that changed is the network path, which is the first place to investigate.

Q19. In an office, if the main switch fails, what impact does this have on network connectivity, and why?

Answer: If the main/central switch fails, all devices connected to it will lose connectivity to each other and to the wider network, because a switch acts as the central hub in a star topology that all devices depend on to relay traffic. This is called a 'single point of failure,' which is why critical networks often use redundant switches to avoid a total outage.

Q20. Why is understanding the OSI model useful for real-world troubleshooting, even though TCP/IP is what's actually implemented?

Answer: The OSI model provides a clear, structured mental framework for isolating where a problem is occurring — for example, distinguishing a cabling issue (Physical layer) from an addressing issue (Network layer) or an application bug (Application layer). Even though TCP/IP is the model actually running the internet, OSI's more granular breakdown makes it an excellent diagnostic and teaching tool for methodically narrowing down the root cause of network problems.