Transport Layer Flashcards
What is the transport layer for?
Logical end to end connection between applications running on 2 hosts
What is TCP?
Transmission Control Protocol
Reliable and in-order
Connection oriented
Congestion and flow control
How does the sender work in the transport layer?
Receives and breaks up application layer message
Determines segment header fields creates segment
Passes segment to IP
How does the receiver work in the transport layer?
Receives segment from IP
Checks header values
Extracts application layer message
Demuxes message up to application via socket
What is UDP?
User datagram protocol
Unreliable and unordered
How does de-multiplexing work?
Delivering data as it arrives to transport layer
From network layer below to multiple sockets above
Destination host receives IP datagrams
Host uses IP addresses and port no. to direct segment to socket
How does multiplexing work?
Gathering data from multiple sockets above
Passing as a stream of segments to network layer below
How does TCP use connection oriented de-muxing?
TCP socket identified by 4-tuple: source IP, source port no, dest IP, dest Port no
Receiver uses 4 values to direct segment to socket
Server may support many simultaneous TCP sockets (different connecting clients)
How does UDP use conectionless demuxing?
UDP socket associated with source IP and port no
Creates packet specifying dest IP and dest port no
Receiving host receives UDP segment on destination transport layer
Checks destination port no
Directs data in that segment to socket with that port no
Received on destination application layer
How is data lost?
Packet loss due to congestion
Corrupted packets/dropped packets at receiver due to bugs
Undeliverable packets due to hardware
Different order due to delay/loss/retransmission
What is the UDP checksum?
Detects errors in transmitted segment
Sender: treat contents of UDP as 16 bit integer sequences
Compute checksum addition
Place value in checksum field
Receiver: compute checksum of received segment
Check = to field value
How do we ensure reliable data transfer in a reliable channel?
Separate FSMs for sender and receiver
How do we ensure reliable data transfer in a channel with bit errors?
Acknowledgements: receiver tells sender packet received fine
Negative acks = receiver tells sender packet has errors
How do we ensure reliable data transfer in a channel with errors and loss?
Wait for certain time for acks
No acks = restransmits packets
What is the channel utility formula?
Channel utility = time sender is busy sending / total time