< Home

service (NAT policy rule view)

Function

The service command specifies a service in a NAT policy rule.

The undo service command removes a service from a traffic policy rule.

Format

service { service-name &<1-6> | any }

undo service { service-name &<1-6> | all }

Parameters

Parameter Description Value
service-name Specifies the name of a service or service group. The service or service group must exist. A maximum of six services or service groups can be specified or deleted at a time. The value is a case-sensitive character string. The length of a name without spaces ranges from 1 to 32 characters. The length of a name with spaces ranges from 3 to 34 characters. If a name contains spaces, the name must be enclosed with quotation marks (for example, "user for test"). The name cannot contain any question marks (?), commas (,), or quotation marks (").
any Indicates any service. -
all Removes all services from the NAT policy rule. -

Views

NAT policy rule view

Default Level

2: Configuration level

Usage Guidelines

The service/service group referenced in a NAT policy can be either a predefined service or user-defined service/service group. You can use the ip service-set command to configure user-defined services/service groups. The system provides predefined services. You can run the display predefined-service command to display details on predefined services.

The NAT policies cannot reference the predefined services with dynamic ports, namely, the predefined services whose port is identified as dynamic port.

By default, no service is configured in a NAT policy rule.

Example

# Specify a service named h323 in a NAT policy rule named abc.

<sysname> system-view
[sysname] nat-policy 
[sysname-policy-nat] rule name abc 
[sysname-policy-nat-rule-abc] service h323
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >