Skip to content
CS core series · PDF ebook

Computer Networks, from bits to HTTPS.

The placement handbook for students, interview candidates and working engineers. OSI and TCP/IP, subnetting, routing, TCP congestion control, DNS, HTTP and TLS, then 25 solved numericals and interview Q&A to lock it in.

12
chapters
25
solved numericals
7
OSI layers, end to end
1
page formula sheet
₹79₹19960% off
  • Secure checkout via Razorpay
  • Digital PDF ebook
  • Read on phone, tablet or laptop
Computer Network ebook coverPDF ebook
Quick answers

Short answers, straight from the book

The questions asked most in exams and interviews, answered the way you would say them out loud.

  • What is the OSI model?

    The OSI model is a 7-layer reference model that splits network communication into Physical, Data Link, Network, Transport, Session, Presentation and Application layers, so each layer can be designed and debugged independently.

  • What is the difference between TCP and UDP?

    TCP is connection-oriented and reliable: it uses a handshake, acknowledgements, retransmission, flow and congestion control. UDP is connectionless and unreliable but faster, with no delivery guarantee, which suits DNS, streaming and gaming.

  • What happens when you type a URL in a browser?

    The browser resolves the domain through DNS, opens a TCP connection to the server, performs a TLS handshake for HTTPS, sends an HTTP request, receives the response and renders the page.

  • What is subnetting?

    Subnetting divides one IP network into smaller subnets by borrowing host bits for the network part. A /26 mask, for example, gives 4 subnets of 62 usable hosts each from a /24 block.

Try it free

Two tools from the book, working right here

Click through the OSI stack to see what each layer adds, then subnet any network the way Chapter 5 teaches it.

Pick a layer

TCP/IP model: layers 7–5 are one Application layer, 2–1 are Network Access.

Layer 4 · Transport

Process-to-process delivery: ports, reliability, ordering, flow and congestion control.

PDU
Segment / Datagram
Address
Port number
TCP/IP layer
Transport
Devices
Hosts, L4 load balancers
  • TCP
  • UDP
  • QUIC

What is on the wire at this layer

TCPTLSHTTPdata
Interview: Why a 3-way handshake and not 2?

Both sides must pick and confirm an initial sequence number. With two messages the server could never know the client received its sequence number, and old duplicate SYNs could open ghost connections.

Subnet calculator

Try 10.0.0.0/8, 172.16.5.4/20 or 192.168.1.130/27.

Address11000000.10101000.00001010.01001101
Mask11111111.11111111.11111111.11000000

26 network bits · 6 host bits

Network
192.168.10.64/26
Broadcast
192.168.10.127
Subnet mask
255.255.255.192
Wildcard
0.0.0.63
Usable hosts
192.168.10.65 – 192.168.10.126
Host count
62
Class · scope
C · private
4 subnets of 14 hosts
  1. 1192.168.10.64/28192.168.10.64 – 192.168.10.79
  2. 2192.168.10.80/28192.168.10.80 – 192.168.10.95
  3. 3192.168.10.96/28192.168.10.96 – 192.168.10.111
  4. 4192.168.10.112/28192.168.10.112 – 192.168.10.127
FeatureTCPUDP
ConnectionConnection-oriented (3-way handshake)Connectionless
ReliabilityAcknowledgements, retransmission, orderingBest effort, no guarantee
ControlFlow control and congestion controlNone built in
Header20 to 60 bytes8 bytes
Used byHTTP/HTTPS, SSH, SMTP, FTPDNS, VoIP, streaming, gaming, QUIC
Mental models

Two flows explain most of networking

Almost every question reduces to how data is wrapped layer by layer, and how a request travels from a name to a server.

Model 01

Encapsulation down the stack

Each layer adds its own header as data moves down the sender's stack, and the receiver strips them in reverse order.

  1. 1Data
  2. 2Segment
  3. 3Packet
  4. 4Frame
  5. 5Bits

Port numbers live in the segment, IP addresses in the packet, MAC addresses in the frame. Knowing this answers a whole class of questions.

Model 02

From URL to web page

Loading a page chains DNS, TCP, TLS and HTTP together. Each step has its own latency and its own failure modes.

  1. 1DNS
  2. 2TCP
  3. 3TLS
  4. 4HTTP
  5. 5Render

Most 'the website will not load' problems are isolated by checking these steps in order, exactly the checklist in Chapter 10.

Syllabus

12 chapters, from the wire to the web

Five parts that follow the stack upward, then a practice set and a revision kit. Search for any topic to see where it is covered.

12 chapters · 63 sections

Part 01Foundations & ModelsBasics, layered models and the physical layer
01Introduction & Network Basics6 sections

What a network is, how networks are classified by size, topologies, transmission modes and switching, the four packet delays, and the metrics used to measure performance.

  • What is a Computer Network?
  • Types of Networks by Size
  • Network Topologies
  • Transmission Modes & Switching
  • Delays in Packet-Switched Networks
  • Network Performance Metrics
