pure aloha - bhg2.files.wordpress.com  · web viewis allowed to use the channel at a given time....

54
COMPUTER NETWORKS QUESTIONS UNIT 3 10 Markers 1. Illustrate about Reservation, Polling and Token passing.(10 M) Ans: Reservation In the reservation method, a station needs to make a reservation before sending data. Time is divided into intervals. In each interval, a reservation frame precedes the data frames sent in that interval. If there are N stations in the system, there are exactly N reservation minislots in the reservation frame. Each minislot belongs to a station. When a station needs to send a data frame, it makes a reservation in its own minislot. The stations that have made reservations can send their data frames after the reservation frame. The following figure shows a situation with five stations and a five-minislot reservation frame. In the first interval, only stations 1, 3, and 4 have made reservations. In the second interval, only station 1 has made a reservation

Upload: duongdan

Post on 15-May-2019

212 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

COMPUTER NETWORKS QUESTIONS

UNIT 3

10 Markers

1. Illustrate about Reservation, Polling and Token passing.(10 M)Ans:

Reservation

In the reservation method, a station needs to make a reservation before sending data. Time is divided into intervals. In each interval, a reservation frame precedes the data frames sent in that interval. If there are N stations in the system, there are exactly N reservation minislots in the reservation frame. Each minislot belongs to a station. When a station needs to send a data frame, it makes a reservation in its own minislot. The stations that have made reservations can send their data frames after the reservation frame. The following figure shows a situation with five stations and a five-minislot reservation frame. In the first interval, only stations 1, 3, and 4 have made reservations. In the second interval, only station 1 has made a reservation

Polling:

Polling works with topologies in which one device is designated as a primary station and the other devices are secondary stations. All data exchanges must be made through the primary device even when the ultimate destination is a secondary device. The primary device controls the link; the secondary devices follow its instructions. It is up to the primary device to determine which device

Page 2: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

is allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the following figure.

If the primary wants to receive data, it asks the secondaries if they have anything to send, this is called poll function. If the primary wants to send data, it tells the secondary to get ready to receive; this is called select function.

Select: The select function is used whenever the primary device has something to send. If it has something to send, the primary device sends it. It has to know whether the target device is prepared to receive or not. So, the primary must alert the secondary to the upcoming transmission and wait for an acknowledgment of the secondary's ready status. Before sending data, the primary creates and transmits a select (SEL) frame, one field of which includes the address of the intended secondary.

Poll: The poll function is used by the primary device to solicit transmissions from the secondary devices. When the primary is ready to receive data, it must ask (poll) each device in turn if it has anything to send. When the first secondary is approached, it responds either with a NAK frame if it has nothing to send or with data (in the form of a data frame) if it does. If the response is negative (a NAK frame), then the primary polls the next secondary in the same manner until it finds one with data to send. When the response is positive (a data frame), the primary reads the frame and returns an acknowledgment (ACK frame), verifying its receipt.

In the token-passing method, the stations in a network are organized in a logical ring. In other words, for each station, there is a predecessor and a successor. The predecessor is the station which is logically before the station in the ring; the successor is the station which is after the station in the ring. The current station is the one that is accessing the channel now. The right to this access has been passed from the predecessor to the current station. The right will be passed to

Page 3: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

the successor when the current station has no more data to send. In this method, a special packet called a token circulates through the ring. The possession of the token gives the station the right to access the channel and send its data. When a station has some data to send, it waits until it receives the token from its predecessor. It then holds the token and sends its data. When the station has no more data to send, it releases the token, passing it to the next logical station in the ring. The station cannot send data until it receives the token again in the next round. Token management is needed for this access method. Stations must be limited in the time they can have possession of the token. The token must be monitored to ensure it has not been lost or destroyed. For example, if a station that is holding the token fails, the token will disappear from the network. Another function of token management is to assign priorities to the stations and to the types of data being transmitted. And finally, token management is needed to make low- priority stations release the token to high priority stations.

2. Perform Hamming Code Error Detection and Correction for the given stream of bits: 11010111. Generate error at 8th bit, detect and correct it using Hamming Code.

Ans:

: Error Correction Using Hamming Code:

Page 4: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the
Page 5: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

3. Provide the classification of multiple access protocols. Explain ALOHA in detail with clear flowchart.

Ans:

Page 6: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

Aloha, also called the Aloha method, refers to a simple communications scheme in which each source (transmitter) in a network sends data whenever there is a frame to send. If the framesuccessfully reaches the destination (receiver), the next frame is sent. If theframe fails to be received at the destination, it is sent again. This protocol wasoriginally developed at the University of Hawaii for use with satellite communication systems in the Pacific.It was designed for a radio (wireless) LAN, but it can be used on any shared medium.

