0% found this document useful (0 votes)
678 views

Computer Networking Imp

Computer networking allows multiple computers to connect and share information and resources. Key network connecting devices that allow this include network interface cards, routers, switches, and hubs. The OSI model is a seven layer conceptual model that describes how data is exchanged between applications over a network, with different layers responsible for different communication functions like physical transmission, error detection, routing, and application services.

Uploaded by

PRATHAM RUHELA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
678 views

Computer Networking Imp

Computer networking allows multiple computers to connect and share information and resources. Key network connecting devices that allow this include network interface cards, routers, switches, and hubs. The OSI model is a seven layer conceptual model that describes how data is exchanged between applications over a network, with different layers responsible for different communication functions like physical transmission, error detection, routing, and application services.

Uploaded by

PRATHAM RUHELA
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Question 1: Explain computer networking and network connecting

devices?
Computer networking is a system in which multiple computers are connected to each
other to share information and resources. The network connecting devices are the
hardware that allows the computers to connect to each other.

The most common network connecting devices are:

● Network interface cards (NICs): NICs are adapters that allow computers to
connect to a network. They are typically installed in the computer's motherboard
or expansion slot.
● Routers: Routers are devices that route data between different networks. They
are typically used to connect a home or office network to the internet.
● Switches: Switches are devices that connect multiple computers together on a
single network. They are typically used to connect computers in a home or office
network.
● Hubs: Hubs are devices that connect multiple computers together on a single
network. They are less common than switches, but they are still used in some
networks.

In addition to these devices, there are a number of other network connecting devices
that are used in specialized networks. For example, wireless access points are used to
connect computers to a wireless network.

Computer networking is a complex topic, but it is essential for understanding how


computers and devices connect to each other. By understanding the basics of computer
networking, you can better understand how to use and troubleshoot your computer and
network.
Here are some of the benefits of computer networking:

● Increased productivity: Computer networking allows users to share files and


resources, which can lead to increased productivity. For example, employees can
share documents and collaborate on projects without having to be in the same
physical location.
● Improved communication: Computer networking makes it easy for users to
communicate with each other, regardless of their location. This can be done
through email, instant messaging, video conferencing, and other tools.
● Enhanced security: Computer networking can be used to improve security by
centralizing access to resources and data. This can make it more difficult for
unauthorized users to access sensitive information.
● Reduced costs: Computer networking can help to reduce costs by eliminating the
need for multiple stand-alone computers. For example, a single server can be
used to store files and applications for all users on a network.

Question 2: Explain types of network?

There are many different types of networks, but they can be broadly classified into four
categories:

● Personal area networks (PANs)


● Local area networks (LANs)
● Metropolitan area networks (MANs)
● Wide area networks (WANs)
● Personal area networks (PANs) are small networks that connect devices within a
close range, such as a few meters. PANs are typically used to connect personal
devices, such as computers, smartphones, and tablets. The most common type
of PAN is a Bluetooth network.
● Local area networks (LANs) are networks that connect devices within a small
area, such as an office building or a home. LANs typically use wired connections,
such as Ethernet cables, but they can also use wireless connections, such as
Wi-Fi. LANs are used to share files, printers, and other resources.
● Metropolitan area networks (MANs) are networks that connect devices within a
city or metropolitan area. MANs typically use fiber optic cables to provide
high-speed connections. MANs are used to connect LANs together and to
provide high-speed Internet access to businesses and homes.
● Wide area networks (WANs) are networks that connect devices over a large
geographic area, such as a country or the world. WANs typically use leased lines
or satellites to provide connections. WANs are used to connect LANs and MANs
together and to provide Internet access to businesses and homes.

In addition to these four categories, there are a number of other types of networks, such
as:

● Campus area networks (CANs)


● Enterprise networks
● Industrial networks
● Virtual private networks (VPNs)

Each type of network has its own unique characteristics and is designed for a specific
purpose. By understanding the different types of networks, you can better understand
how they work and how to use them.

Question 3: Explain OSI model?


The Open Systems Interconnection (OSI) model is a conceptual model that describes
the communication functions of a computer network. It is a seven-layer model that
defines how data should be exchanged between two applications. The OSI model is a
generic model, and it is not tied to any specific network technology.

The seven layers of the OSI model are:

1. Physical layer: The physical layer is responsible for the physical transmission of
data over a network medium. It defines the electrical and mechanical
characteristics of the network medium, as well as the signaling techniques used
to transmit data.
2. Data link layer: The data link layer is responsible for error detection and
correction. It ensures that data is received without errors by adding error
detection codes to the data and by requesting retransmission of data that is
received with errors.
3. Network layer: The network layer is responsible for routing data between different
networks. It provides a way for data to be forwarded from one network to another.
4. Transport layer: The transport layer is responsible for providing a reliable
connection between two applications. It ensures that data is delivered in the
correct order and that it is not lost or corrupted.
5. Session layer: The session layer is responsible for managing the communication
between two applications. It provides a way for applications to establish,
maintain, and terminate a connection.
6. Presentation layer: The presentation layer is responsible for formatting data for
presentation to the user. It converts data from one format to another so that it can
be displayed or printed correctly.
7. Application layer: The application layer is the highest layer of the OSI model. It
provides services to applications that need to communicate over a network.
These services include file transfer, email, and web browsing.

The OSI model is a useful tool for understanding how data is transmitted over a
network. It can also be used to troubleshoot network problems. By understanding the
different layers of the OSI model, you can better understand where a problem might be
occurring and how to fix it.

