Professional Documents
Culture Documents
ECE_486
Mid-term I
1. What are the main reasons for using layered protocols? Give the name and also briefly
describe the functions for each of the seven layers for ISO/OSI model.
Changes to one layer have no effect on the layers above and below it. Designers can
concentrate on each layer separately with layered protocols.
It takes something complex and breaks it down into smaller, more manageable chunks.
1. Physical Layer – This layer is responsible for sending computer bits from one device to
another along the network.
2. Data-Link Layer – This layer handles problems that occur as a result of bit transmission
errors.
3. Network Layer – The primary function of the network layer is to move data into and through
other networks.
4. Transport Layer - The transport layer is responsible for transferring data across a network and
provides error-checking mechanisms and data flow controls.
5. Session Layer – The session layer sets up, coordinates and terminates conversations between
applications.
6. Presentation Layer- The presentation layer translates or formats data for the application layer.
7. Application Layer – The application layer enables the user -- human or software -- to interact
with the application or network.
2. What is the main difference between TCP and UDP? In which website can you find the
standards of TCP and UDP?
TCP:
TCP provides error checking support and also guarantees delivery of data to the
destination.
UDP:
UDP does provided only basic error checking support using checksum so the delivery of
data to the destination cannot be guaranteed in UDP.
TCP and UDP can be found in http://www.ietf.org. RFC index for TCP is 793and RFC
index for UDP is 768.
3. State the Nyquist’s theorem for maximum data rate of a channel, and Shannon’s result for
maximum data rate of a channel.
A B ESC FLAG ESC ESC C ESC ESC ESC ESC ESC FLAG D
b. A bit string, 0111101111101111110, needs to be transmitted at the data link layer. What is the
string actually transmitted after bit stuffing?
011110111110011111010
5. An 8-bit byte with binary value 10101111 is to be encoded using an even-parity Hamming
code. What is the binary value after encoding?
Check bits are inserted at positions that are powers of 2 i.e. 1,2,4,8,16,32,e.t.c. Data bits are at
positions 3,5,6,7,9,10,11,12 e.t.c. So after inserting check bits our data should look like this:
??1?010?11 1 1
Positions 1 2 3 4 5 6 7 8 9 10 11 12
3 = 1+2
5 = 1+4
6 = 2+4
7 = 1+2+4
9 = 1+8
10 = 2+8
11 = 1+2+8
12 = 4+8
Hence for the check bit 1 we look at bits 3,5,7,9,11 and get value 1.
For check bit 2 we look at bits 3,6,7,10,11 and get value 0.
For check bit at position 4 we look at bits 5,6,7,12 and get value 0.
For check bit at position 8 we look at bits 9,10,11,12 and get value 0.
6. Use CRC with general polynomial x3 + x + 1 to encode the value: 10101111. Show the
procedure and the final encoded message.
CRC is 010
7. A channel has a bit rate of 8 kbps and a (one-way) propagation delay of 20 msec. If stop-
and-wait protocol is used, what is the range of frame sizes that can provide more than 50%
efficiency?
Data rate =8Kbps = 8000 bps, propagation delay = 20ms = 0.02, Frame size =1
Line efficiency =
L> bR
L> (8000x0.02x2)
b. Briefly describe Pure ALOHA, Slotted ALOHA, Nonpersistent, 1-persistent, and p-persistent
CSMA protocols. (Up to two sentences each.)
Pure ALOHA:
Pure aloha is used when data is available for sending over a channel at stations. In pure
Aloha, when each station transmits data to a channel without checking whether the channel is
idle or not, the chances of collision may occur, and the data frame can be lost.
Slotted ALOHA:
The shared channel is divided into a fixed time interval called slots. So that, if a station
wants to send a frame to a shared channel, the frame can only be sent at the beginning of the slot,
and only one frame is allowed to be sent to each slot.
Non-presistent CSMA:
When a frame is ready, the transmitting station checks whether the channel is idle or
busy. If the channel is idle then it transmits the frame immediately.
1-presistent CSMA:
When a frame is ready, the transmitting station checks whether the channel is idle or
busy. If the channel is busy, the station waits and continually checks until the channel becomes
idle. If the channel is idle then it transmits the frame immediately, with a probability 1.
p-persistent CSMA:
When a frame is ready, the transmitting station checks whether the channel is idle or
busy. If the channel is idle then it transmits the frame immediately. If the channel is busy, the
station waits and continually checks until the channel becomes idle.
9. Assuming basic bit-map protocol is applied schedule 4 stations (0,1,2,3) in the medium access
layer. Based on the given information, fill in the control bits in the contention slots, and the
stations in the transmission slots.
1 0 1 0 0 2 1 1 1 0 1 3
10. (a) Name the IEEE 802.2, 802.3, and 802.11 protocols?
(b) Draw a figure to show the relationship between the protocol stacks of MAC, Data Link
Layer, Physical Layer, and Network Layer.