set service

Use the set service command to

Normal users can display service table entries. Root privileges are required to configure entries.

The following are the service numbers (TCP and UDP ports) to which you can assign names:

Command Syntax

Configuration Syntax

Enter the set service command as shown below to associate names with TCP service ports:

set service name=name port={udp:port|TCP:port}

Removal Syntax

Enter the set service command as shown below to remove an entry from the service table:

set service {rmservice=name|rmservice=on range=range}

Display Syntax

Enter the set service command as shown below to display entries in the service table:

set service [range=range]

Command Fields

Command Field

Description

name

Specifies the name to assign the service.

port

Specifies the TCP or UDP port number for the service.

range

Specifies a range of entries in the service table, which is used to identify entries to display or delete.

{rmservice=name| rmservice=on}

name - specifies the name of a service to be removed from the service table.

on - means remove the service (or services) from the service table identified on the range field.

Command Examples

Displaying the Service Table

In this example, the set service command displays the entire service table.

set service

Displaying an Entry in the Service Table

In this example, the set service command displays a range of entries in the service table.

set service range=2-4

Configuring an Entry in the Service Table

In this example, the set service command configures a name for telnet.

set service name=telnet port=tcp:23

Removing an Entry from the Service Table

In this example, the set service command removes the telnet entry from the service table.

set service name=telnet rmservice=on