48
Network Operations & administration CS 4592 Lecture 16 Instructor: Ibrahim Tariq

Network Operations & administration CS 4592 Lecture 16

  • Upload
    aldon

  • View
    40

  • Download
    0

Embed Size (px)

DESCRIPTION

Network Operations & administration CS 4592 Lecture 16. Instructor: Ibrahim Tariq. Data Link Layer. Protocols (Contd.). Stop-and-Wait ARQ. Note. In Stop-and-Wait ARQ, we use sequence numbers to number the frames. The sequence numbers are based on modulo-2 arithmetic .(01010101). - PowerPoint PPT Presentation

Citation preview

Page 1: Network Operations & administration  CS 4592 Lecture  16

Network Operations & administration CS 4592

Lecture 16

Instructor: Ibrahim Tariq

Page 2: Network Operations & administration  CS 4592 Lecture  16

Data Link Layer

Page 3: Network Operations & administration  CS 4592 Lecture  16

3

Protocols (Contd.)

Page 4: Network Operations & administration  CS 4592 Lecture  16

Stop-and-Wait ARQ

Page 5: Network Operations & administration  CS 4592 Lecture  16

11.5

In Stop-and-Wait ARQ, we use sequence numbers to number the frames.

The sequence numbers are based on modulo-2 arithmetic.(01010101)

Note

Page 6: Network Operations & administration  CS 4592 Lecture  16

11.6

Flow diagram for Example 11.3

Page 7: Network Operations & administration  CS 4592 Lecture  16

7

Stop-and-Wait ARQ -Delayed ACK-

Importance of ACK numbering

Page 8: Network Operations & administration  CS 4592 Lecture  16

8

Drawbacks of Stop-and-Wait ARQ

• After each frame sent the host must wait for an ACK– inefficient use of bandwidth

• To improve efficiency ACK should be sent after multiple frames

• Alternatives: Sliding Window protocols1.Go-back-N ARQ2.Selective Repeat ARQ

Page 9: Network Operations & administration  CS 4592 Lecture  16

9

Sliding Window Protocols• Sequence numbers

– sent frames are numbered sequentially – number of frames stored in the header

• if the number of bits in the header is m than sequence number goes from 0 to 2^m-1

• Sliding window– to hold the unacknowledged

outstanding frames– the receiver window size always 1

sequence number

frame

acknowledged frames

Page 10: Network Operations & administration  CS 4592 Lecture  16

Go-Back-N ARQ

Page 11: Network Operations & administration  CS 4592 Lecture  16

11.11

The send window is an abstract concept defining an imaginary box of size 2m − 1 with three variables: Sf, Sn, and Ssize.

Note

Page 12: Network Operations & administration  CS 4592 Lecture  16

12

Go-back-N-Control variables-

• S- holds the sequence number of the recently sent frame• SF – holds sequence number of the first frame in the window• SL – holds the sequence number of the last frame• R – sequence number of the frame expected to be received

Page 13: Network Operations & administration  CS 4592 Lecture  16

11.13

The send window can slide oneor more slots when a valid acknowledgment arrives.

Note

Page 14: Network Operations & administration  CS 4592 Lecture  16

11.14

Flow diagram for Example 11.6

Page 15: Network Operations & administration  CS 4592 Lecture  16

11.15

Flow diagram for Example 11.7

Page 16: Network Operations & administration  CS 4592 Lecture  16

11.16

Figure 11.13 Receive window for Go-Back-N ARQ

Page 17: Network Operations & administration  CS 4592 Lecture  16

11.17

The receive window is an abstract concept defining an imaginary box

of size 1 with one single variable Rn. The window slides

when a correct frame has arrived; sliding occurs one slot at a time.

Note

Page 18: Network Operations & administration  CS 4592 Lecture  16

11.18

Figure 11.15 Window size for Go-Back-N ARQ

Page 19: Network Operations & administration  CS 4592 Lecture  16

11.19

Stop-and-Wait ARQ is a special case of Go-Back-N ARQ in which the size of the send window is 1.

Note

Page 20: Network Operations & administration  CS 4592 Lecture  16

20

Go-back-N• Inefficient

– all out of order received packets are discarded• This is a problem in a noisy link

– many frames must be retransmitted -> bandwidth consuming

• Solution– re-send only the damaged frames

• Selective Repeat ARQ – avoid unnecessary retransmissions

Page 21: Network Operations & administration  CS 4592 Lecture  16

Selective Repeat ARQ

Page 22: Network Operations & administration  CS 4592 Lecture  16

22

Selective Repeat ARQ• Processing at the receiver more complex• The window size is reduced to one half of 2m

• Both the transmitter and the receiver have the same window size

• Receiver expects frames within the range of the sequence numbers

Page 23: Network Operations & administration  CS 4592 Lecture  16

23

Selective Repeat ARQ-lost frame-

Note: retransmission triggered with NACK and not with expired timer

Page 24: Network Operations & administration  CS 4592 Lecture  16

24

Selective Repeat ARQ-sender window size-

Page 25: Network Operations & administration  CS 4592 Lecture  16

11.25

In the Go-Back-N Protocol, the sequence numbers are modulo 2m,

where m is the size of the sequence number field in bits.

Note

Page 26: Network Operations & administration  CS 4592 Lecture  16

11.26

Figure 11.22 Delivery of data in Selective Repeat ARQ

