EEC-484/584 Computer Networks - PowerPoint PPT Presentation

Loading...

PPT – EEC-484/584 Computer Networks PowerPoint presentation | free to download - id: 7b78ec-ZTc0Y



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

EEC-484/584 Computer Networks

Description:

EEC-484/584 Computer Networks Lecture 14 Wenbing Zhao wenbing_at_ieee.org (Part of the s are based on Drs. Kurose & Ross s s for their Computer Networking ... – PowerPoint PPT presentation

Number of Views:70
Avg rating:3.0/5.0
Slides: 38
Provided by: Wenb92
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: EEC-484/584 Computer Networks


1
EEC-484/584Computer Networks
  • Lecture 14
  • Wenbing Zhao
  • wenbing_at_ieee.org
  • (Part of the slides are based on Drs. Kurose
    Rosss slides for their Computer Networking book,
    and on materials supplied by Dr. Louise Moser at
    UCSB and Prentice-Hall)

2
Outline
  • Quiz3 results
  • Introduction to transport layer
  • Multiplexing/demultiplexing
  • Sliding window protocols

3
EEC484
  • Max 98
  • Min 83
  • Average 90
  • Q1 avg 25
  • Q2 avg 27
  • Q3 avg 10
  • Q4 avg 10
  • Q5 avg 19

4
EEC584 (TTh)
  • Max 100
  • Min 69
  • Average 90
  • Q1 avg 27
  • Q2 avg 27
  • Q3 avg 9
  • Q4 avg 9
  • Q5 avg 18

5
EEC584 (MW)
  • Max 93
  • Min 75
  • Average 87
  • Q1 avg 26
  • Q2 avg 26
  • Q3 avg 9
  • Q4 avg 10
  • Q5 avg 17

6
Transport Layer
  • learn about transport layer protocols in the
    Internet
  • UDP connectionless transport
  • TCP connection-oriented transport
  • TCP congestion control
  • Our goals
  • understand principles behind transport layer
    services
  • multiplexing/demultiplexing
  • reliable data transfer
  • flow control
  • congestion control

7
Transport vs. Data Link Layer
  • Similarities deal with error control,
    sequencing, flow control
  • Difference operating environments

Environment of the transport layer
Environment of the data link layer
8
Transport vs. Network Layer
  • Network layer logical communication between
    hosts
  • Transport layer logical communication between
    processes
  • Relies on, enhances, network layer services

9
Internet Transport-Layer Protocols
  • Reliable, in-order delivery (TCP)
  • congestion control
  • flow control
  • connection setup
  • Unreliable, unordered delivery UDP
  • no-frills extension of best-effort IP
  • Services not available
  • delay guarantees
  • bandwidth guarantees

10
Multiplexing/Demultiplexing
delivering received segments to correct socket
gathering data from multiple sockets, enveloping
data with header (later used for demultiplexing)
process
socket
application
P4
application
application
P1
P2
P3
P1
transport
transport
transport
network
network
network
link
link
link
physical
physical
physical
host 3
host 2
host 1
11
How Demultiplexing Works
  • Host receives IP datagrams
  • Each datagram has source IP address, destination
    IP address
  • Each datagram carries 1 transport-layer segment
  • Each segment has source, destination port number
  • Host uses IP addresses port numbers to direct
    segment to appropriate socket

32 bits
source port
dest port
other header fields
application data (message)
TCP/UDP segment format
12
Principles of Reliable Data Transfer
  • characteristics of unreliable channel will
    determine complexity of reliable data transfer
    protocol (rdt)

13
Reliable Data TransferSliding Window Protocols
  • Recall that we have studies 3 simplex reliable
    transfer protocols in data link layer
  • Here we study 3 more realistic protocols
  • A One-Bit Sliding Window Protocol
  • A Protocol Using Go Back n
  • A Protocol Using Selective Repeat

14
Sliding Window Protocols
  • Full-duplex Use same connection for data in both
    directions (A?B and B?A)
  • Interleave data and ack packets
  • B piggybacks its ack for As packet onto Bs next
    packet
  • Savings of header in separate ack packet
  • If B sends data infrequently, use timeout to
    determine when B should send ack in separate ack
    packet

15
Sliding Window Protocols
  • Each packet contains sequence number in ranges
    0..2n-1 (for n-bit sequence numbers)
  • Sending window list of consecutive sequence
    numbers of packets that sender is permitted to
    send

3
ack
16
Sliding Window Protocols
  • When new packet arrives from application layer,
    it is given next highest sequence number, and
    upper edge of window is incremented
  • When ack arrives from receiver, lower edge of
    window is incremented
  • Within sending window, packets sent but not acked
  • Sender must keep those packets for possible
    retransmission
  • If max window size w, need w buffers

17
Sliding Window Protocols
  • Receiving window list of consecutive sequence
    numbers of packets that receiver is permitted to
    accept
  • When packet with (seq num lower edge of window)
    arrives
  • Packet is passed to higher layer
  • Ack is generated
  • Window slid down by 1 (remains same size as was
    initially)

3
0
1
2
3
4
5
6
7
18
One-Bit Sliding Window Protocol
  • A sliding window of size 1, with a 3-bit sequence
    number

After first ack received
After first packet sent
After first packet received
Initially
19
One-Bit Sliding Window Protocol
  • No duplicate, no omissions, no deadlock, but
    inefficient

Normal case
Abnormal case
  • The notation is (seq, ack, packet number)
  • An asterisk indicates where a packet is delivered

20
Sliding Window Protocols Pipelining
  • Problem of one-bit sliding window protocol
  • Sender blocks till receives acks
  • Solution pipelining
  • Allow sender to send up to w packets before
    blocking
  • With pipelining, if packet in middle is lost or
    damaged, what to do with the packets following it
    ?
  • Solution two strategies
  • Go Back n - all the packets following it are
    discarded
  • Selective repeat nack the lost/damaged packet
    and retransmit that packet

21
Pipelining and Error Recovery
Go back n Effective receiver window size is 1
Packets discarded
22
Pipelining and Error Recovery
Selective repeat
Packets buffered
Can you think of an alternative to go-back-n and
selective-repeat?
23
Go Back n
  • Sender
  • Stores all packets in output buffer
  • Must get acks in order in which packets are sent
  • Receiver
  • Discards all packets following lost or damaged
    one
  • Works well
  • If transmission errors rare and few
    retransmissions
  • If lot of traffic in both directions

24
Selective Repeat
  • Receiver accepts and buffers packets following
    lost or damaged packets
  • Both sender and receiver maintain windows
  • Senders window starts at 0, grows to MAX SEQ
  • Receivers window fixed at MAX SEQ
  • Receiver has buffer reserved for each seq num in
    its window

0
1
2
3
4
5
6
7
25
Selective Repeat
  • When packet arrives, receiver checks if seq num
    in window
  • If so and if not already received, this packet is
    accepted and stored
  • If all lower numbered packets delivered, this
    packet is delivered as well

5
3
0
2
3
5
6
0
1
2
3
4
5
6
7
1
4
7
26
Non-Sequential Receive Problem
  • New range of valid sequence numbers for receiver
    can overlap old range
  • Overlap can contain duplicates
  • Example n 3-bit seq num (8 possible numbers, 0
    through 7, back to 0)

27
Non-Sequential Receive Problem
  • Sender sends 0,1,2,3,4,5,6
  • Receiver
  • Receives 0,1,2,3,4,5,6
  • Sends ack but ack gets lost
  • Expects to receive 7,0,1,2,3,4,5

0
1
2
3
4
5
6
28
Non-Sequential Receive Problem
  • Sender times out, retransmits 0,1,2,3,4,5,6
  • Receiver checks 0 is in new window, thinks new 0
    because sent ack for old 6, waits for 7

0
1
2
3
4
5
6
29
Non-Sequential Receive Problem
  • Sender receives ack for 0-6, sends 7
  • Receiver receives 7, delivers 7 and old 0 (as
    new 0 !)

7
30
Non-Sequential Receive Problem
  • The problem is caused by the overlap of sequence
    number between the new receiving window and the
    old receiving window

0
1
2
3
4
5
6
Overlap
Overlap
31
Non-Sequential Receive Problem
  • Solution
  • make sure no overlap when receiver advances its
    window
  • Make window size w 1/2 range of seq numbers

0
1
2
3
32
Selective Repeat
  • If no reverse traffic before timer goes off,
    separate ack is sent
  • When receiver suspects error, sends NAK back to
    sender (request for retransmission)
  • Two circumstances that trigger NAK
  • Damaged packet arrives
  • Packet other than expected one arrives, suspect
    expected one is lost
  • Receiver sends only one NAK for packet expected

33
(No Transcript)
34
(No Transcript)
35
(No Transcript)
36
(No Transcript)
37
(No Transcript)
About PowerShow.com