0% found this document useful (0 votes)
27 views26 pages

What Is CN:: 0.NIC (Network Interface Card)

The document provides an overview of computer networking, including key terms such as NIC, router, switch, and various types of networks (LAN, MAN, WAN). It explains the OSI model, IPv4 addressing, routing protocols, and network protocols like ARP and ICMP. Additionally, it discusses network topologies, the differences between peer-to-peer and client-server networks, and the distinction between the Internet and the Web.

Uploaded by

icoanurag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views26 pages

What Is CN:: 0.NIC (Network Interface Card)

The document provides an overview of computer networking, including key terms such as NIC, router, switch, and various types of networks (LAN, MAN, WAN). It explains the OSI model, IPv4 addressing, routing protocols, and network protocols like ARP and ICMP. Additionally, it discusses network topologies, the differences between peer-to-peer and client-server networks, and the distinction between the Internet and the Web.

Uploaded by

icoanurag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 26

Intro to CN-Basic terms:

What is cn:
Computer networking refers to connected computing devices (such as
laptops, desktops, servers, smartphones, and tablets) and an ever-expanding
array of IoT devices (such as cameras, door locks, doorbells, refrigerators,
audio/visual systems, thermostats, and various sensors) that communicate
with one another.

0.NIC (Network interface card):


NIC or Network Interface Card is a network adapter used to connect the
computer to the network. It is installed in the computer to establish a LAN -
contains the MAC address.

1. Router

●​ Directs data between different networks and connects to the internet They
analyze data to be sent across a network, choose the best routes for it,
and send it on its way.
2. Switch

●​ Connects devices within a local area network (LAN) and manages data traffic
efficiently.

3. Access Point (AP)

●​ Is like a switch which Allows wireless devices to connect to a wired network.

4. Firewall

●​ A firewall is a network security device that monitors and controls traffic


on a network, allowing or blocking specific traffic based on a set of
security rules
5. Bridge

●​ Connects and filters traffic between two or more network segments to reduce
congestion.

6. Gateway
●​ Acts as a "gate" between different networks, enabling communication
between dissimilar protocols.

7. Modem

Modem is a device which converts the computer-generated digital signals of a


computer into analog signals to enable their travelling via phone lines. The
‘modulator-demodulator’ or modem can be used as a dial up for LAN or to connect to an
ISP

LAN:

A LAN is a collection of connected devices in one physical location, such as a


home or an office. A LAN can be small or large, ranging from a home network
with one user to a large enterprise network with thousands of users and devices.
A LAN may include both wired and wireless devices

MAN:
MAN stands for metropolitan area network. It covers a larger area than LAN
such as small towns, cities, etc. MAN connects two or more computers that
reside within the same or completely different cities. MAN is expensive and
should or might not be owned by one organization.

WAN:
A WAN extends over a large geographical area and connects individual users
or multiple LANs. The Internet can be considered a WAN. Large organizations
use WANs to connect their various sites, remote employees, suppliers, and
data centers so they can run applications and access necessary data.

Client:
A client is a computer hardware device or software that accesses a service made
available by a server. The server is often (but not always) located on a separate
physical computer.

server:
A server is a physical computer dedicated to run services to serve the needs of other
computers. Depending on the service that is running, it could be a file server, database
server, home media server, print server, or web server.

Host:

A host is a computer, connected to other computers for which it provides data or


services over a network. In theory, every computer connected to a network acts as a
host to other peers on the network. In essence, a host reflects the logical relationship of
two or more computers on a network.

Bandwidth:

the maximum amount of data that can be transferred over a network or


connection in a given amount of time (MBps, GBps..)

Delay (Latency):

The time it takes for a data packet to travel from the sender to the
receiver.

Cause: Can be due to propagation delays, routing, and network congestion.

Jitter:

The variation in delay between consecutive packets.

Cause: Network congestion, route changes, or buffering issues can cause


some packets to take longer than others.

Impact: Primarily affects real-time applications like voice and video, leading to
issues like choppy audio or lag.