Basic Idea Behind ALOHA Use of two distinct frequencies in a hub/star configuration. The hub machine broadcasting packets to everyone on the "outbound" channel. Various client machines sending data packets to the hub on the "inbound" channel. If data was received correctly at the hub, a short acknowledgment packet was sent to the client. if an acknowledgment was not received by a client machine after a short wait time, it would automatically retransmit the data packet after waiting a randomly selected time interval. This acknowledgment mechanism was used to detect and correct for "collisions" created when two client machines both attempted to send a packet at the same time.

Page 7: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

4. Explain channelization. Give valid examples of FDMA, TDMA, CDMA.

Ans:

Channelization or channel partition is a multiple-access method in which the available bandwidth of a link is shared in time, frequency, or through code, among different stations. There are three channelization protocols:

a) Frequency Division Multiple Access (FDMA)The available bandwidth is divided into frequency bands. Each station is allocated a band to send its data. In other words, each band is reserved for a specific station, and it belongs to the station all the time. Each station also uses a bandpass filter to confine the transmitter frequencies. To prevent station interferences, the allocated bands are separated from one another by small guard bands. It allows multiple users to send data through a single communication channel.

FDMA is distinct from frequency division duplexing (FDD). While FDMA allows multiple users simultaneous access to a transmission system, FDD refers to how the radio channel is shared between the uplink and downlink. FDM is a physical layer technique that combines and transmits low-bandwidth channels through a high-bandwidth channel. FDMA, on the other hand, is an access method in the data link layer.

Page 8: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

FDMA, on the other hand, is an access method in the data-link layer. The datalink layer in each station tells its physical layer to make a bandpass signal from the data passed to it. The signal must be created in the allocated band. There is no physical multiplexer at the physical layer. The signals created at each station are automatically bandpass filtered. They are mixed when they are sent to the common channel.

Early cellular telephony mostly used FDMA analogue transmission. Walkie talkies and mobile networks for closed user groups often use FDMA. Another example of FDMA is AM or FM radio broadcasting, where each station has its own channel.

b) Time Division Multiple Access (TDMA)The stations share the bandwidth of the channel in time. Each station is allocated a time slot during which it can send data. Each station transmits its data in its assigned time slot. The main problem with TDMA lies in achieving synchronization between the different stations. Each station needs to know the beginning of its slot and the location of its slot. This may be difficult because of propagation delays introduced in the system if the stations are spread over a large area. To compensate for the delays, we can insert guard times. In TDMA, the bandwidth is just one channel that is timeshared between different stations.

Page 9: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

- TDM IS USED IN TELEPHONE COMMUNICATION A channel access method for shared-medium networks. It allows several users to share the same frequency channel by dividing the signal into different time slots. The users transmit in rapid succession, one after the other, each using its own time slot.

c) Code Division Multiple Access (CDMA)

Page 10: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

It was conceived several decades ago. Recent advances in electronic technology have finally made its implementation possible. CDMA differs from FDMA in that only one channel occupies the entire bandwidth of the link. It differs from TDMA in that all stations can send data simultaneously; there is no timesharing. In CDMA, one channel carries all transmissions simultaneously. CDMA is based on coding theory. Each station is assigned a code, which is a sequence of numbers called chips, Tata Indicom, reliance virgin mobile are the examples for CDMA phones.

Page 11: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

5. Perform CRC for the given set of bits: 110111110111 with the key: 11011. Generate error on 8th bit and determine error at receiver's end.

Ans:

Page 12: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

6. What is a Controlled access? Explain three protocols used in controlled access with valid examples.

Ans:

In controlled access, the stations seek information from one another to find which station has the right to send. It allows only one node to send at a time, to avoid collision of messages on shared medium.The three controlled-access methods are:

1. Reservation

2. Polling

3. Token Passing

Reservation

In the reservation method, a station needs to make a reservation before sending data.

The time line has two kinds of periods:

Reservation interval of fixed time length

Data transmission period of variable frames.

If there are M stations, the reservation interval is divided into M slots, and each station has one slot.

Suppose if station 1 has a frame to send, it transmits 1 bit during the slot 1. No other station is allowed to transmit during this slot.

In general, i th station may announce that it has a frame to send by inserting a 1 bit into i th slot. After all N slots have been checked, each station knows which stations wish to transmit.

Page 13: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

The stations which have reserved their slots transfer their frames in that order.

After data transmission period, next reservation interval begins.

Since everyone agrees on who goes next, there will never be any collisions.

The following figure shows a situation with five stations and a five slot reservation frame. In the first interval, only stations 1, 3, and 4 have made reservations. In the second interval, only station 1 has made a reservation.

Polling

Polling process is similar to the roll-call performed in class. Just like the teacher, a controller sends a message to each node in turn.

In this, one acts as a primary station (controller) and the others are secondary stations. All data exchanges must be made through the controller.

The message sent by the controller contains the address of the node being selected for granting access.

Although all nodes receive the message but the addressed one responds to it and sends data, if any. If there is no data, usually a “poll reject”(NAK) message is

sent back.

Problems include high overhead of the polling messages and high dependence on the reliability of the controller.

Page 14: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

EfficiencyLet Tpoll be the time for polling and Tt be the time required for transmission of data. Then,

Efficiency = Tt/(Tt + Tpoll)

Token Passing

In token passing scheme, the stations are connected logically to each other in form of ring and access of stations is governed by tokens.

A token is a special bit pattern or a small message, which circulate from one station to the next in the some predefined order.

In Token ring, token is passed from one station to another adjacent station in the ring whereas in case of Token bus, each stationuses the bus to send the token to the next station in some predefined order.

In both cases, token represents permission to send. If a station has a frame queued for transmission when it receives the token, it can send that frame before it passes the token to the next station. If it has no queued frame, it passes the token simply.

Page 15: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

After sending a frame, each station must wait for all N stations (including itself) to send the token to their neighbors and the other N – 1 stations to send a frame, if they have one.

There exists problems like duplication of token or token is lost or insertion of new station, removal of a station, which need be tackled for correct and reliable operation of this scheme.

PerformancePerformance of token ring can be concluded by 2 parameters:-

Delay, which is a measure of time between when a packet is ready and when it is delivered. So, the average time (delay) required to send a token to the next station = a/N.

Throughput, which is a measure of the successful traffic.

Throughput, S = 1/ (1 + a/N) for a<1

and

S = 1/ {a (1 + 1/N)} for a>1.

where N = number of stations

a = Tp/Tt

(Tp = propagation delay and Tt = transmission delay)

Page 16: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

7. Write a short note on CSMA/CD and CSMA/CA with valid figures and examples.

Ans:

CSMA/CD: Carrier Sense Multiple Access with Collision Detection

The CSMA method does not specify the procedure following a collision. It augments the algorithm to handle the collision. In this method, a stations monitors the medium and sends frame after frame to check the transmission was successful. If so, the station is finished. If, however, there is collision, the frame is sent again.

Procedure:

● At time 𝑡1, station A has executed its persistence procedure and starts sending the bits of its frame.

● At time 𝑡2, station C has not yet sensed the first bit sent by A. Station C executes its persistence procedure and starts sending the bits in its frame, which propagate both to the left and to the right.

● The collision occurs sometime after time 𝑡2' Station C detects a collision at time 𝑡3 when it receives the first bit of A's frame. Station C immediately aborts transmission.

● Station A detects collision at time 𝑡4 when it receives the first bit of C's frame; it also immediately aborts transmission.

● Looking at the figure, we see that A transmits for the duration 𝑡4 - 𝑡1; C transmits for the duration 𝑡3 - 𝑡2' Later we show that, for the protocol to work, the length of any frame divided by the bit rate in this protocol must be more than either of these durations. At time 𝑡4, the transmission of A’s frame, though incomplete, is aborted at time 𝑡3, the transmission of B's frame, though incomplete, is aborted. The minimum frame size is related to the distance which the network spans, the type of media being used and the number of repeaters which the signal may have to pass

Page 17: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

through to reach the furthest part of the LAN. Together these define a value known as the Ethernet Slot Time, corresponding to 512-bit times at 10 Mbps.

Difference between ALOHA and CSMA/CD:

● The first difference is the addition of the persistence process. We need to sense the channel before we start sending the frame by using one of the persistence processes we discussed previously (non-persistent, I-persistent, or p-persistent).

● The second difference is the frame transmission. In ALOHA, we first transmit the entire frame and then wait for an acknowledgment. In CSMA/CD, transmission and collision detection is a continuous process. We constantly monitor in order to detect one of two conditions: either transmission is finished or a collision is detected. Either event stops the transmission.

Energy Level: The level of energy in a channel can have three values: zero, normal, and abnormal. At the zero level, the channel is idle. At the normal level, a station has successfully captured the channel and is sending its frame. At the abnormal level, there is a collision and the level of the energy is twice the normal level. A station that has a frame to send or is sending a frame needs to

Page 18: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

monitor the energy level to determine if the channel is idle, busy, or in collision mode.

Throughput of CSMA/CD is greater than that of pure or slotted ALOHA. The maximum throughput occurs at a different value of G and is based on the persistence method and the value of p in the p-persistent approach. For 1-persistent method the maximum throughput is around 50 percent when G =1. For nonpersistent method, the maximum throughput can go up to 90 percent when G is between 3 and 8.

Example: A network using CSMA/CD has a bandwidth of 10 Mbps. If the maximum propagation time (including the delays in the devices and ignoring the time needed to send a jamming signal, as we see later) is 25.611S, what is the minimum size of the frame?

Solution: The frame transmission time is 𝑇𝑓𝑟 = 2 x 𝑇𝑝 =51.2 µs. This means, in the worst case, a station needs to transmit for a period of 51.2 µs to detect the collision. The minimum size of the frame is 10 Mbps × 51.2 µs = 512 bits or 64 bytes. This is actually the minimum size of the frame for Standard Ethernet.

CSMA/CA: Carrier Sense Multiple Access with Collision Avoidance

CSMA/CA is that a station needs to be able to receive while transmitting to detect a collision. When there is a collision, the station receives two signals: its own signal and the signal transmitted by second station.

In a wired network, the received signal has almost the same energy as the sent signal this means that in a collision, the detected energy almost doubles.

In a wireless network, much of the sent energy is lost in transmission. The received signal has very little energy. Therefore, a collision may add only 5 to 10 percent additional energy. This is not useful for effective collision detection.

Page 19: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

CSMA/CA was invented to avoid collisions on wireless networks. Collisions are avoided through the use of CSMAICA's three strategies: the interframe space, the contention window, and acknowledgments.

Interframe Space (IFS): First, collisions are avoided by deferring transmission even if the channel is found idle. When an idle channel is found, the station does not send immediately. It waits for a period of time called the interframe space or IFS. Even though the channel may appear idle when it is sensed, a distant station may have already started transmitting.

Contention Window: The contention window is an amount of time divided into slots. A station that is ready to send chooses a random number of slots as its wait time. The number of slots in the window changes according to the binary exponential backoff strategy.

Acknowledgment: With all these precautions, there still may be a collision resulting in destroyed data. In addition, the data may be corrupted during the transmission. The positive acknowledgment and the time-out timer can help guarantee that the receiver has received the frame.

Procedure:

Page 20: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

Compared to CSMA, CSMA/CA defines more precisely when a device is allowed to send a frame. First, CSMA/CA defines two delays : DIFS and EIFS. To send a frame, a device must first wait until the channel has been idle for at least the Distributed Coordination Function Inter Frame Space (DIFS) if the previous frame was received correctly. However, if the previously received frame was corrupted, this indicates that there are collisions and the device must sense the channel idle for at least the Extended Interframe Space (EIFS), with SIFS < DIFS < EIFS. The exact values for SIFS, DIFS and EIFS depend on the underlying physical layer.

The figure below shows the basic operation of CSMA/CA devices. Before transmitting, host A verifies that the channel is empty for a long enough period. Then, its sends its data frame. After checking the validity of the received frame, the recipient sends an acknowledgement frame after a short SIFS delay. Host C, which does not participate in the frame exchange, senses the channel to be busy at the beginning of the data frame. Host C can use this information to determine how long the channel will be busy for. Note that as SIFS < DIFS < EIFS, even a device that would start to sense the channel immediately after the last bit of the data frame could not decide to transmit its own frame during the transmission of the acknowledgement frame.

Page 21: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

CSMA/CA and Wireless Networks: CSMA/CA was mostly intended for use in wireless networks. However, it is not sophisticated enough to handle some particular issues related to wireless networks, such as hidden terminals or exposed terminals

8. Explain Flow Control with the help of the following protocols. a) Stop and Wait. b) Automatic Repeat reQuest (ARQ).

Ans:

• In this method of flow control, the sender sends a single frame to receiver & waits for an acknowledgment.

• The next frame is sent by sender only when acknowledgment of previous frame is received.

• This process of sending a frame & waiting for an acknowledgment continues as long as the sender has data to send.

• To end up the transmission sender transmits end of transmission (EOT) frame.

• The main advantage of stop & wait protocols is its accuracy. Next frame is transmitted only when the first frame is acknowledged. So there is no chance of frame being lost.

Page 22: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

• The main disadvantage of this method is that it is inefficient. It makes the transmission process slow. In this method single frame travels from source to destination and single acknowledgment travels from destination to source. As a result each frame sent and received uses the entire time needed to traverse the link. Moreover, if two devices are distance apart, a lot of time is wasted waiting for ACKs that leads to increase in total transmission time.

