Computer Communication Network
Sheet 3
1- What are the three function of the data link layer? 1- Line discipline 2- Flow control 3- Error control 2- What are the two main methods of line discipline? How does a system select which one to use? - The two methods of line discipline are 1- ENQ / ACK (Enquiry / acknowledgment) 2- Poll / Select - The peer-to-peer systems select ENQ / ACK method. The primary-secondary systems select Poll / Select method. 3- What is the Mechanism of (ENQ / ACK)? -First the sender send enquiry packet to the receiver if the receiver response by acknowledgement packet the line reserved to transmission from sender to receiver otherwise the line remains free. -After transmission complete sender send end of transmission to finish the transmitting.
4- What is the Mechanism of (Poll / Select)? -Poll operation begins with send poll packet to one of secondary stations to transfer data from this secondary response by the data itself or by negative acknowledgement packet. -Select operation begins with send select packet to one of secondary stations to transfer data to and if this secondary response by an acknowledgement packet the transfer of data begin.
1/6
Computer Communication Network
Sheet 3
5- Why are addresses needed in (Poll / Select) but not in (ENQ / ACK)? - Because
ENQ / ACK method have only two stations (peer-to-peer) systems but Poll / Select method have many secondary stations and one primary station (primary-secondary) systems so it needs address to each secondary station.
6- What are difference between polling and selecting? -
Polling operation used in transfer data from secondary station to primary one. Selecting operation used in transfer data from primary station to secondary one.
7- Why is flow control needed? -Flow control needed to restrict the amount of data that the sender can send before waiting for acknowledgment 8- What are the two methods for flow control? 1- Stop-and-Wait method. 2- Sliding Window method. 9- What are the two main methods for error control? 1- Stop-and-Wait ARQ method. 2- Sliding Window ARQ method. 10- What are the two types of sliding window ARQ error control ? How do they differ from one another? 1- Go-back-n sliding window ARQ SW=N-1 when error occur it repeat all again. 2- Selective reject sliding window ARQ SW=N/2 when error occur it repeat only the error. 11- Draw the sender and receiver windows for a system using go-back-n ARQ given that a- Frame 0 is sent; frame 0 is acknowledged. b- Frame 1 & 2 are sent; and acknowledged. c- Frame 3, 4 & 5 are sent; NAK 4 is received. d- Frame 4, 5, 6 & 7 are sent; and acknowledged. 12- Draw the sender and receiver windows for a system using Selective-reject ARQ given that a- Frame 0 is sent; frame 0 is acknowledged. b- Frame 1 & 2 are sent; and acknowledged. c- Frame 3, 4 & 5 are sent; NAK 4 is received. d- Frame 4, 6 & 7 are sent; and acknowledged.
2/6
Computer Communication Network
Sheet 3
13- What can the receiver send in response to each of the following: a- A poll Send the NAK or Data b- A select Send the NAK or ACK 14- What does the number on an NAK frame mean for. a- Stop-and-wait ARQ. Send again the last packet (its number is the number on an NAK). (Remember Stop-and-Wait method have packets numbered 0 and 1 only) b- Go-back-n ARQ. Send again starting from certain packet (its number is the number on an NAK). c- Selective-reject ARQ. Send again only certain packet (its number is the number on an NAK). 15- What does the number on an ACK frame mean for. a- Stop-and-wait ARQ. It Acknowledge the sender by receiving the last packet b- Go-back-n ARQ. It Acknowledge the sender by receiving a certain packet and all previous ones. c- Selective-reject ARQ. It Acknowledge the sender by receiving a certain packet and all previous ones. 16- A sliding window protocol uses a window of size 15. How many bits are needed to define the sequence numbers? N=16 SW=15 # bits = 4 17- A sliding window protocol is using seven bits t represent the sequence number. What is the size of the window? # Bits = 7 SW=127 N=2 =128 7
18- A computer is using a sliding window of size 7. Complete the following sequence numbers for 20 packets: 0, 1, 2, 3, 4, 5, 6,……………………………….. 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3, 4, 5, 6, 7, 0, 1, 2, 3 19- A computer is using the following sequence numbers. What is the size of the window? 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 1, ……… N=16 hence SW=15
3/6
Computer Communication Network
Sheet 3
20- For the following sliding window : Show the window after a- The sender has sent packets 0 to 11 and has received ACK 8.
b- The sender has sent packets 0 to 11 and has received NAK 6.
c- The sender has sent packets 0 to 14, no acknowledgment has been received, and timeout has expired.
d- The receiver has sent ACK 6 and ACK 9, but ACK 6 is lost.
21- What is the difference between the information fields in an HDLC I-frame and an HDLC U-frame? 1- In I frame information field hold user information. 2- In U frame information field hold management information that manage the network. 22- Describe the three HDLC station types? • • •
Primary Station - this completely controls all data link operations issuing commands from secondary stations and has the ability to hold separate sessions with different stations. Secondary Station - this can only send responses to one primary station. Secondary stations only talk to each other via a Primary station. Combined Station - this can transmit and receive commands and responses from one other station.
23- How do the three HDLC frame types differ from one another? 1- I: information frame and its control filed start by 0 2- S: supervisory frame and its control filed start by 10 3- U: unnumbered frame and its control filed start by 11 24- Name and discuss briefly the bits in the HDLC control field?
N(S) N(R) S M P/F
Send sequence number Receive sequence number supervisory function bits Unnumbered function bits Poll/Final bit
Used to identify the sequence of the current frame Used to acknowledgement previous frames Form a command aiding in supervisory Form a command aiding in management Mean poll at primary and final at secondary
4/6
Computer Communication Network
Sheet 3
25- The HDLC frame in the figure below is sent from a primary station to a secondary station? 0111 1110
0000 1111
1000 1011
FCS
0111 1110
Answer the following questions: a- What is the address of the secondary? (0000 111) b- What is the type of the frame? (1000 1011) S-Frame c- What is the sender sequence number (if present)? Sequence number isn't present. d- What is the acknowledgment number (if present)? (1000 1011) acknowledgment number is 011. e- Dos the frame carry user data? If yes, what is the value of this data? No. f- Dos the frame carry management data? If yes, what is the value of this data? No. g- What is the purpose of the frame? This frame used in flow and error control by sending the status of the sender which is one of (received and ready - received and not ready – reject – selective reject) and the acknowledgment sequence number. 26- Repeat QUESTION #25 with The frame sent from a secondary station to a primary station? No change in solution and the secondary address is the same. 27- The HDLC frame in the figure below is sent from a primary station to a secondary station? 0111 1110
0000 0111
1010 1011
FCS
0111 1110
Answer the following questions: a- What is the address of the secondary? (0000 011) b- What is the type of the frame? (1010 1011) S-Frame c- What is the sender sequence number (if present)? Sequence number isn't present. d- What is the acknowledgment number (if present)? (1010 1011) acknowledgment number is 011. e- Dos the frame carry user data? If yes, what is the value of this data? No. f- Dos the frame carry management data? If yes, what is the value of this data? No. g- What is the purpose of the frame? This frame used in flow and error control by sending the status of the sender which
is one of (received and ready - received and not ready – reject – selective reject) and the acknowledgment sequence number. 28- Repeat QUESTION #27 with The frame sent from a secondary station to a primary station? No change in solution and the secondary address is the same.
5/6
Computer Communication Network
Sheet 3
29- The HDLC frame in the figure below is sent from a primary station to a secondary station? 0111 1110
0000 0111
0010 1011
0010 1110 0101 0000 1011
FCS
0111 1110
Answer the following questions: a- What is the address of the secondary? (0000 011) b- What is the type of the frame? (0010 1011) I-Frame c- What is the sender sequence number (if present)? (0010 1011) the sender sequence number is 010 d- What is the acknowledgment number (if present)? (0010 1011) the acknowledgment sequence number is 011 e- Dos the frame carry user data? If yes, what is the value of this data? 0010 1110 0101 0000 1011 f- Dos the frame carry management data? If yes, what is the value of this data? No. g- What is the purpose of the frame? This frame transfer user information and aid in flow and error control by sending the sender sequence number and the acknowledgment sequence number. 30- The HDLC frame in the figure below is sent from a primary station to a secondary station? 0111 1110
0000 0111
0010 1011 0011 1110 0101 1110 0101 0000 1011 FCS
0111 1110
Answer the following questions: a- What is the address of the secondary? (0000 011) b- What is the type of the frame? (0010 1011) I-Frame c- What is the sender sequence number (if present)? (0010 1011) the sender sequence number is 010 d- What is the acknowledgment number (if present)? (0010 1011) the acknowledgment sequence number is 011 e- Dos the frame carry user data? If yes, what is the value of this data? Yes, 0011 1110 0101 1110 0101 0000 1011 f- Dos the frame carry management data? If yes, what is the value of this data? No. g- What is the purpose of the frame? This frame transfer user information and aid in flow and error control by sending the sender sequence number and the acknowledgment sequence number. 31- The HDLC frame in the figure below is sent from a primary station to a secondary station? 0111 1110
1000 0111
1100 1010
0010 1………….0000 1011 FCS
0111 1110
Answer the following questions: a- What is the address of the secondary? (1000 011) b- What is the type of the frame? (1100 1010) U-Frame c- What is the sender sequence number (if present)? Sequence number isn't present. d- What is the acknowledgment number (if present)? Acknowledgment number isn't present. e- Dos the frame carry user data? If yes, what is the value of this data? No. f- Dos the frame carry management data? If yes, what is the value of this data? Yes, 0010 1………….0000 1011 g- What is the purpose of the frame? This frame used for managing the network by holding management info.
6/6