Here are some of the benefits of using the OSI model:

● It provides a common framework for understanding network communication.


● It helps to identify and troubleshoot network problems.
● It can be used to design and implement new network protocols.
● It can be used to teach network concepts to students and professionals.

The OSI model is a valuable tool for anyone who works with computer networks. By
understanding the OSI model, you can better understand how networks work and how
to troubleshoot network problems.

Question 4: Explain network topology with its types?

Network topology is the physical layout of a network. It describes how the nodes
(devices) in a network are connected to each other. There are many different types of
network topologies, each with its own advantages and disadvantages.
The most common types of network topologies are:

● Bus topology: In a bus topology, all the nodes are connected to a single cable.
The cable is called the bus. Data is transmitted in one direction along the bus.
● Star topology: In a star topology, all the nodes are connected to a central hub or
switch. The hub or switch is responsible for routing data between the nodes.
● Ring topology: In a ring topology, the nodes are connected in a closed loop. Data
is transmitted in one direction around the ring.
● Mesh topology: In a mesh topology, each node is connected to every other node.
This provides a redundant network, which means that if one connection fails, the
data can still be transmitted through another connection.
● Tree topology: A tree topology is a combination of a star and a bus topology. The
nodes are connected to a central hub or switch, and the hub or switch is
connected to other hubs or switches.

The best type of network topology for a particular network will depend on a number of
factors, including the size of the network, the number of nodes, the type of data being
transmitted, and the budget.
Here is a table that summarizes the advantages and disadvantages of each type of
network topology:

Topolog Advantages Disadvantages


y

Bus Simple to install and maintain Not very fault-tolerant


topolog
y

Star Easy to add or remove nodes More expensive than a bus


topolog topology
y

Ring Fault-tolerant Difficult to install and maintain


topolog
y

Mesh Very fault-tolerant Expensive to implement


topolog
y
Tree A good compromise between More complex to manage than a
topolog cost and fault tolerance bus or star topology
y

Question 5:Discuss physical layer transmission medium?

The physical layer is the lowest layer of the OSI model. It is responsible for the physical
transmission of data over a network medium. The physical layer defines the electrical
and mechanical characteristics of the network medium, as well as the signaling
techniques used to transmit data.

There are two main types of transmission media:

● Wired media: Wired media uses physical cables to transmit data. The most
common types of wired media are twisted-pair cable, coaxial cable, and
fiber-optic cable.
● Wireless media: Wireless media does not use physical cables to transmit data.
Instead, it uses radio waves or infrared light to transmit data through the air. The
most common types of wireless media are Wi-Fi, Bluetooth, and cellular
networks.

The choice of transmission medium depends on a number of factors, including the


distance between the nodes, the amount of data to be transmitted, and the security
requirements.

Here is a more detailed discussion of each type of transmission medium:


Wired media

● Twisted-pair cable: Twisted-pair cable is the most common type of wired media. It
consists of two insulated copper wires twisted together. Twisted-pair cable is
relatively inexpensive and easy to install. It is typically used for Ethernet
networks.
● Coaxial cable: Coaxial cable consists of a central conductor surrounded by a
shield. The shield protects the conductor from electromagnetic interference.
Coaxial cable is more expensive than twisted-pair cable, but it can transmit data
at higher speeds. It is typically used for cable television and high-speed Internet
connections.
● Fiber-optic cable: Fiber-optic cable consists of a thin strand of glass or plastic
that carries light signals. Fiber-optic cable is the fastest type of wired media. It is
typically used for long-distance communication and for high-speed networks.

Wireless media

● Wi-Fi: Wi-Fi is a wireless technology that uses radio waves to transmit data.
Wi-Fi is the most common type of wireless media. It is used for home networks,
office networks, and public hotspots.
● Bluetooth: Bluetooth is a wireless technology that uses short-range radio waves
to transmit data. Bluetooth is used for personal area networks (PANs), which
connect devices such as computers, smartphones, and tablets.
● Cellular networks: Cellular networks use radio waves to transmit data over a wide
area. Cellular networks are used for mobile phones, tablets, and other mobile
devices.

The physical layer is an important part of any network. It is responsible for the physical
transmission of data over a network medium. The choice of transmission medium
depends on a number of factors, including the distance between the nodes, the amount
of data to be transmitted, and the security requirements.

Question 6: what is a medium -access sublayer?


The medium access sublayer (MAC sublayer) is the second layer of the Data Link Layer
in the Open Systems Interconnection (OSI) model. It is responsible for controlling
access to the shared medium, such as a wired or wireless network. The MAC sublayer
ensures that only one device can transmit data at a time, preventing collisions.

The MAC sublayer uses a variety of methods to control access to the medium,
including:

● Carrier sense multiple access with collision detection (CSMA/CD): CSMA/CD is a


protocol that allows devices to sense the medium before transmitting data. If the
medium is busy, the device waits until the medium is clear before transmitting. If
two devices transmit at the same time, a collision occurs and both devices must
retransmit the data.
● Carrier sense multiple access with collision avoidance (CSMA/CA): CSMA/CA is
a protocol that is similar to CSMA/CD, but devices listen to the medium before
transmitting data. If the medium is busy, the device waits for a random amount of
time before transmitting. This helps to reduce the number of collisions.
● Token passing: Token passing is a protocol that uses a special frame called a
token to control access to the medium. The token is passed from device to
device in a predetermined order. Only the device that has the token can transmit
data.