9. Describe and distinguish between FDMA and CDMA.

Ans:

FDMA: In frequency-division multiple access (FDMA), the available bandwidth is divided into frequency bands. Each station is allocated a band to send its data. In other words, each band is reserved for a specific station, and it belongs to the station all the time. Each station also uses a band-pass filter to confine the transmitter frequencies. To prevent station interference, the allocated bands are separated from one another by small guard bands. Figure below shows the idea of FDMA:

Page 23: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

CDMA: CDMA is a form of multiplexing, which allows numerous signals to occupy a single transmission channel, optimizing the use of available bandwidth. The technology is used in ultra-high-frequency (UHF) cellular telephone systems in the 800-MHz and 1.9-GHz bands. In CDMA entire bandwidth is being used by users all the time and each have their unique codes to recover the data. The system works based on spread spectrum concept. Figure below shows the idea of Communication with code:

Differences between CDMA and FDMA:

Page 24: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

CDMA

- Same frequency is used by every user and simultaneous transmission occurs- Every narrow band signal is multiplied by wide-band spreading signal, usually known as code word- Every user has a separate pseudo-code word, i.e. orthogonal to others- Only the desired code word is detected by the receivers and others appear as noise- It is mandatory for the receivers to know about the transmitter’s code word

FDMA

- When the channel is not in use, it sits simply idle- Bandwidth of Channel is relatively narrow (30 KHz), known as narrowband system- Little or no equalization is needed for spreading symbol time- Analog links are suitable for FDMA- Framing or synchronization bits are not needed for continuous transmission- Tight filtering is needed to minimize interference- Combined with FDD for duplexing

Page 25: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

2 markers

1. Define TDMA.(2M)

Ans:

Time-division multiple access (TDMA) is a channel access method for shared-medium networks. It allows several users to share the same frequency channel by dividing the signal into different time slots. The users transmit in rapid succession, one after the other, each using its own time slot.

2. List different types of Error Detection Schemes.

Ans:

Detection methods

VRC(Vertical Redundancy Check) LRC(Longitudinal Redundancy Check) CRC(Cyclical redundancy Check) Checksum

VRC(Vertical Redundancy Check): A parity bit is added to every data unit so that the total number of

1s(including the parity bit) becomes even for even-parity check or odd for odd-parity check

Page 26: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

VRC can detect all single-bit errors. It can detect multiple-bit or burst errors only the total number of errors is odd.

LRC(Longitudinal Redundancy Check): Parity bits of all the positions are assembled into a new data unit, which

is added to the end of the data block A cyclic redundancy check (CRC) :

It is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents.

Checksum is used by the higher layer protocols And is based on the concept of redundancy(VRC, LRC, CRC …. Hamming

code) In checksum error detection scheme, the data is divided into k segments

each of m bits.

3. Define Piggy backing.Ans:

A technique called piggybacking is used to improve the efficiency of the bidirectional protocols. When a frame is carrying data from A to B, it can also carry control information about arrived (or lost) frames from B; when a frame is carrying data from B to A, it can also carry control information about the arrived (or lost) frames from A.

4. Give an example for burst error.Ans:

Page 27: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

The term burst error means that 2 or more bits in the unit have changed from 1 to 0 or from 0 to 1. Example, 1010011100110101 was sent, but 1010001110100101 was received. Note that burst error does not necessarily mean that the error occurs in consecutive bits. The length of the burst is measured from the first corrupted bit to the last corrupted bit. Some bits in between may not have been corrupted.

The length of burst error is measured from first changed bit to last changed bit. Although some bits are unchanged in between. Burst error is most likely to occur in a serial transmission. The noise occurring for a longer duration affects multiple bits. The number of bits affected depends on the data rate & duration of noise. For e.g. if data rate is 1 kbps, a noise of 1/100 second can affect 10 bits.

5. What is a burst error?Ans:

In telecommunication, a burst error or error burst is a contiguous sequence of symbols, received over a communication channel, such that the first and last symbols are in error and there exists no contiguous subsequence of m correctly received symbols within the error burst. The integer parameter m is referred to as the guard band of the error burst. The last symbol in a burst and the first symbol in the following burst are accordingly separated by mcorrect bits or more. The parameter m should be specified when describing an error burst.

Page 28: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

6. What is CRC?

Ans:

A cyclic redundancy check (CRC) is an error-detecting code commonly used in digital networks and storage devices to detect accidental changes to raw data. Blocks of data entering these systems get a short check value attached, based on the remainder of a polynomial division of their contents. On retrieval, the calculation is repeated and, in the event the check values do not match, corrective action can be taken against data corruption. CRCs can be used for error correction

CRCs are so called because the check (data verification) value is a redundancy (it expands the message without adding information) and the algorithm is based on cyclic codes. CRCs are popular because they are simple to implement in binary hardware, easy to analyze mathematically, and particularly good at detecting common errors caused by noise in transmission channels. Because the check value has a fixed length, the function that generates it is occasionally used as a hash function.

The CRC was invented by W. Wesley Peterson in 1961; the 32-bit CRC function, used in Ethernet and many other standards, is the work of several researchers and was published in 1975.

7. What is CRC?

Ans:

Cyclic codes are special linear block codes with one extra property. In a cyclic code, if a codeword is cyclically shifted (rotated), the result is another

Page 29: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

codeword. A category of cyclic codes called the cyclic redundancy check (CRC) is used in networks such as LANs and WANs. CRC is based on binary division. In CRC, a sequence of redundant bits, called cyclic redundancy check bits, are appended to the end of data unit so that the resulting data unit becomes exactly divisible by a second, predetermined binary number.

8. What is a single bit error?Ans:

As name suggest single-bit errors occur when a single bit gets changed during transmission of data due to interference in network communication. Single-bit errors are least likely type of error because their duration or noise is normally longer than duration of 1 bit.

9. What is stop and wait ARQ?

Ans:

Stop and Wait transmission is the simplest reliability technique and is adequate for a very simple communications protocol. A stop and wait protocol transmits a Protocol Data Unit (PDU) of information and then waits for a response. The receiver receives each PDU and sends an Acknowledgment (ACK) PDU if a data PDU is received correctly, and a Negative Acknowledgment (NACK) PDU if the data was not received. In

Page 30: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

practice, the receiver may not be able to reliably identify whether a PDU has been received, and the transmitter will usually also need to implement a timer to recover from the condition where the receiver does not respond.

