service (PBR rule view)

Function

The service command sets the service type of packets as a matching condition.

The undo service command deletes the configuration.

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 specified service or service group must exist. You can add or delete a maximum of six services or service groups at a time.

any

Indicates any service.

-

all

Deletes all configurations that use service groups as a matching condition of a PBR rule.

-

Views

PBR rule view

Default Level

2: Configuration level

Usage Guidelines

The service type of packets can be a matching condition of a PBR rule. Configure the services or service groups before referencing them in a PBR rule.

Packets matching any of the specified service types match the PBR rule.

The service/service group referenced in a PBR rule 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 PBR rules cannot reference the predefined services with dynamic ports, namely, the predefined services whose port is identified as dynamic port.

Example

# Set service group video as a matching condition of PBR rule abc.

<sysname> system-view
[sysname] policy-based-route
[sysname-policy-pbr] rule name abc
[sysname-policy-pbr-rule-abc] service video

Huawei Proprietary and Confidential
Copyright © Huawei Technologies Co., Ltd.