02OSI & TCP/IP Reference Models4 sections

Why networks are layered, the OSI and TCP/IP models side by side, how data is encapsulated and decapsulated, and which address is used at each layer.

  • Why Layered Architecture?
  • OSI vs TCP/IP
  • Encapsulation & Decapsulation
  • Addresses at Each Layer
03Physical Layer5 sections

Transmission media, analog vs digital signals, bandwidth and baud, channel capacity with Nyquist and Shannon, line coding and multiplexing.

  • Transmission Media
  • Analog vs Digital, Bandwidth, Baud
  • Channel Capacity: Nyquist and Shannon
  • Line Coding
  • Multiplexing
Part 02Link, IP & RoutingFrames, addresses and how packets find their way
04Data Link Layer6 sections

Framing and stuffing, error detection and correction, flow control with sliding-window ARQ, medium access control, and Ethernet, switches, VLANs and ARP.

  • Responsibilities of the Data Link Layer
  • Framing & Stuffing
  • Error Detection and Correction
  • Flow Control & ARQ Protocols
  • Medium Access Control (MAC)
  • Ethernet, Switches, VLANs, ARP
05Network Layer: IP, Subnetting, NAT8 sections

IPv4 addressing, subnetting, VLSM, CIDR and longest prefix match, the IPv4 header and fragmentation, ICMP, DHCP, NAT and IPv6.

  • Network Layer Functions
  • IPv4 Addressing
  • Subnetting
  • VLSM
  • CIDR, Supernetting & Longest Prefix Match
  • IPv4 Header and Fragmentation
  • ICMP, DHCP and NAT
  • IPv6
06Routing Algorithms & Protocols4 sections

Forwarding vs routing, distance vector with Bellman-Ford, link state with Dijkstra and OSPF, and BGP, the routing protocol of the internet.

  • Forwarding vs Routing
  • Distance Vector Routing (Bellman-Ford)
  • Link State Routing (Dijkstra) - OSPF
  • BGP - the Routing Protocol of the Internet
Part 03Transport & ApplicationTCP, UDP, DNS, HTTP and email
07Transport Layer: TCP & UDP7 sections

Process-to-process delivery, UDP, the TCP connection lifecycle, flow control, congestion control, timeouts and RTT estimation, and a clear TCP vs UDP comparison.

  • Process-to-Process Delivery
  • UDP - User Datagram Protocol
  • TCP - Transmission Control Protocol
  • Flow Control
  • Congestion Control
  • Timeouts and RTT Estimation
  • TCP vs UDP
08Application Layer5 sections

Client-server vs peer-to-peer, DNS resolution, HTTP versions and methods, email with SMTP, POP3 and IMAP, and other everyday application protocols.

  • Client-Server vs Peer-to-Peer
  • DNS - Domain Name System
  • HTTP
  • Email: SMTP, POP3, IMAP
  • Other Application Protocols
Part 04Security & Modern InfraTLS, firewalls, Wi-Fi, CDNs and debugging
09Network Security Essentials5 sections

Security goals, cryptography building blocks, how TLS and HTTPS use certificates, firewalls, IDS/IPS and VPNs, and common attacks with their defences.

  • Security Goals
  • Cryptography Building Blocks
  • TLS / HTTPS and Certificates
  • Firewalls, IDS/IPS, VPN
  • Common Attacks and Defences
10Wireless, Modern Infrastructure & Tools4 sections

Wi-Fi (IEEE 802.11), load balancers, proxies and CDNs, the command-line tools every engineer uses, and a step-by-step checklist for 'the website will not load'.

  • Wi-Fi (IEEE 802.11)
  • Load Balancers, Proxies, CDNs
  • Command-line Tools
  • Troubleshooting: "The website will not load"
Part 05Practice & RevisionSolve, drill and revise before the interview
11Numerical Practice Set1 sections

25 numerical questions on delays, Shannon and Nyquist, CRC, sliding window, subnetting, CIDR, TCP and more, each with a full worked answer.

  • 25 questions with answers and working
12Interview Questions & Quick Revision8 sections

Interview questions grouped by topic plus scenario questions, followed by a one-page formula sheet and a port number cheat-sheet.

  • Fundamentals
  • Data Link & Network Layer
  • Transport Layer
  • Application Layer & Web
  • Security
  • Scenario Questions
  • One-page Formula Sheet
  • Port Number Cheat-sheet
Free samples

Run the concepts, not just read them

Short programs and commands from the book. Copy them, run them, change the numbers and watch what happens.

Subnet a network with Python

Split 192.168.10.0/24 into four /26 subnets and list the network, broadcast and usable host range of each, the same working you do in an exam.

subnet.py
import ipaddress

net = ipaddress.ip_network("192.168.10.0/24")