Packet:

●​ A small unit of data transmitted over a network, containing both the data
and control information (like source/destination addresses).

Frame:
●​ A data packet at the Data Link Layer that includes error-checking bits
and physical addressing information (like MAC addresses) for local
network communication.

Local Host:

●​ The computer or device you're directly working on within a network,


often referred to as "localhost" in networking.

Bitrate:

●​ The rate at which data is transmitted over a network, measured in bits


per second (bps). It indicates the speed or bandwidth of the
transmission.

Noise:

●​ Unwanted interference or signal distortions in the network that degrade


the quality of the transmitted data, often due to electromagnetic
interference.

Attenuation:

●​ The gradual loss of signal strength as it travels over distance in a


network medium (e.g., copper wires, fiber optics).

Distortion:

●​ Alteration of the original signal's shape or form during transmission,


which can affect the quality of data received, often caused by
environmental factors or transmission media limitations.

Transmission Media:

1)Guided/wired: Signals being transmitted are directed and confined in a


narrow pathway by using physical links.

-High speed
-secure
-shorter distances
Twisted Pair Cable: Two insulated copper wires twisted to reduce
interference, used in telephony and LANs.
Coaxial Cable: Single copper core with shielding, used for cable TV and
internet.
Fiber Optic Cable: Transmits data using light through glass fibers, suitable
for high-speed, long-distance communication.

2)Unguided/ wireless: It is also referred to as Wireless or Unbounded


transmission media . No physical medium is required for the transmission of
electromagnetic signals.
-Large distance
-Less cost
-Less secure
Radio Waves: Wireless transmission via radio frequencies, used in Wi-Fi,
mobile networks, and broadcasting.
Microwaves: High-frequency waves for point-to-point communication (e.g.,
satellite links).
Infrared: Short-range communication using infrared light, commonly used in
remote controls and some wireless devices.

Topologies:
Mesh Topology:

●​ Definition: Every device is connected to every other device.


●​ Device Used: No central device, direct connections between nodes.
●​ Advantage: High redundancy; failure of one link doesn’t affect the network.
●​ Disadvantage: Expensive and complex to install due to many cables.

Ring Topology:

●​ Definition: Devices are connected in a circular loop, data flows in one direction.
●​ Device Used: Network Interface Cards (NICs) for data transfer.
●​ Advantage: No data collisions due to one-way data flow.
●​ Disadvantage: Single node failure can disrupt the entire network unless a dual ring is
used.

Star Topology:

●​ Definition: All devices are connected to a central hub or switch.


●​ Device Used: Central hub or switch.
●​ Advantage: Easy to manage; a single node failure doesn’t affect the rest of the network.
●​ Disadvantage: Failure of the central hub leads to total network failure.

Bus Topology:

●​ Definition: All devices share a single communication line (backbone).


●​ Device Used: A common backbone cable (coaxial or twisted pair).
●​ Advantage: Simple and inexpensive to install.
●​ Disadvantage: If the backbone fails, the entire network goes down; performance
degrades with more devices.

Tree Topology:

●​ Definition: A hierarchical topology with a root node connected to star-configured


branches.
●​ Device Used: Central root node (hub or switch) connected to other hubs or switches.
●​ Advantage: Scalable and easy to expand.
●​ Disadvantage: If the root node fails, it affects the entire branch.

Peer-to-Peer vs. Client-Server Networks

Peer-to-Peer (P2P) Networks:

●​ Definition: Each device acts as both client and server, sharing resources directly.
●​ Examples: BitTorrent, blockchain networks.

Advantages:

●​ Decentralized and reliable.


●​ Cost-effective and scalable.

Disadvantages:

●​ Higher security risks.


●​ Cannot connect many peers, less scale of data.

Client-Server Networks:

●​ Definition: Clients request resources from centralized servers.


●​ Examples: Google, corporate networks.

Advantages:

●​ Centralized management and data consistency.


●​ Easier security control.

