The if-match icmp-type command configures a filtering rule based on the type of an ICMP packet.
The undo if-match icmp-type command deletes the filtering rule based on the type of an ICMP packet.
By default, no filtering rule based on the type of an ICMP packet is configured.
if-match icmp-type { greater-than | less-than | equal } icmp-type
if-match icmp-type greater-than icmp-type less-than upper-icmp-type-value
undo if-match icmp-type
undo if-match icmp-type greater-than icmp-type less-than upper-icmp-type-value
undo if-match icmp-type { greater-than | less-than | equal } icmp-type
Parameter | Description | Value |
---|---|---|
greater-than |
Indicates that the type of an ICMP packet is greater than the specified one. |
- |
less-than |
Indicates that the type of an ICMP packet is smaller than the specified one. |
- |
equal |
Indicates that the type of an ICMP packet is equal to the specified one. |
- |
icmp-type |
Specifies the ICMP packet type. |
The value is an integer ranging from 0 to 255. |
upper-icmp-type-value |
Specifies the upper limit of a range that identifies ICMP packet types. |
The value is an integer ranging from 0 to 255. |
Usage Scenario
To improve network performance or security, you can run the if-match icmp-type and if-match icmp-code commands to configure a filtering rule related to an ICMP packet for a BGP (IPv6) Flow Specification route or BGP (IPv6) VPN Flow Specification route to control traffic. There are two situations:
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 ICMP packet types 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 icmp-type greater-than 13 less-than 20
<HUAWEI> system-view [~HUAWEI] flow-route Rule1 ipv6 [*HUAWEI-flow-route-ipv6] if-match icmp-type equal 13
<HUAWEI> system-view [~HUAWEI] flow-route Rule1 [*HUAWEI-flow-route] if-match icmp-type equal 13