Networking - Chapter 3

Transport Layer

The protocols of the layer provide host-to-host communication services for applications.
It provides services such as connection-oriented data stream support, reliability, flow control, and multiplexing.

Transmission Control Protocol (TCP)

used for connection-oriented transmissions.
congestion control
flow control
connection setup.
-logical communication between "processes" host computers

Network Layer

logical communication between host computers

User Datagram Protocol (UDP)

uses a simple connectionless transmission model with a minimum of protocol mechanism. UDP provides checksums for data integrity, and port numbers for addressing different functions at the source and destination of the datagram.
no-frills extension of "bes

Multiplexing

method by which multiple analog or digital signals are combined into one signal over a shared medium. The aim is to share an expensive resource

demultiplexing at receiver

use header info to deliver
received segments to correct
socket

multiplexing at sender:

handle data from multiple
sockets, add transport header (later used for demultiplexing)

Connectionless demultiplexing

that does not require a circuit to be established before data is transmitted, and routes messages to their destinations independently of any other messages

OSI Model Layers

1. Application
2. Presentation
3. Session
4. Transport
5. Network
6. Data-Link
7. Physical

TCP/IP Protocol Architecture Layers

5. Application
4. Host-to-Host Transport
3. Internet
2. Network Interface
1. Physical

TCP reliable data transfer features

flow control, sequence numbers,
acknowledgments, and timers

TCP congestion control features

prevents any one TCP connection
from swamping the links and routers between communicating hosts with an
excessive amount of traffic.

How does TCP congestion control work?

This is done by regulating the rate at which the sending sides of TCP connections can send traffic into the network.

Demultiplexing

how a receiving host directs an incoming transport-layer segment to the appropriate socket.
-delivering the data in a transport-layer segment to the correct socket

Multiplexing

The job of gathering data chunks at the source host from different sockets, encapsulating each data chunk with header information to create segments, and passing the segments to the network
layer

Source Port # field and Destination Port #

transport-layer multiplexing requires (1) that sockets have unique
identifiers, and (2) that each segment have special fields that indicate the socket to
which the segment is to be delivered

Port Number

16-bit number, ranging from 0 to 65535.

well-known port numbers

port numbers ranging from 0 to 1023.
-well-known
application protocols such as HTTP (which uses port number 80) and FTP (which
uses port number 21).

A consequence of UDP socket addressing.

if two UDP segments have different source IP addresses and/or source port numbers, but have the same destination IP address and destination port number, then the two segments will be directed to the same destination process via the same destination socket

A connection-establishment request

is nothing more than a TCP segment with destination [say]
port number 12000 and a special connection-establishment bit set in the TCP
header.
-segment also includes a source port number
that was chosen by the client.

What happens when a TCP segment arrives at the host

all four fields (source IP address,
source port, destination IP address, destination port) are used to direct (demultiplex)
the segment to the appropriate socket.

UDP: User Datagram Protocol Features

no handshaking between UDP sender, receiver
each UDP segment handled independently of others
streaming multimedia apps (loss tolerant, rate sensitive)
DNS
add reliability at application layer
application-specific error recovery!
TCP maintains connection s

UDP checksum

Goal:detect "errors"(e.g., flipped bits) in transmitted segment
--compute checksum of received segment
check if computed checksum equals checksum field value:
NO -error detected
YES -no error detected. But maybe errors

Popular Internet applications using TCP

-Electronic mail, SMTP
-Remote terminal access Telnet
-Web HTTP
-File transfer FTP
-Remote file server NFS

Popular Internet applications using UDP

-Network management SNMP
-Routing protocol RIP Typically
-Name translation DNS

Popular Internet applications using either TCP or UDP

-Streaming multimedia, typically proprietary
-Internet telephony, typically proprietary

stop-and-wait operation

A stop-and-wait ARQ sender sends one frame at a time. The sender doesn't send any further frames until it receives an acknowledgement (ACK) signal. After receiving a valid frame, the receiver sends an ACK. If the ACK does not reach the sender before a cer

Go-Back-N

specific instance of the automatic repeat request (ARQ) protocol, in which the sending process continues to send a number of frames specified by a window size even without receiving an acknowledgement (ACK) packet from the receiver.

Selective Repeat

the sender sends a number of frames specified by a window size even without the need to wait for individual ACK from the receiver as in Go-Back-N ARQ. The receiver may selectively reject a single frame, which may be retransmitted alone; this contrasts wit

Go-Back-N: sender

k-bit seq # in pkt header
"window"of up to N, consecutive unack'ed pkts allowed ACK(n): ACKs all pkts up to, including seq # n -"cumulative ACK"
may receive duplicate ACKs (see receiver)
timer for oldest in-flight pkt
timeout(n):retransmit packet n and al

Selective Repeat Explained

receiver individuallyacknowledges all correctly received pkts
buffers pkts, as needed, for eventual in-order delivery to upper layer
sender only resends pkts for which ACK not received
sender timer for each unACKed pkt
sender window
Nconsecutive seq #'s
l

TCP Flow Control

receiver controls sender, so sender won't overflow receiver's buffer by transmitting too much, too fast

congestion

informally: "too many sources sending too much data too fast for networkto handle"
different from flow control!
manifestations:
lost packets (buffer overflow at routers)
long delays (queueing in router buffers)
a top-10 problem!

two broad approaches towards congestion control

1) end-end congestion control:
2) network-assisted congestion control

end-end congestion control

no explicit feedback from network
congestion inferred from end-system observed loss, delay
approach taken by TCP

network-assisted congestion control

routers provide feedback to end systems
single bit indicating congestion (SNA, DECbit, TCP/IP ECN, ATM)
explicit rate for sender to send at

Congestion window

LastByteSent - LastByteAck <= min{cwnd, rwnd}

cwnd, rwnd

TCP state variables used to regulate data flow in TCP connections.

CWND

Congestion Window (cwnd) is a TCP state variable that limits the amount of data the TCP can send into the network before receiving an ACK.

RWND

The Receiver Window (rwnd) is a variable that advertises the amount of data that the destination side can receive.

additive increase:

increase cwndby 1 MSS every RTT until loss detected

multiplicative decrease

cut cwnd in half after loss

TCP congestion control: additive increase multiplicative decrease

senderincreases transmission rate (window size), probing for usable bandwidth, until loss occurs

TCP Slow Start

when connection begins, increase rate exponentially until first loss event:
initially cwnd= 1 MSS
double cwndevery RTT
done by incrementing cwndfor every ACK received