Академический Документы
Профессиональный Документы
Культура Документы
Session Number
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 1
Course Objectives: What You Should Get
• http://www.sctp.org
Also reachable with HTTP over SCTP!
• http://www.ietf.org/html.charters/tsvwg-charter.html
All current work on SCTP is done in the IETF TSVWG
• sctp-impl on mailer.cisco.com
App-2 App-3
App-1
OS
160.15.82.20 10.1.61.11
161.10.8.221
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 10
Of Endpoints and Associations
[161.10.8.221 : 2223]
Application-1
10.1.61.11
160.15.82.20
161.10.8.221
Sd-queue Ro-queue
Ro-queue Sd-queue
[Rcv INIT]
Gen Cookie
Send INIT-ACK CLOSED
[ASSOCIATE] COOKIE_WAIT
Create TCB
Send INIT
Start init timer
[rcv valid COOKIE-ECHO]
Create TCB [rcv INIT-ACK]
Send COOKIE-ACK Send COOKIE-ECHO
Stop init timer
Start cookie timer
COOKIE_ECHOED
ESTABLISHED
[rcv COOKIE-ACK]
Stop cookie timer
ESTABLISHED
[SHUTDOWN] [rcv SHUTDOWN]
Check outstanding Check outstanding
data chunks data chunks
SHUTDOWN- SHUTDOWN-
PENDING PENDING
NEXT-SLIDE NEXT-SLIDE
SHUTDOWN-
SENT SHUTDOWN-
ACK-SENT
[rcv SHUTDOWN-ACK]
send SHUTDOWN_COMPETE [rcv SHUTDOWN-COMPLETE]
Stop shutdown timer Stop shutdown timer
Delete TCB delete TCB
CLOSED
IP Header
Chunk 1
...
Chunk N
Verification Tag
CRC-32c Checksum
Chunk Data
4 Octets of Data
Initiation Tag
Initial TSN
Initiation Tag
Initial TSN
TSN Value
Stream Identifier Stream Sequence Num
Payload Protocol Identifier
• Gap Ack Block Start / End TSN offset: the start and
end offset for a range of consecutive TSNs received
relative to the cumulative ack point
The TSNs not covered by a Gap Ack Block indicate TSNs
that are “missing”
Heartbeat Data
Heartbeat Data
Cumulative TSN
SHUTDOWN
Endpoint A Endpoint Z
INIT
INIT-ACK
Association
Association COOKIE-ECHO * Is Up
Is Up
* COOKIE-ACK
Endpoint A Endpoint Z
INIT
Endpoint A Endpoint Z
INIT
INIT-ACK
Endpoint A Endpoint Z
INIT
INIT-ACK
COOKIE-ECHO *
Type=0x0A
Type=0xa Flags=0 Chunk Length=N
Cookie Data (N – 4 bytes)
Type=0xa
Type=0x0 Flags=03
Flags=0 Chunk Length=N
Length=K
TSN = X
Stream Number = M Stream Sequence = 0
Payload Protocol ID = A
Endpoint A Endpoint Z
INIT
INIT-ACK
Association
Association COOKIE-ECHO * Is Up
Is Up
* COOKIE-ACK
• Questions
Chunk 1
...
Chunk N
Endpoint A Endpoint Z
3800
octets
PMTU=512 octets
SCTP SCTP
TSN 1*
* - B bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 109
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
TSN 2 TSN 1*
* - B bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 110
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
* - B bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 111
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
* - B bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 112
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
TSN 1*
* - B bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 113
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
TSN 1*
TSN 2
TSN 6 TSN 5 TSN 4 TSN 3
* - B bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 114
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
TSN 1*
TSN 2
TSN 7 TSN 6 TSN 5 TSN 4
TSN 3
* - B bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 115
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
TSN 1*
TSN 2
TSN 8 TSN 7 TSN 6 TSN 5
TSN 3
TSN 4
* - B bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 116
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
TSN 1*
TSN 2
TSN 9+ TSN 8 TSN 7 TSN 6 TSN 3
TSN 4
TSN 5
* - B bit set to 1
+ - E bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 117
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
TSN 1*
TSN 2
TSN 9+ TSN 8 TSN 7 TSN 3
TSN 4
TSN 5
TSN 6
* - B bit set to 1
+ - E bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 118
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
TSN 1*
TSN 2
TSN 9+ TSN 8 TSN 3
TSN 4
TSN 5
TSN 6
TSN 7
* - B bit set to 1
+ - E bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 119
A Large Message Transfer
Endpoint A Endpoint Z
PMTU=512 octets
SCTP SCTP
TSN 1*
TSN 2
TSN 9+ TSN 3
TSN 4
TSN 5
TSN 6
TSN 7
TSN 8
* - B bit set to 1
+ - E bit set to 1
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 120
A Large Message Transfer
Endpoint A Endpoint Z
3800
octets
PMTU=512 octets
SCTP SCTP
IP-1
X
IP-2
EP-1 IP Network
IP-4 EP-2
IP-3
• A stream is uni-directional
SCTP makes NO correlation between an inbound and
outbound stream
Sd-queue Ro-queue
Ro-queue Sd-queue
• Questions
3
DATA(1452)
DATA(548)
4
• Questions?
Endpoint-1
Endpoint-2
NI-1 NI-2
NI-1 NI-2
IP Network
X
IP Network
Endpoint-1
Endpoint-2
NI-1 NI-2
NI-1 NI-2
IP Network
X
IP Network
X
Endpoint-1
Endpoint-2
NI-1 NI-2
NI-1 NI-2
IP Network
IP Network
Endpoint-1
Endpoint-2
IP-X IP-Z
IP-B
IP Network
Init(IP-A,IP-B) Evil-3
IP-A
IP Network
Endpoint-1 Endpoint-2
Endpoint-1 Endpoint-2
1.2
1.1
Endpoint-1 2.1 3.2 3.1
2.2 Endpoint-2
1.2
1.1
Endpoint-1 2.1 3.2 3.1/4.1
2.2 Endpoint-2
1.2
1.1
Endpoint-1 2.1 3.2 3.1
2.2 Endpoint-2
• Questions
1 close()
2
SHUTDOWN
3
4
DO W N- ACK
SHUT
5
SHUTDOWN-COMPL
ETE 6
• Questions?
SS7-Network SG MGC
IAM SLS=2
SS7-Network SG MGC
IAM SLS=8
IAM SLS=7
IAM SLS=2
SID=2
SS7-Network SG MGC
IAM SLS=8
SID=8
IAM SLS=7
SID=7
IAM SLS=2
SS7-Network SG MGC
IAM SLS=8
IAM SLS=7
ACM SLS=2
SID=2
/* notification event */
union sctp_notification {
struct sctp_tlv sn_header;
struct sctp_assoc_change sn_assoc_change;
struct sctp_paddr_change sn_paddr_change;
struct sctp_remote_error sn_remote_error;
struct sctp_send_failed sn_send_failed;
struct sctp_shutdown_event
sn_shutdown_event;
struct sctp_adaption_event sn_adaption_event;
struct sctp_pdapi_event sn_pdapi_event;
};
struct sctp_tlv {
u_int16_t sn_type;
u_int16_t sn_flags;
u_int32_t
sn_length;
};
• So what type of notifications do you get?
/* shutdown event */
struct sctp_shutdown_event {
u_int16_t sse_type;
u_int16_t sse_flags;
u_int32_t sse_length;
sctp_assoc_t
sse_assoc_id;
};
/* pdapi indications */
struct sctp_pdapi_event {
u_int16_t pdapi_type;
u_int16_t pdapi_flags;
u_int32_t pdapi_length;
u_int32_t
pdapi_indication;
sctp_assoc_t pdapi_assoc_id;
};
Presentation_ID © 2003 Cisco Systems, Inc. All rights reserved. 254
Common to events is the assoc_id