On the Choice of Fairness: Finding Representative Fairness ...
TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion...
-
Upload
caleb-rawls -
Category
Documents
-
view
219 -
download
0
Transcript of TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion...
![Page 1: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/1.jpg)
TCP--Revisited
![Page 2: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/2.jpg)
Background
• How to effectively share the network?– Goal: Fairness and vague notion of equality
• Ideal: If N connections, each should get 1/N• How to determine 1/N in a distributed
manner?– Each connection probes available BW by sending
more packets– When a loss occurs then over 1/N so slow down
![Page 3: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/3.jpg)
TCP Revisited
Window of packets
ACK
• Every RTT increase your Window by 1 Pkt– W = W +1
• However if you receive a loss– Cut your window by half: w = w/2
– You aggressively decrease!!
![Page 4: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/4.jpg)
TCP Revisited
ACK
• Every RTT increase your Window by 1 Pkt– W = W +1
• However if you receive a loss– Cut your window by half: w = w/2
– You aggressively decrease!!
![Page 5: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/5.jpg)
TCP Revisited
Window of packets:Increased by 1
• Every RTT increase your Window by 1 Pkt– W = W +1
• However if you receive a loss– Cut your window by half: w = w/2
– You aggressively decrease!!
![Page 6: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/6.jpg)
TCP Congestion Control: AIMD (Additive Increase Multiplicative Decrease)
• Every RTT increase your Window by 1 Pkt– W = W +1
• However if you receive a loss– Cut your window by half: w = w/2– You aggressively decrease!!
RENO Probing
Cwnd
![Page 7: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/7.jpg)
Implications
• TCP has a saw tooth behavior– To keep N/W occupied you need: huge buffers– In network
• Buffer size= Bandwidth-delay product (Network Capacity)• You need as much buffer as capacity because TCP oscillates
between Max BW and Max BW/2
RENO Probing
Cwnd
N/W Capacity
Buffer
![Page 8: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/8.jpg)
Implications
• TCP has a saw tooth behavior– To keep N/W occupied you need: huge buffers– In end-host (receiver side)
• Sender only needs Buffer size = window• Buffer size = 2* Window• Window = 1/N * Network capacity• Why 2* window?• You need at least one window size buffer to hold the
packets you are receiving now• And if there’s loss and you want to keep receiving new
packets you need another window for fast-retransmit.
![Page 9: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/9.jpg)
Side-effects
• TCP is fundamentally unfair– Every things happens after an RTT– Flows with smaller RTT outperform flows with larger RTT
• TCP is slow – It increase one packet at a time– Takes a while to reach capacity for links with large BW
• TCP is inefficient– Devices have multiple paths(Data center, mobile)– TCP only uses only path
![Page 10: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/10.jpg)
TCP-Cubic
• Addresses:– TCP-unfair + TCP slow-ness
• Insight: AIMD is horrible– Instead of additive increase use either exponential
or logarithmic faster TCP– Make decisions based on loss-rate rather than RTT Fairer TCP
![Page 11: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/11.jpg)
TCP-Cubic
• In steady state:– When loss: w= w/2 (Same as TCP)
• When in steady state:– Wcubic=C(t-K)3+Wmax
– K=(WmaxB/C)1/3
![Page 12: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/12.jpg)
TCP Cubic V TCP Reno
CUBIC Probing RENO Probing
CwndCwnd
Slow IncreaseSharp decrease
Faster IncreaseSharp decrease
![Page 13: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/13.jpg)
MPTCP
• Takes advantage of existence of multiple paths– Examples:• Data center network: as many as 4 paths exists• Mobile networks: as many as 2 paths (3G, Wifi)
Subflow 1
Subflow 2
![Page 14: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/14.jpg)
MPTCP- Constraints– Must be Fair to TCP: Must perform as well as a connection with same
loss rate• Increase the window of subflow on same path by 1/N, where N is number of
subflows on a path.
– Perform at-least as well as TCP
– Must send traffic on the efficient path• Send traffic on path proportion to the loss rate of path• Send probe paths on poor paths to detect change in conditions
– Resilient to sub-path failure; If at-least one path exists then connection must persist• The above solutions helps out here
![Page 15: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/15.jpg)
TCP Revisited
• TCP 3-way handshake
SYN-Flag
SYN/ACK-Flag
ACK-Flag
Hello
Oh, Hello
Let’s talk
![Page 16: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/16.jpg)
TCP Revisited
• TCP 3-way handshake
• Flow-Control/Congestion-Control– AIMD
![Page 17: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/17.jpg)
TCP Revisited
• TCP 3-way handshake
• Flow-Control/Congestion-Control
• Connection Tear-downFIN-Flag
ACK/FIN-Flag
I’m done talking
Got it, good bye
![Page 18: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/18.jpg)
Implementing MPTCP
• How do sender/receiver agree to use MPTCP?
• How do you start new subflows?
• How do you ensure flow-control and reliable delivery?– Sequence numbers and ACKs
• How do you end the connection?
![Page 19: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/19.jpg)
Negotiating MPTCP
• Ideal: Use TCP Options• Problem: Network Middleboxes– MB: strip all TCP options from 10% of paths– MB: strip TCP options on SYN/ACK for 5% of paths
• Solution:– Fall back to normal TCP if options are stripped– If options only stripped on SYN/ACK the problematic:
• Receives thinks MPTCP• Sender think fallback to TCP• Receiver should keep sending MPTCP options on subsequent
ACKs
![Page 20: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/20.jpg)
Starting New Subflows
• Ideal:– Open new connection and send packets– Use same sequence numbers allows for TCP congestion
control
• Implication:– New connection has no TCP-Handshake– Each connection will have gap in sequence numbers
• Problem: Middleboxes– NAT/FW: If no TCP-Handshake, connection is dropped– Other MB: if gap in sequence number connection is dropped– Other MB: rewrite beginning seq # to add more random-ness
![Page 21: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/21.jpg)
Starting New Subflow
• Each subflow has unique seq #– But also carries, as TCP Options, offset to original seq #– So Seq # can be contiguous
• If MB rewrites seq #– The offset helps to map back to original TCP
• Each subflow starts with TCP-Handshake– Handshake carries two keys:
• Key-1: allows the receiver to map sub-flow to original connections
• Key-2: prevents hackers from hijacking the connectioin
![Page 22: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/22.jpg)
Ending a Flow
• Two ways to end a connection:– RST Flag: End connection because of error– FIN Flag: End connection all packets send
• RST on a subflow subflow error– Other subflows continue
• FIN on subflow confusing!!!– Is flow finished? Or just subflow?– Need to be careful with FIN, if FIN is sent but subflow
packets are lost and need to be resent then the connection is in trouble
![Page 23: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/23.jpg)
Ending a Flow
• Each subflow– Sends FIN as a TCP option
• After all subflow send FIN– Then send FIN as TCP Flag
![Page 24: TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.](https://reader035.fdocuments.net/reader035/viewer/2022062619/55165387550346c6758b5ac2/html5/thumbnails/24.jpg)
Insights
• Drawbacks of Normal TCP (TCP Reno)– Slow to determine N/W capacity– Unfair on the level of RTT• Ties congestion control to loss rate rather than RTT
– Doesn’t take advantage of multiple paths• Create Subflow for multiple paths
• Middleboxes make it hard to modify TCP– Lots of built in assumptions about TCP