Data Communication & Networking

Detailed Notes — Quick Summary

These notes cover fundamentals of data communication, OSI/TCP-IP models, transmission media, protocols, switching, routing, addressing, transport layer, application layer protocols, wireless networks, security, QoS and practical subnetting & VLAN topics.

1. Basics of Data Communication

Data communication involves transmission of digital/analog signals between sender and receiver through a medium. Key metrics: bandwidth, throughput, latency, jitter, BER.

2. Layered Models

OSI 7-layer: Physical, Data Link, Network, Transport, Session, Presentation, Application.
TCP/IP: Link (Network Interface), Internet, Transport (TCP/UDP), Application.

3. Physical Layer

Cables: twisted pair, coaxial, fiber optic. Wireless: radio, microwave. Concepts: attenuation, noise, signal-to-noise ratio, modulation (AM, FM, ASK, FSK, PSK), multiplexing (TDM, FDM), Shannon's capacity.

4. Data Link Layer

Provides framing, error detection (parity, CRC), and MAC addressing. Protocols: Ethernet (CSMA/CD), PPP, ARP. Switches operate at this layer.

5. Network Layer

Responsible for logical addressing (IP), routing, fragmentation. IP versions: IPv4 (32-bit), IPv6 (128-bit). Routing algorithms: distance-vector (RIP), link-state (OSPF), path-vector (BGP).

6. Transport Layer

TCP: connection-oriented, reliable, flow (sliding window), congestion control (slow start, AIMD). UDP: connectionless, low overhead.

7. Application Layer

Common protocols: HTTP/HTTPS, FTP, SMTP, POP3, IMAP, DNS, DHCP. DNS maps domain names to IP addresses; HTTP is stateless; TLS/SSL provides encryption.

8. Switching & Routing

Switching: circuit vs packet vs message switching. Routing: static vs dynamic, convergence, metrics. NAT translates private addresses to public IPs. VLANs segment layer-2 networks.

9. Wireless & Mobile Networks

Wi-Fi standards (802.11a/b/g/n/ac/ax), cellular generations (3G/4G/LTE/5G), handoff, MAC for wireless, fading & multipath.

10. Network Security

Encryption (symmetric/asymmetric), firewalls, VPNs, IDS/IPS, authentication, CSRF/XSS, SSL/TLS, packet filtering, access control lists.

11. Performance & QoS

QoS mechanisms: prioritization, traffic shaping, DiffServ, IntServ. Metrics: latency, jitter, packet loss. Techniques: queuing, scheduling (WFQ, RR), policing.

12. Error Control & Flow Control

Error detection (checksum, CRC), correction (Hamming codes), ARQ (Stop-and-Wait, Go-Back-N, Selective Repeat). Flow control: sliding window.

13. Addressing & Subnetting

IPv4 classes, CIDR notation, subnet mask, calculating subnets, host ranges, broadcast and network addresses. Private IP ranges (RFC1918).

14. Practical Tips

50 Practice MCQs — Correct answers highlighted

1. Which model standardizes network functions into seven layers?

  • A) OSI model ✅
  • B) TCP/IP model
  • C) Hybrid model
  • D) ISO-IEC model

2. What is the primary function of the network layer?

  • A) Error detection
  • B) Routing and logical addressing ✅
  • C) Physical transmission
  • D) Session management

3. Which device operates at the data link layer and forwards frames by MAC address?

  • A) Switch ✅
  • B) Hub
  • C) Router
  • D) Modem

4. Ethernet primarily uses which MAC protocol?

  • A) CSMA/CD ✅
  • B) Token Ring
  • C) TDMA
  • D) FDMA

5. Which of the following is a connection-oriented transport protocol?

  • A) TCP ✅
  • B) UDP
  • C) ICMP
  • D) IGMP

6. Which IP version uses 128-bit addresses?

  • A) IPv4
  • B) IPv6 ✅
  • C) IPX
  • D) ARP

7. What does DNS do?

  • A) Maps domain names to IP addresses ✅
  • B) Routes packets
  • C) Encrypts data
  • D) Manages ARP tables

8. Which protocol is used to send email between mail servers?

  • A) SMTP ✅
  • B) FTP
  • C) HTTP
  • D) SNMP

9. Which technique is used for error detection in frames commonly?

  • A) Parity only
  • B) CRC (Cyclic Redundancy Check) ✅
  • C) Checksum only
  • D) Hamming only

10. ARP translates between which two identifiers?

  • A) IP address to MAC address ✅
  • B) Domain to IP
  • C) Port to service
  • D) Hostname to domain

11. Which routing protocol is distance-vector based?

  • A) RIP ✅
  • B) OSPF
  • C) BGP
  • D) IS-IS

12. NAT is primarily used to:

  • A) Encrypt traffic
  • B) Map private addresses to public addresses ✅
  • C) Route between VLANs
  • D) Detect intrusions

13. Which UDP is preferable over TCP when low latency is needed?

  • A) UDP ✅
  • B) TCP
  • C) SCTP
  • D) DCCP

14. What is sliding window used for?

  • A) Flow control and reliable delivery ✅
  • B) Address translation
  • C) Error detection only
  • D) QoS marking

15. Which layer does IP belong to?

  • A) Network layer ✅
  • B) Data link layer
  • C) Transport layer
  • D) Physical layer

16. TTL (Time To Live) in IP header prevents:

  • A) Packets looping indefinitely ✅
  • B) Packet loss
  • C) Fragmentation
  • D) ARP table overflow

17. Which protocol resolves domain names?

  • A) DNS ✅
  • B) DHCP
  • C) LDAP
  • D) SNMP

