CN External
CN External
Definition : The OSI model is a conceptual framework used to understand and design network
communication by dividing the process into seven distinct layers.
- Layers :
- Function : Transmits raw binary data over physical media (e.g., cables, switches).
- Function : Provides error detection and correction; manages data frames between devices on the
same network.
- Function : Handles routing of data packets across different networks; manages IP addressing.
- Function : Ensures reliable data transfer; manages error recovery and flow control.
- Components : Protocols like TCP (Transmission Control Protocol), UDP (User Datagram Protocol).
- Function : Translates data between the application layer and the network; manages data
encryption, compression, and translation.
- Components : Web browsers, email clients, protocols like HTTP, FTP, SMTP.
- Purpose :
- Standardization : Provides a universal standard for network communication, making it easier for
different systems to interoperate.
- Troubleshooting : Helps in diagnosing and solving network issues by isolating problems to specific
layers.
- Inter-layer Communication : Each layer serves the layer above it and is served by the layer below it,
creating a modular approach to network communication.
- Encapsulation : Data is encapsulated with protocol information at each layer as it travels from the
application layer down to the physical layer, and vice versa.
- Relevance : Although the OSI model is theoretical, it provides valuable insight into how networks
operate and is used as a reference for designing and troubleshooting network protocols and systems.
Q.Explain Network Components of a Computer Network :
Components of a Computer Network refer to the essential elements that enable devices to
communicate and share resources. Some basic network components are as follow :
1. Node :
- A node is any device that is part of a network, such as a computer, printer, or router. It can either
send, receive, or forward data.
2. Cables :
- Cables are the physical medium through which data travels in a wired network. Common types
include :
2. Twisted pair cable : Common in LANs, includes Cat5e and Cat6 for faster data
transmission.
3. Fiber optic cable : Uses light to transmit data, offering high-speed and long-distance
communication.
3. Host :
- A host refers to any device (like a computer or server) connected to a network that can send
and receive data.
4. Communication Subnet :
- The communication subnet is the infrastructure that allows data to travel between hosts,
including routers, switches, and transmission media (like cables or wireless connections).
Types of Switches :
- Function : This switch reads the entire data packet before forwarding it. It checks the packet for
errors by inspecting the frame's integrity (using CRC checks). If an error is found, the packet is
discarded.
- Disadvantages : Slower performance due to the time taken to inspect the entire packet.
- Function : Operates at the Data Link Layer (Layer 2 of the OSI model). It forwards data based on
the MAC address of the destination device. It uses a MAC address table to determine where to send
the data.
- Disadvantages : Cannot route data between different networks; only forwards within a single
LAN.
- Function : Operates at both the Data Link Layer and the Network Layer (Layer 3). It can forward
data based on both MAC addresses (Layer 2) and IP addresses (Layer 3), which means it can perform
routing tasks.
- Advantages : Combines switching and routing, allowing faster data movement between different
networks.
- Disadvantages : More complex and expensive compared to Layer 2 switches, typically used in
larger networks.
Q.Explain Modem.
A modem is a device that helps your computer connect to the internet. The word "modem" comes
from "modulate" and "demodulate." Here’s a simple breakdown of its role and functions:
Role of a Modem:
1. Connecting to the Internet: A modem takes the signals from your internet service provider
(ISP) and translates them so your computer can understand them.
Functions of a Modem:
1. Modulation: When you send data from your computer (like an email or a website request),
the modem converts this data into a format that can be transmitted over telephone lines or
cables.
2. Demodulation: When data comes to your computer from the internet, the modem converts
it back into a format that your computer can use.
3. Signal Processing: It boosts weak signals to ensure that data can travel long distances
without losing quality.
4. Establishing Connection: The modem helps set up the connection between your home
network and the internet.
5. Routing (if combined with a router): Some modems have built-in routers, which means they
can also distribute the internet connection to multiple devices, like smartphones and tablets.
In short, a modem is essential for your internet connection, making sure that the data you send and
receive is properly converted and transmitted.
Q.Explain NIC and its Function.
A Network Interface Card (NIC) is a hardware component that allows your computer or device to
connect to a network, such as the internet or a local area network (LAN). Here’s a simple explanation
of its functions:
Functions of a NIC:
1. Connection: The NIC provides the physical connection between your computer and the
network. It can connect via cables (like Ethernet) or wirelessly (like Wi-Fi).
2. Data Transmission: It helps send and receive data over the network. When you send
information, the NIC converts it into signals that can travel over the network.
3. Addressing: Every NIC has a unique identifier called a MAC address. This helps the network
know where to send data specifically for your device.
4. Error Checking: The NIC can check for errors in the data being sent or received, ensuring that
the information is accurate.
5. Protocol Support: It supports different networking protocols, which are rules that determine
how data is transmitted over the network.
In short, a NIC is essential for connecting your device to a network and enabling communication with
other devices.
Q.Explain P2P Network.
A Peer-to-Peer (P2P) network is a type of network where computers (or "peers") connect directly
with each other, rather than going through a central server. Here’s a simple explanation of how it
works and its features:
1. Direct Connection: In a P2P network, each computer can communicate directly with others.
This means that files and information can be shared without needing a central server.
2. Equal Roles: All computers in a P2P network have equal status. Each one can act as both a
client (requesting files) and a server (providing files). There’s no hierarchy.
3. File Sharing: P2P networks are often used for sharing files, such as music, videos, or
documents. Each user can upload and download files from other users.
4. Decentralization: Since there’s no central server, the network is more resilient. If one
computer goes offline, the others can still connect and share files.
5. Scalability: P2P networks can grow easily. As more computers join, the network can support
more users without needing extra infrastructure.
File-sharing services like BitTorrent allow users to download files from multiple sources at
once.
In short, a P2P network allows computers to share resources and communicate directly, making it a
flexible and efficient way to connect.
Q.Explain Stop And Wait Protocol.
The Stop-and-Wait protocol is a simple method used in computer networks to send data between
two devices. Here’s how it works and its key features:
1. Sending a Message: When one device (like a computer) wants to send data to another
device, it sends one packet (a small chunk of data).
2. Waiting for a Response: After sending the packet, the sender stops and waits for an
acknowledgment (ACK) from the receiver. This means the sender is waiting to hear back that
the packet was received successfully.
3. Acknowledgment: Once the receiver gets the packet, it sends an acknowledgment back to
the sender. This tells the sender that the packet was received.
4. Sending the Next Packet: After receiving the acknowledgment, the sender can send the next
packet of data. If it doesn’t get the acknowledgment within a certain time, it will resend the
same packet.
Simplicity: The protocol is easy to understand and implement, making it good for basic
communication.
Error Handling: If there’s an error or if the packet is lost, the sender can simply resend it.
Efficiency Limitations: This method can be slow because the sender must wait for an
acknowledgment after each packet before sending the next one. This waiting time can lead
to underutilization of the network.
Summary:
In summary, the Stop-and-Wait protocol is a straightforward way to send data where the sender
waits for confirmation after each packet before moving on. While it’s simple, it can be less efficient
for larger amounts of data.
Q. Techniques & Principle of Error Correction.
Error correction is important in computer networks to ensure that data is transmitted accurately.
When data is sent over a network, it can get corrupted due to noise, interference, or other issues.
Here are some common techniques and principles used for error correction:
Techniques of Error Correction:
1. Parity Bits:
o A parity bit is an extra bit added to a set of data bits to make the total number of 1s either even (even
parity) or odd (odd parity).
o If the number of 1s doesn't match the expected parity, the system knows there’s an error.
2. Checksums:
o A checksum is a value calculated from a set of data. The sender computes this value and sends it along
with the data.
o The receiver also calculates the checksum for the received data. If the two checksums don’t match, it
means there was an error.
o CRC is a more advanced error-checking method. It involves treating the data as a polynomial and
dividing it by a fixed polynomial.
o The remainder of this division is the CRC value sent with the data. The receiver performs the same
division and checks for errors based on the remainder.
4. Hamming Code:
o Hamming code adds multiple extra bits to the data to help detect and correct errors.
o It can identify and correct single-bit errors and detect two-bit errors, making it very effective for reliable
data transmission.
o In FEC, the sender adds redundant data to the message. This extra information allows the receiver to
correct errors without needing to request a resend.
o This is useful in situations where it’s not practical to send a request for retransmission.
1. Redundancy: Adding extra bits or data to help identify and correct errors. This ensures that even if some
information is lost or changed, the original data can still be reconstructed.
o Detection means identifying that an error has occurred (like using parity bits or checksums).
o Correction means fixing the error (like using Hamming code or FEC).
3. Reliability: The goal of error correction is to make data transmission reliable, so the information received is the
same as what was sent.
4. Efficiency: While adding extra bits helps with error correction, it’s important to balance between reliability and
the amount of extra data sent. Too much redundancy can slow down transmission.
Q. Difference Between Delay And Jitter.
Delay and jitter are both important concepts in computer networks, especially when it
comes to data transmission. Here’s a simple explanation of each and how they differ:
Delay:
What it Is: Delay refers to the time it takes for data to travel from one point to
another in a network. It’s like the time it takes for a message to get from you to a
friend.
Jitter:
What it Is: Jitter refers to the variation in delay when packets are sent over the
network. It’s like if some messages arrive quickly, while others take longer, causing
uneven timing.
Key Differences:
1. Definition:
o Delay is the total time it takes for a packet to travel from sender to receiver.
o Jitter is the variability in that delay.
2. Focus:
o Delay measures a fixed amount of time.
o Jitter measures how much that time can change.
3. Impact on Applications:
o Delay can affect overall performance, making everything feel slower.
o Jitter can disrupt real-time communications, leading to poor quality.
4. Measurement:
o Delay: Measured in milliseconds (ms) as a fixed value.
o Jitter: Measured as the difference in delay over time, often expressed in ms as
well.
5. Causes:
o Delay: Caused by factors like transmission, propagation, and processing
times.
o Jitter: Caused by variations in network conditions, such as congestion and
different routing paths.
Q.IP Subnetting
What is IP Subnetting?
IP subnetting is a way to divide a large network into smaller, manageable parts called subnets. This
helps improve performance, security, and organization of IP addresses.
3. Reduced Broadcast Traffic: Smaller subnets limit the number of devices that receive
broadcast messages, improving overall network performance.
Basic Concepts
IP Address: A unique identifier for a device on a network, usually written as four numbers
(e.g., 192.168.1.1).
Subnet Mask: A number that defines which part of the IP address is the network and which
part is the host. It is usually written in a similar format (e.g., 255.255.255.0).
Example of Subnetting
Scenario: You have a network with the IP address 192.168.1.0 and want to create 4 subnets.
o Start with the default subnet mask for a Class C network: 255.255.255.0.
11111111.11111111.11111111.00000000
11111111.11111111.11111111.11000000
IP fragmentation is a way to break down large packets of data into smaller pieces so they can be sent
over a network that has size limits. This is important because different networks can handle different
maximum packet sizes.
Fragmentation in IPv4
1. How it Works:
o If the packet exceeds the maximum size allowed by the network, the sender breaks it
into smaller fragments.
o Each fragment has its own header and includes information to help reassemble them
later.
2. Key Points:
o Fragment Size: The maximum size for fragments is determined by the Maximum
Transmission Unit (MTU) of the network.
o Reassembly: The receiver (destination) puts the fragments back together to form the
original packet.
Fragmentation in IPv6
1. How it Works:
o If the packet is too big, the sender breaks it into smaller pieces before it even gets on
the network.
2. Key Points:
o No In-Network Fragmentation: Unlike IPv4, IPv6 does not allow routers to fragment
packets. This makes the process faster and more efficient.
o Path MTU Discovery: The sender uses a method called Path MTU Discovery to find
out the smallest MTU on the route to the destination, ensuring packets are sent at
an appropriate size.
Summary
IPv4: The sender can break packets into fragments if they are too large, and the network can
also help with fragmentation.
IPv6: The sender must ensure packets are small enough before sending, and routers do not
fragment packets at all.
Q.Differences Between IPv4 and IPv6
1. Address Format
IPv4 : Uses 32-bit addresses. Written as four numbers separated by dots (e.g., 192.168.1.1).
Can support about 4.3 billion unique addresses.
IPv6 : Uses 128-bit addresses. Written as eight groups of four hexadecimal numbers
separated by colons (e.g., 2001:0db8:85a3:0000:0000:8a2e:0370:7334). Can support a
virtually unlimited number of unique addresses (about 340 undecillion).
2. Address Space
IPv4: Limited address space, which can lead to exhaustion (not enough addresses for all
devices).
IPv6 : Vast address space, designed to accommodate the growing number of devices
connected to the internet.
3. Header Complexity
IPv4 : Has a more complex header with several fields (like checksum and options), making it
slightly slower to process.
IPv6 : Has a simpler, more efficient header with fewer fields, allowing for faster processing.
4. Fragmentation
IPv4 : Allows fragmentation to happen at both the sender and the router. If a packet is too
large, it can be broken down into smaller parts by the network.
IPv6 : Does not allow routers to fragment packets. The sender must ensure the packet is the
correct size before sending it.
5. Address Configuration
IPv6 : Supports automatic address configuration using a method called Stateless Address
Autoconfiguration (SLAAC), making it easier for devices to connect.
6. Security
IPv4 : Security features (like IPsec) are optional and not built-in.
IPv6 : Security features (IPsec) are built into the protocol, providing better security options.
Summary
In summary, IPv4 is the older version with limited addresses and a more complex structure, while
IPv6 is the newer version designed for the future, with a vast address space, simpler processing, and
built-in security features. IPv6 aims to solve the limitations of IPv4 as more devices connect to the
internet.
Q. Explain IP Header and its components.
An IP header is a block of information that helps computers communicate over a network. It’s like an
envelope that contains important details about the data being sent. Here are the main components
of an IP header:
1. Version: This indicates the version of the IP protocol being used. The most common versions
are IPv4 and IPv6.
2. Header Length: This tells how long the header is in 32-bit words. It helps the receiving
computer know where the data starts.
3. Type of Service (ToS): This specifies the priority of the packet and how it should be handled,
such as whether it’s for voice or video.
4. Total Length: This shows the total size of the packet, including both the header and the data.
5. Identification: This is a unique number assigned to each packet, which helps in reassembling
data if it gets split into smaller packets.
6. Flags: These control how the packet is handled, like whether it can be fragmented or not.
7. Fragment Offset: If a packet is split into smaller pieces, this tells where a fragment fits within
the original packet.
8. Time to Live (TTL): This value limits how long a packet can travel across the network. It
decreases by 1 each time the packet passes through a router. When it reaches zero, the
packet is discarded.
9. Protocol: This indicates the type of data being carried, such as TCP or UDP, which helps the
receiver understand how to process the data.
10. Header Checksum: This is used to check for errors in the header. If the checksum doesn’t
match, the packet might be discarded.
11. Source IP Address: This is the IP address of the sender, so the receiver knows where the data
came from.
12. Destination IP Address: This is the IP address of the intended recipient, guiding the packet to
its destination.
These components work together to ensure that data is sent accurately and efficiently from one
computer to another over a network.
Q. UDP protocol [features and benefits].
The User Datagram Protocol (UDP) is a communication protocol used in computer networks. Here
are its main features and benefits:
Features of UDP:
1. Connectionless: UDP doesn’t establish a connection before sending data. Each packet (called
a datagram) is sent independently, without needing to confirm that the other end is ready to
receive it.
2. Unreliable: There’s no guarantee that packets will arrive, or that they will arrive in the same
order they were sent. If some packets get lost, UDP doesn’t try to resend them.
3. No Flow Control: UDP does not manage the rate at which data is sent. This means that it
won’t slow down to match the receiver’s speed, which can be beneficial in some situations.
4. No Error Recovery: Unlike some protocols, UDP does not check for errors or try to fix them.
If a packet is corrupted, it simply gets discarded.
5. Low Overhead: Because it has fewer features, UDP has a smaller header size (only 8 bytes)
compared to other protocols like TCP, which makes it faster for sending data.
Benefits of UDP:
1. Speed: Since there’s no connection setup or error checking, UDP can send data more quickly
than protocols that require more overhead, like TCP.
2. Simplicity: The protocol is simple and easy to implement, making it suitable for applications
where speed is more important than reliability.
3. Real-Time Applications: UDP is great for real-time services like video streaming, online
gaming, and VoIP (voice over Internet Protocol), where receiving timely data is crucial, even
if some data is lost.
4. Broadcast and Multicast: UDP supports sending data to multiple recipients at once
(broadcasting or multicasting), which is useful for applications like live streaming.
5. Less Resource Intensive: Since it doesn’t require a lot of resources for managing connections
and error checking, UDP can be more efficient in terms of processing and memory usage.
Overall, UDP is best used in situations where speed is essential and occasional data loss is
acceptable.
Q. Explain Go Back-N Protocol.
Go-Back-N is a protocol used for reliable data transmission over networks. It’s part of the Automatic
Repeat reQuest (ARQ) family and helps ensure that data is sent and received correctly. Here’s a
simple explanation of how it works:
1. Sliding Window: The protocol uses a “sliding window” technique, which means that the
sender can send multiple packets (frames) before needing an acknowledgment (ACK) from
the receiver. The size of the window determines how many packets can be sent at once.
2. Sending Packets: The sender can send several packets in sequence (up to the window size)
without waiting for the receiver to confirm each one. Each packet has a unique number.
4. Lost or Corrupted Packets: If a packet is lost or corrupted, the receiver will stop
acknowledging further packets. For example, if packet 3 is lost, the receiver will acknowledge
packets 1 and 2 but will not acknowledge packet 3 or any packets after it (like 4 and 5).
5. Retransmission: When the sender notices that it hasn’t received an acknowledgment for a
specific packet (for example, packet 3), it will go back and retransmit that packet and all
subsequent packets. So, in our example, if packet 3 is missing, the sender will resend packets
3, 4, and 5.
Benefits of Go-Back-N:
Error Recovery: It ensures that lost or corrupted packets are retransmitted, maintaining data
integrity.
Limitations:
Inefficient Retransmissions: If a single packet is lost, the sender has to resend not just that
packet but all subsequent packets, which can waste bandwidth and time.
Delay: This can lead to delays in data delivery, especially in networks with higher error rates.
Q. Explain TCP Header Format.
The TCP (Transmission Control Protocol) header is part of the data packet that helps manage
communication between computers over a network. It contains important information needed for
reliable data transmission. Here’s a breakdown of the TCP header format and its components in
simple terms:
1. Source Port (16 bits): This is the port number of the application on the sender’s side. It helps
identify where the data is coming from.
2. Destination Port (16 bits): This is the port number of the application on the receiver’s side. It
tells the computer where to send the data.
3. Sequence Number (32 bits): This number indicates the order of the packets. It helps the
receiver arrange the data in the correct sequence.
4. Acknowledgment Number (32 bits): This number shows the sequence number of the next
expected packet. It tells the sender that the receiver has successfully received all packets up
to that number.
5. Data Offset (4 bits): This tells how long the TCP header is, which helps the receiver know
where the actual data begins.
6. Flags (9 bits): These are control bits that indicate different types of messages:
o URG: Urgent data
o ACK: Acknowledgment
7. Window Size (16 bits): This indicates the size of the sender’s receive window, or how much
data can be sent before waiting for an acknowledgment. It helps manage flow control.
8. Checksum (16 bits): This is used to check for errors in the header and data. If the checksum
doesn’t match, the packet may be discarded.
9. Urgent Pointer (16 bits): This indicates where urgent data is located within the packet, used
if the URG flag is set.
10. Options (Variable length): This field can be used for additional features, like maximum
segment size or timestamps. It’s optional and can vary in size.
11. Data (Variable length): This is the actual data being transmitted, following the header.
Summary
The TCP header provides all the necessary information to ensure reliable communication between
computers. It helps keep track of which packets have been sent, received, and acknowledged,
ensuring that data is delivered accurately and in order.
How It Works: When you type a website address in your browser, your browser sends an
HTTP request to the server where the website is stored. The server then sends back the
requested web page.
Characteristics:
Stateless: Each request is independent, meaning the server doesn’t remember previous requests.
Purpose: SMTP is used for sending emails from one server to another.
How It Works: When you send an email, your email client (like Gmail or Outlook) uses SMTP
to send your message to the email server. The server then forwards it to the recipient’s email
server.
Characteristics:
o Handles Sending Only: SMTP is mainly for sending emails, not for retrieving them.
For retrieving, protocols like IMAP or POP3 are used.
Purpose: FTP is used for transferring files between computers over the internet.
How It Works: You can connect to an FTP server using an FTP client (like FileZilla) to upload
or download files. You provide the server address, username, and password to log in.
Characteristics:
Uses Ports 21 and 20: FTP generally uses port 21 for commands and port 20 for data transfer.
Can be Secure (FTPS/SFTP): There are secure versions of FTP that encrypt data during transfer.
Common Usage: Uploading website files to a server or downloading files from a server.
Summary
These protocols are essential for how we interact with the internet every day!
1. Bit Interval :
- The bit interval is the time required to send one bit of data in a communication system.
1
Bit Interval=
Bit Rate
- For example, if the bit rate is 1000 bits per second (bps), the bit interval would be 1 millisecond
(0.001 seconds).
2. Bit Rate :
- The bit rate is the number of bits transmitted per second, measured in bps (bits per second).
- Formula :
1
Bit Rate=
Bit Interval
3. Bit Length :
- The bit length is the physical distance a bit occupies on the transmission medium.
- It depends on the propagation speed of the signal and the bit interval :
In summary, bit interval is the time for one bit, bit rate is the speed of bit transmission, and bit
length is the distance a bit covers in the transmission medium.
Q.Explain Star and Bus Topology.
Star Topology
Advantages:
o High performance.
Disadvantages:
Bus Topology
Advantages:
Disadvantages:
Both topologies have their pros and cons based on network needs!
Q.Error in Data Link Layer :
In computer networks, errors occur during data transmission due to interference, noise, or faulty
connections. These errors lead to the alteration of data, causing problems in communication. Errors
can be categorized based on transmission and bits.
Types of Errors :
- Context Error : When the transmitted data doesn’t match the expected data. For example, sending
the wrong message or data type. This could happen due to faulty encoding or transmission failures.
- Flow Integrity Error : This occurs when the sequence or the flow of data packets is disrupted,
leading to loss, duplication, or out-of-order delivery of data. It happens when network congestion or
mismanagement of data packets occurs.
Errors can also occur at the bit level, where individual bits in the data become corrupted. These can
be :
- Single-bit Error : In this type of error, only one bit in the data packet is altered during transmission.
For instance, a '0' might become '1' or vice versa. It’s simple to detect but occurs less frequently.
Medium
0 1 1 1 0 0 1 1 0 1 1 1 0 0 1 0
Transmitted byte Received byte
Error
- Burst Error : In a burst error, multiple consecutive bits are corrupted. This type of error affects
larger sections of data, making it harder to detect and correct. Burst errors are more common in
noisy or unstable network environments.
Errors
Medium
0 1 1 1 0 0 1 1
0 1 0 1 1 0 0 1
Transmitted byte
Received byte
The TCP/IP model (Transmission Control Protocol/Internet Protocol) is a framework used to design
and understand how data is transmitted across networks. It is the foundation of the internet and
most networks today. The model breaks down the networking process into layers, each with specific
functions that work together to enable communication between devices.
| Application Layer |
| Transport Layer |
| Network Layer
| Physical Layer |
1. Application Layer :
- Explanation : This layer is where applications and software that you use (like web browsers, email
clients, etc.) interact with the network. It provides protocols that enable software to communicate
over a network. Examples include HTTP (for web browsing), FTP (for file transfers), and SMTP (for
email).
2. Transport Layer :
- Explanation : This layer is responsible for ensuring that data is transferred reliably between two
devices. It breaks down large messages into smaller packets, sends them, and ensures they arrive
correctly. The main protocols used here are TCP (Transmission Control Protocol) for reliable
communication and UDP (User Datagram Protocol) for faster, but less reliable, communication.
3. Network Layer :
- Explanation : This layer is responsible for routing the packets of data across different networks. It
determines the best path for the data to reach its destination. The key protocol in this layer is IP
(Internet Protocol), which handles the addressing and routing of packets to ensure they reach the
correct destination.
- Explanation : The Data Link Layer is responsible for the actual transfer of data between two devices
on the same network. It handles error detection, correction, and the framing of data packets. It
ensures that data is delivered to the correct device on the network. Examples of protocols used here
include Ethernet and Wi-Fi.
5. Physical Layer :
- Explanation : The Physical Layer is concerned with the physical connection between devices. It deals
with the transmission of raw bits over a physical medium, such as cables, fiber optics, or radio waves.
This layer ensures that the data is transmitted as electrical or optical signals.
Summary
The TCP/IP model is an essential framework that organizes how data is transmitted over a network.
Each of the five layers—Application, Transport, Network, Data Link, and Physical—plays a specific role
in the process, ensuring that communication between devices is efficient and reliable.