Disadvantages:

●​ Single point of failure- if server fails...


●​ Higher costs for server infrastructure and maintenance.

In essence, P2P networks prioritize decentralization and cost, while client-server


networks focus on control and data integrity.

Internet vs Web:

The Internet is a global network of networks while the Web, also referred to
formally as World Wide Web (www) is a collection of information that is
accessed via the Internet. Another way to look at this difference is that the
Internet is infrastructure while the Web is served on top(application layer) of
that infrastructure

Web applications use HTTP protocol which is a layer over TCP protocol. In
contrast, internet applications can use either TCP or UDP protocol. To
visualize the difference think of it as the internet is a network of many
computers connected so you can use any port say 90 to send or receive data.
In contrast, the web port is fixed as HTTP uses port 80 to communicate, and
also the data that is sent is HTML, CSS, and JavaScript

OSI MODEL:

OSI stands for Open Systems Interconnection, open stands for systems willing to
interact with other systems on the network, It is a 7-layer architecture with each
layer having specific functionality to perform. All these 7 layers work
collaboratively to transmit the data from one person to another across the
globe

specific protocols and technologies are often designed based on the


principles outlined in the OSI model to facilitate efficient data transmission
and networking operations

●​ Application Layer: Applications create the data.

●​ Presentation Layer: Data is formatted and encrypted.

●​ Session Layer: Connections are established and managed.

●​ Transport Layer: Data is broken into segments for reliable delivery,

port address is assigned

●​ Network Layer : Segments are packaged into packets and

routed(source and dest add).

●​ Data Link Layer: Packets are framed and sent to the next device,

MAC address is assigned

●​ Physical Layer: Frames are converted into bits and transmitted

physically.

Let’s look at it with an Example:

Luffy sends an e-mail to his friend Zoro.

Step 1: Luffy interacts with e-mail application like Gmail , outlook , etc.
Writes his email to send. (This happens in Layer 7: Application layer )
Step 2: Mail application prepares for data transmission like encrypting data
and formatting it for transmission. (This happens in Layer 6: Presentation
Layer )

Step 3: There is a connection established between the sender and receiver


on the internet. (This happens in Layer 5: Session Layer )

Step 4: Email data is broken into smaller segments. It adds sequence number
and error-checking information to maintain the reliability of the information.
(This happens in Layer 4: Transport Layer )

Step 5: Addressing of packets is done in order to find the best route for
transfer. (This happens in Layer 3: Network Layer )

Step 6: Data packets are encapsulated into frames, then MAC address is
added for local devices and then it checks for error using error detection.
(This happens in Layer 2: Data Link Layer )

Step 7: Lastly Frames are transmitted in the form of electrical/ optical signals
over a physical network medium like ethernet cable or WiFi.

After the email reaches the receiver i.e. Zoro, the process will reverse and
decrypt the e-mail content. At last, the email will be shown on Zoro’s email
client.

IPv4 Addressing:

IPv4 uses 32-bit addresses written in decimal as four octets separated by periods,
e.g., 192.168.1.1.

●​ Classful Addressing (based on predefined classes):


○​ Class A:
■​ Range: 0.0.0.0 to 127.255.255.255
■​ Subnet mask: 255.0.0.0
■​ Leading bit: 0
■​ Large networks with millions of hosts.
○​ Class B:
■​ Range: 128.0.0.0 to 191.255.255.255
■​ Subnet mask: 255.255.0.0
■​ Leading bits: 10
■​ Medium-sized networks.
○​ Class C:
■​ Range: 192.0.0.0 to 223.255.255.255
■​ Subnet mask: 255.255.255.0
■​ Leading bits: 110
■​ Small networks with up to 254 hosts.
○​ Class D (Multicast):
■​ Range: 224.0.0.0 to 239.255.255.255
○​ Class E (Experimental):
■​ Range: 240.0.0.0 to 255.255.255.255
●​ Classless Addressing (CIDR):
○​ Allows flexible allocation of IP addresses.
○​ Example: 192.168.1.0/24, where /24 indicates the number of bits
used for the network portion (subnet mask 255.255.255.0).

