Computer Networks 3
Computer Networks 3
KHARAR, PUNJAB
COMPUTER NETWORKS
ASSIGNMENT – III
BTCS 504 – 18
B. TECH 5TH SEMESTER
2023-24
i) Error control
Error control, in the context of data communication and networking, is a set of
techniques and mechanisms designed to detect, correct, and prevent errors in data
transmission. Errors can occur during the transmission of data due to various factors,
including noise, interference, signal attenuation, and other impairments in the
communication channel. Error control is essential to ensure the integrity and reliability
of data as it travels from a sender to a receiver. Here's a brief overview of error control:
1. Error Detection:
- Error detection techniques involve adding extra bits (e.g., checksums, cyclic
redundancy checks) to the transmitted data to create a redundancy in the data stream.
- The receiver can use these extra bits to detect the presence of errors in the received
data.
- If an error is detected, the receiver requests retransmission of the erroneous data.
2. Error Correction:
- Error correction techniques go beyond error detection and allow the receiver to
correct errors in the received data.
- Error-correcting codes, such as Hamming codes and Reed-Solomon codes, are used
to encode the data with additional redundancy.
- The receiver can use this redundancy to not only detect errors but also reconstruct
the original, error-free data.
3. Automatic Repeat Request (ARQ):
- ARQ is a common error control mechanism that involves requesting retransmission
of data when errors are detected.
- The sender and receiver engage in a communication cycle where the sender
retransmits the data upon request.
- ARQ may use mechanisms like Stop-and-Wait, Go-Back-N, or Selective Repeat for
managing retransmissions.
Error control is critical for ensuring the reliability of data transmission, particularly in
scenarios where data accuracy and integrity are essential, such as in computer
networks, telecommunication systems, and file transfers. The choice of error control
methods depends on factors like the type of data being transmitted, the communication
medium, and the acceptable trade-offs between error detection, correction, and the
associated overhead.
ii) IPv4
IPv4, or Internet Protocol version 4, is one of the foundational protocols of the internet and
network communication. It is the fourth version of the Internet Protocol and serves as the
basis for most internet communication. Here's a brief overview of IPv4:
1. Addressing: IPv4 uses 32-bit addresses, represented as four decimal numbers separated by
periods (e.g., 192.168.1.1). Each IPv4 address is unique and identifies a specific device or
node on a network. The addressing scheme is hierarchical, with classes of addresses and
subnets to efficiently manage IP allocations.
2. Packet Structure: IPv4 data is transmitted in packets called datagrams. Each datagram
includes a header with control information and a payload containing the actual data. The
header includes fields for the source and destination IP addresses, Time-to-Live (TTL),
protocol version, and checksum, among others.
3. Routing: IPv4 relies on routing tables and algorithms to determine the best path for data to
traverse a network. Routers use these tables to forward packets toward their destination. The
Internet is a collection of interconnected networks, and IPv4 is crucial for ensuring data
reaches its intended recipient across these networks.
4. Subnetting: Subnetting is a technique that allows organizations to divide their IP address
space into smaller, more manageable segments. It helps improve network management and
security. Subnet masks determine how IP addresses are divided between network and host
portions.
5. NAT (Network Address Translation): NAT is a technique used to conserve IPv4 addresses.
It allows multiple devices within a private network to share a single public IP address. NAT
translates private IP addresses to the public address when data is sent outside the private
network.
6. IPv4 Exhaustion: The biggest challenge with IPv4 is address exhaustion. The limited pool
of available IPv4 addresses has been largely depleted due to the rapid growth of the internet
and the proliferation of connected devices. This has led to the development and adoption of
IPv6, which uses 128-bit addresses and offers an enormous number of unique addresses to
meet the growing demands of the internet.
While IPv6 adoption is increasing, IPv4 is still widely used, and the transition to IPv6 is a
gradual process. Many devices and networks continue to rely on IPv4, and mechanisms like
NAT have helped extend its usability. However, as the need for IP addresses continues to
grow, IPv6 is becoming increasingly important to ensure the continued expansion and
scalability of the internet.
Question 3: What is Address mapping?
Address mapping is a fundamental concept in computer networks and operating systems, and
it involves the translation of one type of address or identifier to another. Address mapping is
typically used to facilitate communication and data transfer between different layers of a
networking protocol stack or between hardware and software components. Here are some
common examples of address mapping:
2. DNS Servers: DNS operates as a distributed system with a network of DNS servers.
These servers are organized into a hierarchy, and they work together to resolve
domain name queries. The hierarchy includes root servers, top-level domain servers,
authoritative name servers, and caching resolvers.
3. DNS Resolution Process: When a user enters a domain name into a web browser, the
browser sends a DNS query to a DNS resolver (usually provided by the Internet
Service Provider, ISP). The resolver then follows a series of steps to resolve the
domain name:
It checks its local cache for a previously resolved domain name.
If not found, the resolver queries a root DNS server for information about the
TLD's authoritative name server.
The root server directs the resolver to the authoritative name server for the
specific domain.
The authoritative name server returns the IP address associated with the
domain name.
The resolver caches this information for future use and returns the IP address
to the user's device.
4. Caching: To reduce the load on DNS servers and improve query response times, DNS
resolvers cache domain name information for a specified period (Time to Live or
TTL). This allows the resolver to respond quickly to subsequent queries for the same
domain.
5. Resource Records: DNS servers store resource records (RRs) that contain
information associated with domain names. Common types of RRs include A records
(for IPv4 addresses), AAAA records (for IPv6 addresses), MX records (for mail
servers), and CNAME records (for aliasing one domain to another).
DNS is a crucial component of the internet infrastructure, enabling users to access websites
and services without needing to know the underlying IP addresses. It plays a vital role in
making the internet user-friendly and accessible. Additionally, DNS provides essential
functionality for email delivery, voice-over-IP (VoIP), and various other internet-based
services.
3. Ciphers:
Ciphers are algorithms or methods used for encryption and decryption.
There are various types of ciphers, including substitution ciphers (replacing
one symbol with another) and transposition ciphers (rearranging symbols).
Modern ciphers, such as the Advanced Encryption Standard (AES) and RSA,
are complex mathematical algorithms that provide strong security.
4. Hash Functions:
Hash functions are cryptographic algorithms that transform input data into a
fixed-length output (hash) that is typically of a fixed size.
Hashes are used to verify data integrity and generate digital signatures.
A good hash function should produce a unique hash for each unique input and
be irreversible (i.e., it should be computationally infeasible to derive the
original input from the hash).
5. Digital Signatures:
Digital signatures use asymmetric-key cryptography to provide authentication
and integrity for digital messages or documents.
The sender uses their private key to sign a message, and the recipient can
verify the signature using the sender's public key. If the signature is valid, it
confirms the message's origin and integrity.
6. Secure Protocols:
Cryptography is used in various secure communication protocols, such as
Secure Sockets Layer (SSL) and its successor, Transport Layer Security
(TLS), for secure web communication.
Secure communication protocols ensure the confidentiality and integrity of
data exchanged over a network.