Controls and configures SCTP.
sctpctrl stats [reset] [interval]
sctpctrl set {name=value|default [name]}
sctpctrl get [name]
The sctpctrl command is used to control and configure the SCTP kernel extension. This command can be used to load and unload the SCTP kernel extension. This can also be used to dump SCTP data and set or retrieve various SCTP tunable. Further, sctpctrl command can be used to read and reset the SCTP specific network statistics.
Item | Description |
---|---|
load | Loads the SCTP kernel extension if not loaded. |
dump | Dump information about internal SCTP structures. |
stats [reset] [interval] | Displays SCTP statistics. The optional reset command will clear (zero) the statistics. If the interval parameter (in seconds) is added, the program does not exit, but outputs the statistics every [interval] seconds. |
set {name=value|default [name]} | Sets the SCTP tunable to a value. If default is specified then it will set all the tunable to their default values. If optional [name] is specified followed by default then it will set tunable described by name to its default value. |
get [name] | Gets the value of the tunable described by their optional name parameter. If name parameter is not specified then it gets the values of all the tunable. |
The sctpctrl command is also used to configure the SCTP tuning parameters. The changes made are not permanent and they have to be set every time a system gets rebooted. The tunables parameters are explained in the following table.
Item | Description | ||
---|---|---|---|
Parameter | Purpose | Scope | Default |
sctp_low_rto | When nonzero, this value is used in place of RTO.min (retransmission time-out). It is specified in terms of milliseconds. Values less than 200 are not allowed. The available time-out values are 200, 250, 300, 350, and so on. | This value is examined each time a new RTT (round trip time) measurement is made and also when RTO is adjusted due to packet loss. | As specified in the RFC 4960 (Request for Comment) document, the default value for this tunable is zero, which means the minimum value of RTO.Min is used, which is 1 second. |
sctp_enable_shutdown_guard | When nonzero, this tunable enables a T5-shutdown guard-timer. It is not RFC compliant because it begins timing when association enters shutdown-pending state. | This value is only examined at an association shutdown. | The default value for this tunable is zero, which means that the T5-shutdown guard-timer is not used. |
sctp_shutdown_guard_timer | When the sctp_enable_shutdown_guard parameter is a nonzero value, this tunable defines the shutdown time-out value in seconds. | This value is only examined at an association shutdown. | The default value is 300 seconds, which is the RFC-specified value for the T5-shutdown guard-timer. |
sctp_peerchangespath | When nonzero, this tunable causes a primary path change based on an incoming data chunk from a different path than the current primary path. | This value is examined on every inbound data chunk. | The default value for this tunable is 1, which retains the existing behavior. |
sctp_delack_timer | This tunable specifies the timer value in ticks (1 tick = 50 ms (milliseconds)) for the delayed-ack timer. | For an ACCEPTCONN socket, this value is established during setup and is used for all associations that share that socket. For a socket other than an ACCEPTCONN socket, it is set at association creation. So changes to this tunable do not affect associations already in existence. | The default value is 4 ticks (200 ms). |
sctp_drop_gapacks | If set to 1, it causes the sender side to drop
all GAPACKED packets from the socket send buffer, thus making
some space free for new packets. Note: This is an RFC noncompatible
tunable and could impact interoperability with other implementations,
potentially resulting in a message loss.
|
This tunable is checked each time GAPACKED packets are processed. | The default value is 0, which means disabled. |
sctp_dontdelayack | If set to 1, a SACK packet is sent for every other DATA packet. Otherwise, a delayed-ack timer is started. | Any updates to this tunable have an immediate impact. | The default value is 1. |
sctp_nagle | If set to 1, it ensures that at least 1 MTU (maximum transmission unit) of data is sent. | Any updates to this tunable have an immediate impact. | The default value is 1 (a nagle is enabled). |
sctp_maxburst | If nonzero, it limits the maximum number of packets sent out to this value. | Any updates to this tunable have an immediate impact. | The default value is 8 packets. |
sctp_rttmax | This tunable specifies the maximum value to be used when RTO computations are made. | Similar to the sctp_low_rto parameter, this value is examined each time a new RTT measurement is made (and RTO calculated with that) and also when RTO is adjusted due to packet loss. | The default value is 60 seconds. |
sctp_rttmin | This tunable specifies the minimum value to be used when RTO computations are made. | If the sctp_low_rto parameter is nonzero, this value is ignored. Otherwise, it is examined each time a new RTT measurement is made and when RTO is stopped due to packet loss. | The default value is 1 second, which ensures that the minimum RTO cannot go below that. |
sctp_assoc_maxerr | This tunable sets the overall association error count. If an error count exceeds this value, the association is ended. Currently, this value is ignored. The assoc_maxerr parameter is calculated based on the path error count and number of faddrs. | For an ACCEPTCONN socket, this value is established during setup and is used for all associations that share that socket. For a socket that is not an ACCEPTCONN socket, it is set at association creation. So changes to this tunable do not affect associations already in existence. | The default value is 10. |
sctp_path_maxerr | This tunable sets the maximum error count for each destination. If the error count exceeds this value, the path is marked down and an alternative path is chosen. | For an ACCEPTCONN socket, this value is established during setup and is used for all associations that share that socket. For a socket that is not an ACCEPTCONN socket, it is set at association creation. So changes to this tunable do not affect associations already in existence. | The default value is 5. |
sctp_use_checksum | This tunable allows an administrator to use
different checksum computation methods. Possible values follows:
|
This parameter is examined for each outgoing and incoming packet. | The default value is zero, which is the RFC-specified CRC32 checksum. |
sctp_sendspace | This tunable specifies the socket buffer size
for sending data. The optimum buffer size is the product of the media
bandwidth and the average round-trip time of a packet: optimum_window = bandwidth * average_round_trip_time |
This parameter is accessed when a new association is created. Use the setsockopt function to override this parameter. | The default value is 65536. |
sctp_recvspace | This tunable specifies the socket buffer size for receiving data. | This parameter is accessed when a new association is created. Use the setsockopt function to override this parameter. | The default value is 65536. |
sctp_send_fewsacks | When enabled, this tunable parameter implements recv side silly window avoidance. It prevents sending a window update until a receiver can fit in 1 MTU of data. | This parameter is accessed each time data is read by an application and a window update is being sent. | The default value is 0. |
sctp_cookie_life | This tunable specifies the time duration in seconds for which a cookie is considered to be valid. | This parameter is used to determine a stale cookie during connection establishment. | The default value is 60 seconds. |
sctp_ecn | This tunable enables or disables the explicit congestion notification (RFC 3168). | It is accessed during connection establishment. | The default value is 1. |
sctp_ephemeral_high | This tunable specifies the largest port number to allocate for the SCTP (Stream Control Transmission Protocol) ephemeral ports. | It is used when an application is trying to bind to a port. | The default value is 65535. |
sctp_ephemeral_low | This tunable specifies the lowest port number to allocate for the SCTP ephemeral ports. | It is used when an application is trying to bind to a port. | The default value is 32768. |
sctp_instreams | This tunable specifies the default number of inbound streams that an association uses. | It is used during connection establishment. | The default is 2048. |
sctp_outstreams | This tunable specifies the default number of outbound streams that an association uses. | It is used during connection establishment. | The default value is 10. |
sctp_pmtu_discover | If enabled, sets the Dont Fragment bit in an IP header of an outgoing packet. | It is accessed when the sending packets are sent out. | The default value is 1. |
sctp_recv_multibuf | This tunable controls the socket receive buffer accounting. The default value is 0 and it indicates that all the associations belonging to the socket share the same receive buffer space. When set to nonzero, each association has its own receive buffer space of this value. The setsockopt function overrides this value. | It is accessed when an association is being created. | The default value is 0 (multibuf is not used). |
sctp_send_multibuf | This tunable controls the socket send buffer accounting. The default value is 0 and indicates that all the associations belonging to a socket share the same send buffer space. When set to nonzero, each association has its own send buffer space of this value. The setsockopt function overrides this value. | It is accessed when an association is being created. | The default is 0 (multibuf is not used). |
sctp_failover_type | When enabled, it causes a new path to be chosen after every retransmit timeout. Otherwise, failover happens only after the path error count value exceeds max path error count value. | It is accessed whenever RTO starts (when there is a packet drop). | The default value is 1. |
sctp_check_associd | Governs the pattern related to checking the association ID passed by an application when sending an ABORT packet. If set to 0, it ignores the association ID. The association is found by using the foreign address. If set to 1, it performs strict association ID matching. If an association is not found with the passed assoc_id value, an EINVAL error is returned. If set to 2, it performs association ID matching, but uses the foreign address when a reserved assoc_id value is used. | It is accessed whenever a user application issues an ABORT packet. | The default value is 0. |
sctpctrl load
sctpctrl stats reset
This
command will zero-out all the SCTP statistics.sctpctrl get
This
will list all the SCTP tunable and their values. Here is a sample
output. sctp_assoc_maxerr = 10
sctp_cookie_life = 60
sctp_delack_timer = 4
sctp_dontdelayack = 1
sctp_ecn = 1
sctp_ephemeral_high = 65535
sctp_ephemeral_low = 32768
sctp_instreams = 2048
sctp_maxburst = 8
sctp_outstreams = 10
sctp_path_maxerr = 5
sctp_pmtu_discover = 1
sctp_rttmax = 60
sctp_rttmin = 1
sctp_recvspace = 65536
sctp_sendspace = 65536
sctp_send_fewsacks = 0
sctpctrl set sctp_path_maxerr=6
/usr/sbin/sctpctrl
Item | Description |
---|---|
/usr/sbin/sctpctrl | Contains the sctpctrl command. |
/usr/lib/drivers/sctp | Contains the SCTP kernel extension. |