FIT3165/FIT4165 Tutorial #6 TCP/IP Layered Architecture Week 7 – Semester 1 – 2022
29 March 2022
Revision Status
Updated by Dr. and , Mar 2022.
Copyright By PowCoder代写 加微信 powcoder
©2022, Faculty of IT, Monash University
Instructions
1. Students work individually to solve this week’s exercise.
2. Each student must answer the following review Q’s and complete the practical tasks
given in part 2.
Review Questions
1. Distinguish between communication at the network layer and communication at the data-link layer.
• Communication at the network layer is host-to-host;
• Communication at the data-link layer is node-to-node.
2. List some basic functions performed at the
a MAC layer.
b LLC layer
Solution: MAC layer:
● On transmission, assemble data into a frame with address and error-detection fields.
● On reception, disassemble frame, and perform address recognition and error detection.
● Govern access to the LAN transmission medium. LLC layer:
● Frames the network layer packet
● Identifies the network layer protocol
● Provides flow control
● Provides error control
● And perform Link management.
3. In a block code of the following figure, a dataword is 20 bits and the corresponding codeword is 25 bits. What are the values of k, r, and n according to the definitions in the text? How many redundant bits are added to each dataword?
Figure: Process of error detection in block coding
©2022, Faculty of IT, Monash University
In this case, k =DATAWORD= 20, r= REDUNDANT-BITS = 5, and n= CODEWORD = 25. Five redundant bits are added to the dataword to create the corresponding codeword.
4. What is the minimum Hamming distance?
The minimum Hamming distance is the smallest Hamming distance between all possible pairs in a set of words.
Hamming Distance: In information theory, the Hamming distance between two strings of equal length is the number of positions at which the corresponding symbols are different. In other words, it measures the minimum number of substitutions required to change one string into the other, or the minimum number of errors that could have transformed one string into the other.
5. Using the code in the following table (Simple EVEN parity-check code) what is the data word (if the code is valid) if one of the following codewords is received?
a. error b. error c. 0000 d. 1101
6. If the Divisor is 10011 and the Dataword is “1010101010” find the Codeword with the help of the figure below, which shows the method to calculate the Cyclic Redundancy check (CRC) encoder at the Transmitter. Note this is also called Frame Check Sequence (FCS) used in the Data-link layer for FRAMES in error detection?
©2022, Faculty of IT, Monash University
In the second part of the calculations if the received Codeword is “10101010100100” verify with the help of the figure below, if the data Integrity of codeword is Valid or NOT?
©2022, Faculty of IT, Monash University
7. Explain why there is only one address field (instead of two) in an HDLC frame.
The address field in the HDLC network defines the address of the secondary station (as the sender or receiver); the primary station, which is always unique, does not need an address.
©2022, Faculty of IT, Monash University
8. Define what data transparency or bit stuffing is HDLC protocol? Explain how bit stuffing is achieved?
Data transparency or bit stuffing refers to the ability to include arbitrary bit patterns in the data field of a frame without any pattern being confused with part of the control information in the frame. This is achieved by bit stuffing.
Flag fields delimit the frame at both ends with the unique pattern 01111110. A single flag may be used as the closing flag for one frame and the opening flag for the next. On both sides of the user-network interface, receivers are continuously hunting for the flag sequence to synchronize on the start of a frame. While receiving a frame, a station continues to hunt for that sequence to determine the end of the frame.
Because the protocol allows the presence of arbitrary bit patterns, there is no assurance that the pattern 01111110 will not appear somewhere inside the frame, thus destroying synchronization. To avoid this problem, a procedure known as bit stuffing is used.
©2022, Faculty of IT, Monash University
For all bits between the starting and ending flags,
❖ 0 inserted after every sequence of five 1s
❖ if receiver detects five 1s it checks next bit
❖ if next bit is 0, it is deleted (was stuffed bit)
❖ if next bit is 1 and seventh bit is 0, accept it as flag
❖ if sixth and seventh bits 1, sender is indicating abort
With the use of bit stuffing, arbitrary bit patterns can be inserted into the data field of the frame. This property is known as data transparency.
9. List and briefly define three versions of ARQ?
• Stop-and-wait ARQ: Based on stop-and-wait flow control. A station retransmits on
receipt of a duplicate acknowledgment or as a result of a timeout.
• Go-back-N ARQ: Based on sliding-window flow control. When an error is detected, the frame in question is retransmitted, as well as all subsequent frames that have
been previously transmitted.
• Selective-reject ARQ. Based on sliding-window flow control. When an error is
detected, only the frame in question is retransmitted.
10. A World Wide Web server is usually set up to receive relatively small messages from its clients but to transmit potentially very large messages to them. Explain, then, which type of ARQ protocol (selective reject, go-back-N) would provide less of a burden to a particularly popular WWW server.
©2022, Faculty of IT, Monash University
The selective-reject approach would burden the server with the task of managing and maintaining large amounts of information about what has and has not been successfully transmitted to the clients;
The go-back-N approach would be less of a burden on the server.
Practical Tasks
Activity 1: Build the following network with one router and two subnets in the CORE.
I. Build the network and run the simulation. Use the ping command to check the connectivity from any client to the server. Is there any need for routing configuration in this network? Explain the need for routing in this scenario.
II. Use the “ip route show” command in the router to check the routing information that the router holds. Does the router need any more information to route packets in this network?
Note: use “man ip route” to check more details about the command
©2022, Faculty of IT, Monash University
Activity 2: Build the following network with two routers and three subnets (two LANs and a point to point network). Implement static routing for networking between the LANs.
I. Build the network and run the simulation. Use the ping command to check the connectivity from any client to the server. Probably you will not be able to connect to the server.
Use the “ip route show” command in the routers to check the routing information that the router holds. Does the router need any more information to route packets in this network design?
II. Use the “ip route add” command in the routers to add static routing information for the packets to reach hosts from one submit to another. An example command is given below.
ip route add 10.0.1.0/24 via 10.0.2.2
Explanation: We are adding a path to the router’s routing table where it states that any packet for the subnet 10.0.1.0/24 should be forwarded to the node having the IP address 10.0.2.2.
We can add the routes in the “live” network at the router’s command line interface or we can add the routes during network building by entering the router’s services option “Static Route”. Please note that any configuration at the live network will be lost once the simulation is over. After successfully adding the necessary routes, we may check the network
©2022, Faculty of IT, Monash University
connectivity for every node in the network.
Extra theory questions try on your own time:
11. What are the three frame types supported by HDLC? Describe each of them.
• Information frames (I-frames): carry the data to be transmitted for the user (the
logic above HDLC that is using HDLC). Additionally, flow and error control data, using the ARQ mechanism, are piggybacked on an information frame.
• Supervisory frames (S-frames): provide the ARQ mechanism when piggybacking is not used.
• Unnumbered frames (U-frames): provide supplemental link control functions.
12. To understand the uses of K (number of attempts) in CSMA/CD in the figure below(Flow diagram for the CSMA/CD), find the probability that a station can send immediately in each of the following cases:
a) After one failure.
b) After three failures.
The use of K in the figure decreases the probability that a station can immediately send when the number of failures increases. This means decreasing the probability of collision.
a) Afteronefailure(K=1),thevalueofR=0to2k–1=>0-1.Theprobabilitythatthe station gets 0 (send immediately) is therefore 1/2 or 50%.
©2022, Faculty of IT, Monash University
b) After three failures (K = 3), the value of R=0 to 2k – 1 => 0 – 7. The probability that the station gets 0 (send immediately) is therefore 1/8 or 12.5%.
©2022, Faculty of IT, Monash University
程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com