A subnet mask is used in IP addressing to differentiate between the network and


host portions of an IP address. It helps divide an IP address into network and host
identifiers, enabling IP addresses to be organized within a network. The subnet
mask ensures efficient routing by indicating which part of an address refers to the
network and which part refers to the host.

Example: For an IP 192.168.1.10 with subnet mask 255.255.255.0, the network


part is 192.168.1, and the host part is 10.

Routing:
Routing is the process of determining the best path for data packets to travel from a
source to a destination across a network. Routers use routing algorithms and protocols
to build and maintain routing tables, which guide the packet-forwarding decisions.

Distance Vector Routing (DVR):

Working:

●​ Each router maintains a routing table with the distance (hop count) to each
destination.
●​ Routers share their entire routing table with directly connected neighbors
periodically.
●​ Each router updates its routing table based on information received from
neighbors, using the Bellman-Ford algorithm to calculate the shortest path.

Disadvantages:

●​ Slow Convergence: Takes time to update routing tables when network topology
changes, leading to temporary routing loops.
●​ Count to Infinity Problem: When a route goes down, routers take a long time to
recognize it, slowly increasing the hop count to infinity.
●​ Example protocol: RIP (Routing Information Protocol).

Link-State Routing (LSR):

Working:

●​ Routers know the entire network topology by exchanging link-state


advertisements (LSAs) with all routers in the network.
●​ Each router builds a complete map of the network and independently calculates
the shortest path to each destination using the Dijkstra algorithm.
●​ Routers only send updates when there is a change in network topology, not the
entire table, making it more efficient.

Disadvantages:
●​ More Complex and Resource Intensive: Requires more memory and CPU
power to maintain the entire network map.
●​ Scalability Issues: In very large networks, the overhead of maintaining detailed
topology can be high.
●​ Example protocol: OSPF (Open Shortest Path First).

Summary:

●​ DVR: Simpler but slow convergence and prone to loops.


●​ LSR: Faster convergence and loop-free but more complex and
resource-demanding.

Network protocols:

1. ARP (Address Resolution Protocol)

●​ Purpose: Resolves IPv4 addresses to MAC (Media Access Control) addresses


in a local network.
●​ Function:
○​ When a device wants to communicate with another device using its IP
address, it uses ARP to find the corresponding MAC address.
○​ Sends an ARP request broadcast to the local network; the device with the
matching IP replies with its MAC address.
●​ Use Case: Essential for local network communication, allowing devices to send
frames at the data link layer.

2. RARP (Reverse Address Resolution Protocol)

●​ Purpose: Resolves MAC addresses to IP addresses.


●​ Function:
○​ Used primarily by diskless workstations to discover their IP address on a
network.
○​ The device sends a RARP request with its MAC address to a RARP
server, which responds with the corresponding IP address.
●​ Use Case: Less common today, often replaced by DHCP for automatic IP
address assignment.
3. ICMP (Internet Control Message Protocol)

●​ Purpose: Used for error messages and operational information in an IP network.


●​ Function:
○​ Sends messages regarding network conditions, errors, and diagnostics
(e.g., unreachable hosts, packet loss).
○​ Commonly used by tools like ping and traceroute to test connectivity
and diagnose network issues.
●​ Use Case: Essential for network management and troubleshooting.

4. DHCP (Dynamic Host Configuration Protocol)

●​ Purpose: Automatically assigns IP addresses and network configuration to


devices on a network.
●​ Function:
○​ Operates by leasing IP addresses from a predefined pool on a DHCP
server.
○​ Simplifies the process of configuring devices by providing not only IP
addresses but also subnet masks, gateways, and DNS server addresses.
●​ Use Case: Widely used in local area networks (LANs) to streamline IP address
management.

Summary:

●​ ARP translates IP addresses to MAC addresses for local communication.


