[go: up one dir, main page]

0% found this document useful (0 votes)
8 views7 pages

Dca2201 Computer Networking

The document discusses key concepts in computer networking, including the OSI model, Stop and Wait protocol, and types of communication methods like unicast, multicast, and broadcast. It also covers routing methods, congestion control techniques in the transport layer, and the differences between lossy and lossless compression. Each section provides explanations and examples to illustrate the principles and their applications in networking.

Uploaded by

vineetkujur14
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)
8 views7 pages

Dca2201 Computer Networking

The document discusses key concepts in computer networking, including the OSI model, Stop and Wait protocol, and types of communication methods like unicast, multicast, and broadcast. It also covers routing methods, congestion control techniques in the transport layer, and the differences between lossy and lossless compression. Each section provides explanations and examples to illustrate the principles and their applications in networking.

Uploaded by

vineetkujur14
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/ 7

Name Vineet Kumar

PROGRAM Bachelor of Computer Applications (BCA)

SEMESTER VI

COUSRE CODE & NAME DCA2201 COMPUTER NETWORKING

SET I

Q1). Why is layered model used for computer networks? Explain OSI referenced model.
Answer: A) The layered model is used in computer networks to break down complex
communication tasks into smaller, manageable parts. The two most commonly used models are
the OSI model and the TCP/IP model.

The OSI (Open Systems Interconnection) model has 7 layers: Physical Layer, Data Link Layer,
Network Layer, Transport Layer, Session Layer, Presentation Layer, Application Layer

The TCP/IP model is simpler and has 4 layers:

• Network Access Layer (similar to OSI's Physical and Data Link Layers)

• Internet Layer (same as OSI’s Network Layer)

• Transport Layer

• Application Layer (includes OSI’s Session, Presentation, and Application layers)


The main reason for using a layered model is simplicity. Each layer performs a specific task and
communicates only with the layer directly above or below it. This makes it easier to design,
develop, and fix problems in a network. Another benefit is modularity. If there is a change or
upgrade in one layer, other layers don’t have to be changed. For example, you can replace the
physical cables (Physical Layer) without affecting how applications send messages (Application
Layer). Layered models also support standardization. Each layer uses specific protocols, allowing
devices and software from different companies to work together. For example, your laptop can
connect to a website hosted on a different system because both follow standard layers and
protocols.
B). OSI referenced model: The OSI (Open Systems Interconnection) model is a standard
framework used to understand how data moves through a network. It was developed by the
International Organization for Standardization (ISO) to help different computer systems
communicate with each other. Each layer communicates with the layer above and below it. This
structure makes network design and troubleshooting easier. It also allows different hardware and
software systems to work together, making communication universal and efficient.

The OSI model has seven layers, each with a specific function:

1. Physical Layer – Transfers raw bits over physical media like cables.

2. Data Link Layer – Handles error detection and data framing between two directly
connected devices.

3. Network Layer – Finds the best path for data using IP addresses.

4. Transport Layer – Ensures reliable data delivery with protocols like TCP.
5. Session Layer – Manages sessions or connections between applications.

6. Presentation Layer – Translates, encrypts, and compresses data for the application.

7. Application Layer – Closest to the user; enables network services like email, web browsing,
etc.

Q 2) Discuss the working of stop and wait protocol in a noisy channel with the help of an
example

Answer: The Stop and Wait Protocol is one of the simplest methods of data transmission in
computer networks. It is a type of flow control method where the sender sends one frame at a time
and waits for an acknowledgment (ACK) from the receiver before sending the next frame. In a
noisy channel, data can be lost or damaged during transmission. To handle such errors, Stop and
Wait protocol is improved with the use of acknowledgments (ACK) and timeouts. This ensures
reliable communication between sender and receiver.

Working Process: The sender sends one data frame to the receiver. The receiver checks the frame.
If it is received correctly, the receiver sends an ACK back to the sender. Once the sender receives
the ACK, it sends the next frame. If the sender does not receive an ACK within a certain time
(called timeout), it assumes that the frame was lost or the ACK was lost due to noise, and it resends
the same frame. This process continues until all data is successfully sent and acknowledged. Each
frame is given a sequence number (usually 0 or 1) to avoid confusion if a frame is resent.

Example in a Noisy Channel:


