• 沒有找到結果。

Network Protocols: Design and Analysis-TCP Revisited

N/A
N/A
Protected

Academic year: 2021

Share "Network Protocols: Design and Analysis-TCP Revisited"

Copied!
13
0
0

加載中.... (立即查看全文)

全文

(1)

Network Protocols:

Design and Analysis

Polly Huang EE NTU

http://cc.ee.ntu.edu.tw/~phuang [email protected]

(2)
(3)

Agenda

• connection setup and teardown

• flow control

• congestion control theory

• congestion control practice (in TCP)

• loss recovery

• security

(4)

Agenda

• security

– TCP hijacking

– DDoS mitigation

• performance

– delayed ACKs

– T/TCP

(5)

Connection Hijacking

• Problem: connection hijacking

– some systems authenticate based on TCP

connections and source IP addresses

=> if you can steal a running TCP connection,

you’re in

(6)

TCP Distributed Denial of Service

• Problem: lots of people have too much time on the

ir hands

– and lots of people don’t have secure computers

 bad people take over computers (zombies) and have th em all ask you at once

• mitigation: SYN cookies

• rather than make a new TCB for a new (probably bogu s) connection, encode the info in the ISN on the SYN-A CK

• when you get the ACK, recreate the missing state

• but, sadly, there are other forms of DDoS…

(7)

Agenda

• security

– TCP hijacking

– DDoS mitigation

• performance

– delayed ACKs

– T/TCP

(8)

Delayed ACKS

• Problem: it’s a lot of work to ACK every TCP segment

– especially if it’s just a few bytes – and the ACKs are tiny

• Approach: delay sending ACKs

– send if you get two full segments – or after at most 500ms

• Side-effect:

– slow-start grows per ACK, not per ACKed segment, so it’s 1, 2, 3, 3, 5…, not 1, 2, 4, 8…

(9)

T/TCP

• Problem: TCP 3WH is expensive for very short connections

– (like RPC or web requests)

• Approach: Transaction TCP

– send SYN+ACK+data in first packet – reply with SYN+ACK+FIN+data – then ACK+FIN

• Limitations

– have to cache of ISN info, and may have to fall back to 3WH sometimes

(10)

Problem: High BW Connections

• How many packets to keep in flight?

– must be > bw*delay product

– 10Mb/s * 100ms rtt = 1Mb ~ 100kB – 1Gb/s * 100ms rtt = 100Mb ~ 10MB!

• Sequence number wraparound time vs. Link speed:

• 1.5Mbps: 6.4 hours • 10Mbps: 57 minutes • 45Mbps: 13 minutes • 100Mbps: 6 minutes

(11)

TCP Extensions for

“Long, Fat Pipes”

• timestamp option + PAWS (Protection Against W

rapped Sequences)

– endpoints swap timestamps on each pkt – allows better RTT estimation

– provides effectively larger sequence space (reject packe ts with old timestamps)

• window scaling

– multiplicative factor on wnd – to keep the pipe full

(12)

Fast TCP

• How fast can TCP go? Need new protocol?

– shown at >1Gb/s

• but requires some care

– must have enough buffers. why? handle receiving data out of order and b

w-delay product implies large amount of data in flight

– must not have too much loss. why? some versions of TCP can only recov

er from one loss in each RTT of data (even with SACK you’re limited to a few losses/rtt)

– must not be dominated by connection set-up costs. why? with small amou

nts of data (<10kB), 3wh and slow-start will dominate – see PSC web site (mentoned on mailing list) for details

(13)

參考文獻

相關文件

✓ Express the solution of the original problem in terms of optimal solutions for subproblems. Construct an optimal solution from

• Thinking: solve easiest case + combine smaller solutions into the original solution.. • Easy to find an

• Algorithmic design methods to solve problems efficiently (polynomial time).. • Divide

• makes a locally optimal choice in the hope that this choice will lead to a globally optimal solution.. • not always yield optimal solution; may end up at

Textbook Chapter 33.4 – Finding the closest pair of points.. Closest Pair of

✓ Combining an optimal solution to the subproblem via greedy can arrive an optimal solution to the original problem. Prove that there is always an optimal solution to the

✓ Combining an optimal solution to the subproblem via greedy can arrive an optimal solution to the original problem.. Prove that there is always an optimal solution to the

Textbook Chapter 4.3 – The substitution method for solving recurrences Textbook Chapter 4.4 – The recursion-tree method for solving recurrences Textbook Chapter 4.5 – The master