The MAC sublayer is an important part of any network. It ensures that data is
transmitted reliably and efficiently.

Here are some of the benefits of using the MAC sublayer:

● It prevents collisions.
● It ensures that only one device can transmit data at a time.
● It allows multiple devices to share the same medium.
● It provides a reliable way to transmit data.
● It is efficient in terms of bandwidth usage.

The MAC sublayer is a valuable tool for anyone who works with computer networks. By
understanding how the MAC sublayer works, you can better understand how networks
work and how to troubleshoot network problems.

Question 7: Discuss ARQ with all of its types?

Automatic Repeat Request (ARQ) is a method of ensuring reliable data transmission


over a communication channel. ARQ works by having the sender send a frame of data,
and then the receiver send an acknowledgement (ACK) back to the sender. If the
sender does not receive an ACK within a certain amount of time, it will assume that the
frame was lost and will resend it.

There are two main types of ARQ: Stop-and-Wait ARQ and Go-Back-N ARQ.

1 .Stop-and-Wait ARQ: Stop-and-Wait ARQ is the simplest type of ARQ. The sender
sends one frame at a time and waits for an ACK before sending the next frame. If the
sender does not receive an ACK within a certain amount of time, it will assume that the
frame was lost and will resend it. This process continues until all of the frames have
been successfully transmitted.

The main advantage of Stop-and-Wait ARQ is its simplicity. It is easy to implement and
requires very little overhead. The main disadvantage of Stop-and-Wait ARQ is its low
throughput. The sender can only send one frame at a time, and it must wait for an ACK
before sending the next frame. This can lead to long delays, especially if the
communication channel is unreliable.

2. Go-Back-N ARQ: Go-Back-N ARQ is a more complex type of ARQ, but it offers better
throughput than Stop-and-Wait ARQ. In Go-Back-N ARQ, the sender can send multiple
frames before waiting for an ACK. The sender keeps track of the sequence number of
each frame it sends. The receiver sends an ACK for each frame it receives, and the
sender will only send frames with sequence numbers that have not yet been
acknowledged. If the sender does not receive an ACK for a particular frame within a
certain amount of time, it will assume that the frame was lost and will resend all of the
frames with sequence numbers less than or equal to the lost frame.

The main advantage of Go-Back-N ARQ is its higher throughput. The sender can send
multiple frames at a time, and it does not have to wait for an ACK for each frame before
sending the next frame. This can lead to significant improvements in throughput,
especially if the communication channel is reliable. The main disadvantage of
Go-Back-N ARQ is its complexity. It is more difficult to implement than Stop-and-Wait
ARQ, and it requires more overhead.

In addition to Stop-and-Wait ARQ and Go-Back-N ARQ, there are a number of other
ARQ protocols. Some of the most common ARQ protocols include:

● Selective Repeat ARQ: Selective Repeat ARQ is a variation of Go-Back-N ARQ


that allows the sender to resend only the frames that were lost. This can lead to
further improvements in throughput, especially if the communication channel is
unreliable.
● Sliding Window ARQ: Sliding Window ARQ is a more general ARQ protocol that
can be used with any type of communication channel. It is more complex than
Stop-and-Wait ARQ, Go-Back-N ARQ, and Selective Repeat ARQ, but it offers
the best throughput of any ARQ protocol.

ARQ is a reliable way to transmit data over a communication channel, but it can add
overhead to the data stream. The amount of overhead depends on the type of ARQ
being used. Stop-and-Wait ARQ has the most overhead, while Go-Back-N ARQ has
less overhead.

Here are some of the benefits of using ARQ:


● It provides a reliable way to transmit data.
● It can be used over unreliable communication channels.
● It is relatively easy to implement.

Here are some of the drawbacks of using ARQ:

● It adds overhead to the data stream.


● It can be slow in some cases.
● It is not always possible to recover from lost data.

ARQ is a valuable tool for anyone who works with computer networks. By
understanding how ARQ works, you can better understand how networks work and how
to troubleshoot network problems.

Question 8: Discuss issues in data link layer?

The Data Link Layer is the second layer of the OSI model. It is responsible for providing
reliable data transfer between two nodes on a network. The Data Link Layer does this
by framing data into units called frames, adding error detection and correction
mechanisms, and controlling access to the physical medium.
There are a number of issues that can arise in the Data Link Layer. Some of the most
common issues include:

● Frame loss: A frame can be lost due to a number of factors, such as noise,
collisions, or hardware failures. When a frame is lost, the Data Link Layer must
detect the loss and take steps to recover the data.
● Frame corruption: A frame can be corrupted due to noise or other factors. When
a frame is corrupted, the Data Link Layer must detect the corruption and take
steps to recover the data.
● Collisions: Collisions can occur when two nodes attempt to transmit data on the
same network at the same time. When a collision occurs, both nodes must stop
transmitting and wait for a random amount of time before trying to transmit again.
● Access control: The Data Link Layer must ensure that only authorized nodes can
access the network. This is done by using a variety of mechanisms, such as
passwords, encryption, and access control lists.

The Data Link Layer is a complex layer that plays a critical role in ensuring reliable data
transfer over a network. By understanding the issues that can arise in the Data Link
Layer, you can help to prevent and troubleshoot problems.

Here are some of the ways to address the issues in the Data Link Layer:

