[Network] Transport Layer 1

Updated:

Transport Layer 1

Transport services and protocols

  • logical communication between application processes running on different hosts(end system)
  • Sender : breaks application messages into segments (packets) and passes to network layer
  • Receiver : reassembles segments into messages, passes to application layer
  • Protocol : TCP, UDP, SCTP, DCCP

transport1

  • Reliable, in-order delivery : TCP
    • Congestion control (control data flow even if application layer try to send lots of data)
    • Flow control (send data to receiver as they can receive)
    • Connection setup
  • Unreliable, unordered delivery : UDP
    • Just send data between processes
  • Services not available
    • Delay guarantees (network layer problem)
    • Bandwidth gurantees (network layer problem)

transport2

Multiplexing

  • handle data from multiple sockets, add transport header

Demultiplexing

  • use header info to deliver received segments to correct socket

multi

How demultiplexing works

  • Host receives IP datagrams
    • Each datagram has source IP address, destination IP address
    • Each datagram carries one transport-layer segment
    • Each segment has source(who send), destination(who receive) port numbers
  • Host uses IP addresses(which computer) & port numbers(which process) to direct segment to appropriate socket

segment

Reliable data transfer

rdt

  • Sender side sender

    • rdt_send() : called from above(application layer), passed data to deliver to receiver upper layer
    • udt_send() : called by rdt, to transfer packet over unreliable channel to receiver
  • Receiver side receiver

    • deliver_data() : called by rdt to deliver data to upper
    • rdt_rcv(): called when packet arrives on rcv_side of channel

rdt3.0 : channels with errors and loss

  • Assumptions
    • Underlying channel may flip bits in packet
    • Use checksum to detect bit errors
    • Underlying channel can also lose packets(data, ACKs)
    • checksum, sequence number, ACKs, retransmissions will be of help… but not enough
    • checksum also have error (but low probability than error in data) checksum
  • How to recover from errors
    • Retransmission
    • Feedback from receiver (ACK -> success, NAK -> corrupt)
    • Retransmisstion timer

Scenario

sender1 receiver1

  • no loss

1

  • packet loss

2

  • ACK loss

3

  • timeout / delayed ACK

4

stop and wait operation

11

Leave a comment