nexthop-learning
Syntax
nexthop-learning (disable | enable);
Hierarchy Level
[edit services flow-monitoring (version-ipfix |version9) template template-name]
Description
Enable learning of next-hop addresses to correctly report the next hop address, output SNMP, destination IP address, destination IP mask values, the packet loss priority, and the first two characters of the configured forwarding class name in the flow records when a destination is reachable through multiple paths. By default, this behavior of learning the next-hop addresses is disabled for inline active flow monitoring.
For PTX Series, starting in Junos OS Evolved 21.2R1 and in Junos OS Release 21.3R1,
every sampled packet is considered to be a flow. When the sampled packet is
received, the flow is created and immediately timed out as inactive, and the
software exports a record to the collector. The effect of the
nexthop-learning
statement on this behavior varies depending
upon the operating system. For Junos OS Evolved, we do not recommend that you
configure the nexthop-learning
statement, as it reduces the number
of packets that can be processed. For Junos OS, you can configure the
nexthop-learning
statement to change this default no-flow
behavior and once again create and maintain flows, then attach the template to all
sampling instances associated with FPCs that require the previous behavior.
When learning of next-hop addresses is disabled, data is reported as follows:
-
If the destination address of the sampled IPv4 flow is reachable through multiple paths, the ipNextHopIPv4Address (Element ID 15) and egressInterface (Element ID 14) in the IPv4 flow record are set to the gateway IP address and SNMP index of the first path seen in the forwarding table.
-
If the destination address of the sampled IPv6 flow is reachable through multiple paths, the ipNextHopIPv6Address (Element ID 62) and egressInterface (Element ID 14) in the IPv6 flow records are set to 0.
-
The Incoming Interface (IIF) and Outgoing Interface (OIF) should be part of the same VRF. If the OIF is in a different VRF, destinationIPv4PrefixLength (Element ID 13), bgpDestinationAsNumber (Element ID 17), ipNextHopIPv4Address (Element ID 15), and egressInterface (Element ID 14) are set to 0 in IPv4 flow records and destinationIPv6PrefixLength (Element ID 30), bgpDestinationAsNumber (Element ID 17), ipNextHopIPv6Address (Element ID 62), and egressInterface (Element ID 14) are set to 0 in IPv6 flow records.
-
The packet loss priority and forwarding class information is not reported for the PTX1000, PTX10008 (without the JNP10008-SF3), and PTX10016 routers.
When learning of next-hop addresses is enabled, output SNMP, destination IP address, destination IP mask values, the packet loss priority, and the first two characters of the configured forwarding class in the flow records are reported correctly. In addition, when enabled, mplsTopLabelIPv4Address (Element ID 47) in IPv4 flow records reports correctly when MPLS ingress sampling is enabled.
Nexthop learning is supported only when sampling is implemented on the PFE. This is known as inline active flow monitoring. Nexthop learning does not work when sampling is configured on the MS-DPC/MS-MPC/MS-MIC service cards.
Options
disable
—Disable the learning
of next-hop information required for inline active flow monitoring.
enable
—Enable the learning of next-hop information
required for inline active flow monitoring.
Default: disable
Required Privilege Level
system—To view this statement in the configuration.
system-control—To add this statement to the configuration.
Release Information
Statement introduced in Junos OS Release 15.1F2.
nexthop-learning
is supported for the bridge-template
statement in Junos OS Release 18.2R1 for MX Series routers.
Support introduced in Junos OS Release 20.3R1 to correctly report the packet loss priority and the first two characters of the configured forwarding class in the IPv4 and IPv6 IPFIX templates for the PTX1000, PTX10008 (without the JNP10008-SF3), and PTX10016 routers.