Download presentation
Presentation is loading. Please wait.
Published byJoanna Sherman Modified over 9 years ago
1
ELEC6113: Wireless and Mobile Networks Session 5: Data Link Protocols. Local Area Networks – Case Study Ethernet (I).
2
At the end of this session you will be able to… … compare and evaluate the basic operation of several data link protocols under a given scenario … calculate the overall efficiency of a link … demonstrate knowledge and understanding of problems related to the use of a communication channel in broadcast networks (in particular, LANs) … demonstrate knowledge and understanding of protocols devised to address such problems
3
For “STOP-AND-WAIT” scheme, a one-bit sequence number is enough for FRAME and ACK Tx sends: FRAME '0' until ACK '1' is received, then FRAME '1' until ACK '0' is received, and so on What does Rx do? Note the convention: the ACK number gives the NEXT frame to send Review from last week pp 206-211 (T.4e) pp 241-246 (T.5e)
4
Stop-and-Wait Tx Rx time TIMEOUT TxRx time ACK 1 Note the convention: the ACK number gives the NEXT frame to send TxRx time TIMEOUT FRAME 0 FRAME 1 FRAME 0 ACK 0 FRAME 0
5
How long should the timeout be? TxRx time TIMEOUT TxRx time TIMEOUT ACK 1 FRAME 0 Too short – inefficient as frames are unnecessarily retransmitted Too long – inefficient when frame lost TIMEOUT
6
What now? This scheme can be improved in various ways. Several frames could be sent simultaneously but then there is more overhead in the control.
7
Talking point Before looking at improvements, first consider the overall efficiency of a link. Assume that a 2Mbps link connects A and B, which are 200 km apart (approximately 124 miles). What is the time to transmit a short frame? A B 2 Mbps link 200 Km
8
(Hint) The speed of the signal in the link is about 200x10 6 m/s (NOT ‘c’, the speed of light, 300 Km/s - in a wire or cable we only achieve around 60% to 80% of ‘c’) What is the time to transmit a short frame?
9
Overall efficiency of a link The speed of the signal in the link is about 200x106 m/s (NOT ‘c’, the speed of light - in a wire or cable we only achieve around 60% to 80% of ‘c’) Hence the time to transmit a ‘short frame’ is
10
Overall efficiency of a link The RTT (Round Trip Time) is thus 2ms (as acknowledgment needs to return and we consider the processing time negligible). Assume a ‘short’ frame of around 200 bits (approximately a 20 byte payload) What is the maximum transfer rate?
11
Overall efficiency of a link The transfer rate actually achieved before the ACK returns to the Tx is Only 5% of the capacity of the 2Mbps link! This can improve with larger frame size, but gets worse with longer distances, faster links, or delays on route.
12
Latency When calculating the overall efficiency of a link, note the fundamental problem of latency (the efficiency can deteriorate with longer distances, faster links, and any delays on route). This is a fundamental problem.
13
Where were we? Recommended reading: ch 7 of Stallings, W. (2009) Data and Computer Communications. 8th ed. (TK5105.5 STA), especially pp 208-221 TIMEOUT TxRx time ACK 1 Tx Rx time TIMEOUT FRAME 0 FRAME 1 FRAME 0 ACK 0 FRAME 0 TxRx time Stop-and-wait protocol ACK 1
14
Talking point How do we improve STOP-AND-WAIT?
15
Talking point: Improving Stop-and-Wait Instead of waiting for the ACK to arrive before transmitting the next FRAME, we can allow multiple frames to be outstanding (“pipelining” – effectively these transmissions are in parallel). But what do we do on errors? Compare Go-back-N ARQ and Selective-Reject ARQ
16
Sliding Windows (I) Allow multiple outstanding frames: sequence number assigned to each frame (sent in the header) e.g. a 3-bit field allows up to 7 “unacknowledged” frames to be in transit (2 n -1). This is Go-back-N ARQ (Automatic Repeat Request). Any failure to acknowledge a frame requires the retransmission of that frame and all subsequent frames (receiver discards any frames received that are not in strict sequence). pp 211 onwards (T.4e) pp 246 onwards (T.5e)
17
Sliding Windows (II) Another alternative is Selective-Reject ARQ (sometimes called “selective-repeat”), where only lost frames are retransmitted. Harder to implement and only 2 n-1 frames can be allowed to be in transit at any time (e.g. 3-bit field allows for 4 frames in transit). Note the possibility of piggybacking ACK and Frame when bi-directional data is being sent. pp 211 onwards (T.4e) pp 246 onwards (T.5e)
18
Sliding Windows (III) Sliding Windows algorithms ensure reliable delivery over an unreliable link. Also provide mechanisms for flow control, essentially feedback mechanisms that enable the receiver to “slow down” a fast transmitter pp 211 onwards (T.4e) pp 246 onwards (T.5e)
19
LAN Case Study – Ethernet LAN = ‘Local Area Network’, a computer network designed to work at the local level (a building or group of buildings) rather than a Wide Area Network which works over an entire region. Original Xerox Parc system developed into a standard by Xerox/Digital/Intel around 1979 – at the time, just one of many alternative LAN systems, all around 10 Mbit/sec Very slow initial uptake, but after a number of changes to the design gradually became a market leader and then the market leader. As a result of this success, faster versions have been developed (100Mbit/sec, 1Gbit/sec and 10Gbit/sec). Recommended reading: Tanenbaum & Wetherall 5th ed. pp 298-300
20
CSMA/CD Ethernet is an example of a CSMA/CD system (Carrier Sense Multiple Access, Collision Detect). It was designed around the concept of a single (shared) data cable: only one system can use the channel (i.e. data cable) at any instant. (Image taken from http://www.louiewong.com/archives/172 )
21
CSMA/CD The basic algorithm is exactly the same as a group of people holding a conversation: listen to see if the channel is busy, if it is, wait until it is free when the channel is free, transmit but continue to listen to detect a collision. If there is a collision, stop transmitting immediately and wait (discussed later) before trying again.
22
Ethernet Frame Format Recommended reading: Tanenbaum & Wetherall 5th ed. pp 300-302
23
Ethernet Frame Format - Preamble The function of the preamble (8 bytes of 0xCC) is to synchronize the Rx clock with the Tx clock (Manchester encoding is used).
24
Ethernet Frame Format – Addresses (I) The ‘addresses’ are needed as a LAN is not a point-to-point data link. There will be a number of nodes in the network, so it is essential to identify the node that a message is being transmitted to.
25
Ethernet Frame Format – Addresses (II) Ethernet addresses are built into the hardware at the manufacturing stage. Sometimes known as ‘MAC’ (=Media Access Control) addresses. The format is 12 hexadecimal characters, MM:MM:MM:SS:SS:SS where MM:MM:MM is the manufacturer ID and SS:SS:SS is the board serial number).
26
Ethernet Frame Format – Addresses (III) There is a special broadcast address, hexadecimal FF:FF:FF:FF:FF:FF (i.e. all 1's), a transmission to this address will be received by every node in the network.
27
Ethernet Frame Format – Type/Length The ‘Type’ field originally defined the protocol in use, but when Ethernet was standardized by the IEEE (resulting in the IEEE 802.3 standard) this became the ‘length’ field.
28
Ethernet Frame Format – Data The ‘Data’ field has a minimum and maximum length. The max length is ~1500 bytes. ( The minimum data size requirement will be discussed later) – for now just note that if the data being sent is less than 46 bytes, it will have to be ‘padded out’ to this size with extra bytes.
29
Ethernet Frame Format – CRC The ‘CRC’ field is designed to provide confidence that the data has not been corrupted. The 32 bit size provides much more confidence than the 16 bit CRCC used in HDLC as discussed in previous sessions.
30
Talking point Why is there a Minimum Frame Size requirement in Ethernet?
31
Minimum Frame Size requirement (I) This is necessary to guarantee detection of collisions. Assume two nodes, A & B, separated by a distance D. Node A decides to transit a frame, and after a time t this frame has ‘almost’ reached node B. At this point node B decides to transmit a frame: it has been monitoring the Ethernet cable and knows that no oother node is transmitting.
32
Minimum Frame Size requirement (II) However, as soon as transmission starts there is a collision with the frame from node A which has just reached node B. B will detect this immediately and cease transmission. In contrast, node A must now wait for the collision to reach it – which will take another time t (i.e. the RTT is 2t). Once the collision reaches node A, it knows that its frame has been corrupted and it aborts transmission.
33
Minimum Frame Size requirement (III) If a ‘too short’ frame was to be transmitted, there is a danger that node A could have completed the transmission before the collision returned. If this were to happen, node A would mistakenly assume that the transmission had been successful even though it was corrupted by the frame from node B.
34
At the end of this session you should be able to… … compare and evaluate the basic operation of several data link protocols under a given scenario … calculate the overall efficiency of a link … demonstrate knowledge and understanding of problems related to the use of a communication channel in broadcast networks (in particular, LANs) … demonstrate knowledge and understanding of protocols devised to address such problems.
35
For tomorrow CSMA/CD efficiency Ethernet Retransmission algorithm Ethernet Switches
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.