● Error detection and correction: The Data Link Layer can add error detection and
correction mechanisms to frames to help prevent and recover from errors.
● Flow control: The Data Link Layer can use flow control mechanisms to prevent
one node from sending too much data to another node and causing it to overflow.
● Access control: The Data Link Layer can use access control mechanisms to
ensure that only authorized nodes can access the network.

By using these techniques, the Data Link Layer can help to ensure reliable data transfer
over a network.

Question 9: Explain network layer?


The network layer is the third layer of the OSI model. It is responsible for routing data
between different networks. The network layer does this by using a routing protocol to
determine the best path for the data to travel.

The network layer uses a variety of protocols to perform its function. Some of the most
common protocols include:

● Internet Protocol (IP): IP is the most common protocol used in the network layer.
IP is responsible for addressing data and routing it between different networks.
● Internet Control Message Protocol (ICMP): ICMP is a protocol used to send
control messages between nodes on a network. ICMP is used for a variety of
purposes, such as error reporting and network testing.
● Address Resolution Protocol (ARP): ARP is used to resolve IP addresses to
physical addresses. This is necessary so that data can be delivered to the
correct node on a network.
The network layer is a critical layer in the OSI model. It is responsible for routing data
between different networks, which is essential for the reliable delivery of data.

Here are some of the benefits of using the network layer:

● It provides a reliable way to route data between different networks.


● It is efficient in terms of bandwidth usage.
● It is scalable to support large networks.
● It is flexible enough to support a variety of network topologies.

The network layer is a valuable tool for anyone who works with computer networks. By
understanding how the network layer works, you can better understand how networks
work and how to troubleshoot network problems.

Question 11: Discuss encoding types in physical layer of ISO-OSI model?

The physical layer is the lowest layer of the OSI model. It is responsible for the
electrical, mechanical, and procedural means for connecting and disconnecting data
terminal equipment (DTE) to a data circuit-terminating equipment (DCE).

Encoding is the process of converting data into a format that can be transmitted over a
physical medium. There are many different encoding schemes used in the physical
layer, each with its own advantages and disadvantages.

Some of the most common encoding schemes used in the physical layer include:

● Unipolar encoding: In unipolar encoding, only one voltage level is used to


represent data. The most common type of unipolar encoding is NRZ (Non-Return
to Zero), which uses a single voltage level to represent a logical 1 and the
absence of voltage to represent a logical 0.
● BIPOLAR encoding: In bipolar encoding, two voltage levels are used to represent
data. The most common type of bipolar encoding is AMI (Alternate Mark
Inversion), which uses a positive voltage to represent a logical 1 and a negative
voltage to represent a logical 0.
● Manchester encoding: In Manchester encoding, each bit is represented by a
positive and negative voltage transition. This ensures that the receiver can
always determine the start and end of each bit, even if there are errors in the
signal.
● Differential encoding: In differential encoding, the only thing that matters is the
change in voltage from one bit to the next. This means that the receiver can
determine the value of a bit by looking at the difference in voltage between the
previous bit and the current bit.

The choice of encoding scheme depends on a number of factors, including the type of
physical medium, the distance between the sender and receiver, and the desired error
performance.

Here are some of the benefits of using encoding in the physical layer:

● It allows data to be transmitted over a physical medium.


● It allows data to be transmitted over long distances.
● It allows data to be transmitted reliably.

Encoding is a critical part of the physical layer. It allows data to be transmitted over a
physical medium and ensures that the data is received correctly.

Question 12: Discuss each command in detail used in networking:

a- ipconfig b- netstat

c- ping d- hostname e‐ tracert

ipconfig

The ipconfig command is used to display the current TCP/IP configuration of a


computer. It can be used to view the IP address, subnet mask, default gateway, and
DNS server addresses.

The syntax for the ipconfig command is as follows:

ipconfig [/all]

The /all switch displays all of the TCP/IP configuration information, including the DHCP
server address, lease duration, and WINS server addresses.
netstat

The netstat command is used to display the network connections and routing tables of a
computer. It can be used to view the listening ports, established connections, and
routing table entries.

The syntax for the netstat command is as follows:

netstat [options]

The options for the netstat command include:

● -a: Displays all connections and listening ports.


● -b: Displays the process ID (PID) for each connection.
● -n: Displays the addresses and ports in numerical form.
● -o: Displays the state of each connection.
● -r: Displays the routing table.
● -s: Displays statistics for each protocol.

ping

The ping command is used to test the connectivity between two hosts. It sends an ICMP
echo request to the destination host and waits for an ICMP echo reply.

The syntax for the ping command is as follows:

ping [options] hostname or IP address

The options for the ping command include:

● -c: Specifies the number of echo requests to send.


● -i: Specifies the interval between echo requests in milliseconds.
● -l: Specifies the size of the echo request in bytes.
● -n: Does not resolve hostnames to IP addresses.
● -t: Continuously pings the destination host.

hostname

The hostname command is used to display the hostname of the current computer.
The syntax for the hostname command is as follows:

hostname

tracert

The tracert command is used to trace the path that packets take to reach a destination
host. It sends ICMP echo requests to the destination host and displays the IP addresses
of the routers that the packets pass through.

The syntax for the tracert command is as follows:

tracert [options] hostname or IP address

The options for the tracert command include:

● -d: Does not resolve hostnames to IP addresses.


● -h: Specifies the maximum number of hops to trace.
● -t: Displays the time it takes for each hop.

Question 12: Calculate the total number of transmissions that are required to send 10
data packets through GBN-3 and every 5th packet is lost.

