Top Banner
Connection ID Management A.K.A. WHAT’S THIS THING CALLED AGAIN?
24

Connection ID Management - IETF Datatracker

Apr 21, 2023

Download

Documents

Khang Minh
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Connection ID Management - IETF Datatracker

Connection ID

ManagementA.K.A. WHAT’S THIS THING CALLED AGAIN?

Page 2: Connection ID Management - IETF Datatracker

Development of Connection IDs

Sequence with Gaps (pre-PNE)

Packet number gaps attempt to

reduce correlation between CIDs

Created HoLB – only allowed to skip

CIDs if you’ve received them (and

therefore know the gap)

Really confusing to apply to multiple

paths

Seq. CID P# Gap Token

-1 (A) 126 F(A)

0 (B) 23 F(B)

1 (C) 470 F(C)

2 (D) 9 F(D)

3 (E) 672 F(E)

2

Page 3: Connection ID Management - IETF Datatracker

Development of Connection IDs

Seq. CID P# Gap Token

-1 (A) 126 F(A)

0 (B) 23 F(B)

1 (C) 470 F(C)

2 (D) 9 F(D)

3 (E) 672 F(E)

PNE A, F(A)

B, F(B)

C, F(C)

D, F(D)

E, F(E)

3

Page 4: Connection ID Management - IETF Datatracker

Development of Connection IDs

Unordered Set (post-PNE)

Fixes HoLB

Easy to use on multiple paths

Just pick a different one!

Requirement to change when peer

changes difficult to reliably specify /

implement

Did peer change by itself, so I need to

change, or did they change because I

changed?

A, F(A)

B, F(B)

C, F(C)

D, F(D)

E, F(E)

4

Page 5: Connection ID Management - IETF Datatracker

Development of Connection IDs

Seq. CID Token

-1 (A) F(A)

0 (B) F(B)

1 (C) F(C)

2 (D) F(D)

3 (E) F(E)

-13 A, F(A)

B, F(B)

C, F(C)

D, F(D)

E, F(E)

5

Page 6: Connection ID Management - IETF Datatracker

Development of Connection IDs

Sequence without Gaps (-13)

No HoLB, because no packet number

gaps

Easier to specify behavior:

Use a higher sequence number than

ever before when starting a new path

On each path, never use a sequence

number less than the highest you’ve

ever sent or received on that path

Seq. CID Token

-1 (A) F(A)

0 (B) F(B)

1 (C) F(C)

2 (D) F(D)

3 (E) F(E)

6

Page 7: Connection ID Management - IETF Datatracker

Example

Using ‘A’, ‘B’, ‘C’, etc. to represent

CIDs of increasing sequence number

Actual sequence numbers will differ in

each direction, but using ‘A’ in each

direction here

Multiple paths are hard to draw

7

Page 8: Connection ID Management - IETF Datatracker

Example

Each side is using CID A

AAAA

AAAA

8

Page 9: Connection ID Management - IETF Datatracker

Example

Each side is using CID A

And also probing a side path with CID

B

AAAA

AAAA

9

Page 10: Connection ID Management - IETF Datatracker

Example

Each side is using CID A

And also probing a side path with CID

B

The probe doesn’t affect what gets

used on the main path

AAAA

AAAA

AAA

AA

10

Page 11: Connection ID Management - IETF Datatracker

Example

Each side is using CID A

And also probing a side path with CID

B

The probe doesn’t affect what gets

used on the main path

Endpoint rolls forward to a new CID, C

AAAA

AAAA

AAA

AA

C

11

Page 12: Connection ID Management - IETF Datatracker

Example

Each side is using CID A

And also probing a side path with CID

B

The probe doesn’t affect what gets

used on the main path

Endpoint rolls forward to a new CID, C

The peer reciprocates

AAAA

AAAA

AAA

AA

C C

12

Page 13: Connection ID Management - IETF Datatracker

Example

Each side is using CID A

And also probing a side path with CID

B

The probe doesn’t affect what gets

used on the main path

Endpoint rolls forward to a new CID, C

The peer reciprocates

The CID change on the main path

doesn’t affect what gets used on the

probing path

AAAA

AAAA

AAA

AA

C C

13

Page 14: Connection ID Management - IETF Datatracker

Example

Each side is using CID A

Endpoint rolls forward to a new CID, C

The peer rolls forward to a new CID, D

AAAA

AAAA

AAA

AA

C C

D

14

Page 15: Connection ID Management - IETF Datatracker

Example

Each side is using CID A

Endpoint rolls forward to a new CID, C

The peer rolls forward to a new CID, D

…but the endpoint never received D!

Rolls forward to E, the next available

AAAA

AAAA

AAA

AA

C C

DE

15

Page 16: Connection ID Management - IETF Datatracker

Example

Each side is using CID A

Endpoint rolls forward to a new CID, C

The peer rolls forward to a new CID, D

…but the endpoint never received D!

Rolls forward to E, the next available

Peer rolls forward to E as well

AAAA

AAAA

AAA

AA

C C

DE

E

16

Page 17: Connection ID Management - IETF Datatracker

Here be dragons….

AAAA

A

NCID:

B,C,D

17

Page 18: Connection ID Management - IETF Datatracker

Here be dragons….

AAAA

A

NCID:

B,C,D

Whoops, I’m

out of CIDs!

Just gave him

three extras;

that’s plenty.

18

Page 19: Connection ID Management - IETF Datatracker

Raises some questions….

It’s possible to become unclear whether a peer has actually used

a CID you’ve issued

Given that, how do I know when the peer needs more CIDs?

19

Page 20: Connection ID Management - IETF Datatracker

Here be dragons….

AAAA

A

B

CC

Only packet

with B

disappears

Guess we’re

not using

B…!

20

Page 21: Connection ID Management - IETF Datatracker

SR with F(B)

Here be dragons….

AAAA

A

B

CC

Only packet

with B

disappears

B

Sometime

later, packet

is deliveredB

unknown!

Guess we’re

not using

B…!

21

Page 22: Connection ID Management - IETF Datatracker

Raises some questions….

Over a long-lived connection with many CIDs, it’s impractical to

remember all CIDs ever associated with the connection

Potential memory exhaustion attack

Might require allocating load balancer state as well

But when is it safe to “forget” a CID?

Forget too early and peer can trigger a Stateless Reset by using a seemingly-

valid CID

Circumstances where CIDs expire

CID with encrypted payload and key rotation

22

Page 23: Connection ID Management - IETF Datatracker

Proposal

NEED_CONNECTION_ID frame

Analogous to BLOCKED, but use it before you are

Requests to have at least X CIDs beyond sequence number Y

RETIRE_CONNECTION_ID frame

Declares an old CID no longer associated with this connection

Stop using and stop recognizing the Stateless Reset Token upon receipt

Sender can forget CID upon acknowledgement

Discuss: Need to retire individual CIDs or range of CIDs?

23

Page 24: Connection ID Management - IETF Datatracker

Here be “dragons”….

Sequence number from end of

handshake is currently “-1”

Negative numbers are annoying to

some

Server’s Preferred Address includes a

CID for use in probing

Avoids waiting for a NEW_CID frame

…but what sequence number is that?

Client’s CID from handshake doesn’t

have a Stateless Reset Token

Seq. CID Token

-1 (A) F(A)???

0 (B) F(B)

1 (C) F(C)

2 (D) F(D)

3 (E) F(E)

24