Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- transport service:
- provide logical communication between app process running on different host
- run in end systems
- send side: break app msg into segment, pass to network layer
- receive side: reassemble segment into msg, pass to app layer
- Internet: TCP and UDP
- TCP: reliable, in-order delivery
- congestion control
- flow control
- connection setup
- UDP: unreliable, unordered delivery
- no-frills extension of best-effort IP
- no delay guarantee
- no bandwidth guarantee
- demultiplexig at rcv host:
- delivering received segment to correct socket
- multiplexing at send host
- gathering data from multiple socket, envelope data with header
- UDP: User Datagram Protocol
- no fills, bare bones
- best effort service
- connectionless:
- no handshaking
- UDP segment handled independently
- no connection establishment
- simple
- small segment header
- no congestion control
- streaming multimedia app
- loss tolerant
- rate sensitive
- DNS, SNMP
- reliable transfer over UDP: add at application layer
- checksum: detect error in transmit segment
- Reliable data transfer:
- rdt1.0: reliable transfer over a reliable channel
- no bit error
- no loss of packet
- rdt2.0: channel with bit error
- ACK, NACK
- error detection
- receiver feedback -> sender
- rdt2.1: handle garble ACK/NAK
- stop and wait
- retransmit current packet if ACK/NAK garble
- sender add sequence number to each packet
- receiver discard duplicate packet
- rdt2.2: NAK free protocol
- rdt3.0: channel with error and loss
- sender wait reasonable amount of time for ACK
- retransmit if no ACK receive in this time
- require countdown timer
- Pipelined protocol:
- pipelining: sender allow multiple, "in-flight", yet-to-be-acknowledge packet
- range of sequence number must be increase
- buffering at sender and receiver
- go-back-N, selective repeat
- Go-back-N:
- sender: up to N unACK packet in pipeline
- receiver: only send cumulative ACK
- doesn't ACK packet if there is a gap
- sender has timer for oldest unACK packet
- if time expire, retransmit all unACK packet
- Selective repeat:
- sender: up to N unACK packet in pipeline
- receiver: ACK individual packet
- sender: maintain timer for each unACK packet
- if time expire, retransmit only unACK packet
- Go-back-N:
- k-bit sequence number in packet header
- window of up to N consecutive unACK packet allow
- ACK all packet up to, including sequence number - cumulative ACK
- may receive duplicate ACK
- timer for each in-flight packet
- time out: retransmit packet n and all higher sequence number packet in window
- ACK-only: always send ACK for correctly received packet with highest inorder sequence number
- may generate duplicate ACK
- need only remember expected sequence number
- out of order packet
- discard
- re ACK packet with highest inorder sequence number
- Selective repeat:
- receiver ack all correctly receive packet
- sender only resend packet for which ACK not receive
- sender window:
- N consecutive sequence number
- limit sequence of sent, unACK packet
- sender:
- data from above:
- if next available sequence number in window, send packet
- timeout(n):
- resend packet n, restart timer
- ACK(n)
- mark packet n as receive
- if n smallest unACK packet, advance window base to next unACK sequence number
- receiver:
- send ACK(n)
- out of order: buffering
- in order: deliver, advance window to next not-yet-receive packet
- TCP:
- point-to-point:
- 1 sender, 1 receiver
- reliable, inorder
- no message boundary
- pipeline:
- TCP congestion and flow control set window size
- send and receive buffer
- full duplex data:
- bidirectional data flow in same connection
- MSS: maximum segment size
- connection-oriented:
- handshaking
- flow control:
- sender will not overwhelm receiver
- TCP segment:
- source port number
- dest port number
- sequence number
- ACK number
- header length
- URG: urgent data
- Receive window
- checksum
- urg data pointer
- options
- application data
- EstimatedRTT = (1 - alpha) * EstimatedRTT + alpha * SampleRTT
- TCP reliable data transfer:
- TCP create rdt service on top of IP unreliable service
- pipelined segment
- cumulative ACKs
- TCP use single retransmission timer
- retransmission are triggered by:
- timeout event
- duplicate ACK
- initially consider simplified TCP sender:
- ignore duplicate ACKs
- ignore flow control, congestion control
- sender:
- create segment with seq #
- seq # is byte-stream number of first data byte in segment
- start timer if not already running
- timeout:
- retransmit segment that cause timeout
- restart timer
- ACK receive:
- if acknowledge previously unACK segment:
- update what is known to be ACK
- start timer if there are outstanding segments
- fast retransmit
- timeout period often relatively long
- long delay before resending lost packet
- detect lost segment via duplicate ACK
- sender often send many segmenet back-to-back
- if segment is lost, there will be many duplicate ACK for that segment
- fast retransmit: resend segment before timer expire
- flow control:
- sender won't overflow receiver buffer by transmitting too much, too fast
- receiver advertise unused buffer space by including rwnd value in segment header
- sender: limit # of unACK byte to rwnd
- connection management:
- establish connection before exchanging data segment
- initialize TCP variables
- seq #s, buffer, flow control info
- 3 way handshake:
- client host send TCP-SYN segment to server
- specify initial seq #, no data
- server host receive SYN, reply with SYNACK segment:
- server allocate buffer
- specify server initial seq #
- client receive SYNACK, reply with ACK segment, may contain data
- closing connection:
- client end system send TCP FIN control segment to server
- server receive FIN, reply with an ACK, close connection, send FIN
- client receive FIN, reply with an ACK
- enter time wait, will respond with ACK to receive FIN
- server receive ACK, close connection
- Congestion control:
- too many source sending too much data too fast for network to handle
- different from flow control
- manifestation:
- lost packet (buffer overflow at router)
- long delay (queueing in router buffer)
- cost of congestion:
- more work for given goodput
- unneeded retransmission
- when packet drop, any upstream transmission capacity use for that packet was wasted
- end-end congestion:
- no explicit feedback from network
- congestion infer from end-system observe loss, delay
- approach taken by TCP
- network-assisted congestion control:
- router provide feedback to end system
- single bit indicating congestion
- explicit rate sender should send
- ABR: avaliable bit rate:
- elastic service
- if sender's path underload:
- sender should use available bandwidth
- if sender's path congested:
- sender throttled to minimum guarantee rate
- RM (resource management):
- sent by sender, intersperse with data cell
- bit in RM cell set by switch
- NI bit: no increase in rate
- CI bit: congestion indication
- RM cell return to sender by receiver, with bit intact
- TCP congestion control:
- should transmit as fast as possible, but without congesting network
- decentralized: each TCP sender set its own rate, base on implicit feedback:
- ACK: segment receive, network not congest, increase sending rate
- lost segment: assume loss due to congestion, decrease sending rate
- probing for bandwidth:
- increase transmission rate on receipt of ACK, until eventually loss occur, then decrease transmission rate
- increase exponentially fast at connection start, or following timeout
- congestion avoidance: increase linearly
- TCP slow start:
- when begin, cwnd = 1 MSS
- increase rate exponentially until first loss event or when threshold reached
- double cwnd every RTT
- done by incrementing cwnd by 1 for every ACK received
- AIMD: Additive Increase, Multiplicative Decrease
- TCP fairness
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement