[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
- 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)
Multiplexing
- handle data from multiple sockets, add transport header
Demultiplexing
- use header info to deliver received segments to correct socket
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
Reliable data transfer
-
Sender side
- 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
- 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)
- How to recover from errors
- Retransmission
- Feedback from receiver (ACK -> success, NAK -> corrupt)
- Retransmisstion timer
Scenario
- no loss
- packet loss
- ACK loss
- timeout / delayed ACK
Leave a comment