You are on page 1of 14

Chapter Two (Part 2)

Data Link Layer Protocols (Q & A)

Q1: State the Main Services Provided by Data Link Layer


Answer:
• Framing

• Error Control
• Flow Control

Q2: State the Sliding Window Protocols types and give an example for two of
them with the aid of graph
Answer:
A One-Bit Sliding Window Protocol (SWP) 1- assign variable 2- define frame 3- accept frame

A Protocol Using Go Back N Discarding &Buffering

A Protocol Using Selective Repeat (SRP) accept and buffer delay and effected frame) without
ACK

Go Back N Protocol

1
Selective repeat Protocol SRP

Q3: What are the classes of MAC layer protocol?


Answer:
There are three broad classes:

1. Channel Partitioning
• divide channel into smaller “pieces” (time slots, frequency, code)
• allocate piece to node for exclusive use

2. Random Access
• channel not divided, allow collisions
• “recover” from collisions

3. Taking turns
• nodes take turns, but nodes with more to send can take longer turns

Q4: Explain how Ethernet CSMA/CD Algorithm works and draw its
strategies
Answer:
1. NIC receives datagram from network layer, creates frame
2. If NIC senses channel idle, starts frame transmission. If NIC senses channel busy,
waits until channel idle, then transmits.
3. If NIC detects another transmission while transmitting, aborts and sends jam signal
4. After aborting, NIC enters binary (exponential) backoff.

2
Q5: Define ARP protocol; provide an example to explain its operation.
Answer:
• ARP Maps IP addresses to MAC addresses
• ARP Request is a broadcast but ARP reply is Unicast.
• ARP tables contain the MAC and IP addresses of other devices on the network

ARP operation:

3
Q6: What are the types of Errors?
Answer:
There are three types of error these are:
1. Single bit error

2. Multiple bit error

3. Burst error: means that two or more bits in the data unit have changed from 1 to 0 or
from 0 to 1.

4
Q7: Consider the Following Network, Using MAC Protocol

A. Define and mention the type of MAC protocol for this network.
B. Determine interface MAC address knowing its IP address if host (A) send message
to host (B).

Answer:

A: There are three type of MAC protocols, these are:


1. Channel Partitioning
• divide channel into smaller “pieces” (time slots, frequency, code)
• allocate piece to node for exclusive use
2. Random Access
• channel not divided, allow collisions
• “recover” from collisions

3. Taking turns
• nodes take turns, but nodes with more to send can take longer turns

B:
1- Source A
IP source 111.111.111.111
IP destination 222.222.222.222
MAC source 74-29-9C-E8-FF-55
MAC destination E6-E9-00-17-BB-4B

2- Router R
IP source 111.111.111.111
IP destination 222.222.222.222
MAC source 1A-23-F9-CD-06-9B
MAC destination 49-BD-D2-C7-56-2A

3- Destination B
5
IP source 111.111.111.111
IP destination 222.222.222.222
MAC source 1A-23-F9-CD-06-9B
MAC destination 49-BD-D2-C7-56-2A

Q8: Determine the CRC code to be used to send message M(x) by using the
devisor G(x) given:
M(x) = X5+X3 +X2+X
G(x) = X3+X
Answer:

6
Q9: For the generator G= (110011) and Message M= (11100011), find how
the sender and receiver handles CRC calculation in the generator
(sender) and checker (receiver) form
Answer:

7
Q10: For the generator G = (10011) and Message M= (1010101010), find how
the sender and receiver handles CRC calculation in a generator and
checker form.
Answer:

8
Q11: Suppose the blocks of 5 binary digits 0111, 1011, 1100, 0000, 0110, to be
sent using checksum; calculate the checksum code step by step.
Answer:

Q12: Suppose the blocks of 8 binary digits 10110011, 10101011, 01011010,


11010101 to be sent using a checksum, calculate the checksum at the
sender and check the sent message at the receiver side.
Answer:
At the sender at the receiver

1 0 1 1 0 0 1 1 1 0 1 1 0 0 1 1
1 0 1 0 1 0 1 1 1 0 1 0 1 0 1 1
___________________ ____________________
1 0 1 0 1 1 1 1 0 1 0 1 0 1 1 1 1 0
1 1
_____________________ _____________________
0 1 0 1 1 1 1 1 0 1 0 1 1 1 1 1
0 1 0 1 1 0 1 0 0 1 0 1 1 0 1 0
______________________ _____________________
1 0 1 1 1 0 0 1 1 0 1 1 1 0 0 1
1 1 0 1 0 1 0 1 1 1 0 1 0 1 0 1
______________________ _____________________
1 1 0 0 0 1 1 1 0 1 1 0 0 0 1 1 1 0
1 1
______________________ _____________________
1 0 0 0 1 1 1 1 : sum 1 0 0 0 1 1 1 1
0 1 1 1 0 0 0 0
1’ complement= 0 1 1 1 0 0 0 0 ___________________
Sum: 1 1 1 1 1 1 1 1
1’s Complement: 0 0 0 0 0 0 0 0 Accepted

