-
Notifications
You must be signed in to change notification settings - Fork 0
/
sctp_plpmtud_ipv6_1500_optbinary_1500-1492_ptb.pkt
66 lines (53 loc) · 2.65 KB
/
sctp_plpmtud_ipv6_1500_optbinary_1500-1492_ptb.pkt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
--tolerance_usecs=100000
--ip_version=ipv6
--mtu=1500
0.0 `sysctl -i net.inet.sctp.initial_cwnd=10`
0.0 `sysctl -i net.inet.sctp.plpmtud_enable=1`
0.0 `sysctl -i net.inet.sctp.plpmtud_ipv6_min_mtu=1280`
0.0 `sysctl -i net.inet.sctp.plpmtud_search_algorithm=2` // OptBinary
0.0 `sysctl -i net.inet.sctp.plpmtud_use_ptb=1`
0.0 `sysctl -i net.inet.tcp.hostcache.purgenow=1`
// Create a non-blocking 1-to-1 style socket
+0.0 socket(..., SOCK_STREAM, IPPROTO_SCTP) = 3
+0.0 fcntl(3, F_SETFL, O_RDWR | O_NONBLOCK) = 0
+0.0 connect(3, ..., ...) = -1 EINPROGRESS (Operation now in progress)
// Trigger the active associtation setup
+0.0 > sctp: INIT[flgs=0, tag=1, a_rwnd=..., os=..., is=..., tsn=1, ...]
+0.1 < sctp: INIT_ACK[flgs=0, tag=2, a_rwnd=99999, os=1, is=1, tsn=1, STATE_COOKIE[len=4, val=...]]
+0.0 > sctp: COOKIE_ECHO[flgs=0, len=..., val=...]
+0.1 < sctp: COOKIE_ACK[flgs=0]
// Check if the setup was sucessful
+0.0 getsockopt(3, SOL_SOCKET, SO_ERROR, [0], [4]) = 0
// probe for 1280
+0.0 > sctp: HEARTBEAT[flgs=0, HEARTBEAT_INFORMATION[len=..., val=...]];
PAD[flgs=0, len=1180, val=...]
+0.1 < sctp: HEARTBEAT_ACK[flgs=0, HEARTBEAT_INFORMATION[len=..., val=...]]
// probe for 1500
+0.0 > sctp: HEARTBEAT[flgs=0, HEARTBEAT_INFORMATION[len=..., val=...]];
PAD[flgs=0, len=1400, val=...]
+0.1 < sctp: HEARTBEAT_ACK[flgs=0, HEARTBEAT_INFORMATION[len=..., val=...]]
// Disable nagle to avoid delay for the second DATA chunk
+0.0 setsockopt(3, IPPROTO_SCTP, SCTP_NODELAY, [1], 4) = 0
// send bytes that result in an IP packet of 1504 byte
+0.1 write(3, ...,1436) = 1436
+0.0 > sctp: DATA[flgs=B, len=1448, tsn=1, sid=0, ssn=0, ppid=0]
+0.0 > sctp: DATA[flgs=E, len=20, tsn=2, sid=0, ssn=0, ppid=0]
+0.1 < icmp packet_too_big mtu 1492 [sctp(2)]
// immediately resend chunks sent in packets bigger than the reported MTU
// this packet gets fragmented on IP level, not supported by packetdrill
+0.0 > sctp: DATA[flgs=B, len=1448, tsn=1, sid=0, ssn=0, ppid=0]
// probe for 1280
+0.0 > sctp: HEARTBEAT[flgs=0, HEARTBEAT_INFORMATION[len=..., val=...]];
PAD[flgs=0, len=1180, val=...]
+0.0 < sctp: SACK[flgs=0, cum_tsn=0, a_rwnd=99999, gaps=[2:2], dups=[]]
+0.1 < sctp: HEARTBEAT_ACK[flgs=0, HEARTBEAT_INFORMATION[len=..., val=...]]
// probe for 1492
+0.0 > sctp: HEARTBEAT[flgs=0, HEARTBEAT_INFORMATION[len=..., val=...]];
PAD[flgs=0, len=1392, val=...]
+0.0 < sctp: SACK[flgs=0, cum_tsn=2, a_rwnd=99999, gaps=[], dups=[]]
+0.1 < sctp: HEARTBEAT_ACK[flgs=0, HEARTBEAT_INFORMATION[len=..., val=...]]
+1.0 close(3) = 0
//Shutdown
+0.0 > sctp: SHUTDOWN[flgs=0, cum_tsn=0]
+0.0 < sctp: SHUTDOWN_ACK[flgs=0]
+0.0 > sctp: SHUTDOWN_COMPLETE[flgs=...]