Go to main content

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

Exit Print View

Updated: November 2020
 
 

Configuring inetd Based Services

The section Modifying Services that are Controlled by inetd in Managing System Services in Oracle Solaris 11.4 includes steps for adding a new instance of an inetd based service.

The following procedure applies those steps to add an echo service to the SCTP protocol. This procedure can serve as a guide if you want to add other inetd services to transport layer protocols.

How to Add a New Instance of the echo Service to SCTP

Before You Begin

Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.

  1. (Optional) Confirm that the echo service is controlled by the inetd daemon.
    $ inetadm
    .
    disabled  disabled       svc:/network/echo:dgram
    disabled  disabled       svc:/network/echo:stream
    .
  2. Determine the location of the manifest for the echo service.
    $ svcs -l echo
    fmri         svc:/network/echo:stream
    name         echo
    enabled      false
    state        disabled
    next_state   none
    state_time   Thu Dec  3 08:11:11 2015
    restarter    svc:/network/inetd:default
    manifest     /etc/svc/profile/generic.xml
    manifest     /lib/svc/manifest/network/echo.xml<- location
    
    fmri         svc:/network/echo:dgram
    name         echo
    enabled      false
    state        disabled
    next_state   none
    state_time   Thu Dec  3 08:11:10 2015
    restarter    svc:/network/inetd:default
    manifest     /etc/svc/profile/generic.xml
    manifest     /lib/svc/manifest/network/echo.xml<- location
  3. Edit the /lib/svc/manifest/echo.xml file to add a new echo instance.
    1. Copy and paste an existing echo element in the XML file.

      echo.xml contains two echo-related elements: dgram and stream. You can use either to create a copy of the echo element on the file.

    2. Give the new echo instance a unique name.

      For this example, the name is sctp_stream.

    3. Change the property values in sctp_stream as necessary.

      For this example, the value of the proto property is changed to sctp.

    The revisions in the /lib/svc/manifest/echo.xml file are shown in bold:

    <instance name='sctp_stream' enabled='false' >
        <exec_method
    	type='method'
    	name='inetd_start'
    	exec='/usr/lib/inet/in.echod -d'
    	timeout_seconds='0'>
    	    <method_context>
    		<method_credential user='root' group='root' />
    	    </method_context>
        </exec_method>
    .
        <property_group name='inetd' type='framework'>
    	<propval name='endpoint_type' type='astring' value='dgram' />
    	<propval name='proto' type='astring' value='sctp' />
    	<propval name='wait' type='boolean' value='true' />
        </property_group>
    </instance>
  4. Add the new sctp_stream to the /etc/svc/profile/generic.xml file.

    The addition is shown in bold:

    <service name='network/echo' version='1' type='service'>
    <instance name='stream' enabled='false'/>
    <instance name='dgram' enabled='false'/>
    <instance name='sctp_stream' enabled='false'/>
    </service>
  5. Restart the manifest import service.
    $ svcadm restart manifest-import
  6. Verify that the sctp_stream has been added.
    $ svcs echo
  7. Verify the property values of sctp_stream.
    $ inetadm -l 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
    default  connection_backlog=10
    default  tcp_keepalive=FALSE 
  8. Add a definition for sctp_stream to the /etc/services file.

    Use the format service-name port/protocol [aliases]. For example:

    echo    30/sctp
  9. (Optional) Enable the new service instance.
    $ inetadm -e svc:/network/echo:sctp_stream