Computer Network Beu - Solution - 2022
Computer Network Beu - Solution - 2022
(c) Which layer of the TCP / IP stack corresponds to the OSI model
transport layer?
(i) 32 bytes
(ii) 64 bytes
(iii) 30 bytes
(iv) 60 bytes
Correct option is (iv)
(i)application-to-application communication
(ii) node-to-node communication
(iii) the process-to-process communication
(iv)Both (i) and (iii)
Correct option is (iii)
(h) FTP server
(i)maintains state information
(ii) is stateless
(iii) has single TCP connection for a file transfer
(iv)has UDP connection for file transfer
Correct option is (i)
(i) Which of the following is the multiple access protocol for channel
access control?
(i)CSMA / CD
(ii) CSMA / CA
(iii) Both CSMA / CD and CSMA / CA
(iv)HDLC
Correct option is (iii)
1. Physical Medium:
Ethernet can operate over various physical media, including
twisted pair cables, coaxial cables, and fiber-optic cables. The most
common type today is Ethernet over twisted pair cables.
2. Data Link Layer:
Ethernet operates at the data link layer (Layer 2) of the OSI model.
It uses a frame-based communication protocol to encapsulate data
for transmission over the network.
3. CSMA/CD Protocol:
Traditional Ethernet (e.g., 10BASE-T and 100BASE-T) used a
protocol called Carrier Sense Multiple Access with Collision
Detection (CSMA/CD). However, modern Ethernet networks,
especially those based on twisted pair cables, often use full-duplex
communication and do not rely on CSMA/CD.
4. Standardization:
Ethernet standards are defined by the Institute of Electrical and
Electronics Engineers (IEEE). Common Ethernet standards include
10BASE-T, 100BASE-TX, 1000BASE-T, and 10GBASE-T, each
specifying different data transfer rates and cabling requirements.
5. Frame Format:
Ethernet frames consist of various fields, including source and
destination MAC addresses, type or length, data payload, and a
cyclic redundancy check (CRC) for error detection.
6. Topology:
Ethernet supports different network topologies, including star, bus,
and ring configurations. In a modern Ethernet network, the star
topology is prevalent, with devices connected to a central switch or
router.
Ans:-
Pure Aloha Slotted Aloha
In this, The time is continuous and In this, The time is discrete and
not globally synchronized. globally synchronized.
Vulnerable time for Pure Aloha = 2 Vulnerable time for Slotted Aloha =
x Tt Tt
1. Flow Control:
Definition: Flow control manages the pace of data
transmission between devices to prevent congestion and
ensure that a fast sender does not overwhelm a slower
receiver.
Example: Stop-and-Wait Protocol
In a simple example, consider the Stop-and-Wait
protocol. In this protocol, the sender sends a frame
and waits for an acknowledgment from the receiver
before sending the next frame. If the sender does not
receive an acknowledgment within a specified time,
it assumes that the frame was lost or corrupted and
retransmits it.
2. Error Control:
Definition: Error control ensures the integrity of data
during transmission and detects and corrects errors that
may occur.
Example: Automatic Repeat reQuest (ARQ)
ARQ is a common error control technique. In the
context of flow control, a common ARQ method is
the Selective Repeat protocol.
The sender sends a series of frames and waits
for acknowledgments from the receiver.
If the sender does not receive an
acknowledgment for a particular frame within a
specified time, it assumes the frame was lost or
corrupted and retransmits only that specific
frame.
The receiver acknowledges correctly received
frames and requests retransmission only for the
frames that were received with errors or not
received at all.
Example: Cyclic Redundancy Check (CRC)
CRC is a method for detecting errors in transmitted
frames. The sender generates a CRC code based on
the frame's content and appends it to the frame
before transmission. The receiver performs the same
calculation upon receiving the frame. If the
calculated CRC at the receiver matches the one
received, the frame is assumed to be error-free.
Otherwise, it is considered corrupted, and the
receiver may request retransmission.
These examples illustrate how flow control and error control work at
the Data Link Layer:
1. Version:
RIP has two main versions: RIP version 1 (RIPv1) and RIP version 2 (RIPv2).
RIPv1 is simpler and uses classful routing, while RIPv2 supports subnetting
and Variable Length Subnet Masking (VLSM).
2. Metric:
RIP uses hop count as its metric, where each hop represents a router that a
packet traverses. The route with the fewest hops is considered the best.
3. Routing Updates:
RIP routers exchange routing information periodically through routing
updates. By default, updates are sent every 30 seconds.
4. Split Horizon:
RIP employs the split horizon mechanism to prevent routing loops. In split
horizon, a router does not advertise routes back out on the interface from
which it learned those routes.
5. Route Poisoning:
RIP uses route poisoning, marking unreachable routes with a metric of 16
(infinity). This informs other routers that the route is unreachable.
Example of RIP:
Consider a simple network with three routers (A, B, and C) connected as follows:
Initially, each router knows only about its directly connected networks.
Router B advertises its routes to router A and C, and vice versa.
If router A wants to reach a network connected to router C, the route
would be A -> B -> C.
RIP exchanges routing information periodically, updating the routers
about the network topology.
7.An ISP is granted the block 80.70.56.0/21. The ISP needs to allocate
addresses for two organizations each with 500 addresses, two organizations
each with 250 addresses, and three organizations each with 50 addresses.
(a) Find the number and range of addresses in the ISP block.
(b) Find the range of addresses for each organization and the range of
unallocated addresses.
Ans 7(a) :- The given ISP block is 80.70.56.0/21. To find the number and range of
addresses, let's break down the information:
1. Subnet Mask:
The /21 in CIDR notation implies that the first 21 bits are the network portion,
and the remaining bits are for host addresses.
2. Calculating Addresses:
The total number of addresses in the block can be found using the formula
232−subnet mask232−subnet mask.
232−21=211=2048232−21=211=2048
So, the ISP block has a total of 2048 addresses.
3. Range of Addresses:
To find the range of addresses, we need to determine the start and end
addresses.
The block 80.70.56.0/21 can be divided as follows:
Network Address: 80.70.56.0
Usable Addresses: 80.70.56.1 to 80.70.63.254
Broadcast Address: 80.70.63.255
4. Allocating Addresses for Organizations:
Two organizations each with 500 addresses will need 2×500=1000 addresses.
Two organizations each with 250 addresses will need 2×250=500 addresses.
Three organizations each with 50 addresses will need 3×50=1503×50=150
addresses.
5. Calculating the Remaining Addresses:
Subtracting the allocated addresses from the total addresses in the ISP block
gives the remaining addresses:
2048−(1000+500+150)=2048−1650=3982048−(1000+500+150)=2048−1650=398
So, the ISP block 80.70.56.0/21 has a total of 2048 addresses, and the usable range is from
80.70.56.1 to 80.70.63.254.
7(b) Ans:- To find the range of addresses for each organization and the range of
unallocated addresses, we need to allocate blocks of addresses for each organization
based on their requirements and then determine the remaining unallocated
addresses. Let's break down the allocation:
When the host has to send a In this, the bucket holds tokens
packet , packet is thrown in generated at regular intervals of
bucket. time.
9.Explain the difference between TCP and UDP. A client residing on a host
with IP address 122.45.12.7 sends a message to the corresponding server
residing on a host with IP address 200.112.45.90 . If the well-known port is
161 and the ephemeral port is 51000, what are the pair of socket addresses
used in this communication?
Ans:- The main differences between TCP (Transmission Control Protocol) and UDP
(User Datagram Protocol) are:
The pair of socket addresses for the client and server communication can be
expressed as:
In summary, the pair of socket addresses for the communication between the
client and server are: