assignment 1 - solution

advertisement
EKT332 COMPUTER NETWORK
ASSIGNMENT 1 – SOLUTION
1. Explain the services provided by the data link layer to the network layer.
Encapsulation of network layer data packets into frames. Provides transmission of data from
the source network layer to destination network layer. This can be accomplished in 3 ways:



Unacknowledged connectionless service.
Acknowledged connectionless service.
Connection oriented service.
Unacknowledged connectionless service consists of having the source machine send
independent frames to the destination machine without having the destination machine
acknowledge them. This is used where there is a very low chance of transmission errors.
In Acknowledged connectionless service the source machine send the frames independently to
the destination machine, but with acknowledgement to each and every frame from the
destination machine.
In connection oriented service a connection is established between the source and the
destination until all the data is transferred.
2.
Compare framing methods (char stuffing, byte stuffing and bit stuffing) in terms of their
advantages and disadvantages.
FRAMING
METHODS
Character Stuffing
ADVANTAGES
- Easy detection of start/end of a - Only works for 8-bit character
frame (receiver only detects
codes. (does not
support
character pairs:- DLE STX and DLE
UNICODE which uses 16 bit
ETX for start/end of a frame).
characters)
-
Byte Stuffing
DISADVANTAGES
No extra bandwidth required.
- Easy detection of start/end of a - Size of frame varies unpredictably
frame, using the same 0x7E flag to
due to byte insertion
indicate start/end of a frame.
- Malicious users can inflate
- Allows transmission of arbitrary
bandwidth by inserting 7D & 7E
data without confusion (using
Control Escape 0x7D).
Bit Stuffing
- Locating the start/end of a frame - Insertion of additional bits into
is easy, even when frames are
the
data stream, wasting
damaged. The receiver simply
bandwidth.
scans arriving data for the reserved
patterns.
- Quick resynchronize between
sender and receiver as to where
frames begin and end, even when
bits in the frame get garbled.
- Allows data frames to contain an
arbitrary number of bits and allows
character codes of arbitrary
number of bits per character.
3.
Explain the differences between PPP and HDLC.
HDLC can support various data transfer modes, supports multipoint links and point to point
links, and can implement error control and flow control mechanisms. PPP uses HDLC-like frames
but does not use error control and flow control protocols. Instead PPP supports powerful link
and network control protocols.
PPP is character based and can be implemented on any physical layer, HDLC is bit based and can
be implemented only on bit synchronous physical layer.
4.
A 1.5 Mbps communications link uses HDLC to transmit information to the moon. What is the
smallest possible frame size that allows continuous transmission? The distance between earth
and the moon is approximately 375,000 km, and the speed of light is 3 x 108 m/s.
For continuous transmission: use Go-Back-N or Selective Repeat ARQ
Go-Back-N
Selective Repeat
Maximum Send Window Size
in Default HDLC Frame
7
4
Maximum Send Window Size in
Extended HDLC Frame
127
64
The round trip propagation delay is:
2tprop = 2(375 x 106 m) = 2.50 s
3 x 108 m/s
Go-Back-N:
If N = 7 :
7nf____
1.5 Mbps
If N = 127:
= 2.5 s → nf = 535,715 bits
127nf____ = 2.5 s → nf = 29,528 bits
1.5 Mbps
Selective Repeat:
If N = 4
:
4nf____ = 2.5 s → nf = 973,500 bits
1.5 Mbps
If N = 64 : 64nf____ = 2.5 s → nf = 58,594 bits
1.5 Mbps
Download