Administering TCP/IP Networks, IPMP, and IP Tunnels in Oracle® Solaris 11.2

Exit Print View

Updated: July 2014
 
 

Adding Services That Use the SCTP Protocol

The Stream Control Transmission Protocol (SCTP) protocol provides services to application layer protocols in a fashion that is similar to TCP. However, SCTP enables communications 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 that is to be transmitted into one or more message streams, also called 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.

How to Add Services That Use the SCTP Protocol

By default, SCTP is included in Oracle Solaris and does not require additional configuration. However, you might need to explicitly configure certain application layer services to use SCTP. Some examples are the echo and discard applications. The following procedure describes how to add an echo service that uses an SCTP one-to-one style socket. You can use the same procedure to add services for TCP and UDP.

The following task describes how to add an SCTP inet service, which is managed by the inetd daemon, to the SMF repository. The task then describes how to use SMF commands to add the service.

Before You Begin

Before performing the following procedure, create a manifest file for the service. For example purposes, this procedure uses a manifest for the echo service that is named echo.sctp.xml.

  1. Log in to the local system with a user account that has write privileges for system files.
  2. Add a definition for the new service to the /etc/services file by using the pfedit command.

    See the pfedit (1M) man page.

    Use the following syntax for the service definition:

    service-name port/protocol aliases
  3. Change to the directory where the service manifest is stored, then import the service manifest.
    # cd dir-name
    # svccfg import service-manifest-name

    For example, you would add a new SCTP echo service by using the manifest echo.sctp.xml that is located in the service.dir directory as follows:

    # cd service.dir
    # svccfg import echo.sctp.xml
  4. 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.

  5. List the properties of the service to determine whether you need to make modifications.
    # inetadm -l FMRI
  6. Enable the new service.
    # inetadm -e FMRI
  7. Verify that the service is enabled.
Example 1-2  Adding a Service That Uses the SCTP Transport Protocol

The following example shows the commands to use and the file entries that are required in order to have the echo service use SCTP.

# 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