The Go-Back-N (GBN) protocol is a sliding window protocol that allows a sender to
send multiple packets before waiting for an acknowledgment from the receiver. The
window size is the number of packets that the sender can send before waiting for an
acknowledgment.

In GBN-3, the window size is 3. This means that the sender can send 3 packets before
waiting for an acknowledgment. If a packet is lost, the sender will not know which
packet was lost. The sender will then send all 3 packets again.

If every 5th packet is lost, then the total number of transmissions required to send 10
data packets is 17.

The first 3 packets will be sent without any problems. The fourth packet will be lost. The
sender will then send all 3 packets again. The fifth packet will be lost. The sender will
then send all 3 packets again. The sixth packet will be received by the receiver. The
seventh packet will be sent without any problems. The eighth packet will be lost. The
sender will then send all 3 packets again. The ninth packet will be received by the
receiver. The tenth packet will be sent without any problems.

The total number of transmissions is 17.

Here is a table of the transmissions:

Transmission Packets Sent

1 1, 2, 3

2 1, 2, 3

3 1, 2, 3

4 4, 5, 6

5 4, 5, 6
6 7, 8, 9

7 7, 8, 9

8 10

9 10

10 10

Question 13: Discuss in detail about ICMP role in network layer.

Internet Control Message Protocol (ICMP) is a network layer protocol that is used to
send control messages between nodes on a network. ICMP is used for a variety of
purposes, such as error reporting, network testing, and routing.

In the network layer, ICMP is used to send control messages between nodes. These
messages can be used for a variety of purposes, such as:

● Error reporting: ICMP can be used to report errors that occur in the network layer.
For example, if a packet is lost, the sender can send an ICMP error message to
the receiver.
● Network testing: ICMP can be used to test the connectivity between two nodes.
For example, the ping command uses ICMP to send a message to a destination
node and wait for a reply.
● Routing: ICMP can be used to exchange routing information between nodes. For
example, the router discovery protocol uses ICMP to discover other routers on
the network.

ICMP is a valuable tool for anyone who works with computer networks. By
understanding how ICMP works, you can better understand how networks work and
how to troubleshoot network problems.

Here are some of the most common ICMP messages:

● Echo request: An echo request is a message sent by a node to another node to


request a response. The response to an echo request is called an echo reply.
● Destination unreachable: A destination unreachable message is sent by a node
to another node to indicate that the destination node is unreachable. There are
several reasons why a destination node may be unreachable, such as a bad IP
address or a network link that is down.
● Time exceeded: A time exceeded message is sent by a node to another node to
indicate that a packet has exceeded its TTL (Time To Live). The TTL is a value
that is set by the sender of a packet and indicates how long the packet can be in
transit before it is discarded.
● Redirect: A redirect message is sent by a node to another node to indicate that a
better route to the destination node is available.

ICMP is a critical part of the network layer. It allows nodes to communicate with each
other and to troubleshoot network problems.

Question 14: Define the relationship between transmission delay and propagation delay,
if the efficiency is at least 50% in STOP N WAIT protocol.

The relationship between transmission delay and propagation delay in stop-and-wait


protocol is that the transmission delay must be at least twice the propagation delay in
order to achieve an efficiency of at least 50%.

In stop-and-wait protocol, the sender sends a single packet and then waits for an
acknowledgment from the receiver before sending the next packet. The transmission
delay is the time it takes for the sender to send the packet, and the propagation delay is
the time it takes for the packet to travel from the sender to the receiver.
If the transmission delay is less than twice the propagation delay, then the sender will
have to wait for the acknowledgment before sending the next packet. This means that
the sender will be idle for a significant portion of the time, which will reduce the
efficiency of the protocol.

In order to achieve an efficiency of at least 50%, the transmission delay must be at least
twice the propagation delay. This means that the sender will be able to send a packet
while the receiver is acknowledging the previous packet. This will allow the sender to
use the network more efficiently and improve the overall performance of the protocol.

Here is a formula that can be used to calculate the efficiency of stop-and-wait protocol:

Efficiency = 1 / (1 + 2 * (Propagation Delay / Transmission


Delay))

where:

● Efficiency is the percentage of time that the sender is actually sending data
● Propagation Delay is the time it takes for a packet to travel from the sender to the
receiver
● Transmission Delay is the time it takes for the sender to send a packet

For example, if the propagation delay is 10 milliseconds and the transmission delay is
20 milliseconds, then the efficiency of the stop-and-wait protocol will be 50%. This
means that the sender will be able to send data for 50% of the time, and the other 50%
of the time will be spent waiting for acknowledgments.

The efficiency of stop-and-wait protocol can be improved by increasing the transmission


delay. This can be done by using a faster modem or by using a more efficient network
protocol.

Question 15: Find out window size and minimum sequence number in sliding window
protocol, if Transmission delay (Tt)= 1 ms, Propagation delay (Tp)= 24.5 ms. (ms=
milliseconds).

The window size is the number of packets that can be sent before the sender has to
wait for an acknowledgment. The minimum sequence number is the smallest number
that can be assigned to a packet.
In a sliding window protocol, the window size is equal to 2 * (Propagation Delay /
Transmission Delay). In this case, the window size is 2 * (24.5 ms / 1 ms) = 49.

The minimum sequence number is equal to 0.

Here is a diagram of the sliding window protocol:

Sender

Receiver

Window Size = 49

Minimum Sequence Number = 0

Packet 0

Packet 1

Packet 2