●​ RARP translates MAC addresses to IP addresses, mainly for diskless devices.
●​ ICMP provides error and operational messages for managing IP networks.
●​ DHCP automates the assignment of IP addresses and other configuration
parameters to devices on a network.

TCP vs UDP:

. UDP (User Datagram Protocol)

●​ Type: Connectionless protocol.


●​ Features:
○​ No connection establishment: Sends data without establishing a connection.
○​ No error recovery: Does not guarantee delivery or order of packets.
○​ Low overhead: Faster and uses fewer resources due to minimal error checking.
●​ Use Cases: Suitable for applications where speed is critical and occasional data loss is
acceptable (e.g., streaming, online gaming, VoIP).

2. TCP (Transmission Control Protocol)

●​ Type: Connection-oriented protocol.


●​ Features:
○​ Connection establishment: Requires a connection to be established before
data transfer (3-way handshake).
○​ Reliable delivery: Guarantees that data is delivered accurately and in order.
○​ Error recovery: Implements mechanisms for retransmission of lost packets and
flow control.
●​ Use Cases: Ideal for applications where reliability is crucial (e.g., web browsing, email,
file transfers).
Flow Control in TCP

Flow control in TCP is a mechanism used to manage the rate of data transmission
between a sender and a receiver. It ensures that a sender does not overwhelm a
receiver with data it cannot process in a timely manner. Here’s how it works:

1. Sliding Window Protocol

●​ Concept: The sliding window mechanism allows the sender to send multiple
packets before needing an acknowledgment from the receiver.
●​ Window Size: This is the amount of data (in bytes) that can be sent without
waiting for an acknowledgment. It is dynamically adjusted based on network
conditions and receiver's processing capability.

2. Window Size Management

●​ Advertised Window Size: The receiver informs the sender of its available buffer
size (the amount of data it can accept) through the TCP header. This is called the
advertised window size.
●​ Dynamic Adjustment: If the receiver's buffer is full, it will send an updated
window size of zero, signaling the sender to pause transmission until space is
available.

3. Acknowledgments (ACKs)

●​ TCP uses positive acknowledgments. The receiver sends an ACK for received
packets. If a sender does not receive an ACK within a specified time, it assumes
the packet was lost and retransmits it.

4. Flow Control Process

●​ The sender transmits data based on the current window size.


●​ The receiver processes the incoming data and sends back ACKs.
●​ The receiver adjusts the advertised window size as needed, either increasing it
when it can process more data or decreasing it if it's nearing capacity.

Congestion Control in TCP


TCP uses congestion control mechanisms to manage network congestion and ensure
efficient data transmission. The primary algorithms used for congestion control are Slow
Start, Additive Increase, and Multiplicative Decrease.

1. Slow Start

●​ Purpose: To quickly find the optimal transmission rate without overwhelming the
network.
●​ Mechanism:
○​ Begins with a small congestion window size (usually one or two
segments).
○​ For each acknowledgment (ACK) received, the congestion window size is
increased exponentially (doubles) for each round-trip time (RTT).
○​ This continues until the congestion window reaches a threshold (slow start
threshold, SSTHRESH) or packet loss is detected.

2. Additive Increase

●​ Purpose: To increase the transmission rate gradually after the congestion window
has been established.
●​ Mechanism:
○​ Once the congestion window exceeds the slow start threshold
(SSTHRESH), TCP enters the congestion avoidance phase.
○​ The congestion window size is increased linearly; for every RTT, it
increases by one maximum segment size (MSS).
○​ This gradual increase helps to probe the network for available bandwidth
while minimizing the risk of congestion.

3. Multiplicative Decrease

●​ Purpose: To respond to congestion signals (e.g., packet loss) by reducing the


transmission rate quickly.
●​ Mechanism:
○​ When packet loss is detected (via duplicate ACKs or timeout), the
congestion window is reduced by half (multiplied by a factor of 0.5).
○​ This rapid decrease helps to alleviate congestion in the network.
○​ After the congestion window is halved, TCP may return to the slow start
phase if the congestion window is small enough.
Quality of Service (QoS)