18. Which layer provides end-to-end reliability?

  • A) Transport layer (e.g., TCP) ✅
  • B) Network layer
  • C) Data link layer
  • D) Physical layer

19. DHCP is used for:

  • A) Automatic IP configuration ✅
  • B) DNS resolution
  • C) Routing decisions
  • D) Packet switching

20. Which device connects multiple networks and forwards packets based on IP?

  • A) Router ✅
  • B) Switch
  • C) Hub
  • D) Bridge

21. What is MTU?

  • A) Maximum Transmission Unit (largest IP packet size) ✅
  • B) Minimum Transfer Unit
  • C) Maximum Transfer Utility
  • D) Medium Transmission Unit

22. Which protocol provides secure web browsing?

  • A) HTTPS (HTTP over TLS) ✅
  • B) HTTP
  • C) FTP
  • D) Telnet

23. What is the main advantage of fiber optic over copper?

  • A) Higher bandwidth and lower attenuation ✅
  • B) Lower cost always
  • C) Easier to install
  • D) Immune to all noise types

24. Which protocol is used for reliable file transfer?

  • A) FTP ✅
  • B) HTTP
  • C) SMTP
  • D) SNMP

25. ICMP is primarily used for:

  • A) Diagnostic and error messages (e.g., ping) ✅
  • B) Reliable transport
  • C) Routing updates
  • D) Name resolution

26. VLANs operate at which layer?

  • A) Data Link layer (Layer 2) ✅
  • B) Network layer
  • C) Transport layer
  • D) Application layer

27. Which algorithm is used for loop-free routing and faster convergence: OSPF or RIP?

  • A) RIP
  • B) OSPF ✅
  • C) Both same
  • D) Neither

28. Which port number is used by HTTPS by default?

  • A) 443 ✅
  • B) 80
  • C) 21
  • D) 25

29. What does DHCP stand for?

  • A) Dynamic Host Configuration Protocol ✅
  • B) Domain Host Control Protocol
  • C) Dynamic Hypertext Control Protocol
  • D) Direct Host Communication Protocol

30. Which of the following is true about TCP's slow start?

  • A) Congestion window increases exponentially until threshold ✅
  • B) It decreases window exponentially
  • C) It's used in UDP
  • D) It avoids flow control

31. SIP protocol is used for:

  • A) VoIP signaling and session control ✅
  • B) Email transfer
  • C) File sharing
  • D) DNS updates

32. Which mechanism avoids collision in wireless networks (802.11)?

  • A) CSMA/CA (Collision Avoidance) ✅
  • B) CSMA/CD
  • C) Token passing
  • D) FDMA

33. Which of these is NOT a routing metric?

  • A) Hop count
  • B) Bandwidth
  • C) MAC address ✅
  • D) Delay

34. FTP uses which ports by default?

  • A) 20 (data), 21 (control) ✅
  • B) 80 and 443
  • C) 53 and 67
  • D) 25 and 110

35. Which header field identifies the application protocol in HTTP/1.1?

  • A) Host and Content-Type help identify request contexts, but HTTP uses URI and method ✅
  • B) TTL
  • C) Sequence Number
  • D) MAC

36. Which of the following provides confidentiality and integrity for IP packets?

  • A) IPsec ✅
  • B) DNS
  • C) ARP
  • D) DHCP

37. Which technology allows multiple virtual networks over a single physical network?

  • A) VLAN ✅
  • B) NAT
  • C) ARP
  • D) DHCP

38. Which command-line tool is commonly used to view packet flows?

  • A) Wireshark/Tcpdump ✅
  • B) Netstat only
  • C) Ping only
  • D) Traceroute only

39. Subnet mask 255.255.255.0 corresponds to which CIDR?

  • A) /24 ✅
  • B) /16
  • C) /8
  • D) /32

40. Which protocol uses three-way handshake?

  • A) TCP ✅
  • B) UDP
  • C) ICMP
  • D) ARP

41. Which method does DHCP use to assign addresses temporarily?

  • A) Lease ✅
  • B) Permanent binding
  • C) NAT mapping
  • D) Static routing

42. Which of the following is a transport-layer multiplexing identifier?

  • A) Port number ✅
  • B) IP address
  • C) MAC address
  • D) VLAN ID

43. Which attack involves overwhelming a service with traffic?

  • A) Denial of Service (DoS/DDoS) ✅
  • B) Man-in-the-middle
  • C) Phishing
  • D) SQL injection

44. Which mechanism fragments IP packets when needed?

  • A) IP fragmentation at routers/source ✅
  • B) TCP segmentation
  • C) Ethernet jumbo frames only
  • D) ARP splitting

45. Which protocol helps discover the path MTU between source and destination?

  • A) Path MTU discovery (PMTUD) using ICMP ✅
  • B) ARP probe
  • C) DHCP discover
  • D) DNS lookup

46. Which technology separates control plane and data plane (popular in SDN)?

  • A) Software Defined Networking (SDN) ✅
  • B) VLAN
  • C) NAT
  • D) OSPF

47. Which of the following is an IPv4 private address range?

  • A) 192.168.0.0/16 ✅
  • B) 8.8.8.0/24
  • C) 172.32.0.0/12
  • D) 224.0.0.0/4

48. Which protocol is used to synchronize time across networks?

  • A) NTP (Network Time Protocol) ✅
  • B) SMTP
  • C) FTP
  • D) RIP

49. Which layer handles data encryption for secure communications in the OSI model?

  • A) Presentation layer ✅
  • B) Session layer
  • C) Transport layer
  • D) Application layer

50. Which tool helps trace the route packets take to reach a destination?

  • A) Traceroute / tracert ✅
  • B) Ping only
  • C) Netstat only
  • D) Nslookup only