Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

header-navigation
keyboard_arrow_up
close
keyboard_arrow_left
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

Inline Active Flow Monitoring on IRB Interfaces

date_range 06-Dec-24

You can perform inline active flow monitoring for IPv4 and IPv6 traffic on the integrated routing and bridging (IRB) interfaces on PTX Series routers.

Overview

On PTX Series routers, you can perform inline active flow monitoring for IPv4 and IPv6 traffic on the integrated routing and bridging (IRB) interfaces. Both IPFIX and version 9 templates for the flow monitoring are supported. For a description of the fields included in the templates, see Understand Inline Active Flow Monitoring.

Understand Inline Active Flow Monitoring on IRB interfaces

You can enable inline active flow monitoring by configuring the IPFIX or V9 templates on IRB interfaces.

Sampling on an IRB Interface with Traffic Routed to a Tunnelled Core

Figure 1 illustrates sampling on an IRB interface where the traffic is routed to a tunnelled core, primarily an MPLS tunnel. The packets are entering irb.10 on which you can enable ingress sampling. The packets can be forwarded to a next hop which is not a part of any user-defined VLAN.

Figure 1: Sampling on an IRB Interface Routing Traffic to a Tunnelled Core Sampling on an IRB Interface Routing Traffic to a Tunnelled Core

Layer 2 bridging and Layer 3 IP routing on an IRB interface

Figure 2 illustrates the topology where Layer 2 bridging and Layer 3 IP routing are supported on the same interface.

Figure 2: Layer 2 Bridging and Layer 3 IP Routing on the Same IRB Interface Layer 2 Bridging and Layer 3 IP Routing on the Same IRB Interface

PC1 and PC2 are in VLAN RED (ID 10) and PC3 is in VLAN BLUE (ID 20).

For traffic moving from PC1 to PC3 or from PC2 to PC3, an IRB interface must be configured with a logical unit with an address in the subnet for VLAN RED and a logical unit with an address in the subnet for VLAN BLUE. The switch automatically directs routes to these subnets and uses these routes to forward traffic between VLANs. If traffic is flowing from VLAN RED to VLAN BLUE, you can configure ingress sampling on irb.10 and egress sampling on irb.20.

Figure 3 illustrates sampling in a topology where Layer 2 bridging and Layer 3 IP routing are supported on the same interface. The interfaces, et-0/0/36.0 and irb.10 belong to VLAN ID 10. The interfaces, et-0/0/48 and irb.20 belong to VLAN ID 20. Packets are entering irb.10 and exiting on irb.20. Hence, you can configure ingress sampling on irb.10 and egress sampling on irb.20.

Figure 3: Sampling on an IRB Interface Supporting Bridging and Routing Sampling on an IRB Interface Supporting Bridging and Routing

Configure Inline Active Flow Monitoring on IRB Interfaces on PTX Series Routers

Configure the Template to Specify Output Properties

Configure a template to specify the output properties for the flow records:

  1. Configure the template name.
    content_copy zoom_out_map
    [edit services flow-monitoring]
    user@host# set (version-ipfix | version9) template template-name
    

    For example:

    content_copy zoom_out_map
    [edit services flow-monitoring]
    user@host# set version-ipfix template t1
    
  2. (Optional) Configure the interval after which an active flow is exported.
    content_copy zoom_out_map
    [edit services flow-monitoring (version-ipfix | version9) template template-name]
    user@host# set flow-active-timeout seconds
    

    For example:

    content_copy zoom_out_map
    [edit services flow-monitoring (version-ipfix | version9) template template-name]
    user@host# set flow-active-timeout 10
    
  3. (Optional) Configure the interval of activity that marks a flow as inactive.
    content_copy zoom_out_map
    [edit services flow-monitoring (version-ipfix | version9) template template-name]
    user@host# set flow-inactive-timeout seconds
    

    For example:

    content_copy zoom_out_map
    [edit services flow-monitoring (version-ipfix | version9) template template-name]
    user@host# set flow-inactive-timeout 10
    
  4. Specify the template type.
    content_copy zoom_out_map
    [edit services flow-monitoring (version-ipfix | version9) template template-name]
    user@host# set template-name
    

    For example:

    content_copy zoom_out_map
    [edit services flow-monitoring (version-ipfix | version9) template template-name]
    user@host# set ipv4-template
    

Configure the Sampling Instance