Page 27: Network Operations & administration  CS 4592 Lecture  16

11.27

Figure 11.23 Flow diagram for Example 11.8

Page 28: Network Operations & administration  CS 4592 Lecture  16

28

Data Link Layer

Page 29: Network Operations & administration  CS 4592 Lecture  16

29

Data Link Layer Topics to Cover

Error Detection and Correction

Data Link Control and ProtocolsMultiple Access

Local Area Networks

Wireless LANs

Page 30: Network Operations & administration  CS 4592 Lecture  16

30

Multiple access problem• Example:• Cocktail party – many people gather together in a

large room• Broadcast medium – air• Another example: a classroom• Human protocols:

– “Give everyone a chance to speak”– “Don’t speak until you are spoken to”– “Don’t monopolize the conversation”– “Raise your hand if you have a question”– “Don’t interrupt when someone is speaking”– “Don’t fall asleep when someone else is talking”

Page 31: Network Operations & administration  CS 4592 Lecture  16

31

Multiple access protocols• In LANs, WiFi, satellite networks, cocktail party• If more than 2 users send @ the same time - collision • All collided packets are lost -> waste of bandwidth

• Ideally, the MAC protocol for a broadcast channel with the bit-rate R bps should satisfy:– if only 1 node is sending than the throughput is R– when M nodes have data to send than the throughput is R/M– decentralized protocol – no master– simple & inexpensive to implement

Page 32: Network Operations & administration  CS 4592 Lecture  16

32

Taxonomy of Multiple-Access Protocols

Page 33: Network Operations & administration  CS 4592 Lecture  16

33

Random Access Protocols

• In random access or contention methods, no station is superior to another station and none is assigned the control over another. No station permits, or does not permit, another station to send. At each instance, a station that has data to send uses a procedure defined by the protocol to make a decision on whether or not to send.

Page 34: Network Operations & administration  CS 4592 Lecture  16

34

ALOHA Network• Developed by Norm Abramson at the Univ. of Hawaii

– the guy had interest in surfing and packet switching– mountainous islands → land-based network difficult to install – fully decentralized protocol

ACK

ACK ACK

ACK

Page 35: Network Operations & administration  CS 4592 Lecture  16

35

Pure Aloha• The node immediately transmits its frame completely• If the frame is collided it retransmits the frame again (after

completely transmitting its collided frame) with the probability p

Page 36: Network Operations & administration  CS 4592 Lecture  16

36

Slotted Aloha• Assumptions• all frames same size• time is divided into equal size

slots, time to transmit 1 frame• nodes start to transmit frames

only at beginning of slots• nodes are synchronized• if 2 or more nodes transmit in

slot, all nodes detect collision

Operation when node obtains fresh frame,

it transmits in next slot no collision, node can send new

frame in next slot if collision, node retransmits

frame in each subsequent slot with prob. p until success

Page 37: Network Operations & administration  CS 4592 Lecture  16

37

Frames in a Slotted ALOHA Network

Page 38: Network Operations & administration  CS 4592 Lecture  16

38

Slotted Aloha

• Pros• single active node can

continuously transmit at full rate of channel

• highly decentralized: only slots in nodes need to be in sync

• simple

Cons collisions, wasting slots idle slots nodes may be able to detect

collision in less than time to transmit packet

clock synchronization

Page 39: Network Operations & administration  CS 4592 Lecture  16

39

Multiple Access Protocols

ALOHA

Page 40: Network Operations & administration  CS 4592 Lecture  16

40

Carrier Sense Multiple Access• Invented to minimize collisions and increase the

performance• A station now “follows” the activity of other stations• Simple rules for a polite human conversation

– Listen before talking– If someone else begins talking at the same time as you, stop

talking• CSMA:

– A node should not send if another node is already sending• carrier sensing

• CD (collision detection):– A node should stop transmission if there is interference

• collision detection

Page 41: Network Operations & administration  CS 4592 Lecture  16

41

Carrier Sense Multiple Access• If everyone is sensing the medium how come that collisions

still occur?

channel propagation delay

Page 42: Network Operations & administration  CS 4592 Lecture  16

42

CSMA (cnt’d)

• Reduces the chance of collisions • reduces the efficiency

increases the chance for collisions 1-persistant

p-persistant Decreases the chance for collisions Improves efficiency

Page 43: Network Operations & administration  CS 4592 Lecture  16

43

Multiple Access Protocols

ALOHA

Page 44: Network Operations & administration  CS 4592 Lecture  16

44

Page 45: Network Operations & administration  CS 4592 Lecture  16

45

CSMA with Collision Detection (CSMA/CD)

• CSMA/CD can be in one of the three states: contention, transmission, or idle.

• Example of CSMA/CD: Ethernet• How long does it take before stations realize that there has been

a collision?

Page 46: Network Operations & administration  CS 4592 Lecture  16

46

Collision Detection• How the station detects a collision?

• There are many collision detection methods!– Most of them are analog processes.

• Examples:– detecting voltage level on the line– detecting power level– detecting simultaneous transmission & reception

Page 47: Network Operations & administration  CS 4592 Lecture  16

47

CSMA with Collision Avoidance -CSMA/CA-

• no collisions

Page 48: Network Operations & administration  CS 4592 Lecture  16

48

Multiple Access Protocols

ALOHA