Let’s assume sender wants to send 3 data frames (Frame 1, Frame 2, Frame 3) to the receiver. The
sender sends Frame 1. The receiver receives it correctly and sends back ACK 1. The sender gets
ACK 1 and sends Frame 2. Due to noise in the channel, ACK 2 is lost. The sender waits, but since
no ACK is received, it resends Frame 2 after timeout. The receiver receives Frame 2 again. Since
it already received it earlier, it can ignore it or resend the ACK to confirm. The process continues
with Frame 3. In case a frame is damaged during transmission, the receiver can simply ignore it,
and the sender will resend it after the timeout period.

Q 3) Give a contrast between unicast, multicast and broadcast. Also explain the way they
implemented.

Answer: In computer networks, data is transferred from one device to another using different types
of communication methods. The three main types are unicast, multicast, and broadcast. These
methods define how data is sent and who receives it.

• Unicast Communication: Unicast is a one-to-one communication. In this method, data is sent


from one sender to only one specific receiver. It is the most commonly used method in
networks. For example, when you open a website on your browser, your device sends a unicast
request to the web server.

Implementation: Unicast uses IP addresses for both the sender and receiver. It is implemented
using protocols like TCP (Transmission Control Protocol) or UDP (User Datagram Protocol).
In TCP, the connection is established before data is sent to ensure reliability.

Example: A video call between two people, or downloading a file from a specific server.

• Multicast Communication: Multicast is a one-to-many communication. In this method, data


is sent from one sender to a selected group of receivers who have shown interest in receiving
the data. It is useful when the same data needs to be sent to multiple users, but not everyone in
the network.

Implementation: Multicast uses special IP address ranges from 224.0.0.0 to 239.255.255.255.


Routers and switches in the network must support multicast routing protocols like IGMP
(Internet Group Management Protocol) and PIM (Protocol Independent Multicast). Only
devices that have joined the multicast group will receive the data.

Example: Live streaming a sports match to selected subscribers.

• Broadcast Communication: Broadcast is a one-to-all communication. Here, the data is sent


from one sender to all devices on the same network. It does not matter whether the devices
want the data or not — they all receive it.
Implementation: Broadcast is used only in local area networks (LANs). It uses the broadcast
address, such as 255.255.255.255 in IPv4. Routers usually do not forward broadcast traffic
outside the local network, which helps avoid unnecessary traffic on the internet.

Example: ARP (Address Resolution Protocol), which asks all devices in the network to find
the MAC address of a specific IP.

Feature Unicast Multicast Broadcast


Type One-to-one One-to-many One-to-all
Receivers Single device Group of devices All devices in network
Bandwidth use High (for many users) Efficient Wastes bandwidth
Scope LAN/WAN LAN/WAN (with Only in LAN
support)

SET II

Q4). Explain various routing methods follow in network layer. Discuss their purpose in
different environments.

Answer: Routing is the process of finding the best path for data to travel from a sender to a receiver
across a network. It takes place in the network layer of the OSI model. The router uses routing
methods to decide which path data packets should take to reach their destination. There are several
routing methods, each with different uses depending on the network environment.

• Static Routing: Static routing is a manual method where routes are set by a network
administrator. These routes do not change automatically unless they are manually updated.
This method is best suited for small and simple networks where the path between devices is
fixed and not likely to change. It Used in small office networks or point-to-point connections
where the route is predictable and does not need to be updated often. It offers security and
stability but requires manual changes if the network topology changes.
• Dynamic Routing: Dynamic routing is an automatic method. Routers share routing information
with each other using routing protocols like RIP (Routing Information Protocol), OSPF (Open
Shortest Path First), or BGP (Border Gateway Protocol). Routes are updated automatically
based on network conditions like traffic, failure, or topology changes. It is used in large and
complex networks like corporate networks or the internet, where manual updates are not
possible. It adapts to changes and finds the best path without human intervention.
• Default Routing: In default routing, a router forwards all packets to a single default route when
it does not have a specific path for the destination. This is like a "catch-all" route. It used in
small networks that connect to a larger network, like a company network connecting to the
internet. It is simple to configure and works well when most traffic goes through one gateway.
• Flooding: In flooding, the router sends the incoming data packet through all available paths
except the one it came from. This ensures that the packet reaches the destination, but it can
cause heavy traffic. It used in emergency or military networks where high reliability is more
important than bandwidth usage. It guarantees delivery but is inefficient for normal use.
• Adaptive Routing: It also called intelligent routing, this method changes the route depending
on the current network condition like traffic load or link failure. Its best for real-time and
changing environments like video streaming, where the fastest available path must always be
used.