Configure a sampling instance:

  1. Configure the sampling instance name.
    content_copy zoom_out_map
    [edit forwarding-options sampling]
    user@host# set instance instance-name
    

    For example:

    content_copy zoom_out_map
    [edit forwarding-options sampling]
    user@host# set instance s1
    
  2. Configure the protocol family for the sampling instance.
    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name]
    user@host# set family (inet | inet6 | mpls)
    

    For example:

    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name]
    user@host# set family inet
    
  3. Set the ratio of the number of packets to be sampled. For example, if you specify a rate of 10, every tenth packet (1 packet out of 10) is sampled.
    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name input]
    user@host# set rate number
    

    For example:

    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name input]
    user@host# set rate 10
    
  4. Specify the source address for the traffic to be sampled.
    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name family inet output]
    user@host# set inline-jflow source-address address
    

    For example:

    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name family inet output]
    user@host# set inline-jflow source-address 10.10.0.1
    
  5. Specify the output address and port for a flow server.
    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name family inet output] 
    user@host# set flow-server hostname port port-number
    

    For example:

    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name family inet output]
    user@host# set flow-server 10.10.10.2 port 2055
    
  6. Specify the template to use with the sampling instance.
    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name family inet output flow-server hostname]
    user@host# set (version9 | version-ipfix) template template-name
    

    For example:

    content_copy zoom_out_map
    [edit forwarding-options sampling instance instance-name family inet output]
    user@host# set version-ipfix template t1
    

Assign the Sampling Instance to an FPC

Assign the sampling instance to the FPC on which you want to implement flow monitoring.

content_copy zoom_out_map
[edit chassis]
user@host# set fpc slot-number sampling-instance instance-name

For example:

content_copy zoom_out_map
[edit chassis]
user@host# set fpc 0 sampling-instance s1

Configure a Firewall Filter

Configure a firewall filter to specify the family of traffic to accept and sample.

  1. Configure the firewall filter name and specify the family of traffic.
    content_copy zoom_out_map
    [edit firewall]
    user@host# set family (inet | inet6 | mpls) filter filter-name 
    

    For example:

    content_copy zoom_out_map
    [edit firewall]
    user@host# set family inet filter f2 
    
  2. Configure a term to sample and accept packets.
    content_copy zoom_out_map
    [edit firewall family mpls filter filter-name]
    user@host# set term term-name then accept
    user@host# set term term-name then sample
    

    For example:

    content_copy zoom_out_map
    [edit firewall family mpls filter filter-name]
    user@host# set term t1 then count c2 
    user@host# set term t1 then accept
    user@host# set term t1 then sample
    

Associate a Layer 3 Interface with the VLAN to Route Traffic

Assign the IRB Interface to the VLAN.

content_copy zoom_out_map
[edit vlans vlan-name]
user@host# set vlan-name vlan-id vlan-id-number 
user@host# set vlan-name l3-interface l3-interface-name .logical-interface-number 

For example:

content_copy zoom_out_map
[edit vlans vlan-name]
user@host# set vlan10 vlan-id 10
user@host# set vlan10 l3-interface irb.10 

For example, if you are configuring inline flow monitoring using IRB while supporting layer 2 bridging and layer 3 IP routing on the same interface (See Figure 3):

content_copy zoom_out_map
[edit vlans vlan-name]
user@host# set vlan-10 vlan-id 10
user@host# set vlan-10 l3-interface irb.10 
user@host# set vlan-20 vlan-id 20
user@host# set vlan-20 l3-interface irb.20 

Assign the Firewall Filter to the Monitored Interface

Assign the input firewall filter to the interface you want to monitor. Also, configure the VLANs for which the interface can carry traffic.

content_copy zoom_out_map
[edit interfaces]
user@host# set interface-name unit logical-unit-number family (inet | inet6 | mpls) filter input filter-name address

For example, if you are configuring inline flow monitoring using IRB while supporting layer 2 bridging and layer 3 IP routing on the same interface (See Figure 3):

content_copy zoom_out_map
[edit interfaces]
user@host# set et-0/0/36 unit 0 family ethernet-switching vlan members vlan10
user@host# set et-0/0/48 unit 0 family ethernet-switching vlan members vlan20
user@host# set et-0/0/60 unit 0 family inet address 10.10.10.1
user@host# set irb unit 1 family inet filter input f2 
user@host# set irb unit 1 family inet address 10.1.1.1
user@host# set irb unit 2 family inet address 10.20.1.1
user@host# set irb unit 1 family inet address 10.1.1.1
user@host# set irb unit 2 family inet filter output f2

Change History Table

Feature support is determined by the platform and release you are using. Use Feature Explorer to determine if a feature is supported on your platform.

Release
Description
24.4R1-EVO
Starting in Junos OS Evolved Release 24.4R1 on the PTX10002-36QDD router, you can perform inline active flow monitoring for IPv4 and IPv6 traffic on integrated routing and bridging (IRB) interfaces.
22.2R1-EVO
Starting in Junos OS Evolved Release 22.2R1 on the PTX10003 router, you can perform inline active flow monitoring for IPv4 and IPv6 traffic on integrated routing and bridging (IRB) interfaces.
21.3R1-EVO
Starting in Junos OS Evolved Release 21.3R1 on the PTX10001-36MR, PTX10004, and PTX10008 routers, you can perform inline active flow monitoring for IPv4 and IPv6 traffic on integrated routing and bridging (IRB) interfaces.
19.1R1
Starting in Junos OS Release 19.1R1, on PTX Series routers, you can perform inline active flow monitoring for IPv4 and IPv6 traffic on integrated routing and bridging (IRB) interfaces.
footer-navigation