Final Exam Solution 1. Please explain how to perform the flag-based frame synchronization (8%) and the CRC-based frame synchronization (7%). Solution: (a) Flag-based frame synchronization was developed to transfer an arbitrary number of bits within a frame. Take an example of HDLC, the beginning and end of an HDLC frame is indicated by the presence of an 8-bit flag. The flag in HDLC consists of the byte 01111110. Bit stuffing prevents the occurrence of the flag inside the frame. The transmitter examines the contents of the frame and inserts an extra 0 after each instance of five consecutive 1s. The receiver looks for five consecutive 1s in the received sequence. Five 1s followed by a 0 indicate that the 0 is a stuffing bit, and so the bit is removed. Five consecutive 1s followed by 10 indicate a flag. Five 1s followed by 11 indicate an error. (b) Take an example of generic framing procedure (GFP) for the CRC-based frame synchronization. The first two fields, PLI and cHEC, are used to delineate a frame. The two-byte payload length indicator (PLI) gives the size in bytes of the GFP payload area and so indicates the beginning of the next GFP frame. The two-byte cHEC field contains the CRC-16 redundancy check bits for the PLI and cHEC fields. The cHEC can be used to correct single errors and to detect multiple errors. The GFP receiver synchronizes to the GFP frame boundary through a three-state process. The receiver is initially in the hunt state where it examines four bytes at a time to see if the CRC computed over the first two bytes equals the contents of the next two bytes. When the receiver finds a match it moves to the pre-sync state, the receiver uses the tentative PLI field to determine the location of the next frame boundary. Then, in the sync state the single-error correcting capability of the CRC-16 is activated so that the occurrence of an isolated error does not disrupt frame synchronization. 2. The following is an HDLC frame exchange between station A and station B using asynchronous balanced mode (ABM). Please finish the diagram by completing the labeling of the frame exchanges (12%). 1.B,I,0,0 2.A,I,0,0 3.x,I,x,x 4.x,I,x,x 5.x,REJ,x 6.x,I,x,x 7.x,I,x,x 8.x,I,x,x (Notice that the frame (B,I,0,0) denotes station A sends the I-frame to station B with sending sequence number 0 and the receiving sequence number 0.) Solution: 1. B,I,0,0 2.A,I,0,0 3.A,I,1,1 4.A,I,2,1 5.A,REJ,1 6.A,I,1,1 7.A,I,2,1 8.A,I,3,1 3. Please describe the three different medium sharing techniques, in which the pros and cons and its applications of each technique should be included in the description (18%). Static channelization schemes They involve the partitioning of the medium into separate channels that are then dedicated to particular users. pros: Highly efficient for constant-bit rate traffic suitable when stations generate a steady stream of information that makes efficient use of the dedicated channel. cons: Inflexible in allocation of bandwidth to users with different requirements Inefficient for bursty traffic Does not scale well to large numbers of users Preferred approach in Cellular telephone networks Terrestrial & satellite broadcast radio & TV Channelization: (1) FDMA (2) TDMA (3) CDMA Dynamic medium access control (MAC) schemes They involve a dynamic sharing of the medium on a per frame basis that is better matched to situations in which the user traffic is bursty. This primary function of MAC is to minimize or eliminate the incidence of collisions to achieve a reasonable utilization of the medium with two basic approaches, random access and scheduling. Scheduling: pros and cons: Schedule frame transmissions (assignment) to avoid collision in shared medium More efficient channel utilization Less variability in delay Fairness provisioning to stations Increased computational or procedural complexity approach: (1) Reservation (2) Polling (3) Token passing Random Access: Each station transmits its reservation message randomly until the message goes through. pros: Simple and quick transfer at low load Can accommodate large number of bursty users cons: delay result from heavy traffic approach: (1) ALOHA (2) CSMA 4. (a) Please write down the maximum achievable throughputs formula for ALOHA, CSMA and CSMA/CD and explain the meaning of parameters used in the formula (15%). (c) Compare the maximum achievable throughputs of the random access schemes including ALOHA, CSMA and CSMA/CD (5%). 5. Please describe the operation of the Ethernet hub and Ethernet switch topologies using the twisted-pair cabling (10%) and explain how the star topology improves the performance over the bus topology (5%). Solution: (a) In Ethernet hub topology, the hub monitors all transmissions from the stations. When there is only one transmission, the hub repeats the transmission on the other lines. If there is a collision, then the hub sends a jamming signal to all the stations to implement the backoff algorithm. In this approach the stations are in the same collision domain, where a collision will occur if two or more stations transmit simultaneously. In Ethernet switch topology, each input port buffers incoming transmission. The incoming frames are examined and transferred to the appropriate outgoing ports. Each outgoing port implements the Ethernet MAC protocol to transmit frames. In this case the group of stations attached to the same line constitutes a collision domain. Switching LAN provides a means of interconnecting larger numbers of stations without reaching the limit of shared transmission medium. (b) Using twisted pairs in a star topology can improve the performance because the loading of each channel is lower and the system can still remain the operation even if one of the channels is broken down. In addition, the stations implement the CSMA-CD protocol, which can reduce the probability of collision occurrence. 6. Describe the operation of the distributed coordination function (DCF) of the IEEE802.11 WLAN (12%), also explain the operation of the point coordination function (PCF) of the IEEE802.11 WLAN (8%). Solution: (a) The distributed coordination function (DCF) is the basic access method used to support asynchronous data transfer on a best-effort basis. The DCF is based on the CSMA-CA protocol. High-priority frames must only wait the short interframe space (SIFS) period before they contend for the channel. The PCF interframe (PIFS) is intermediate in duration and is used by the PCF to gain priority access to the medium at the start of a CFP. The DCF interframe space (DIFS) is used by the DCF to transmit data and management MDPUs. When the data frame is transmitted, the duration field of the frame let all station in the BSS know how long the medium will be busy. All stations hearing the data frame adjust their NAV based on the duration field value, which includes the SIFS interval and the acknowledgement frame following the data frame. (b) The point coordination function (PCF) is an optional capability that can be used to provide connection-oriented, contention-free services by enabling polled stations to transmit without contending for the channel. The PCF function is performed by the point coordinator (PC) in the AP within the BSS. The CFP repetition interval determines the frequency with which the PCF occurs. At the beginning of each CFP repetition interval, the so-called target beacon transmission times (TBTT), all stations in the BSS update their NAV to the maximum length of the CFP. During the CFP, stations may transmit only to respond to a poll from the PC or to transmit an acknowledgment one SIFS interval after receipt of an MPDU. At the nominal start of the CFP, the PC senses the medium. If the medium remains idle for a PIFS interval, the PC transmits a beacon frame to initiate the CFP. In case the CFP is slightly loaded, the PC can foreshorten the CFP and provide the remaining bandwidth to contention-based traffic by issuing a CF-End or CF-End+ACK control frame. This action causes all stations that receive the frame in the BSS to reset their NAV values.