lt. 43  Network and DNS

lt. 43 Network and DNS

·

8 min read

What is network

A network is a system that connects multiple devices together in order to allow them to share resources and information. Networks can vary greatly in size, complexity, and scope, ranging from small local networks to vast global networks like the Internet.

Types of Networks:

  1. Local Area Network (LAN):

    • Scope: Limited to a small geographic area such as a single building or campus.

    • Usage: Commonly used in homes, offices, and schools.

    • Technology: Ethernet, Wi-Fi.

  2. Wide Area Network (WAN):

    • Scope: Covers a large geographic area, such as cities, countries, or even continents.

    • Usage: Used by businesses and organizations to connect multiple LANs.

    • Technology: MPLS, leased lines, satellite links, public networks like the Internet.

  3. Metropolitan Area Network (MAN):

    • Scope: Covers a larger geographic area than a LAN but smaller than a WAN, typically a city or metropolitan area.

    • Usage: Used by city governments, large organizations, or internet service providers (ISPs).

    • Technology: Fiber optics, Ethernet.

  4. Personal Area Network (PAN):

    • Scope: Very small, typically within a range of a few meters.

    • Usage: Used for connecting personal devices such as smartphones, tablets, and laptops.

    • Technology: Bluetooth, USB.

  5. Virtual Private Network (VPN):

    • Scope: Extends a private network across a public network.

    • Usage: Allows secure remote access to a private network.

    • Technology: Encryption, tunneling protocols.

Internet:

The internet is a network of networks that spans allows millions of private, public, and government networks to connect and interact.

It is network of interconnected computers and other devices that communicate and share information using standardized protocols

Core Components of the Internet:

  1. Protocols: Standardized rules that define how data is transmitted and received. The primary protocol suite is TCP/IP.

  2. Domain Name System (DNS)

  3. Internet Service Providers (ISPs)

  4. Routers and Switches

  5. Servers.

  6. Clients

Importance of the Internet:

  1. Communication.

  2. Information Access.

  3. Commerce.

  4. Entertainment.

  5. Education.

  6. Collaboration

  7. Innovation.

WWW

WWW stands for World Wide Web. It's essentially an information system that sits on top of the internet, allowing users to access and share information in a user-friendly way. It is a system of interlinked hypertext documents and multimedia content accessed through the Internet.

The World Wide Web was invented by Tim Berners-Lee in 1989

How the World Wide Web Works:

  • Requesting a Web Page:

    • A user enters a URL into a web browser or clicks a hyperlink.

    • The browser sends an HTTP request to the web server hosting the requested page.

  • Server Response:

    • The web server processes the request and sends back the requested web page (HTML file) along with any associated resources (images, CSS, JavaScript files).
  • Rendering the Page:

    • The web browser receives the HTML file and other resources.

    • The browser interprets the HTML and displays the content to the user, formatting it according to the CSS and enabling interactivity through JavaScript.

  • Navigation:

    • Users can click on hyperlinks within a web page to navigate to other pages or resources.

IP Address

An IP address (Internet Protocol address) is a unique numerical identifier assigned to each device connected to a computer network that uses the Internet . It serves two main functions:

  1. identifying the host.

  2. providing the location of the host .

Types of IP Addresses:

  1. IPv4 (Internet Protocol version 4):

    • 32-bit address, represented as four decimal numbers (e.g., 192.168.1.1).

    • Range: 0.0.0.0 to 255.255.255.255.

    • Approximately 4.3 billion unique addresses.

  2. IPv6 (Internet Protocol version 6):

    • 128-bit address, represented as eight groups of four hexadecimal digits (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334).

    • Provides approximately 340 undecillion unique addresses.

    • Developed to address the shortage of IPv4 addresses and improve routing efficiency and security.

Types of IP Address Allocations:

  1. Public IP Addresses:

    • Assigned by Internet Service Providers (ISPs)

    • They are unique across the entire Internet.

    • Used for devices that need to be accessible over the Internet, such as web servers and email servers.

  2. Private IP Addresses:

    Used within private networks and are not routable on the public Internet.

    • Ranges:

      • 10.0.0.0 to 10.255.255.255 (Class A)

      • 172.16.0.0 to 172.31.255.255 (Class B)

      • 192.168.0.0 to 192.168.255.255 (Class C)

    • Commonly used for devices within a home or office

  3. Static IP Addresses:

    • Assigned manually to a device and remains constant.

    • Useful for servers, network equipment, and other devices that require a permanent IP address.

  4. Dynamic IP Addresses:

    • Assigned automatically by a DHCP (Dynamic Host Configuration Protocol) server and can change over time.

    • Commonly used for consumer devices like computers, smartphones

Port Number

A port number is a numerical identifier used to specify a particular service or process running on a computer or network device. Ports help to differentiate multiple services running on a single device by assigning each service a unique port number.

Range: 0 to 65535

  • 0 to 1023 (Well-Known Ports): Assigned by the Internet Assigned Numbers Authority (IANA) for common services and protocols (e.g., HTTP, FTP, SMTP).

  • 1024 to 49151 (Registered Ports): Assigned by IANA for user applications and processes.

  • 49152 to 65535 (Dynamic or Private Ports): Used for temporary or private connections and not registered by IANA.

