The SCTP transport protocol provides services to application layer protocols in a fashion similar to TCP. However, SCTP enables communication between two systems, either or both of which can be multihomed. The SCTP connection is called an association. In an association, an application divides the data to be transmitted into one or more message streams, or multi-streamed. An SCTP connection can go to endpoints with multiple IP addresses, which is particularly important for telephony applications. The multihoming capabilities of SCTP are a security consideration if your site uses IP Filter or IPsec. Some of these considerations are described in the sctp(7P) man page.
By default, SCTP is included in the Solaris OS and does not require additional configuration. However, you might need to explicitly configure certain application layer services to use SCTP. Some example applications are echo and discard. The next procedure shows how to add an echo service that uses an SCTP one-to-one style socket.
You can also use the following procedure to add services for the TCP and UDP transport layer protocols.
The following task shows how to add an SCTP inet service that is managed by the inetd daemon to the SMF repository. The task then shows how to use the Service Management Facility (SMF) commands to add the service.
For information about SMF commands, refer to SMF Command-Line Administrative Utilities in System Administration Guide: Basic Administration.
For syntactical information, refer to the man pages for the SMF commands, as cited in the procedure.
For detailed information about SMF refer to the smf(5) man page.
Before you perform the following procedure, create a manifest file for the service. The procedure uses as an example a manifest for the echo service that is called echo.sctp.xml.
Log in to the local system with a user account that has write privileges for system files.
Edit the /etc/services file and add a definition for the new service.
Use the following syntax for the service definition.
service-name |port/protocol | aliases |
Add the new service.
Go to the directory where the service manifest is stored and type the following:
# cd dir-name # svccfg import service-manifest-name |
For a complete syntax of svccfg, refer to the svccfg(1M) man page.
Suppose you want to add a new SCTP echo service using the manifest echo.sctp.xml that is currently located in the service.dir directory. You would type the following:
# cd service.dir # svccfg import echo.sctp.xml |
Verify that the service manifest has been added:
# svcs FMRI |
For the FMRI argument, use the Fault Managed Resource Identifier (FMRI) of the service manifest. For example, for the SCTP echo service, you would use the following command:
# svcs svc:/network/echo:sctp_stream |
Your output should resemble the following:
STATE STIME FMRI disabled 16:17:00 svc:/network/echo:sctp_stream |
For detailed information about the svcs command, refer to the svcs(1) man page.
The output indicates that the new service manifest is currently disabled.
List the properties of the service to determine if you must make modifications.
# inetadm -l FMRI |
For detailed information about the inetadm command, refer to the inetadm(1M) man page.
For example, for the SCTP echo service, you would type the following:
# inetadm -l svc:/network/echo:sctp_stream SCOPE NAME=VALUE name="echo" endpoint_type="stream" proto="sctp" isrpc=FALSE wait=FALSE exec="/usr/lib/inet/in.echod -s" . . default tcp_trace=FALSE default tcp_wrappers=FALSE |
Enable the new service:
# inetadm -e FMRI |
Verify that the service is enabled:
For example, for the new echo service, you would type the following:
# inetadm | grep sctp_stream . . enabled online svc:/network/echo:sctp_stream |
The following example shows the commands to use and the file entries required to have the echo service use the SCTP transport layer protocol.
$ cat /etc/services . . echo 7/tcp echo 7/udp echo 7/sctp # cd service.dir # svccfg import echo.sctp.xml # svcs network/echo* STATE STIME FMRI disabled 15:46:44 svc:/network/echo:dgram disabled 15:46:44 svc:/network/echo:stream disabled 16:17:00 svc:/network/echo:sctp_stream # inetadm -l svc:/network/echo:sctp_stream SCOPE NAME=VALUE name="echo" endpoint_type="stream" proto="sctp" isrpc=FALSE wait=FALSE exec="/usr/lib/inet/in.echod -s" user="root" default bind_addr="" default bind_fail_max=-1 default bind_fail_interval=-1 default max_con_rate=-1 default max_copies=-1 default con_rate_offline=-1 default failrate_cnt=40 default failrate_interval=60 default inherit_env=TRUE default tcp_trace=FALSE default tcp_wrappers=FALSE # inetadm -e svc:/network/echo:sctp_stream # inetadm | grep echo disabled disabled svc:/network/echo:stream disabled disabled svc:/network/echo:dgram enabled online svc:/network/echo:sctp_stream |