What Is CN:: 0.NIC (Network Interface Card)
What Is CN:: 0.NIC (Network Interface Card)
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.
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.
4. Firewall
● 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
LAN:
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:
Bandwidth:
Delay (Latency):
The time it takes for a data packet to travel from the sender to the
receiver.
Jitter:
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:
Bitrate:
Noise:
Attenuation:
Distortion:
Transmission Media:
-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.
Topologies:
Mesh Topology:
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:
Bus Topology:
Tree Topology:
● Definition: Each device acts as both client and server, sharing resources directly.
● Examples: BitTorrent, blockchain networks.
Advantages:
Disadvantages:
Client-Server Networks:
Advantages:
Disadvantages:
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
● Data Link Layer: Packets are framed and sent to the next device,
physically.
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 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.
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.
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).
Working:
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:
Network protocols:
Summary:
TCP vs UDP:
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:
● 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.
● 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.
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
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.
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:
The TCP/IP model and the OSI model are both frameworks for understanding network
communication, but they have distinct characteristics:
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.
● 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.
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.
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.
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 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.
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).
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.
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.
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.
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.
The DNS resolver gives this IP address back to your operating system, which forwards
it to the browser.
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.
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.
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.
.