Q5) Explain the process of controlling congestion in the transport layer in detail with the
help of examples.

Answer: Congestion in a network happens when too many data packets are sent through the
network, and the routers or links become overloaded. This results in packet loss, delays, and
reduced performance. The transport layer, especially TCP (Transmission Control Protocol), plays
an important role in controlling congestion to ensure smooth data flow between sender and
receiver. Congestion control in the transport layer is very important to maintain the speed and
reliability of data transmission. Techniques like slow start, congestion avoidance, fast retransmit,
and fast recovery help manage the data flow efficiently. These methods prevent packet loss, reduce
delays, and improve the overall performance of the network.

Congestion usually occurs when, The sender sends data faster than the network can handle. Many
users send large data at the same time. Routers have limited buffer space to store packets. To solve
this, the transport layer uses congestion control techniques to adjust the data flow and avoid
overloading the network.

Congestion Control Methods in TCP

1. Slow Start: When a TCP connection begins, the sender does not know the network capacity. So,
it starts by sending a small amount of data. For example, it may send 1 packet and wait for
acknowledgment (ACK). After receiving the ACK, it doubles the data in the next round — 1, 2, 4,
8, and so on. This exponential growth continues until the network shows signs of congestion (like
packet loss). This helps the sender find the limit without sending too much at once.

2. Congestion Avoidance: Once the network reaches a certain point (called threshold), the sender
stops growing exponentially and switches to linear growth. For example, instead of doubling the
window size, it increases it by 1 packet at a time. This helps in avoiding congestion by not
overloading the network.

3. Fast Retransmit and Fast Recovery : If a packet is lost, the receiver sends duplicate ACKs for
the last successfully received packet. When the sender gets 3 duplicate ACKs, it assumes a packet
is lost and retransmits it immediately, without waiting for timeout. This is called Fast Retransmit.
After this, the sender performs Fast Recovery, where it reduces the congestion window (maybe to
half) and slowly increases it again. This avoids starting from zero and saves time.

Example Scenario:

Let’s assume I’m downloading a large file from a server. The server starts sending small chunks
of the file. As i receive and acknowledge them, the server sends more. If at some point my internet
becomes slow or the network gets crowded, some packets may be lost. TCP detects this, slows
down the sending rate, and starts recovering slowly. This way, the network does not crash, and the
download continues smoothly.

Q6) Compare between the lossy and lossless compression. Discuss the tradeoff between these.

Answer: Data compression is the process of reducing the size of files so they take up less storage
space or can be transmitted faster over a network. There are two main types of compression
techniques: lossy and lossless. Each has its own use, advantages, and disadvantages depending on
the situation. Lossy and lossless are two different approaches to compression. Lossy gives smaller
files with reduced quality, while lossless keeps original quality but reduces less in size. Choosing
the right one depends on the need for space, quality, and accuracy.

Lossless Compression: Lossless compression means that the original data can be perfectly
restored after decompression. No information is lost in the process. This method is mostly used
where data accuracy is important. Common examples of lossless formats are ZIP files, PNG
images, FLAC audio, GIFs. Lossless compression is used for Text files, Software, Databases,
Medical or legal documents It usually provides a lower compression ratio, meaning the file size is
not reduced as much compared to lossy compression, but the data remains 100% original.
Lossy Compression: Lossy compression reduces file size by removing some data permanently,
especially parts that are less important or not noticeable to the human eye or ear. Once the file is
compressed, it cannot be restored to its original form. Common examples of lossy formats are
JPEG images, MP3 audio, MP4 videos. Lossy compression is ideal for Multimedia files (images,
audio, video), Streaming content, Social media uploads. It gives a higher compression ratio, which
saves more space, but the quality may reduce slightly.
Tradeoff Between Lossy and Lossless Compression: The main tradeoff between lossy and
lossless compression is quality vs. file size. Lossy compression provides smaller file sizes, which
is great for saving storage or faster downloads, especially on slow networks. However, you
sacrifice some quality, which might be noticeable if the compression is too high. lossless
compression keeps 100% of the original quality, but the file size may remain large. This is
important when the accuracy of the data matters, such as in legal files, scientific data, or
professional audio editing. For watching a movie online, lossy is fine. But for storing important
documents or code, lossless is better.

You might also like