Some common port numbers

  • HTTP (Hypertext Transfer Protocol): Port 80

  • HTTPS (HTTP Secure): Port 443

  • FTP (File Transfer Protocol): Port 21

  • SSH (Secure Shell): Port 22

  • Telnet: Port 23

Port number allows multiple services to run on a single device.

DNS(Domain Name System)

Also called phonebook of the internet.
It is a decentralized naming system for devices, services, or any resource connected to the Internet or a private network .It translates human-readable domain names into numerical IP addresses .

Structure: Consists of multiple labels separated by dots, organized from right to left (e.g., example.com)

  • Top-Level Domain (TLD): The last part of the domain name (e.g., .com, .org, .net).

  • Second-Level Domain: The part directly to the left of the TLD (e.g., example).

  • Subdomain: Additional parts to the left of the second-level domain (e.g., www).\

Cache

A cache is a temporary storage location that holds copies of frequently accessed data

Types of Caches:

  1. CPU Cache:

    • L1, L2, and L3 Caches: Small, fast memory locations within the CPU that store copies of frequently accessed data and instructions to speed up processing.
  2. Memory Cache (RAM Cache):

    • DRAM Cache: Stores recently accessed data from the main memory (RAM) to reduce access times for subsequent requests.
  3. Disk Cache:

    • Page Cache: Stores frequently accessed disk data in RAM to reduce the number of read/write operations on the physical disk.
  4. Web Cache:

    • Browser Cache: Stores web content (e.g., HTML, images, JavaScript) on the user's device to speed up the loading of previously visited websites.

Network Protocols:

Protocols are usually the set of rules which govern the movement of data in the network.

TCP/IP Model Layers:

  1. Link Layer (Network Interface Layer):

    • Function: Corresponds to the OSI Physical and Data Link layers.

    • Responsibilities: Handles hardware addressing, error detection, and network access control.

    • Examples: Ethernet, Wi-Fi, ARP (Address Resolution Protocol).

  2. Internet Layer:

    • Function: Corresponds to the OSI Network layer.

    • Responsibilities: Logical addressing, routing, and packet forwarding.

    • Examples: IP (Internet Protocol), ICMP (Internet Control Message Protocol).

  3. Transport Layer:

    • Function: Corresponds to the OSI Transport layer.

    • Responsibilities: Ensures reliable data transfer, error checking, and flow control.

    • Examples: TCP (Transmission Control Protocol), UDP (User Datagram Protocol).

  4. Application Layer:

    • Function: Combines the functions of the OSI Application, Presentation, and Session layers.

    • Responsibilities: Provides protocols and services for application communication.

    • Examples: HTTP, FTP, SMTP, DNS.

OSI Model

  • Physical Layer (Layer 1):

    • Function: Deals with the physical connection between devices, including cables, switches, and other hardware.

    • Responsibilities: Transmission and reception of raw bit streams over a physical medium (e.g., electrical signals, light pulses).

  • Data Link Layer (Layer 2):

    • Function: Ensures reliable data transfer across the physical link.

    • Responsibilities: Error detection and correction, frame synchronization, and media access control (MAC).

    • Examples: Ethernet, Wi-Fi.

  • Network Layer (Layer 3):

    • Function: Handles the routing of data between devices across different networks.

    • Responsibilities: Logical addressing, routing, and forwarding of packets.

    • Examples: IP (Internet Protocol).

  • Transport Layer (Layer 4):

    • Function: Provides reliable data transfer between end systems.

    • Responsibilities: Flow control, error recovery, and data segmentation.

    • Examples: TCP (Transmission Control Protocol), UDP (User Datagram Protocol).

  • Session Layer (Layer 5):

    • Function: Manages sessions between applications.

    • Responsibilities: Establishing, maintaining, and terminating sessions, synchronization, and dialog control.

    • Examples: RPC (Remote Procedure Call), PPTP (Point-to-Point Tunneling Protocol).

  • Presentation Layer (Layer 6):

    • Function: Translates data between the application layer and the network.

    • Responsibilities: Data encryption, decryption, compression, and format conversion.

    • Examples: SSL/TLS (Secure Sockets Layer/Transport Layer Security), JPEG.

  • Application Layer (Layer 7):

    • Function: Provides network services directly to end-user applications.

    • Responsibilities: Interface for application services, data formatting, and communication.

    • Examples: HTTP, FTP, SMTP.

Web Sockets

It is a communication protocol that provides full-duplex communication channels over a single, long-lived connection. It is designed for web applications to enable real-time communication between a client and a server.

Types:

  1. Simplex:

     cssCopy codeDevice A (transmitter) ---> Device B (receiver)
    
  2. Half-Duplex:

     cssCopy codeDevice A <--- (send/receive) ---> Device B
    
  3. Full-Duplex:

     cssCopy codeDevice A <--- (simultaneous) ---> Device B
    
  • Simplex: One-way communication, like a one-lane road that only goes in one direction.

  • Half-Duplex: Two-way communication but not at the same time, like a one-lane road that allows traffic in both directions but not simultaneously.

  • Full-Duplex: Two-way communication simultaneously, like a two-lane road where traffic flows in both directions at the same time.

Did you find this article valuable?

Support himanshu by becoming a sponsor. Any amount is appreciated!