Download as doc, pdf, or txt
Download as doc, pdf, or txt
You are on page 1of 6

HITESH SAHANI (11816118-A18) date – April-8-2020

section K18MS ROll no - 18

Q1. With the help of a suitable diagrams wherever required, explain the role
of layer 2, keeping in view of the services it provides at the sender and the
receiver end. Note: You need to take describe the concepts related to layer 2
as a whole.

Data link layer


The data link layer is the 2nd layer in the OSI model. its function is to primarily prepare
packets for transmission over the physical media. It also serves to control the flow of data
that will traverse the physical media. The Data Link term is the Frame. The two main
functions performed at this layer includes.

 Framing of packets received from the network layer


 Control of how data is handled by the physical media through MAC (Media Access
Control) and detection of errors.

Functions of Data Link Layer


1. Framing: Frames are the streams of bits received from the network layer into
manageable data units. This division of stream of bits is done by Data Link Layer.
2. Physical Addressing: The Data Link layer adds a header to the frame in order to
define physical address of the sender or receiver of the frame, if the frames are to be
distributed to different systems on the network.
3. Flow Control: A flow control mechanism to avoid a fast transmitter from running a
slow receiver by buffering the extra bit is provided by flow control. This prevents
traffic jam at the receiver side.
4. Error Control: Error control is achieved by adding a trailer at the end of the frame.
Duplication of frames are also prevented by using this mechanism. Data Link Layers
adds mechanism to prevent duplication of frames.
5. Access Control: Protocols of this layer determine which of the devices has control
over the link at any given time, when two or more devices are connected to the
same link.

The main work of the data link layer is to provide services to the network layer. The main
service of the data link layer is to transfer data of network layer from the source machine to
the network layer of the destination machine. 

Following are the services provided by the data link layer to the network layer :

1. Acknowledged connectionless service- in this type of service of data link layer an


acknowledged connectionless service is established between the source and the
destination. That means here the acknowledgement bit is sent between the source
and destination but no connection is established.
2. Unacknowledged connectionless service- As the name suggest, when the data is
transferred from the source machine to the destination machine it is not known to
the destination machine i.e. no acknowledgement is sent either from the source side
nor from the destination side. No connection is established or released between
them. And if the data is lost in between the transmission then it cannot be
recovered.
3. Acknowledged connection-oriented service- In this type of service properly an
acknowledgement bit is sent from  both the sides and a proper connection is
established between the source and the destination. Proper connection is
established and released.

FRAMING :  
To provide services to the network layer, data link layer uses the services provided to
it by the physical layer. Physical layer sends the data in the form of bits in streams.
Data link layer break the bit stream into the discrete frames and calculates the sum
which is called the checksum The breaking of bit stream into discrete frames by
adding time gaps or inserting spaces is called as framing.

ERROR CONTROL

To ensure proper services and safe delivery of the packets data link layer uses a mechanism
which is called as error control. In this the receiver sends back an acknowledgment bit which
shows that the data is safely delivered to the destination machine. For this the receiver
when receives the data or does not receives it sends back the either the positive or negative
acknowledgement. If the data is properly received it sends back the positive
acknowledgement and if it does not receive the correct data or incomplete data it sends
back the negative acknowledgement. This method is known as error control.

FLOW CONTROL :

It is very important that the transmission speed of both the machines should be same.
because if this is not the case then there occur many problems like when sender sends the
data at a very fast speed or at very slow speed and the receiver receives the data at very
slow speed or at very fast speed, in either of the case the receiver will start loosing the data.
To prevent this flow of data flow control mechanism is incorporated in them. like Automatic
Repeat Request (ARQ).

Q2. An organization namely LPU was using class full addressing but shifted to
classless addressing, provide the 2 appropriate reasons with justification.
LPU shifted to classless addressing because of reasons given below:
Classless addressing effectively manage the available IP address space and
reduces the number of routing table entries. It has is method of assigning IP
addresses in efficient way. In Classless addressing, you can assign IP address
according to number of hosts present in your network. In Classful addressing
importing of subnet information is not possible but in classless it is available ..

Q3. If a router forwards the packets to another router which is not a


destination, but one of the paths in the route, what can we call this and why?
The above given question comes under category of routing…and the above
statement of question is explained below in form of example:
If router “A” wants to send a packet to router “C”, the packet has follow the
path through router “B” as router “B” knows which network is assigned to “C”
and all the relevant information for forwarding a packet. This is the reason
packet of router “A” will be sent through router “B” which will be at last
received at router “C”.
Q4. Suppose block 34 of LPU forwarded a packet to the speaker node of block
51, and the packet was rejected by 51 block , what could be the possible
reasons for rejection?
Reason which can be a considered for rejection of packets..
 policy based routing-it could be rejected due to policies defined by
network administrators. Policy based routing includes routing packets on
user-defined routes, setting of precedence, type of service bits etc
 optimum path- it could also be rejected if the forwarded packet does
not have optimum path to a destination packet.

Q5. Suppose LPU is using 12.67.88.10 network, is this representation correct?


If yes then how? If not then what is the correct representation?
In the above given IP address is in dotted decimal notation, consisting of four
decimal numbers. Each and every decimal have value from 0 – 255.An IP-
address is IPV4 is defined as a 32-bit number. So the above representation of IP
address is correct.

Q6. Suppose one of the hosts of block 33 of LPU is using 128.17.19.11 address
and wants to communicate with host of block 38 that uses FF10::FF67, how
can the communication be successful?
In above given, host block 33 of LPU uses IPV4 address and block 38 uses IPV6
address. Communication between both the host can be successful by following
methods.
a. Dual stack mechanism - Dual stack implies providing
complete implementations of both versions of the Internet Protocol
(IPv4 and IPv6),
This mechanism provides a server which can configure both IPV4 and IPV6
because of this we can communicate.
b. NAT protocol translation:-The NAT64 server then creates a NAT-mapping
between the IPv6 and the IPv4 address, allowing them to communicate.
Q7. Do you think dynamic routing is always better? Justify your answer
No ,Dynamic routing is not always better. Algorithm of dynamic routing is very
complex to implement. It also requires knowledge of additional commands.It is
also costlier as it requires resources to store information and it is also less
secure than static routing and also there is predictability issues.

Q8. What is the role of a speaker node? What if speaker node is not present,
can you suggest any solution?
Speaker node creates an automatic system. The main role of speaker node is
to create routing table and send to its neighbour speaker node by this it create
a routing path for sending message.
Speaker node create an automatic system.so if it is not their we can manually
update the routing table of each router by ourself.

Q9. Suppose you need to design a dynamic routing algorithm, which


parameters you will take into consideration and why?
Parameter we will consider for designing a dynamic routing algorithm are…
- Current Topology:-this will tell us about how the message can
potentially travel in the network. This will tell about any potential
collision that might happen.
- Delay -Delay is a measure of the time a packet takes to transverse a
route
- no. of hopes – simply count router hopes

Q10. Use Dijktra’s algorithm to find the shortest path tree and forwarding
tables for each node in the Fig (a).

You might also like