Skip to content

Networks & Security — DSSSB TGT CS Notes

Must-know bullets, comparisons, and MCQ traps. Concise exam focus.


1. Network Types

TypeScopeExample
LANSingle building / campusSchool lab, office
MANCity / metroCable TV network across city
WANCountries / continentsInternet, bank branches
PANPersonal (metres)Bluetooth, USB tether
CANCampusMultiple buildings linked

Trap: MAN is not larger than WAN. Order by size: PAN < LAN < CAN < MAN < WAN.


2. Topologies

TopologyIdeaProCon
BusSingle backbone cableCheap, simpleCable cut = whole net down
StarCentral hub/switchEasy to add nodes; fault isolationHub/switch failure = all down
RingClosed loopEqual accessOne break can disrupt (unless dual ring)
MeshMany/all connectedHighly reliableCostly cabling
TreeHierarchical starsScalableRoot failure impact
HybridMix of aboveFlexibleComplex design

Exam favourite: Star is most common today (switch at centre). Full mesh needs (n(n-1)/2) links.


3. Network Devices

DeviceLayer (approx.)Function
RepeaterPhysicalAmplifies / regenerates signal (extends distance)
HubPhysicalBroadcasts to all ports (shared collision domain)
SwitchData linkForwards by MAC; separate collision domains
BridgeData linkConnects similar LANs; filters by MAC
RouterNetworkRoutes by IP; connects different networks
GatewayMulti / ApplicationProtocol translation between dissimilar networks
ModemPhysicalModulates/demodulates (digital ↔ analog) for phone/cable

Traps:

  • Hub = dumb broadcast; Switch = MAC learning.
  • Router ≠ switch (IP vs MAC).
  • Gateway is broader than router (can convert protocols).
  • Repeater does not filter traffic.

4. OSI 7 Layers + TCP/IP 4 Layers

OSI (bottom → top)

#LayerPDU / focusKey protocols / examples
1PhysicalBits, cables, signalsRJ-45, fibre, hubs, repeaters
2Data LinkFrames, MACEthernet, PPP, switches, bridges
3NetworkPackets, routingIP, ICMP, routers
4TransportSegments / datagramsTCP, UDP
5SessionDialogs, sessionsRPC, NetBIOS (classic)
6PresentationFormat, encryption, compressionSSL/TLS often mapped here/app, JPEG, ASCII
7ApplicationUser servicesHTTP, FTP, SMTP, DNS, DHCP

Mnemonic: Please Do Not Throw Sausage Pizza Away.

TCP/IP model (4 layers)

TCP/IPMaps roughly to OSIProtocols
Network Access / Link1–2Ethernet, Wi-Fi
Internet3IP, ICMP, ARP
Transport4TCP, UDP
Application5–7HTTP, FTP, SMTP, DNS, DHCP

Trap: OSI has 7 layers; TCP/IP commonly taught as 4 (sometimes 5 with separate physical/data link). DNS and HTTP are application layer, not transport.


5. IP Addressing Basics (IPv4)

  • Address: 32 bits → 4 octets (e.g. 192.168.1.10).
  • Classes (legacy classful):
ClassFirst octetDefault maskHosts (approx.)
A1–126255.0.0.0 (/8)~16M
B128–191255.255.0.0 (/16)~65K
C192–223255.255.255.0 (/24)254
D224–239Multicast
E240–255Experimental
  • 127.0.0.0/8 = loopback (127.0.0.1 = localhost). 0 and 255 in class A first octet historically reserved (exam often: 1–126 for A).
  • Private ranges (RFC 1918):
    • 10.0.0.010.255.255.255
    • 172.16.0.0172.31.255.255
    • 192.168.0.0192.168.255.255
  • Subnet mask: separates network vs host portion. Longer prefix = more networks, fewer hosts.
  • Broadcast: all host bits 1. Network ID: all host bits 0.

Trap: 172.32.x.x is not private (only 172.16–31). Class D is multicast, not “for large companies.”


6. TCP vs UDP

