if-match protocol (Flow-Route-IPv6 view)

Function

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.

Format

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 }

Parameters

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:

  • 1: ICMP
  • 2: IGMP
  • 4: IPIP
  • 6: TCP
  • 8: EGP
  • 17: UDP
  • 41: IPv6
  • 46: RSVP
  • 47: GRE
  • 50: ESP
  • 58: ICMPv6
  • 89: OSPF
  • 103: PIM
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:

  • 1: ICMP
  • 2: IGMP
  • 4: IPIP
  • 6: TCP
  • 8: EGP
  • 17: UDP
  • 41: IPv6
  • 46: RSVP
  • 47: GRE
  • 50: ESP
  • 58: ICMPv6
  • 89: OSPF
  • 103: PIM

Views

Flow-Route IPv6 VPN instance view, Flow-Route-IPv6 view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
flow-route write

Usage Guidelines

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.

Example

# Configure a filtering rule that is based on the TCP protocol for the static BGP IPv6 Flow Specification route Rule 1.
<HUAWEI> system-view
[~HUAWEI] flow-route Rule1 ipv6
[*HUAWEI-flow-route-ipv6] if-match protocol equal 6
# Configure a filtering rule that is based on a protocol ID range for the static BGP IPv6 Flow Specification route Rule1.
<HUAWEI> system-view
[~HUAWEI] flow-route Rule1 ipv6 vpn-instance a
[*HUAWEI-flow-route-ipv6-a] if-match protocol greater-than 100 less-than 200
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >