Quiz on Transport layer Flashcards
Logical communication meaning
an end-to-end connection in which the sender and receiver are directly linked
port number vs IP address
BOTH - numerical identifiers
IP: identifies a specific device on a network
port number: identifies a specific process or service on that device
port number function
distinguishes different services/apps on a device
help direct network traffic to correct application/service
Port number definition
16-bit number used by the transport layer to identify specific apps running on a host
allows multiple apps/services on the same host to communicate at the same time
for example, port 80 is used for HTTP, and port 443 is used for HTTPS.
datagram
specific type of packet used by the network layer
demultiplexing
datagram’s payloads (the data inside the packet) are directed to the correct app/protocol in the host
apps/protocols are identified by a socket number
happens on all layers
multiplexing
the reverse of demultiplexing; as apps send messages down through different sockets, TCP funnels them down into an IP packet to be sent out
demultiplexing at the CLIENT vs SERVER
client: making sure the info is sent to the correct app on the host (since host is usually running many apps at once)
server: making sure HTTP messages are send to the correct client (since server is handling requests from many clients at once)
multiplexing at the CLIENT vs SERVER
client: funneling messages from apps into a packet
server: combining data from multiple sockets and adding transport header that’s later used for demultiplexing
IP datagram structure
header: source port #, dest port #
each datagram carries one transport-layer segment
connectionless demultiplexing (UDP)
when creating a socket, the app programmer specifies a host-local port number
when creating a datagram to send to this UDP socket, you specify:
*destination IP address
* destination port number
connection-oriented demultiplexing (TCP) - the 4 parts of TCP sockets
more complicated than UDP
TCP sockets are identified by 4 things:
*source IP address
* source port number
*dest IP address
* dest port number
for demultiplexing, the receiver uses all 4 values to direct the segment to the right socket
segment definition
unit of data created by TCP/UDP
UDP vs TCP demultiplexing
UDP: demultiplexing uses dest port number ONLY
TCP: demultiplexing uses source & dest IP addresses, source & dest port numbers
UDP segment structure
4 header fields: source port #, dest port #, length, checksum
checksum
detects errors (corrupted/changes) in a segment by checking that 2 numbers add up to the same sum
no protection against bit flips because they would have the same sum
used by both TCP and UDP
UDP advantages
no setup/handshaking (no RTT delay)
can function when network service is compromised (unaffected by congestion)
helps with reliability (checksum)
UDP usages
streaming videos/audio (tolerant of packet loss, won’t be slow because of network congestion)
can build reliable transfer on top of it
RDT
Reliable Data Transfer
set of protocols that try to detect errors and retransmit packets if necessary
uses ACK or NAK to confirm that packet was received or to tell sender that packet had error
stop and wait behavior meaning
sender sends 1 packet, then waits for response from receiver
Selective repeat
receiver individually acknowledges all correctly received packets
times-out or retransmits for un-ACKed packets
TCP segment structure
line 1: source port #, dest port #
line 2: sequence #
line 3: ACK #
line 4: length of TCP header, receive window
line 5: checksum
line 6: TCP options
app data
ACK
message sent to confirm that data was received
contains the next expected sequence number