Quality of Service (QoS) refers to the overall performance of a network, focusing on


the transmission quality and the prioritization of certain types of traffic. QoS ensures that
critical applications receive the necessary bandwidth, latency, and reliability.

Flow Characteristics

QoS is characterized by several key flow characteristics:

1.​ Bandwidth: The maximum data rate of a network connection, ensuring sufficient
capacity for required applications.
2.​ Latency: The time taken for data to travel from source to destination. Low
latency is crucial for real-time applications like VoIP and online gaming.
3.​ Jitter: The variation in packet arrival times. Consistent arrival times are essential
for the smooth functioning of real-time applications.
4.​ Packet Loss: The percentage of packets that fail to reach their destination.
Lower packet loss is critical for maintaining data integrity and application
performance.

Techniques to Improve QoS

Here are some techniques used to enhance QoS in networks:

1.​ Traffic Scheduling:


○​ Priority Queuing: Assigning different priority levels to different types of
traffic, ensuring high-priority packets are processed first.
○​ Weighted Fair Queuing (WFQ): Distributing bandwidth among users
based on assigned weights, allowing for fairer resource allocation while
still prioritizing critical traffic.
2.​ Traffic Shaping:
○​ Rate Limiting: Controlling the amount of traffic sent into the network to
avoid congestion, allowing smoother data flow.
○​ Token Bucket: A mechanism that allows bursts of traffic while enforcing a
consistent average rate, managing bandwidth more effectively.
3.​ Admission Control:
○​ Resource Reservation Protocol (RSVP): Allocating necessary
bandwidth before establishing a connection, ensuring that sufficient
resources are available for critical applications.
○​ Call Admission Control (CAC): Deciding whether to accept or reject new
traffic based on current network load and QoS requirements, preventing
congestion.
4.​ Traffic Engineering:
○​ MPLS (Multiprotocol Label Switching): Directing packets along
predetermined paths based on QoS requirements, improving bandwidth
utilization and reducing latency.
○​ Path Control: Adjusting the routes taken by different types of traffic to
manage network resources better.
5.​ Over-provisioning:
○​ Excess Capacity: Increasing network capacity beyond current needs to
accommodate peak traffic loads and reduce congestion.
6.​ Monitoring and Management:
○​ Continuously monitoring network performance to identify issues and
dynamically adjust resources based on current demand.

Application Layer protocol:

The application layer is the top layer of the OSI and TCP/IP models, responsible for
facilitating communication between end-user applications and lower network layers.
Here’s a concise overview of common application layer protocols:

1.​ HTTP (Hypertext Transfer Protocol):


○​ Used for transferring web pages and content over the Internet.
○​ Works on a request-response model.
2.​ HTTPS (HTTP Secure):
○​ A secure version of HTTP that uses SSL/TLS to encrypt data for secure
communication.
3.​ FTP (File Transfer Protocol):
○​ Used for transferring files between a client and a server.
○​ Supports file uploads and downloads, with options for anonymous access.
4.​ SFTP (Secure File Transfer Protocol):
○​ A secure version of FTP that uses SSH to encrypt data during
transmission.
5.​ SMTP (Simple Mail Transfer Protocol):
○​ Used for sending emails from a client to a server or between servers.
6.​ IMAP (Internet Message Access Protocol):
○​ Allows users to access and manage their email on a remote server.
○​ Supports multiple devices accessing the same mailbox.
7.​ POP3 (Post Office Protocol version 3):
○​ Used for retrieving emails from a server, downloading them to a client, and
typically deleting them from the server.
8.​ DNS (Domain Name System):
○​ Translates human-readable domain names into IP addresses, enabling
users to access websites using easy-to-remember names.
9.​ DHCP (Dynamic Host Configuration Protocol):
○​ Automatically assigns IP addresses and other network configuration
parameters to devices on a network.
10.​Telnet:
○​ Allows remote command-line interface access to servers and devices over the
Internet.

