Vyatta Network OS Documentation

Learn how to install, configure and operate the Vyatta NOS, which helps drive our virtual networking & physical platforms portfolio.

policy route pbr <name> rule <rule-number> icmp <icmp>

Creates a routing policy rule to match Internet Control Message Protocol (ICMP) packets.

set policy route pbr name rule rule-number icmp { type type-number [ code code-number ] | name name }
delete policy route pbr name rule rule-number icmp [ type [ number code ] | name ]
show policy route pbr name rule rule-number icmp [ type [ number code ] | name ]

The rule is enabled.

name
Name of a PBR group. The PBR group must be unique and must not be used with other PBR policy commands.
rule-number

The numeric identifier of the rule. Rule numbers determine the order in which rules are executed. Each rule must have a unique rule number. The numbers range from 1 through 9999.

You can define multiple rules by creating more than one rule configuration node.

icmp
The ICMP packet that matches the routing policy rule. The ICMP packet identifiers are type, code, and name.
type-number
An IPv4 ICMP type number. Values range from 0 through 255.
code-number
An IPv4 ICMP code number. Values range from 0 through 255.
name
Specifies matching for ICMP type names. The default name is any.

Configuration mode


policy {
    route {
        pbr name {
            rule rule-number {
                icmp {
                    type type-number {
                        code code-number
                    }
                    name name
                }
            }
        }
    }
}

You must specify the address-family, action, and table leaf nodes to configure a routing policy. It is recommended to use the delete policy route pbr name rule number command to delete a routing policy.

Note: As ICMP is an IPv4 protocol and ICMPv6 is an IPv6 protocol, configuring a routing policy rule to match ICMPv6 packets when address-family ipv4 is configured or vice versa are unlikely to be useful and probably will not behave as you are expecting it to behave.

You can specify an ICMP type code by type; for example, 128 (echo-request), or by a type and code pair; for example, type 1 and code 4 (port-unreachable). Alternatively, you can specify the ICMP type code explicitly by using the name name parameter ; for example, name echo-request.

For a list of ICMP codes and types, refer to ICMP Types.

Use the set form of this command to create a rule to match ICMP packets.

Use the delete form of this command to delete a rule that matches ICMP packets.

Use the show form of this command to display a rule that matches ICMP packets.