CBSE Class 12 CS (083) - Network Protocols and Security

Network Protocols and Security

Network protocols are rules that govern how data is transmitted between devices in a network. Network security involves protecting the network from unauthorized access and threats. This chapter covers major protocols and security concepts as per the CBSE Class 12 Computer Science syllabus.

1. Introduction to Protocols

A network protocol is a set of rules and conventions that govern how data is transmitted between devices in a network. Protocols define the format, timing, sequencing, and error control of data transmission.

Key functions of protocols:

  • Data formatting: Define how data is structured.
  • Addressing: Identify source and destination devices.
  • Routing: Determine the path for data transmission.
  • Error detection: Identify and handle transmission errors.
  • Flow control: Manage data transmission speed.
  • Security: Protect data during transmission.

2. OSI Reference Model

The OSI (Open Systems Interconnection) model is a conceptual framework with 7 layers that standardizes network communication.

LayerNameFunctionProtocols/Devices
7ApplicationUser interface and application supportHTTP, FTP, SMTP, DNS
6PresentationData translation, encryption, compressionSSL/TLS, JPEG, MPEG
5SessionSession management and synchronizationNetBIOS, RPC
4TransportEnd-to-end delivery and reliabilityTCP, UDP
3NetworkRouting and addressingIP, ICMP, Router
2Data LinkFrame transmission, error detectionEthernet, Switch
1PhysicalPhysical transmission of bitsHub, Cables, Repeater

3. TCP/IP Model

The TCP/IP (Transmission Control Protocol/Internet Protocol) model is the practical model used on the Internet. It has 4 layers:

LayerEquivalent OSI LayersProtocols
Application5, 6, 7HTTP, FTP, SMTP, DNS, DHCP
Transport4TCP, UDP
Internet3IP, ICMP, ARP
Network Access1, 2Ethernet, Wi-Fi, PPP

4. HTTP and HTTPS

HTTP (HyperText Transfer Protocol) is used for transferring web pages on the Internet. It works on a request-response model.

  • Default port: 80
  • Stateless protocol.
  • Methods: GET, POST, PUT, DELETE.

HTTPS (HTTP Secure) is the encrypted version of HTTP using SSL/TLS.

  • Default port: 443
  • Provides data encryption, authentication, and integrity.
  • Uses SSL/TLS certificates for encryption.

5. FTP - File Transfer Protocol

FTP (File Transfer Protocol) is used for transferring files between computers on a network.

  • Default port: 21 (control), 20 (data).
  • Supports file upload and download.
  • Requires authentication (username/password).
  • Anonymous FTP allows public file access.

6. SMTP - Simple Mail Transfer Protocol

SMTP (Simple Mail Transfer Protocol) is used for sending email messages between servers.

  • Default port: 25.
  • Used for outgoing mail transmission.
  • Works with POP3 or IMAP for receiving emails.
  • Relays email from sender to recipient server.

7. POP3 and IMAP

POP3 (Post Office Protocol version 3) is used for retrieving emails from a mail server.

  • Default port: 110.
  • Downloads emails to the local device.
  • Emails are typically deleted from server after download.

IMAP (Internet Message Access Protocol) is more advanced.

  • Default port: 143.
  • Emails remain on the server.
  • Allows accessing emails from multiple devices.
  • Supports server-side folders.

8. PPP - Point-to-Point Protocol

PPP (Point-to-Point Protocol) is used for direct communication between two network nodes.

  • Used for dial-up Internet connections.
  • Supports authentication (PAP, CHAP).
  • Can encapsulate multiple network layer protocols.

9. IP Addressing

An IP address is a unique numeric identifier assigned to each device on a network.

IPv4: 32-bit address, written as four octets (e.g., 192.168.1.1). Approximately 4.3 billion addresses.

IPv6: 128-bit address, written as eight groups of hexadecimal digits (e.g., 2001:0db8::1). Provides a much larger address space.

Classes of IPv4:

ClassRangePurpose
A1.0.0.0 - 126.255.255.255Large networks
B128.0.0.0 - 191.255.255.255Medium networks
C192.0.0.0 - 223.255.255.255Small networks
D224.0.0.0 - 239.255.255.255Multicast
E240.0.0.0 - 255.255.255.255Research

10. DNS - Domain Name System