TCP/IP vs. OSI Model Comparison

The TCP/IP model and the OSI model are both frameworks for understanding network
communication, but they have distinct characteristics:

1.​ Layer Structure:


○​ TCP/IP has 4 layers:
■​ Application Layer (combines OSI's Application, Presentation, and
Session layers)
■​ Transport Layer (TCP, UDP)
■​ Internet Layer (IP)
■​ Network Interface Layer (hardware and data transmission)
○​ OSI has 7 layers:
■​ Application Layer
■​ Presentation Layer
■​ Session Layer
■​ Transport Layer
■​ Network Layer
■​ Data Link Layer
■​ Physical Layer
2.​ Development:
○​ TCP/IP was developed by the U.S. Department of Defense for practical
networking needs and is widely used in the Internet.
○​ OSI was developed by the International Organization for Standardization
(ISO) as a theoretical framework for network protocols.
3.​ Protocols:
○​ TCP/IP primarily uses protocols like TCP and IP for communication.
○​ OSI describes a broader range of protocols that can operate within its
layers.
4.​ Focus:
○​ TCP/IP emphasizes end-to-end communication and is more streamlined
for practical implementation.
○​ OSI provides a detailed and comprehensive theoretical approach to
networking.
5.​ Application:
○​ TCP/IP is the foundation of the Internet and is widely adopted in real-world
applications.
○​ OSI serves as a guideline for developing and understanding networking
protocols.

HTTP (Hypertext Transfer Protocol) and HTTPS (HTTP Secure) are both protocols used
for transferring data over the web, but they differ significantly in terms of security and
functionality.

Http vs Https:

●​ HTTP:
○​ Stands for Hypertext Transfer Protocol.
○​ It is an application layer protocol used for transmitting hypertext via the
internet, facilitating communication between web browsers and servers.
○​ Primarily used for accessing web pages and transferring data without any
encryption.
●​ HTTPS:
○​ Stands for Hypertext Transfer Protocol Secure.
○​ It is an extension of HTTP that adds a layer of security through encryption.
○​ Designed to ensure secure communication over a computer network,
especially on the web.

2. Security

●​ HTTP:
○​ Data is transmitted in plaintext, meaning it can be easily intercepted and
read by malicious actors.
○​ Offers no protection against eavesdropping, data tampering, or
man-in-the-middle attacks.
●​ HTTPS:
○​ Uses SSL (Secure Sockets Layer) or TLS (Transport Layer Security)
protocols to encrypt the data exchanged between the client and server.
○​ Ensures that data remains confidential and integral during transmission,
protecting against eavesdropping and tampering.

3. Port Numbers

●​ HTTP:
○​ Operates over port 80 by default.
●​ HTTPS:
○​ Operates over port 443 by default.

4. Performance

●​ HTTP:
○​ Generally faster than HTTPS due to the absence of encryption overhead,
leading to quicker response times in some scenarios.
●​ HTTPS:
○​ May have slightly higher latency because of the encryption and decryption
processes. However, advancements in technology have significantly
minimized this overhead, making HTTPS performance comparable to
HTTP in most cases.

5. SEO and Trust

●​ HTTP:
○​ Browsers typically mark HTTP sites as "Not Secure," which can deter
users from entering sensitive information.
○​ HTTP sites may have lower rankings in search engine results due to lack
of security.
●​ HTTPS:
○​ Browsers display a padlock icon in the address bar, indicating a secure
connection, which builds user trust.
○​ Search engines like Google consider HTTPS as a ranking factor,
promoting secure sites in search results.

6. Use Cases

●​ HTTP:
○​ Suitable for websites that do not require user data security, such as
informational sites or blogs where sensitive data is not transmitted.
●​ HTTPS:
○​ Essential for e-commerce sites, online banking, and any web application
that involves user login, data entry, or sensitive transactions. It’s becoming
the standard for all websites to enhance user security and privacy.

Domain Name System (DNS):

