Computer Networks and Internet Protocols Week - 1

NPTEL CNIP Week 1 – Comprehensive Exam-Focused Notes

Cover image
Materio
Materio
Listen

Course Objectives

  • Understand how two computers communicate over the Internet.
  • Learn basic functionalities of computer networks.
  • Gain knowledge of network programming.
  • Explore the evolution and future design needs of computer networks.

Network Architecture

  • Definition: The conceptual design that defines the structure and operation of a network, visualizing how two remote computers communicate.
  • Requirement: Conversion of digital data to analog signals and vice versa for communication.
  • End-to-End Traffic Control: Ensures reliable data transfer across the entire network, not just individual links.

Network Protocol Stack

  • Layered Approach: Communication tasks are divided into layers, each responsible for specific functions.
  • Key Layers (with examples):
    • Application: HTTP, FTP, SMTP
    • Transport: TCP, UDP, RTP
    • Network: IPv4, IPv6, MPLS
    • Data Link: Ethernet, WiFi, Bluetooth, UMTS, LTE
    • Physical: Transmission of raw bits over a medium

Protocols

  • Definition: A controlled sequence of messages exchanged between systems to accomplish a task.
  • Components: Specifies message format, sequence, and rules for communication.
  • Examples: HTTP (web), FTP (file transfer), SMTP (email), TCP (reliable transport), UDP (unreliable transport).

OSI Model (Open Systems Interconnection)

OSI LayerFunction
ApplicationNetwork applications (file transfer, terminal emulation)
PresentationData formatting, encryption
SessionSession establishment/maintenance
TransportEnd-to-end reliable/unreliable delivery
NetworkPacket routing and delivery
Data LinkFraming, error checking, physical addressing
PhysicalTransmission of binary data over the medium
  • Comparison with TCP/IP:
    • TCP/IP combines Application, Presentation, and Session into one layer.
    • Both have Transport, Network, Data Link, and Physical layers.

TCP/IP Protocol Stack

  • Application Layer: User processes (e.g., Telnet, FTP, SMTP, HTTP). Uses port numbers and sockets for communication.
  • Transport Layer: End-to-end data transfer. Main protocols:
    • TCP: Connection-oriented, reliable, congestion and flow control.
    • UDP: Connectionless, unreliable, faster, used where some data loss is tolerable.
  • Network (Internetwork) Layer: Provides a virtual network, main protocol is IP (connectionless, no error recovery). Handles routing.
  • Network Interface (Link) Layer: Interface to physical network hardware (e.g., Ethernet, ATM). May or may not provide reliable delivery.

Encapsulation

  • Concept: Each layer adds its own header (and sometimes trailer) to the data from the layer above.
  • Order: Application Data → Transport Header → Network Header → Data Link Header → Physical Transmission

Network Devices and Their Functions

DeviceLayer(s)Function
NIC2Provides host access to media using MAC addresses
Repeater1Amplifies/retimes signals to extend network distance
Hub1Multi-port repeater; broadcasts to all ports
Bridge2Filters traffic based on MAC addresses
Switch2Multi-port bridge; dedicated bandwidth per port
Router3Filters/forwards traffic based on IP addresses
  • Broadcast Domain: All devices that receive all network broadcasts on a segment.
  • Collision Domain: Network area where data packets can collide (hubs = 1 domain, switches = 1 per port).

LAN and WAN

  • LAN (Local Area Network): Covers small geographic area (e.g., office). Devices: NICs, repeaters, hubs, bridges, switches, routers.
  • WAN (Wide Area Network): Covers large areas, connects multiple sites, often uses leased lines.

Hierarchical Design Model

  • Access Layer: End-user connectivity.
  • Distribution Layer: Policy-based routing, access control.
  • Core Layer: Fast packet switching across the internetwork.

Switching Technologies

  • Circuit Switching:
    • Dedicated path between two stations.
    • Phases: Establish, Transfer, Disconnect.
    • Channel reserved for duration, inefficient for data, best for voice.
    • Approaches: Space-Division, Time-Division, TDM Bus.
  • Packet Switching:
    • Data split into packets, each routed independently.
    • Two types:
      • Datagram: Each packet independent, may take different routes, may arrive out of order.
      • Virtual Circuit: Preplanned route, all packets follow same path, connection-oriented.
    • Advantages: Efficient line use, data rate conversion, can handle busy networks, priorities possible.

Comparison Table: Circuit vs. Packet Switching