Packet 3

Packet 4

Packet 5

Packet 6

Packet 7

Packet 8

Packet 9
ACK 0

ACK 1

ACK 2

ACK 3

ACK 4

ACK 5

ACK 6

ACK 7

ACK 8

ACK 9

The sender can send up to 49 packets before it has to wait for an acknowledgment. The
receiver acknowledges packets in order, so the sender knows which packets have been
received and which packets have not.

The sliding window protocol is a more efficient way to send data than the stop-and-wait
protocol. This is because the sender does not have to wait for an acknowledgment
before sending the next packet. The sender can send multiple packets at the same
time, and the receiver can acknowledge them in order. This allows the sender to use the
network more efficiently and improve the overall performance of the protocol.

Question 16: Explain distance vector routing (DVR) with working example in detail.

Distance vector routing (DVR) is a routing protocol that uses distance vectors to
determine the best path to a destination. Distance vectors are simply the number of
hops between a router and a destination.
DVR works by having each router share its routing table with its neighbors. A routing
table is a table that contains the IP addresses of all the destinations that a router knows
about, as well as the distance to each destination.

When a router receives a routing table from its neighbor, it updates its own routing table
with the new information. The router then sends its updated routing table to its
neighbors.

This process continues until all the routers on the network have the same routing table.

Here is a working example of DVR:

Let's say we have a network with three routers, A, B, and C. Router A is connected to
router B, and router B is connected to router C.

Router A's routing table initially looks like this:

Destination Distance

B 1

C ∞

Router B's routing table initially looks like this:


Destination Distance

A 1

C ∞

Router C's routing table initially looks like this:

Destination Distance

B ∞

C ∞

Now, let's say router A sends its routing table to router B. Router B updates its routing
table with the new information, and its routing table now looks like this:
Destination Distance

A 1

B 1

C ∞

Now, let's say router B sends its routing table to router C. Router C updates its routing
table with the new information, and its routing table now looks like this:

Destination Distance

A ∞

B 1
C 1

Now, all the routers on the network have the same routing table, and they can all
communicate with each other.

DVR is a simple and efficient routing protocol. It is easy to implement and it scales well
to large networks. However, DVR is not as reliable as other routing protocols, such as
link-state routing protocols. This is because DVR can only update its routing table when
it receives a routing table from its neighbor. If a link goes down, DVR may not be able to
update its routing table, which can lead to routing loops.

Here are some of the advantages of DVR:

● Easy to implement
● Scalable to large networks
● Low overhead

Here are some of the disadvantages of DVR:

● Not as reliable as other routing protocols


● Can be slow to converge
● Can be vulnerable to routing loops

Question 17: Sender’s data D=11010, CRC generator polynomial= x3 +x+1. Apply CRC
algorithm and perform calculations both at sender and receiver end.

Here are the steps on how to apply the CRC algorithm and perform calculations both at
the sender and receiver end:

1. The sender's data is divided by the CRC generator polynomial.


2. The remainder of the division is the CRC code.
3. The CRC code is appended to the data.
4. The data with the CRC code is sent to the receiver.
5. The receiver divides the received data by the CRC generator polynomial.
6. If the remainder is 0, then the data was received without error.
7. If the remainder is not 0, then an error occurred during transmission.

Here are the specific steps for the given example:

Sender:

1. The data D=11010 is divided by the CRC generator polynomial x3 +x+1.


2. The remainder of the division is 1.
3. The CRC code is 1.
4. The data with the CRC code is 110101.

Receiver:

1. The received data is 110101.


2. The received data is divided by the CRC generator polynomial x3 +x+1.
3. The remainder of the division is 0.
4. Therefore, the data was received without error.

Sender
Data = 11010

CRC Generator Polynomial = x3 + x + 1

CRC Code = 1

Data with CRC Code = 110101

Receiver

Received Data = 110101

CRC Generator Polynomial = x3 + x + 1

Remainder = 0

No Error

Question 18: Assume we want to send a data from S to R and there are 2 routers in
between. What will be the total time taken if total number of packets are 5. Data is like:
Tp=0 ms, Data size=1000 bytes, BW=1 mbps, Header of the packet=100 bytes

Assume we want to send a data from S to R and there are 2


routers in
between. What will be the total time taken if total number of
packets

are 5. Data is like:

Tp=0 ms, Data size=1000 bytes, BW=1 mbps, Header of the

packet=100 bytes
edit
View other drafts
The total time taken to send the data from S to R will be 1005 milliseconds.

The time it takes to send a packet is the sum of the transmission delay, the
propagation delay, and the processing delay. The transmission delay is the time it
takes to send the data in the packet. The propagation delay is the time it takes for
the packet to travel from the sender to the receiver. The processing delay is the
time it takes for the router to process the packet.

The transmission delay is equal to the data size divided by the bandwidth. In this
case, the transmission delay is 1000 bytes / 1 Mbps = 1 ms.

The propagation delay is equal to the distance between the sender and the
receiver divided by the speed of light. In this case, the propagation delay is 2 *
100 km / 3 * 10^8 m/s = 0.00667 ms.

The processing delay is equal to the header size divided by the bandwidth. In this
case, the processing delay is 100 bytes / 1 Mbps = 0.01 ms.

The total time it takes to send a packet is 1 ms + 0.00667 ms + 0.01 ms = 1.0167


ms.

The total number of packets is 5.

The total time it takes to send the data from S to R is 5 * 1.0167 ms = 10.167 ms.