9
Q13: Suppose the blocks of 5 binary digits 10101, 10110, 01110 to be sent
using a checksum, calculate the checksum at the sender and check the
message at the receiver side.
Answer:
At the sender at the receiver
1 0 1 0 1 1 0 1 0 1
1 0 1 1 0 1 0 1 1 0
_____________ _____________
1 0 1 0 1 1 1 0 1 0 1 1
1 1
_______________ ______________
0 1 1 0 0 0 1 1 0 0
0 1 1 1 0 0 1 1 1 0
_______________ ______________
1 1 0 1 0 : sum 1 1 0 1 0
0 0 1 0 1 : checksum 0 0 1 0 1
______________
sum : 1 1 1 1 1
complement : 0 0 0 0 0 (Accepted Data)
……………………………………………………………………………………………………………………………………………....

Q14: Define checksum and find the checksum of the following message
10101111, 11111001, 00011101.
Answer:
Checksum: The error detection method used by the higher layer protocols. Like other methods,
it depends on the concept of redundancy.
1 0 1 0 1 1 1 1
1 1 1 1 1 0 0 1
____________________
1 1 0 1 0 1 0 0 0
1
_____________________
1 0 1 0 1 0 0 1
0 0 0 1 1 1 0 1
_____________________
1 1 0 0 0 1 1 0 : sum
0 0 1 1 1 0 0 1 : checksum

10
Q15: Suppose that a sender want to send (1000101, 1000001, 1000011, and
1110001) with one dimensional EVEN PARITY, find the parity bit need
to be added to the message and then check received data at receiver side
as shown in the table below.
Sender Data Parity Bit Received data at receiver Result
1000101 10001001
1000001 10000010
1000011 11100111
1110001 11100000

Answer:
Sender Data Parity Bit Received data at receiver Result
1000101 1 10001011 Accept (Even)
1000001 0 10000010 Accept (Even)
1000011 1 10000111 Accept (Even)
1110001 0 11100000 Error (Odd)

Q16: Suppose that a sender want to send (1000101, 1001001, 1100011, and
1111001) with one dimensional ODD PARITY, find the parity bit need
to be added to the message and then check received data at receiver
side as shown in the table below.
Sender Data Parity Bit Received data at receiver Result
1000101 10001011
1001001 10010011
1100011 11000110
1111001 11110010
1010101 10101011

Answer:
Sender Data Parity Bit Received data at receiver Result
1000101 0 10001110 Error (Even)
1001001 0 10000010 Error (Even)
1100011 1 11010111 Error (Even)
1111001 0 11110010 Accept (Odd)
1010101 1 10101011 Accept (Odd)

11
Q17: Fill the table below to create the required code word using one
dimensional parity check
Data Word Data word with EVEN parity bit Data word with ODD parity bit
1000101
1001001
1100011
1111001
1010101

Answer:

Data Word Data word with EVEN parity bit Data word with ODD parity bit
1000101 10001011 10001010
1001001 10010011 10010010
1100011 11000110 11000111
1111001 11110011 11110010
1010101 10101010 10101011

Q18: Using two-dimensional parity check find the message to be send if you
have the following data message stream
(10110011 10101011 01011010 11010101)
Answer:

12
Q19: Using two dimensional parity check find the message to be send if you
have the following data message stream
(10011001 11100010 00100100 10000100)
Answer:

Q20: Fill the blanks with the correct choice

1. CRC is a mechanism used for ___________


a. Error correcting
b. Error detecting
c. Access method
d. Framing

2. The goal of a Virtual Private Network (VPN) is to ___________


a. Access network channel
b. provide private communications within the public network
c. Maps IP addresses to MAC addresses
d. Carry network data of any network layer protocol at the same time

3. The process of placing an entire packet within another packet and sending it over a
network is called ___________
a. Error control
b. Tunneling
c. VPN
d. Framing

4. The main job of data link control includes ___________


a. Framing
b. Flow control
c. Error control
d. All of above

13
5. The mechanism that minimize the number of collisions that occur during data
transmission is called ___________
a. CRC
b. Checksum
c. Media access
d. VPN

6. Data link layer perform error control by ___________


a. Correcting error only
b. Detecting error only
c. Leaving error
d. All of above

14

You might also like