The if-match protocol command configures a filtering rule based on the IP protocol.
The undo if-match protocol command deletes the filtering rule based on the IP protocol.
By default, no filtering rule is configured based on the IP protocol.
if-match protocol { greater-than | less-than | equal } { icmp | igmp | ipip | tcp | egp | udp | ipv6 | rsvp | gre | esp | ospf | pim | protocol | icmpv6 }
if-match protocol greater-than { icmp | igmp | ipip | tcp | egp | udp | ipv6 | rsvp | gre | esp | ospf | pim | protocol | icmpv6 } less-than { icmp | igmp | ipip | tcp | egp | udp | ipv6 | rsvp | gre | esp | ospf | pim | icmpv6 | upper-protocol-value }
undo if-match protocol
undo if-match protocol { greater-than | less-than | equal } { icmp | igmp | ipip | tcp | egp | udp | ipv6 | rsvp | gre | esp | ospf | pim | protocol | icmpv6 }
undo if-match protocol greater-than { icmp | igmp | ipip | tcp | egp | udp | ipv6 | rsvp | gre | esp | ospf | pim | protocol | icmpv6 } less-than { icmp | igmp | ipip | tcp | egp | udp | ipv6 | rsvp | gre | esp | ospf | pim | icmpv6 | upper-protocol-value }
Parameter | Description | Value |
---|---|---|
greater-than |
Indicates that the IP protocol ID is greater than the specified one. |
- |
less-than |
Indicates that the IP protocol ID is smaller than the specified one. |
- |
equal |
Indicates that the IP protocol ID is equal to the specified one. |
- |
protocol |
Specifies a protocol type with a name or number. |
The value is an integer that ranges from 0 to 255. The options are as follows:
|
upper-protocol-value |
Specifies the upper limit of an IP protocol ID range. |
The value is an integer that ranges from 0 to 255. The options are as follows:
|
Usage Scenario
The if-match protocol command is used to configure a filtering rule based on the IP protocol name or number for a BGP (IPv6) Flow Specification route or BGP (IPv6) VPN Flow Specification route. Traffic matching the filtering rule will be controlled with the action specified by the apply clause.
Prerequisites
A static BGP (IPv6) Flow Specification route or BGP (IPv6) VPN Flow Specification route has been created using the flow-route command in the system view.
Precautions
A maximum of five filtering rules based on the IP protocol type can be configured for a BGP Flow Specification route.
<HUAWEI> system-view [~HUAWEI] flow-route Rule1 vpn-instance va [*HUAWEI-flow-route-va] if-match protocol greater-than 6 less-than 10
<HUAWEI> system-view [~HUAWEI] flow-route Rule1 [*HUAWEI-flow-route] if-match protocol equal 6