Here is a table of the times involved in sending the data from S to R:


Action Time

Transmission delay 1 ms

Propagation delay 0.00667 ms

Processing delay 0.01 ms

Total time 1.0167 ms

Quesiton 19: Explain CSMA/CD in detail.

Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is a media


access control (MAC) method used most notably in early Ethernet technology for
local area networking. It uses carrier-sensing to defer transmissions until no
other stations are transmitting. This is used in combination with collision
detection in which a transmitting station detects collisions by sensing
transmissions from other stations while it is transmitting a frame.

When this collision condition is detected, the station stops transmitting that
frame, transmits a jam signal, and then waits for a random time interval before
trying to resend the frame. CSMA/CD is a modification of pure carrier-sense
multiple access (CSMA). CSMA/CD is used to improve CSMA performance by
terminating transmission as soon as a collision is detected, thus shortening the
time required before a retry can be attempted. With the growing popularity of
Ethernet switches in the 1990s, IEEE 802.3 deprecated Ethernet repeaters in 2011,
making CSMA/CD and half-duplex operation less common and less important.

Here are the steps involved in CSMA/CD:

1. A station that wants to transmit listens to the medium to see if it is busy.


2. If the medium is busy, the station waits until it is idle.
3. If the medium is idle, the station starts transmitting.
4. While transmitting, the station listens for a collision signal.
5. If a collision signal is detected, the station stops transmitting and sends a
jam signal.
6. The station waits for a random time interval before trying to transmit again.

CSMA/CD is a simple and efficient way to share a medium between multiple


stations. It is easy to implement and it works well in networks with a small
number of stations. However, CSMA/CD can be inefficient in networks with a large
number of stations. This is because stations may have to wait for long periods of
time before they can transmit.

Here are some of the advantages of CSMA/CD:

● Simple to implement
● Efficient in networks with a small number of stations
● Reliable

Here are some of the disadvantages of CSMA/CD:

● Inefficient in networks with a large number of stations


● Can be susceptible to collisions
● Requires more complex hardware than other MAC protocols

Question 20: Divide the network with IP address 200.1.2.0 into 5 subnets.

To divide the network with IP address 200.1.2.0 into 5 subnets, we can use the
following steps:

1. Find the network mask for the desired number of subnets. In this case, we
want to divide the network into 5 subnets, so we need a network mask with
2 bits for the host portion of the address. This gives us a network mask of
255.255.255.128.
2. Apply the network mask to the IP address to get the network number for
each subnet. In this case, the network numbers for the 5 subnets are:
○ 200.1.2.0
○ 200.1.2.128
○ 200.1.2.192
○ 200.1.2.224
○ 200.1.2.240
3. The host portion of the address can be used to identify individual hosts on
each subnet. For example, the host address 200.1.2.100 would be on the
first subnet, while the host address 200.1.2.193 would be on the second
subnet.

Here is a table of the subnets and their corresponding host ranges:

Subnet Network Number Host Range

1 200.1.2.0 200.1.2.1 - 200.1.2.127

2 200.1.2.128 200.1.2.129 - 200.1.2.191

3 200.1.2.192 200.1.2.193 - 200.1.2.223

4 200.1.2.224 200.1.2.225 - 200.1.2.239


5 200.1.2.240 200.1.2.241 - 200.1.2.255

Please note that this is just one possible way to divide the network with IP
address 200.1.2.0 into 5 subnets. There are other ways to do this, and the best
way will vary depending on the specific needs of the network.

Question 21: Describe the role of application layer and session layer of OSI model
in detail.

The Application Layer is the highest layer of the OSI model. It is responsible for
providing services to the user, such as file transfer, email, and web browsing. The
Application Layer uses the services of the Presentation Layer to format data in a
way that is understandable by the user.

The Session Layer is responsible for managing communication between two


applications. It provides a way for applications to establish a connection,
exchange data, and terminate the connection. The Session Layer uses the
services of the Transport Layer to send data between applications.

Here are the detailed roles of the Application Layer and Session Layer:

Application Layer

● Provides services to the user, such as file transfer, email, and web
browsing.
● Uses the services of the Presentation Layer to format data in a way that is
understandable by the user.
● Interacts with the user to provide feedback and input.
● Handles errors and retries.

Session Layer

● Responsible for managing communication between two applications.


● Provides a way for applications to establish a connection, exchange data,
and terminate the connection.
● Uses the services of the Transport Layer to send data between
applications.
● Handles errors and retries.

Here are some examples of protocols that operate at the Application Layer:

● File Transfer Protocol (FTP)


● Hypertext Transfer Protocol (HTTP)
● Simple Mail Transfer Protocol (SMTP)
● Domain Name System (DNS)

Here are some examples of protocols that operate at the Session Layer:

● Session Initiation Protocol (SIP)


● Remote Desktop Protocol (RDP)
● Lightweight Directory Access Protocol (LDAP)

The Application Layer and Session Layer are important layers in the OSI model
because they provide the services that allow users to interact with the network
and applications.

Question 22: Write detailed note on “TCP vs UDP”.

TCP and UDP are two of the most commonly used transport layer protocols in the
internet. They both provide a way for applications to send data over a network,
but they do so in different ways.

TCP is a connection-oriented protocol. This means that before data can be sent, a
connection must be established between the two applications. Once a connection
is established, data can be sent in a reliable way. This means that TCP guarantees
that all of the data will be delivered, and that it will be delivered in the correct
order.