DNS (Domain Name System) translates human-readable domain names (www.techlearners.in) into IP addresses (185.199.108.153).

  • Default port: 53.
  • Hierarchical naming system.
  • Types of records: A, AAAA, CNAME, MX, NS, TXT.
  • DNS servers are organized in a tree structure.

11. Network Security Concepts

Network security involves policies and practices to prevent unauthorized access, misuse, modification, or denial of network resources.

Key objectives (CIA Triad):

  • Confidentiality: Data accessible only to authorized users.
  • Integrity: Data accurate and unmodified during transmission.
  • Availability: Network and data accessible when needed.

12. Common Network Threats

ThreatDescription
MalwareMalicious software (viruses, worms, trojans)
PhishingFraudulent attempts to obtain sensitive information
DoS/DDoSOverwhelming a server with traffic to make it unavailable
Man-in-the-MiddleIntercepting communication between two parties
SQL InjectionInserting malicious SQL queries in input fields
Social EngineeringManipulating people to reveal confidential information

13. Firewall

A firewall is a network security system that monitors and controls incoming and outgoing network traffic based on predetermined security rules.

  • Acts as a barrier between trusted and untrusted networks.
  • Can be hardware-based or software-based.
  • Filters traffic based on IP addresses, ports, and protocols.
  • Types: Packet filter, Stateful inspection, Proxy firewall.

14. Encryption and Cryptography

Encryption converts plain text into ciphertext to prevent unauthorized access.

TypeDescriptionExample
SymmetricSame key for encryption and decryptionAES, DES, Blowfish
AsymmetricPublic key for encryption, private key for decryptionRSA, ECC

15. VPN - Virtual Private Network

A VPN (Virtual Private Network) creates an encrypted tunnel between a user's device and a remote server, providing privacy and security.

  • Encrypts all data traffic.
  • Hides the user's IP address.
  • Allows secure access to private networks remotely.
  • Uses protocols like PPTP, L2TP, IPsec, OpenVPN.

16. Antivirus and Malware Protection

Antivirus software detects, prevents, and removes malicious software from a computer system.

  • Scans files and programs for known malware signatures.
  • Provides real-time protection.
  • Includes firewall and web protection features.
  • Examples: Windows Defender, Kaspersky, Avast.

17. Network Security Best Practices

  • Use strong passwords and change them regularly.
  • Enable two-factor authentication.
  • Keep software and operating systems updated.
  • Use firewalls and antivirus software.
  • Encrypt sensitive data during transmission.
  • Use secure protocols (HTTPS, SFTP, SSH).
  • Regularly back up important data.
  • Educate users about phishing and social engineering.
  • Implement network segmentation.
  • Monitor network activity for suspicious behaviour.

18. Revision Questions and Answers

Very Short Answer Questions

1. What is a network protocol?
A set of rules governing data transmission between devices.

2. Which protocol is used for web browsing?
HTTP/HTTPS.

3. What is the default port for HTTPS?
443.

4. What does DNS stand for?
Domain Name System.

5. Which device monitors and controls network traffic based on rules?
Firewall.

Short Answer Questions

1. Differentiate between HTTP and HTTPS.
HTTP transmits data in plain text (port 80), while HTTPS uses SSL/TLS encryption (port 443) to secure data. HTTPS provides confidentiality, integrity, and authentication, making it suitable for sensitive transactions like online banking.

2. Explain the CIA triad in network security.
The CIA triad consists of Confidentiality (ensuring data is accessible only to authorized users), Integrity (ensuring data is accurate and unmodified), and Availability (ensuring network resources are accessible when needed). These three principles form the foundation of information security.

Long Answer Questions

1. Explain the TCP/IP model with its four layers and the protocols used at each layer.
The TCP/IP model has four layers: (1) Application Layer - provides user services; protocols include HTTP, FTP, SMTP, DNS. (2) Transport Layer - provides end-to-end communication; protocols include TCP (reliable) and UDP (unreliable). (3) Internet Layer - handles routing and addressing; protocol is IP. (4) Network Access Layer - handles physical transmission; protocols include Ethernet and Wi-Fi.

2. What is a firewall? Explain its types and how it protects a network.
A firewall is a security system that monitors and filters network traffic based on rules. Types include: Packet filter firewall (inspects packets), Stateful inspection firewall (tracks connection state), and Proxy firewall (acts as intermediary). Firewalls protect by blocking unauthorized access, preventing malware transmission, logging traffic, and creating a barrier between internal and external networks.