The Domain Name System (DNS) is essentially the phonebook of the internet. When
you enter a domain name (like www.google.com) in your web browser, DNS translates
that domain into an IP address (like 172.217.6.78), which is required to locate and
communicate with the website's server. DNS makes it easier for humans to use the web
by allowing them to use readable domain names rather than complicated IP addresses.

Steps involved when you type a URL in your browser:

You enter a URL in the browser:

When you type a URL like www.google.com in the browser and press Enter, the
browser doesn't know where to find the corresponding server because it only knows
how to connect to an IP address, not the domain name. So, the first thing it needs to do
is resolve this domain name into an IP address.

Browser checks the local DNS cache:

The browser first checks its own local cache to see if it recently visited www.google.com
and already has the corresponding IP address. If the entry exists in the cache, the
browser skips further steps and directly contacts the IP address.

If there’s no cache hit, it moves on to the next step.

Operating System (OS) cache lookup:

If the browser doesn't have the address cached, it asks the operating system. The OS
maintains its own DNS cache, and it may have the IP address from previous requests.

Router and ISP cache lookup:

If the OS also doesn't have the IP address, it sends a request to the local router (home
or office router), which may have cached DNS responses.

If the router doesn't have it, the request is forwarded to the DNS resolver provided by
your Internet Service Provider (ISP).

DNS Recursive Resolver:

The recursive resolver (provided by the ISP or configured by the user) acts as the
middleman that knows how to find the IP address if it’s not cached locally. The resolver
will follow a series of steps to resolve the IP address by querying various DNS servers.

Querying the Root DNS Server:

If the DNS resolver doesn’t have the domain cached, it first contacts one of the Root
DNS Servers. The root server knows the top-level domain (TLD) servers (like .com,
.org, .net) but not the specific domain.
The root server responds with the IP address of the TLD DNS server responsible for
.com domains.

Querying the TLD DNS Server:

The recursive resolver now contacts the .com TLD DNS server and asks for the IP
address of www.google.com. The TLD server doesn’t know the exact address either but
knows which Authoritative Name Server holds the record for google.com.

The TLD server responds with the IP address of the Google's Authoritative Name
Server.

Querying the Authoritative Name Server:

The recursive resolver now sends a query to Google's authoritative name server. This
server has the exact mapping between www.google.com and its IP address.

The authoritative server returns the correct IP address (for example, 172.217.6.78) to
the recursive resolver.

DNS Resolver returns the IP Address:

The DNS resolver gives this IP address back to your operating system, which forwards
it to the browser.

Browser sends an HTTP/HTTPS request:

Now that the browser has the IP address, it sends a TCP/IP request to the server
hosting www.google.com over port 80 (HTTP) or port 443 (HTTPS).

This begins the process of loading the web page. If it's an HTTPS request, an SSL/TLS
handshake is performed before any data transfer.

Website is loaded:
The server at the IP address responds with the website's data (HTML, CSS, JavaScript,
etc.), and the browser renders the content on your screen.

DNS Record Types:

A Record (Address Record): Maps a domain name to an IPv4 address.

AAAA Record: Maps a domain name to an IPv6 address.

CNAME Record (Canonical Name): Maps a domain name to another domain name (for
aliasing).

MX Record (Mail Exchange): Specifies the mail server responsible for receiving emails.

TXT Record: Stores text data, often used for verification or configuration purposes.

Why DNS is Important:

Human-friendly: It allows us to use easily readable domain names rather than


memorizing IP addresses.

Scalability: DNS is a distributed system, meaning the load is spread across many
servers, ensuring the system can handle large volumes of requests.

Caching: DNS caching helps reduce latency and improves response times by storing
results locally across various layers (browser, OS, router, ISP, etc.).

Summary:

When you enter a URL, DNS follows a series of steps to resolve the domain name into
an IP address. It involves checking caches at multiple levels, querying root, TLD, and
authoritative name servers, and finally returning the IP address to the browser to load
the website.
.

You might also like