### set service

Use the set service command to

- Configure (associate) names with TCP and UDP service ports for use in filters

- Remove entries from the service table

- Display entries in the service table

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:

- FTP - 21
- NNTP - 119
- RIP - 520
- Login - 513
- Shell - 514
- SMTP - 25
- Telnet - 23, 2001 to 2099
- TFTP - 69

#### 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`