` 6 Markers

10.Write a short note on Selective Repeat ARQ. Explain all the cases of packet loss. How does Selective Repeat ARQ react to packet loss.

Page 31: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

Selective Repeat is part of the automatic repeat-request (ARQ). With selective repeat, the sender sends a number of frames specified by a window size even without the need to wait for individual ACK from the receiver as in Go-Back-N ARQ. The receiver may selectively reject a single frame, which may be retransmitted alone; this contrasts with other forms of ARQ, which must send every frame from that point again. The receiver accepts out-of-order frames and buffers them. The sender individually retransmits frames that have timed out.

Packet loss is the failure of one or more transmitted packets to arrive at their destination. This event can cause noticeable effects in all types of digital communications.

The cases of packet loss:

In data, packet loss produces errors.

In videoconference environments it can create jitter.

In pure audio communications, such as VoIP, it can cause jitter and frequent gaps in received speech.

In the worst cases, packet loss can cause severe mutilation of received data, broken-up images, unintelligible speech or even the complete absence of a received signal.

Selective repeat ARQ reaction to packet loss: Selective Repeat attempts to retransmit only those packets that are actually lost (due to errors) : Receiver must be able to accept packets out of order. Since receiver must release packets to higher layer in order, the receiver must be able to buffer some packets.

11.What is go back n automatic repeat request?Go-Back-N ARQ is a specific instance of the automatic repeat request (ARQ) protocol, in which the sending process continues to send a number of frames specified by a window size even without receiving an acknowledgement (ACK) packet from the receiver. It is a special case of the general sliding window protocol with the transmit window size of N and receive window size of 1. It can transmit N frames to the peer before requiring an ACK.

12.Distinguish between multilevel TDM, multiple-slot TDM, and pulse-stuffed TDM

They are all techniques used to handle a disparity/inequality in the i/p lines data rates.

1-Multilevel TDM.

it's used when the i/p lines data rates are multiple of each other.

for example if u have two i/p lines with data rate of 100kbps each

and another (third) i/p line with data rate of 200kbps

we multiplex the 1st two together (100k + 100k) to produce a data rate of 200kbps

2-Multislot TDM.

Page 32: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

it's used to give a single i/p line two slots in the o/p frame, to do this we use a serial to parallel converter

for example if u have one i/p line with data rate of 200kbps

and another (second) i/p line with data rate of 100kbps

we apply serial to parallel converter on the 1st one to change into two i/p lines with data rate of 100kbps each

3-Pulse-Stuffed TDM

it's used when the i/p lines data rates are NOT multiple integers of each other

we make the i/p line with largest data rate the dominant one and add dummy bits to the other i/p lines data rates to be equal to it

for example if u have one i/p line with data rate of 100kbps

and another (second) i/p line with data rate of 99kbps

we make the 1st one the dominant one and add 1kbps of dummy bits to the second one (99k + 1k) to be equal the first one

13.Compare and contrast Slotted Aloha and Pure Aloha. (6M)

Ans:

Page 33: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

14.Explain the protocol of Go-Back-N ARQ. Explain all the cases of packet loss. How does Go-Back-N react in each case?

Ans:

In a noisy link a frame has a higher probability of damage, which means the resending of multiple frames. This resending uses up the bandwidth and slows down the transmission. For noisy links, there is another mechanism that does not resend N frames when just one frame is damaged; only the damaged frame is re-sent. This mechanism is called Selective Repeat ARQ.

CASES OF PACKET LOSS :

Page 34: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

• When a frame is lost in transmission o When sender is transmitting data, one or more frames can be dropped due to hindrances in the network. This may lead to loss of information in the receiver end. The sender window has an individual timer for each frame which resends the frame if acknowledgement is not received until the time out. The frame is re-sent after the rest of the frames in current slot is transmitted.

• When an acknowledgement is lost in transmission o If due to any hindrances in the network, the acknowledgement packet is lost and not received by sender before the time-out, the sender assumes its fault and resends the frame. The frame is re-sent after the remaining frames in current slot is sent. The receiver on receiving the duplicated frame, drops it and re-sends the acknowledgement. Thus, completing entire cycle of data transmission. Selective Repeat ARQ reaction to Packet Loss

15.Explain HDLC Frame Format.

Ans:

High-Level Data Control, also known as HDLC, is a bit oriented, switched and non-switched protocol. It is a data link control protocol, and falls within layer 2, the Data Link Layer of the Open Systems Interface (OSI) model.

It has been so widely implemented because it supports both half duplex and full duplex communication lines, point to point(peer to peer) and multi-point networks, and switched or non-switched channels. The procedures outlined in HDLC are designed to permit synchronous, code-transparent data transmission. Other benefits of HDLC are that the control information is always in the same position, and specific bit patterns used for control differ dramatically from those in representing data, which reduces the chance of errors.

It has also led to many subsets. Two subsets widely in use are Synchronous Data Link Control (SDLC) and Link Access Procedure-Balanced (LAP-B).

HDLC Frame Structure: HDLC uses the term "frame" to indicate an entity of data (or a protocol data unit) transmitted from one station to another. Figure below is a graphical representation of a HDLC frame with an information field.

Page 35: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

Figure 1.HDLC frame

For any HDLC communications session, one station is designated primary and the other secondary. A session can use one of the following connection modes, which determine how the primary and secondary stations interact.

• Normal unbalanced: The secondary station responds only to the primary station.

• Asynchronous: The secondary station can initiate a message.

• Asynchronous balanced: Both stations send and receive over its part of a duplex line.

16.Describe Data Link Control.Ans:

The data link control (DLC) deals with procedures for communication between two adjacent nodes—node-to-node communication—no matter whether the link is dedicated or broadcast. Data link control functions include framing and flow and error control.

a) Framing Data transmission in the physical layer means moving bits in the form of a signal from the source to the destination. The physical layer provides bit synchronization to ensure that the sender and receiver use the same bit durations and timing. Framing in the data-link layer separates a message from one source to a destination by adding a sender address and a destination address. The destination address defines where the packet is to go; the sender address helps the recipient acknowledge the receipt.

Framing Approaches: - Character-Oriented Framing - Bit-Oriented Approach

Page 36: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

b) Error Control Error control at the data-link layer is normally very simple and implemented using one of the following two methods. In both methods, a CRC is added to the frame header by the sender and checked by the receiver.

- In the first method, if the frame is corrupted, it is silently discarded; if it is not corrupted, the packet is delivered to the network layer. This method is used mostly in wired LANs such as Ethernet.

- In the second method, if the frame is corrupted, it is silently discarded; if it is not corrupted, an acknowledgment is sent (for the purpose of both flow and error control) to the sender.

c) Flow Control Flow Control Whenever an entity produces items and another entity consumes them, there should be a balance between production and consumption rates. If the items are produced faster than they can be consumed, the consumer can be overwhelmed and may need to discard some items. If the items are produced more slowly than they can be consumed, the consumer must wait, and the system becomes less efficient. Flow control is related to the first issue. We need to prevent losing the data items at the consumer site.

10.Write a note on ALOHA

Ans:

ALOHA is a system for coordinating and arbitrating access to a shared communication Networks channel. It was developed in the 1970s by Norman Abramson and his colleagues at the University of Hawaii. The original system used for ground based radio broadcasting, but the system has been implemented in satellite communication systems.

A shared communication system like ALOHA requires a method of handling collisions that occur when two or more systems attempt to transmit on the channel at the same time. In the ALOHA system, a node transmits whenever data is available to send. If another node transmits at the same time, a collision occurs, and the frames that were transmitted are

Page 37: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

lost. However, a node can listen to broadcasts on the medium, even its own, and determine whether the frames were transmitted. 

Aloha means "Hello". Aloha is a multiple access protocol at the data link layer and proposes how multiple terminals access the medium without interference or collision. In 1972 Roberts developed a protocol that would increase the capacity of aloha two fold. The Slotted Aloha protocol involves dividing the time interval into discrete slots and each slot interval corresponds to the time period of one frame. This method requires synchronization between the sending nodes to prevent collisions.

There are two different versions of ALOHA

Pure ALOHA   • In pure ALOHA, the stations transmit frames whenever they have data to send.• When two or more stations transmit simultaneously, there is collision and the frames are destroyed.• In pure ALOHA, whenever any station transmits a frame, it expects the acknowledgement from the receiver.• If acknowledgement is not received within specified time, the station assumes that the frame (or acknowledgement) has been destroyed.

• If the frame is destroyed because of collision the station waits for a random amount of time and sends it again. This waiting time must be random otherwise same frames will collide again and again.

• Therefore pure ALOHA dictates that when time-out period passes, each station must wait for a random amount of time before resending its frame. This randomness will help avoid more collisions

Slotted ALOHA• Slotted ALOHA was invented to improve the efficiency of pure ALOHA as chances of collision in pure ALOHA are very high.

Page 38: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

• In slotted ALOHA, the time of the shared channel is divided into discrete intervals called slots.• The stations can send a frame only at the beginning of the slot and only one frame is sent in each slot.

• In slotted ALOHA, if any station is not able to place the frame onto the channel at the beginning of the slot i.e. it misses the time slot then the station has to wait until the beginning of the next time slot.

11.How is checksum error detection works? Explain with examples

Ans:

Checksum

In checksum error detection scheme, the data is divided into k segments each of m bits.

In the sender’s end the segments are added using 1’s complement arithmetic to get the sum. The sum is complemented to get the checksum.

The checksum segment is sent along with the data segments.

At the receiver’s end, all received segments are added using 1’s complement arithmetic to get the sum. The sum is complemented.

If the result is zero, the received data is accepted; otherwise discarded.

Page 39: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

12.Explain two-dimensional parity check with example.

Ans:

Performance can be improved by using two-dimensional parity check, which organizes the block of bits in the form of a table. Parity check bits are calculated for each row, which is equivalent to a simple parity check bit. Parity check bits are also calculated for all columns then both are sent along with the data. At the receiving end these are compared with the parity bits calculated on the received data.

Performance: Two- dimensional parity checking increases the likelihood of detecting burst errors. A 2-D Parity check of n bits can detect a burst error of n bits.

Disadvantage:

There is, however, one pattern of error that remains elusive. If two bits in one data unit are damaged and two bits in exactly same position in another data unit are also damaged, the 2-D Parity check checker will not detect an error. For example, if two data units: 11001100 and 10101100. If first and second from last bits in each of them is changed, making the data units as 01001110 and 00101110, the error cannot be detected by 2-D Parity check.

Page 40: Pure ALOHA - bhg2.files.wordpress.com  · Web viewis allowed to use the channel at a given time. The primary device, therefore, is always the initiator of a session. Consider the

13.What is Hamming distance? Explain with example. How does that relate to error detection?

Ans:

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 is the number of differences between the corresponding bits. We show the Hamming distance between two words x and y as d(x, y). A major application is in coding theory, more specifically to block codes, in which the equal-length strings are vectors over a finite field.

The idea of the Hamming distance is one of the central concepts in coding for error control. Hamming distance is important for error detection. The reason is that the Hamming distance between the received code-word and the sent code-word is the number of bits that are corrupted during transmission. For example, if the code-word 00000 is sent and 01101 is received, 3 bits are in error and the Hamming distance between the two is d(00000, 01101) = 3. In other words, if the Hamming distance between the sent and the received code-word is not zero, the code-word has been corrupted during transmission. The Hamming distance can easily be found if we apply the XOR operation (?) on the two words and count the number of 1s in the result. It should be noted that the Hamming distance is a value greater than or equal to zero.

Example:

Let us find the Hamming distance between two pairs of words. The Hamming distance d(000, 011) is 2 because (000 ? 011) is 011 (two 1s).