for sub in net.subnets(new_prefix=26):
    hosts = list(sub.hosts())
    print(
        f"{sub}  broadcast={sub.broadcast_address}"
        f"  usable={hosts[0]} - {hosts[-1]}"
        f"  ({len(hosts)} hosts)"
    )

# 192.168.10.0/26    usable=192.168.10.1 - 192.168.10.62   (62 hosts)
# 192.168.10.64/26   usable=192.168.10.65 - 192.168.10.126 (62 hosts)
# ...
Choose your book

The CS core set: Networks, OS and SQL

The three subjects asked in almost every campus and off-campus technical round. Start with this one, add the others when you need them.

This page
Computer Networks

Computer Network

OSI and TCP/IP, subnetting, routing, TCP, DNS, HTTP and TLS, with solved numericals.

  • 12 chapters, physical to application
  • 25 solved numericals
  • Interview Q&A and port cheat-sheet
₹79₹19960% off
Operating Systems

Operating Systems

Processes, threads, scheduling, synchronization, deadlocks, memory and file systems.

  • Scheduling with Gantt charts
  • Paging, page replacement, deadlocks
  • Interview Q&A and numericals
₹79₹19960% off
Details
SQL & Databases

SQL & Database Interview Handbook

From first SELECT to window functions, indexes, transactions and scaling databases.

  • Joins, CTEs, window functions
  • Indexes, transactions, isolation
  • Interview-style query problems
₹79₹19960% off
Details
Who it's for

Written for exams, interviews and real networks

  • Students

    Built around university and GATE-style syllabi. Every layer explained from zero with diagrams, worked numericals and revision tables.

    • Syllabus-aligned flow
    • Step-by-step numericals
    • Formula sheet
  • Placement prep

    Computer Networks is asked in most campus and off-campus technical rounds. Practise the exact questions, with answers short enough to say aloud.

    • Q&A by topic
    • Scenario questions
    • Port cheat-sheet
  • Working professionals

    Understand what happens beneath your API calls. Debug DNS, TLS, latency and connectivity issues with confidence.

    • LBs, proxies, CDNs
    • CLI debugging tools
    • 'Won't load' checklist

What you get

  • 12 chapters, physical to application

    Every layer explained with diagrams and tables.

  • 25 solved numericals

    Delays, Shannon, CRC, sliding window, subnetting, CIDR, TCP.

  • Interview Q&A by topic

    Plus scenario questions interviewers love.

  • Formula sheet and port cheat-sheet

    One page each, made for the night before.

  • Real debugging toolkit

    ping, dig, traceroute, nc, openssl and curl, in order.

  • GATE and semester ready

    Follows the standard university syllabus.

₹79₹19960% off
Questions

Before you buy

Anything else? Write to [email protected]

Who is this Computer Networks ebook for?

It is written for college students preparing for semester exams and GATE, candidates preparing for campus and off-campus placements, and working professionals who want to understand and debug the network beneath their applications.

Do I need prior knowledge of networking?

No. The book starts with what a network is and builds layer by layer, from the physical layer up to the application layer. Basic familiarity with programming is enough.

Does it cover subnetting, VLSM and CIDR?

Yes. Chapter 5 covers IPv4 addressing, subnetting, VLSM, CIDR, supernetting and longest prefix match with worked examples, along with ICMP, DHCP, NAT and IPv6.

Are there numerical problems with solutions?

Yes. Chapter 11 is a practice set of 25 numerical questions with full working. Topics include delays, Nyquist and Shannon capacity, sliding window efficiency, subnetting, CIDR and TCP.

Does the book explain TCP congestion control?

Yes. The transport layer chapter covers the TCP handshake, flow control, congestion control, timeouts and RTT estimation, and ends with a TCP vs UDP comparison.

Will it help in technical interviews?

Yes. Chapter 12 groups interview questions by topic (fundamentals, data link and network layer, transport, application and web, security) and adds scenario questions, a one-page formula sheet and a port number cheat-sheet.

Does it cover security, DNS, HTTP and TLS?

Yes. The Application Layer chapter covers DNS, HTTP and email protocols, and the Network Security chapter covers cryptography, TLS/HTTPS certificates, firewalls, IDS/IPS, VPNs and common attacks with defences.

In what format will I receive the book?

It is a digital PDF ebook. After a successful payment you receive access through the same flow used for all Target Trek ebooks. For any payment or access issue, contact our support email.

Know what happens between the click and the page.

12 chapters, 25 solved numericals and an interview Q&A bank, in one PDF you can read anywhere.

₹79₹19960% off
Resume Lab by Target Trek

Applying everywhere but getting no interview calls?

Your book gets you ready for the interview. A better resume gets you the call. See exactly which lines cost you shortlists, and how to fix each one.

~2 min
AI report
Real people
review it
Pay once
no subscription
Computer Networks: The Placement Handbook
₹79₹19960% off