TCPUDP
ConnectionConnection-orientedConnectionless
ReliabilityACK, retransmitBest-effort
OrderSequencedNo guarantee
OverheadHigherLower, faster
UseHTTP, FTP, SMTP, SSHDNS (often), DHCP, streaming, VoIP

Trap: DNS commonly uses UDP port 53 (TCP for zone transfers). “Faster” ≠ always better for file transfer.


7. Common Application Protocols

ProtocolPort (default)Role
HTTP80Web (clear text)
HTTPS443HTTP over TLS
FTP20 (data), 21 (control)File transfer
SMTP25Send email
POP3110Retrieve mail (download)
IMAP143Retrieve mail (server-side)
DNS53Name → IP
DHCP67/68Auto IP config
SSH22Secure remote shell
Telnet23Insecure remote (avoid)

Traps: SMTP sends; POP/IMAP receive. HTTPS is not a separate L7 app inventing encryption alone — it uses SSL/TLS. DHCP assigns IP, mask, gateway, DNS.


8. Circuit Switching vs Packet Switching

CircuitPacket
PathDedicated path for callPackets share links
ResourceReservedOn demand
DelaySetup delay; then steadyVariable (queuing)
ExampleTraditional PSTNInternet (IP)
EfficiencyWasteful if idleBetter for bursty data

Trap: Internet uses packet switching. ATM/frame relay are packet-oriented variants (exam usually contrasts with circuit).


9. Transmission Media

Guided (wired):

  • Twisted pair (UTP/STP) — cheap LAN
  • Coaxial — bus/legacy cable TV
  • Fibre optic — high bandwidth, EMI immune, long distance

Unguided (wireless): radio, microwave, infrared, satellite.

Comparisons: Fibre > copper for speed/distance/noise. Infrared needs LOS. Microwave is line-of-sight point-to-point.


10. Network Security Essentials

CIA triad

  • Confidentiality — only authorised read (encryption, access control).
  • Integrity — data not altered unnoticed (hashing, signatures).
  • Availability — services usable when needed (redundancy, anti-DoS).

Firewall

  • Filters traffic by rules (IP, port, protocol); can be hardware/software.
  • Packet filter vs stateful vs application (proxy) — know names.

Antivirus

  • Detects/removes malware (signatures + heuristics/behaviour).

Cryptography basics

SymmetricAsymmetric
KeysSame key encrypt/decryptPublic + private pair
SpeedFastSlower
UseBulk data (AES)Key exchange, signatures (RSA, ECC)
ProblemKey distributionComputational cost

Digital signature

  • Sender signs with private key; anyone verifies with public key.
  • Provides integrity + authenticity + non-repudiation (not confidentiality alone).

Hashing

  • One-way fixed-size digest (MD5 legacy, SHA-256 etc.).
  • Same input → same hash; tiny change → different hash.
  • Used for integrity checks, password storage (with salt).

Trap: Hashing ≠ encryption (no decryption). Digital signature ≠ encrypting the whole message for secrecy.

Threats / attacks

  • Phishing — fake sites/emails to steal credentials.
  • Hacking — unauthorised access (broad term).
  • DoS / DDoS — flood to deny availability.
  • Malware — virus, worm, Trojan, ransomware.
  • Man-in-the-middle — intercept/alter communications.

VPN

  • Encrypted tunnel over public network; remote secure access to private net.

SSL / TLS

  • Secure channel for apps (HTTPS uses TLS).
  • Handshake establishes keys; then symmetric crypto for data.
  • Provides confidentiality + integrity of the session.

Trap: SSL is older name; modern exams say TLS. VPN ≠ antivirus. Firewall does not replace patching/user awareness.


Quick MCQ Checklist

  1. Device layer: hub/repeater L1; switch L2; router L3.
  2. OSI count = 7; TCP/IP = 4.
  3. Private IP ranges memorise.
  4. TCP reliable; UDP fast/unreliable.
  5. SMTP send; DNS name resolution; DHCP auto config.
  6. Packet switching = Internet.
  7. CIA: Confidentiality, Integrity, Availability.
  8. Symmetric = one key; asymmetric = two keys.
  9. Sign with private; verify with public.
  10. HTTPS port 443; HTTP 80; DNS 53.