FeatureCircuit SwitchingPacket Switching
BandwidthGuaranteedDynamically allocated
EfficiencyLow (wasted if idle)High (shared among users)
DelayLow, once establishedMay have delays/congestion
SuitabilityVoiceData
CostIndependent of data transmittedBased on usage

Protocols – Key Elements

  • Syntax: Data formats, signal levels.
  • Semantics: Control information, error handling.
  • Timing: Speed matching, sequencing.

Protocol Interfaces

  • Service Interface: Operations provided to the layer above.
  • Peer Interface: Messages exchanged with the same layer on another system.

Internet Architecture

  • Defined by IETF (Internet Engineering Task Force).
  • Hourglass Model: IP at the narrow waist, many protocols above and below.
  • Flexibility: Applications can bypass some layers if needed.

Network Application Programming Interface (API)

  • Socket API: Standard interface for applications to communicate over the network.
  • Server-Client Model: Applications exchange messages using sockets.

Application Layer Protocols (Examples and Functions)

  • DNS (Domain Name System): Translates domain names to IP addresses. Examples of TLDs: .com, .in, .edu, .gov, .org, .net.
  • FTP (File Transfer Protocol): Reliable, uses TCP, transfers files.
  • TFTP (Trivial FTP): Simpler, uses UDP, often for device configuration.
  • HTTP (Hypertext Transfer Protocol): Used for web communication.
  • SMTP (Simple Mail Transfer Protocol): Used for email transfer between servers.
  • SNMP (Simple Network Management Protocol): Manages network devices.
  • Telnet: Remote login to another machine.

Responsibilities of Application Layer

  • Identifying and establishing communication partners.
  • Synchronizing applications.
  • Agreeing on error recovery procedures.
  • Controlling data integrity.

History of Computer Networks & Internet (Key Milestones)

YearEvent/Innovation
1836Telegraph (Cooke & Wheatstone), Morse Code
1858-66Transatlantic cable
1876Telephone (Alexander Graham Bell), modems for digital-analog conversion
1957ARPA formed (US DoD), Sputnik launch
1962ARPA contracts, ARPANET foundation
1962-68Packet-switching networks developed
1969ARPANET commissioned (first 4 nodes)
1971Email program invented (Ray Tomlinson)
1973First international ARPANET links
1974TCP specified, Telenet (first public packet data service)
1977Email becomes reality, 100+ hosts
1979USENET, newsgroups established
1982TCP/IP protocol suite established
1983Name server developed
1984DNS introduced, NSFNET created
1987Commercialization of Internet, UUNET founded
1989First commercial email relay, WWW concept (Tim Berners-Lee)
1990First search engine (Archie), ARPANET ends
1991Gopher released, text-based interface
1992Multimedia, “Surfing the Internet” coined
1993WWW revolution, Mosaic browser released
1994-2001Web explosion: millions of hosts and websites
1994Hotmail, W3C founded
1995JAVA source code released
1996ICQ (instant messaging) launched
1998Google founded

Key Definitions & Concepts

  • MAC Address: Unique identifier for network interfaces at Data Link Layer.
  • Broadcast Domain: Network segment where all devices receive broadcast frames.
  • Collision Domain: Network segment where data packets can collide (important in Ethernet).
  • Encapsulation: Wrapping data with protocol-specific headers/trailers as it moves down the stack.
  • Datagram: Independent packet, may take any route.
  • Virtual Circuit: Predefined path for all packets in a session.

Summary Table: Devices and OSI Layers

DeviceOSI Layer(s)Functionality
NICData Link (2)Access to network, MAC addressing
RepeaterPhysical (1)Signal amplification
HubPhysical (1)Broadcasts to all ports
BridgeData Link (2)Filters by MAC, reduces traffic
SwitchData Link (2)Multi-port bridge, dedicated bandwidth
RouterNetwork (3)Routes by IP, breaks up broadcast/collision domains

Tips for Exam Preparation

  • Understand the function and structure of each protocol layer.
  • Be able to compare and contrast circuit switching and packet switching.
  • Know the roles and differences between network devices (NIC, hub, switch, router).
  • Memorize key milestones in the history of networks and the Internet.
  • Be clear on protocol examples for each layer and their main functions.
  • Practice explaining encapsulation and the flow of data through the stack.
  • Review the responsibilities and examples of application layer protocols.

With these notes, you can confidently answer any question from Week 1 of the NPTEL CNIP course without needing to refer back to the PDF.