UDP is a connectionless protocol. This means that data can be sent without first
establishing a connection. UDP does not guarantee that all of the data will be
delivered, and it does not guarantee that the data will be delivered in the correct
order.

Here is a table of the differences between TCP and UDP:


Feature TCP UDP

Connection-orien Yes No
ted

Reliable Yes No

Flow control Yes No

Error detection Yes No

Data delivery In order Not guaranteed

Applications File transfer, email, web Streaming media,


browsing gaming

TCP is a good choice for applications that require reliable delivery of data, such
as file transfer, email, and web browsing. UDP is a good choice for applications
that do not require reliable delivery of data, such as streaming media and gaming.
Here are some examples of protocols that use TCP:

● File Transfer Protocol (FTP)


● Hypertext Transfer Protocol (HTTP)
● Simple Mail Transfer Protocol (SMTP)

Here are some examples of protocols that use UDP:

● Domain Name System (DNS)


● Trivial File Transfer Protocol (TFTP)
● User Datagram Protocol (UDP)

TCP and UDP are both important protocols in the internet. They provide different
services, and they are used by different applications.

Question 23: Explain following application layer protocols:

FTP SMTP DNS

TELNET HTTP

File Transfer Protocol (FTP) is a standard network protocol used to transfer files
between computers. FTP is a reliable protocol that uses TCP to establish a
connection between the two computers. FTP provides two modes of data
transfer:

● Active mode - In active mode, the client opens a connection to the server
on port 21. The server then opens a connection back to the client on a port
chosen by the server.
● Passive mode - In passive mode, the client opens a connection to the
server on port 21. The server then opens a connection back to the client on
port 20.

FTP is a widely used protocol for transferring files over the internet. It is used by
many different applications, including web browsers, email clients, and file
managers.

SMTP
Simple Mail Transfer Protocol (SMTP) is a protocol used to send email messages.
SMTP is a text-based protocol that uses TCP to establish a connection between
the sender and receiver. SMTP is a connection-oriented protocol, which means
that a connection must be established before any data can be sent.

The SMTP protocol consists of a series of commands that are sent by the sender
to the receiver. The most common commands are:

● MAIL FROM: - This command specifies the sender's email address.


● RCPT TO: - This command specifies the recipient's email address.
● DATA: - This command indicates that the sender is about to send the email
message.
● .: - This command indicates that the email message is complete.

SMTP is a widely used protocol for sending email messages. It is used by email
clients, webmail applications, and email servers.

DNS

Domain Name System (DNS) is a protocol used to translate domain names into IP
addresses. DNS is a hierarchical naming system that allows users to access
websites and other resources by using names instead of IP addresses.

DNS is a distributed system, which means that it is not controlled by any single
entity. DNS servers are located all over the world, and they work together to
resolve domain names to IP addresses.

When a user enters a domain name into a web browser, the browser sends a
request to a DNS server. The DNS server then looks up the domain name in its
database and returns the corresponding IP address. The browser then uses the IP
address to connect to the website.

DNS is an essential part of the internet. It allows users to access websites and
other resources by using names instead of IP addresses. DNS makes the internet
more user-friendly and easier to use.

TELNET
Telnet is a network protocol that allows users to log in to remote computers. It is
a text-based protocol that uses the Transmission Control Protocol (TCP) to
establish a connection between the user's computer and the remote computer.

Telnet is a simple protocol to use. To log in to a remote computer using Telnet,


you need to know the IP address of the remote computer and the username and
password for that computer. Once you have this information, you can use the
Telnet command to connect to the remote computer.

The syntax for the Telnet command is:

telnet <IP address>

Question 25: Explain HTTP?

HTTP stands for Hypertext Transfer Protocol. It is a set of rules for exchanging or
transferring hypertext documents over the World Wide Web (WWW).

HTTP is a stateless protocol, which means that each request from a client to a
server is independent of any previous requests. This makes HTTP very efficient
for transferring large amounts of data, such as web pages.

HTTP is a text-based protocol, which means that requests and responses are sent
as text. This makes HTTP easy to understand and debug.

HTTP is a client-server protocol, which means that there are two participants in
each communication: a client and a server. The client is the computer that
requests a resource, and the server is the computer that provides the resource.

The client and server communicate with each other using a request-response
model. The client sends a request to the server, and the server sends a response
to the client.

A request consists of a method, a URI, and a set of headers. The method


specifies what the client wants to do with the resource, the URI specifies the
resource that the client wants to access, and the headers provide additional
information about the request.
A response consists of a status code, a reason phrase, and a set of headers. The
status code indicates the success or failure of the request, the reason phrase
provides a human-readable explanation of the status code, and the headers
provide additional information about the response.

The most common HTTP methods are:

● GET - Used to retrieve a resource from the server.


● POST - Used to create a new resource on the server.
● PUT - Used to update an existing resource on the server.
● DELETE - Used to delete a resource from the server.

The most common HTTP status codes are:

● 200 OK - The request was successful.


● 400 Bad Request - The request was malformed.
● 401 Unauthorized - The client is not authorized to access the resource.
● 403 Forbidden - The client is not allowed to access the resource.
● 404 Not Found - The resource does not exist.
● 500 Internal Server Error - An error occurred on the server.

HTTP is a fundamental protocol for the World Wide Web. It is used to transfer web
pages, images, videos, and other resources between clients and servers. HTTP is
a reliable and efficient protocol that has made the World Wide Web possible.

You might also like