arrow-left

All pages
gitbookPowered by GitBook
1 of 13

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Loading...

Configuring Tool Ports

You can specify the destination(s) for packets matching the flow. The supported destinations are as follows:

  • port-id(s): matching traffic redirected to one or more tool ports

  • port-channel: matching traffic redirected to multiple tool ports with symmetric load balancing

hashtag
Reference

hashtag
Example

You can verify the configuration by using the command(s) below:

Command

tool-ports <tool-ports>

Description

Configure network tool or analyzer ports

Parameters

tool-ports—valid interfaces, delimited by (,)

Mode

FLOW

pbnoscli# configure terminal 
pbnoscli(config)# flow flow01
pbnoscli(config-flow-flow01)# network-ports Ethernet1/1,Ethernet2/1
pbnoscli(config-flow-flow01)# tool-      
  tool-ports            Configure network tool or analyzer ports
pbnoscli(config-flow-flow01)# tool-ports port-channel1,Ethernet8/1
pbnoscli(config-flow-flow01)#
pbnoscli# show flow flow01

===================================
Flow : flow01 (CLI)
===================================
Status       : enable          
Network-Port : Ethernet1/1,Ethernet2/1
Tool-Port    : port-channel1,Ethernet8/1
pbnoscli# 
pbnoscli# show running-config 
configure terminal
port-channel 1 ports Ethernet63/1,Ethernet64/1
!
interface ethernet Ethernet1/1
forward-error-correction rs
type network
!
interface ethernet Ethernet2/1
forward-error-correction rs
type network
!
interface mgmt
ip address 10.4.4.53/23 gateway 10.4.4.1
!
flow flow01
network-ports Ethernet1/1,Ethernet2/1
tool-ports port-channel1,Ethernet8/1
!
pbnoscli# 

Configuring Flows and Rules

This section provides information about configuring flows and rules.

Configuring Flowschevron-right
Configuring Flow Descriptionchevron-right
Configuring Flow Rules (NVIDIA)chevron-right
Configuring Flow Override Action(s)chevron-right
Display Flow Informationchevron-right

Configuring Flows

You can configure flows with rules to replicate and filter traffic between the network and tool ports.

Flow can be used to create a traffic stream between the network port and tool port, The traffic can be filtered by configuring rule(s) to permit/deny matching traffic.

hashtag
Reference

Command

hashtag
Example

[no] flow <flow-name>

Description

Create/Delete Flow

Parameters

Flow-name—maximum of 10 characters

Interface

CONFIG

pbnoscli# configure terminal 
pbnoscli(config)# flow flow01
pbnoscli(config-flow-flow01)# 
  !                     Exit from the current prompt
  description           Configure description for flow
  enable                Enable the flow
  end                   Exit to exec prompt
  exit                  Exit from the current prompt
  network-ports         Configure network or TAP ports
  no                    no form
  pop-vlan              Pop Vlan Tag
  push-vlan-tag         Push VLAN tag
  rule                  Configure rule
  show                  Show commands
  tool-ports            Configure network tool or analyzer ports
  top                   Exit to the configuration prompt
pbnoscli(config-flow-flow01)# exit

//to delete a flow
pbnoscli(config)# no flow flow01
pbnoscli(config)

Configuring Network Ports

Network ports are the source port(s) that can be specified in a flow for matching and filtering on one or more ingress traffic ports.

hashtag
Reference

Command

network-ports <network-ports>

Description

hashtag
CLI Example

You can verify the configuration by using the command(s) below:

Configure network or TAP ports

Parameters

network-ports—valid interfaces, delimited by (,)

Mode

FLOW

pbnoscli# configure terminal 
pbnoscli(config)# flow flow01
pbnoscli(config-flow-flow01)# network-               
  network-ports         Configure network or TAP ports
pbnoscli(config-flow-flow01)# network-ports Ethernet1/1,Ethernet2/1
pbnoscli(config-flow-flow01)# 

Network port as Port-channel
~~~~~~~~~~~~~~~~~~~~~~~~~~~~

pbnoscli# conf t
pbnoscli(config)# flow flow02
pbnoscli(config-flow-flow02)# network-ports
  <network_port>        Add Network ports (delimited by ,)
pbnoscli(config-flow-flow02)# network-ports port-channel5
pbnoscli(config-flow-flow02)# end
pbnoscli#
pbnoscli# show flow flow01

===================================
Flow : flow01 (CLI)
===================================
Status       : enable          
Network-Port : Ethernet1/1,Ethernet2/1
pbnoscli# 

pbnoscli# show flow flow02

===================================
Flow : flow02 (CLI)
===================================
Status       : enable
Network-Port : port-channel5
pbnoscli#
pbnoscli# show running-config 
configure terminal
!
interface ethernet Ethernet1/1
forward-error-correction rs
type network
!
interface ethernet Ethernet2/1
forward-error-correction rs
type network
!
interface mgmt
ip address 10.4.4.53/23 gateway 10.4.4.1
!
flow flow01
network-ports Ethernet0,Ethernet4
!
pbnoscli# 

pbnoscli# show running-config
configure terminal
!
port-channel 5 ports Ethernet1/1,Ethernet2/1 lacp min-links 1
!
flow flow02
enable
network-ports port-channel5
pbnoscli#

Configuring Flow Rules (NVIDIA)

NVIDIA ASIC

You can configure a rule with certain qualifiers to aggregate and filter traffic from network port(s) to tool port(s) for monitoring.

circle-info

Before configuring flow rules, Network and Tool ports must be configured

hashtag
Reference

hashtag
Example

You can verify the configuration by using the command(s) below:

Configuring Flow Rules (Broadcom)

Broadcom ASIC

You can configure a rule with certain qualifiers to aggregate and filter traffic from network port(s) to tool port(s) for monitoring.

circle-info

Before configuring flow rules, Network and Tool ports must be configured

hashtag

Configuring Flow Description

You can specify the description of the flow. The description can contain upto 48 characters long and is case-sensitive.

hashtag
Reference

Command

rule <ruleid> (deny | permit ) [description <cstring>] ([ethertype <etype>] [vlan <vid>] [src-ip (<ipv4> | <ipv6 > src-netmask <ipv6 >)] [dest-ip (<ipv4> | <ipv6 > dest-netmask <ipv6 >)] [protocol (tcp | udp | <ptype >)] [l4portsrc <sport>] [l4portdst <dport>] [tosval <sval >] [dscp <dval>] [ttl <tval>] [tcpctl <flags > tcpctlmask <tcpmask >] | match_all [ipv6]) [counters (enable | disable)]

no rule <ruleid>

Description

Rule configuration

Parameters

  • ruleid: It should be in the range 1 to 4000(SP2,3)/400(SP1)

  • description: max 50 characters

  • ethertype: hexadecimal value prefix with 0x. max 4 characters.

  • vlan: VLAN id 2 to 4094

  • src-ip: source IP address

  • dest-ip: Destination IP address

  • protocol: L3 Protocol

  • l4portsrc: L4 source port for TCP or UDP

  • l4portdst: L4 source port for TCP or UDP

  • tossval: Type of Service

  • dscp: Differentiated services code point.

  • ttl: Time-to-live

  • tcpctl: TCP control flags

Mode

FLOW

Parameters

string—maximum 50 characters, within double quotes.

Interface

FLOW

hashtag
Example

You can verify the configuration by using the command(s) below:

Command

description <string>

Description

Description configuration

pbnoscli# configure terminal 
pbnoscli(config)# flow flow01
pbnoscli(config-flow-flow01)# descript    
  description           Configure description for flow
pbnoscli(config-flow-flow01)# description "--Flow Description--"
pbnoscli(config-flow-flow01)# 

//to remove flow description
pbnoscli(config-flow-flow01)# no description
pbnoscli(config-flow-flow01)# 
pbnoscli# configure terminal 
pbnoscli(config)# flow flow01
pbnoscli(config-flow-flow01)# 
  !                     Exit from the current prompt
  description           Configure description for flow
  enable                Enable the flow
  end                   Exit to exec prompt
  exit                  Exit from the current prompt
  network-ports         Configure network or TAP ports
  no                    no form
  pop-vlan              Pop Vlan Tag
  push-vlan-tag         Push VLAN tag
  rule                  Configure rule
  show                  Show commands
  tool-ports            Configure network tool or analyzer ports
  top                   Exit to the configuration prompt
pbnoscli(config-flow-flow01)# rule 1 
  action                Add rule specific action
  deny                  Deny traffic
  permit                Permit traffic
pbnoscli(config-flow-flow01)# rule 1 permit 
  <cr>
  counters              Enable counters
  description           Add description within double quotes
  dest-ip               Destination IP address
  dscp                  Differentiated services code point
  ethertype             ethernet type, 0x800, 0x8100
  gtp                   GTP Tunneling
  l4portdst             L4 destination port
  l4portsrc             L4 source port
  match-all             Match all
  protocol              IP protocol
  qualifiers            Flow Rule Qualifiers
  src-ip                Source IP address
  tcpctl                TCP Control Flags
  tosval                Type of Service
  ttl                   Time-to-live
  vlan                  Vlan Identifier
pbnoscli(config-flow-flow01)# rule 1 permit src-ip 10.10.0.0/24 dest-ip 20.0.20.0/24 counters enable 

//to remove a rule
pbnoscli(config-flow-flow01)# no rule 1
pbnoscli(config-flow-flow01)#
pbnoscli# show flow summary 
Flow-Name       Rule-Id        Status      Counter-Value
=========================================================
flow01          1             Active          1675               
pbnoscli# 

pbnoscli# show flow flow01

===================================
Flow : flow01 (CLI)
===================================
Status       : enable          
Network-Port : Ethernet1/1,Ethernet2/1
Tool-Port    : port-channel1,Ethernet8/1

Rule : 1               
++++++++++++++++++++++++++++++++++
Action                   : permit          
Source IP                : 2401::1         
Source Mask              : f::f            
Destination IP           : 2401::2         
Destination Mask         : f::f            
Counters                 : enable          
pbnoscli# 
\\Configuring IPv4 rules
pbnoscli# show running-config 
configure terminal
port-channel 1 ports Ethernet63/1,Ethernet64/1
!
interface ethernet Ethernet1/1
forward-error-correction rs
type network
!
interface ethernet Ethernet2/1
forward-error-correction rs
type network
!
interface mgmt
ip address 10.4.4.53/23 gateway 10.4.4.1
!
flow flow01
description "--Flow Description--"
network-ports Ethernet1/1,Ethernet2/1
tool-ports port-channel1,Ethernet8/1
rule 1 permit src-ip 10.10.0.0/24 dest-ip 20.0.20.0/24 counters enable
!
pbnoscli# 
\\Configuring IPv6 rules
pbnoscli# show running-config 
configure terminal
port-channel 1 ports Ethernet63/1,Ethernet64/1
!
interface ethernet Ethernet1/1
forward-error-correction rs
type network
!
interface ethernet Ethernet2/1
forward-error-correction rs
type network
!
interface mgmt
ip address 10.4.4.53/23 gateway 10.4.4.1
!
flow flow01
description "--Flow Description--"
network-ports Ethernet1/1,Ethernet2/1
tool-ports port-channel1,Ethernet8/1
rule 1 permit src-ip 2401::1 src-netmask f::f dest-ip 2401::2 dest-netmask f::f counters enable
!
pbnoscli# 
pbnoscli# show flow flow01

===================================
Flow : flow01 (CLI)
===================================
Status       : enable          
Description  : --Flow Description--
pbnoscli# 
pbnoscli# show running-config
configure terminal
!
interface mgmt
ip address 10.4.4.53/23 gateway 10.4.4.1
!
flow flow01
description "--Flow Description--"
!
pbnoscli# 
Reference

Command

rule <ruleid> [ipv6] (deny | permit ) [description <cstring>] ([ethertype <etype>] [vlan <vid>] [src-ip (<ipv4> | <ipv6 > src-netmask <ipv6 >)] [dest-ip (<ipv4> | <ipv6 > dest-netmask <ipv6 >)] [protocol (tcp | udp | <ptype >)] [l4portsrc <sport>] [l4portdst <dport>] [tosval <sval >] [dscp <dval>] [ttl <tval>] [tcpctl <flags > tcpctlmask <tcpmask >] | match_all [ipv6]) [counters (enable | disable)]

no rule <ruleid>

Description

Rule configuration

Parameters

  • ruleid: It should be in the range 1 to 1500(TD3/TH2)/768(TD2/TH)

  • ipv6: used to specify an ipv6 rule

  • description: max 50 characters

Mode

FLOW

hashtag
Example

You can verify the configuration by using the command(s) below:

Clear Flow Counters

You can use the following command to clear all ASIC Flow counters:

hashtag
Reference

Command

clear flow counters (all | <flow-name> [rule <ruleid> ])

Description

hashtag
Example

pbnoscli# configure terminal 
pbnoscli(config)# flow flow01
pbnoscli(config-flow-flow01)# 
  !                     Exit from the current prompt
  description           Configure description for flow
  enable                Enable the flow
  end                   Exit to exec prompt
  exit                  Exit from the current prompt
  network-ports         Configure network or TAP ports
  no                    no form
  rule                  Configure rule
  show                  Show commands
  tool-ports            Configure network tool or analyzer ports
  top                   Exit to the configuration prompt
pbnoscli(config-flow-flow01)# rule 1 
  action                Add rule specific action
  deny                  Deny traffic
  ipv6                  IPv6 Rule
  permit                Permit traffic
pbnoscli(config-flow-flow01)# rule 1 ipv6   
  deny                  Deny traffic
  permit                Permit traffic
pbnoscli(config-flow-flow01)# rule 1 ipv6 
pbnoscli(config-flow-flow01)# rule 1 permit 
  <cr>
  counters              Enable counters
  description           Add description within double quotes
  dest-ip               Destination IP address
  dscp                  Differentiated services code point
  ethertype             ethernet type, 0x800, 0x8100
  l4portdst             L4 destination port
  l4portsrc             L4 source port
  match-all             Match all
  protocol              IP protocol
  src-ip                Source IP address
  tcpctl                TCP Control Flags
  tosval                Type of Service
  ttl                   Time-to-live
  vlan                  Vlan Identifier
pbnoscli(config-flow-flow01)# rule 1 permit src-ip 10.10.0.0/24 dest-ip 20.0.20.0/24 counters enable 

//to remove a rule
pbnoscli(config-flow-flow01)# no rule 1
pbnoscli(config-flow-flow01)#
pbnoscli# show flow summary 
Flow-Name       Rule-Id        Status      Counter-Value
=========================================================
flow01          1             Active          1671               

pbnoscli# show flow flow01

===================================
Flow : flow01 (CLI)
===================================
Status       : enable          
Network-Port : Ethernet1/1,Ethernet2/1
Tool-Port    : port-channel1,Ethernet8/1

Rule : 1               
++++++++++++++++++++++++++++++++++
Action                   : permit          
Source IP                : 10.10.0.0       
Source Mask              : 255.255.255.0   
Destination IP           : 20.0.20.0       
Destination Mask         : 255.255.255.0   
Counters                 : enable          
pbnoscli# 
\\Configuring IPv4 rules
pbnoscli# show running-config 
configure terminal
port-channel 1 ports Ethernet63/1,Ethernet64/1
!
interface ethernet Ethernet1/1
forward-error-correction rs
type network
!
interface ethernet Ethernet2/1
forward-error-correction rs
type network
!
interface mgmt
ip address 10.4.4.53/23 gateway 10.4.4.1
!
flow flow01
description "--Flow Description--"
network-ports Ethernet1/1,Ethernet2/1
tool-ports port-channel1,Ethernet8/1
rule 1 permit src-ip 10.10.0.0/24 dest-ip 20.0.20.0/24 counters enable
!
pbnoscli# 
\\Configuring IPv6 rules
pbnoscli# show running-config 
configure terminal
port-channel 1 ports Ethernet63/1,Ethernet64/1
!
interface ethernet Ethernet1/1
forward-error-correction rs
type network
!
interface ethernet Ethernet2/1
forward-error-correction rs
type network
!
interface mgmt
ip address 10.4.4.53/23 gateway 10.4.4.1
!
flow flow01
description "--Flow Description--"
network-ports Ethernet1/1,Ethernet2/1
tool-ports port-channel1,Ethernet8/1
rule 1 ipv6 permit src-ip 2401::1 src-netmask f::f dest-ip 2401::2 dest-netmask f::f counters enable
!
pbnoscli# 

ethertype: hexadecimal value prefix with 0x. max 4 characters.

  • vlan: VLAN id 2 to 4094

  • src-ip: source IP address

  • dest-ip: Destination IP address

  • protocol: L3 Protocol

  • l4portsrc: L4 source port for TCP or UDP

  • l4portdst: L4 destination port for TCP or UDP

  • tossval: Type of Service

  • dscp: Differentiated services code point.

  • ttl: Time-to-live

  • tcpctl: TCP control flags

  • Clear command

    Parameters

    None

    Mode

    EXEC

    pbnoscli# clear flow counters all 
    pbnoscli# 
    pbnoscli# clear flow counters flow01
    pbnoscli# 
    pbnoscli# show flow counters all
    Flow-Name       Rule-Id        ASIC-Stat-Id   Counter-Value
    =============================================================
    flow01          DropRule        32768           0               
    flow01          1               40960           0               
    pbnoscli# 

    Configuring Flow Match Expression Rules

    Using this command, users can configure a rule using an expression string for both inner and outer headers in encapsulated packets.

    circle-info

    Before configuring flow rules, Network and Tool ports must be configured

    circle-exclamation

    This feature is supported only on NVIDIA spectrum-2/3 platforms

    hashtag
    Reference

    Expression qualifiers -

    ethertype - L2 Ethertype, vlan - Vlan header value, src-ip - Source IP prefix, src-netmask - Source IP mask, dest-ip- Destination IP prefix, dest-netmask- Destination IP mask, protocol - Protocol type, l4portsrc- Transport layer source port, l4portdst - Transport layer destination port, tosval - Type of Service value, dscp - Differentiated services field value, ttl - Packet TTL, tcpctl - TCP control value, tcpctlmask - TCP control mask, teid - Encapsulation tunnel ID, inner-sip - Inner IP Source Address, inner-dip - Inner IP Destination Address, inner-protocol - Inner Header Protocol, inner_l4srcport - Inner Header UDP Source Port, inner_l4destport - Inner Header UDP Destination Port

    hashtag
    Example

    You can verify the configuration by using the command(s) below:

    Display Flow Information

    Use the following command to check the rate of data flowing through a flow:

    hashtag
    Reference

    Command

    show flow (all | <flow-name> ) rate

    Description

    circle-info

    EC5812 device: Need to execute "collect-flow-stats" before collecting the flow counters "show flow summary" and "show flow counters all" each time.

    hashtag
    EC5812

    hashtag
    Example

    You can display the flow configuration and operational status as follows:

    hashtag
    Reference

    hashtag
    Example

    Use the following command to show the flow summary:

    hashtag
    Reference

    hashtag
    Example

    Use the following command to display the counters of all the flows:

    hashtag
    Reference

    hashtag
    Example

    Configuring Push/Pop VLAN

    VLAN aware mode provides APB administrators with the ability to match and modify packets in the flow before forwarding them to the tool port(s).

    You can configure the APB to modify the flow as below:

    • Push VLAN - Push a new VLAN Tag onto the egress traffic.

    • Pop VLAN - Pop(remove) the VLAN Tag from the egress traffic.

    circle-exclamation

    This feature is only supported on the NVIDIA platforms

    hashtag
    Reference

    hashtag
    Example

    You can verify the configuration by using the command(s) below:

    hashtag
    Reference

    hashtag
    Example

    You can verify the configuration by using the command(s) below:

    Configuring Flow Override Action(s)

    You can configure a rule to override the configured flow action for egress ports to push and/or pop VLAN. You can also override tool port(s) for egress traffic.

    circle-info

    override-action is per-rule and will require override-action for every rule in the flow

    hashtag
    Reference

    hashtag
    Example

    You can verify the configuration by using the command(s) below:

    Configuring Flow UDF Rules

    User Defined Filtering can be considered an inspection of a packet based on offset values. An ACL can be defined with UDF matching capabilities to give granularity and flexibility when identifying traffic patterns. It is often used for deeper packet analysis. Typical use cases include finding patterns inside the inner header when packets are tunnelled.

    Using UDF, users can configure a rule to match specific bytes in the ingress packet based on a given offset to permit or deny matched packets

    • Offset for the L3 packet starts from the IP header in the packet

    • offset for the L2 packet starts from EtherType in the packet

    Note: The maximum length that can be matched is 40 characters (i.e. 20 bytes), and the minimum is 4 characters (i.e. 2 bytes), excluding the "0x" prefix. The character string must be an even number of characters.

    circle-info

    Before configuring flow rules, Network and Tool ports must be configured

    circle-exclamation

    This feature is supported only on NVIDIA spectrum-2/3 platforms

    triangle-exclamation

    UDF and GTP can not be configured together on a device

    hashtag
    Reference

    hashtag
    Example

    You can verify the configuration by using the command(s) below:

    Command

    rule ((deny | permit) [description ] [match-expression ] [counters (enable | disable )]

    no rule <ruleid>

    Description

    Rule configuration

    Parameters

    • ruleid: It should be in the range 1 to 6000

    • description: max 50 characters. match

    • expression: qualifiers can be added to this string

    • counters: can be enabled or disabled

    Mode

    FLOW

    Display flow rate for a flow

    Parameters

    flow-name - max 20 characters

    Mode

    EXEC

    Command

    show flow (all | <flow-name> rule <rule-id> )

    Description

    Displays all the flow configurations and rule configurations

    Parameters

    flow-name—max 20 characters

    rule-id – within 1 to 6000

    Mode

    EXEC

    Command

    show flow summary

    Description

    Displays the summary of all APB flows

    Parameters

    None

    Mode

    EXEC

    Command

    show flow counters (all |<flow-name> )

    Description

    Displays the counters of all the APB flows

    Parameters

    flow-name – max 20 characters

    Mode

    EXEC

    Command

    rule 1 action

    override-pop-vlan Override action to pop the VLAN override-push-vlan-tag Override action to push VLAN Tag override-to Override to configure a rule specific network tool or analyzer ports

    Description

    Rule actions

    Parameters

    â—Ź ruleid: It should be in the range 1 to 6000 â—Ź override-to: override egress ports â—Ź override-push-vlan: override MAP push VLAN â—Ź override-pop-vlan: override pop VLAN

    Mode

    FLOW

    Command

    rule <rule-id> ((deny | permit) [description ] [udf-data udf-extraction-group (l2 | l3 [udf-extraction-point ]) udf-offset ] [counters (enable | disable )]

    no rule <ruleid>

    Description

    Rule configuration

    Parameters

    • ruleid: It should be in the range 1 to 6000

    • description: max 50 characters

    • udf-data: data bytes that need to be matched with the incoming packet

    • udf-extraction-group:

      • l2 - match from l2 header ethertype field

      • l3 - match from start of IPV4 or IPV6 header

    • udf-extraction point: (applies for only l3 extraction point) set extraction point from start of IPV4 or IPV6 header

    • udf-offset: offset from which bytes will be monitored from extraction point

    • counters: can be enabled or disabled

    Mode

    FLOW

    pbnoscli# configure terminal 
    pbnoscli(config)# flow flow01
    pbnoscli(config-flow-flow01)# 
      !                     Exit from the current prompt
      description           Configure description for flow
      enable                Enable the flow
      end                   Exit to exec prompt
      exit                  Exit from the current prompt
      network-ports         Configure network or TAP ports
      no                    no form
      pop-vlan              Pop Vlan Tag
      push-vlan-tag         Push VLAN tag
      rule                  Configure rule
      show                  Show commands
      tool-ports            Configure network tool or analyzer ports
      top                   Exit to the configuration prompt
    pbnoscli(config-flow-flow01)# rule 1 permit description "Match Expression" 
      <cr>
      counters              Enable counters
      dest-ip               Destination IP address
      dscp                  Differentiated services code point
      ethertype             ethernet type, 0x800, 0x8100
      gtp                   GTP Tunneling
      l4portdst             L4 destination port
      l4portsrc             L4 source port
      match-all             Match all
      match-expression      Flow Rule Qualifiers
      protocol              IP protocol
      src-ip                Source IP address
      tcpctl                TCP Control Flags (maximum value is 0x3f)
      tosval                Type of Service
      ttl                   Time-to-live
      udf-data              User Defined Data
      vlan                  Vlan Identifier
    pbnoscli(config-flow-flow01)# rule 1 permit description "Match Expression" 
    pbnoscli(config-flow-flow01)# $Match Expression" match-expression 
      <matchexpression>     Example qualifiers: ethertype, vlan, src-ip, src-netmask, 
                                                dest-ip, dest-netmask, protocol, l4portsrc,
                                                l4portdst, tosval, dscp, ttl, tcpctl, tcpctlmask,
                                                teid, inner-sip, inner-dip, inner-protocol, 
                                                inner_l4srcport, inner_l4destport
    pbnoscli(config-flow-flow01)# $Match Expression" match-expression "vlan 100 src-ip 1.1.1.1/32 dest-ip 2.2.2.2/32 protocol udp inner-sip 10.10.10.1/32 inner-dip 20.20.20.2/32" counters enable
    pbnoscli(config-flow-flow01)# end
    pbnoscli# show flow all
    ===================================
    Flow : flow01 (CLI)
    ===================================
    Status       : enable          
    Network-Port : Ethernet1/1,Ethernet2/1
    Tool-Port    : port-channel1,Ethernet8/1
    
    Rule : 1               
    ++++++++++++++++++++++++++++++++++
    Vlan                     : 100             
    Source IP                : 1.1.1.1         
    Source Mask              : 255.255.255.255 
    Destination IP           : 2.2.2.2         
    Destination Mask         : 255.255.255.255 
    Protocol                 : udp             
    Inner Source IP          : 10.10.10.1      
    Inner Source Mask        : 255.255.255.255 
    Inner Destination IP     : 20.20.20.2      
    Inner Destination Mask   : 255.255.255.255 
    Action                   : permit          
    Description              : Match Expression
    Counters                 : enable          
    pbnoscli# 
    
    pbnoscli# show flow counters all
    Flow-Name       Rule-Id        ASIC-Stat-Id   Counter-Value
    =============================================================
    flow01          DropRule        40960           42156085        
    flow01          1               57344           455049065       
    pbnoscli#
    pbnoscli# show running-config 
    configure terminal
    !
    interface ethernet Ethernet1/1
    forward-error-correction rs
    type network
    !
    interface ethernet Ethernet2/1
    forward-error-correction rs
    type tool
    !
    interface mgmt
    ip address 10.4.4.53/23 gateway 10.4.4.1
    !
    port-channel 1 ports Ethernet63/1,Ethernet64/1
    flow flow01
    network-ports Ethernet16
    tool-ports Ethernet20
    rule 1 permit description "Match Expression" match-expression "vlan 100 src-ip 1.1.1.1/32 dest-ip 2.2.2.2/32 protocol udp inner-sip 10.10.10.1/32 inner-dip 20.20.20.2/32" counters enable
    !
    pbnoscli# 
    EC5812# show flow summary
    Flow-Name       Rule-Id        Status      Counter-Value
    =========================================================
    flow_001        2             Active          0
    flow_001        3             Active          0
    flow_001        1             Active          0
    flow_001        4             Active          0
    EC5812# collect-flow-stats
    EC5812# show flow summary
    Flow-Name       Rule-Id        Status      Counter-Value
    =========================================================
    flow_001        2             Active          68409729060
    flow_001        3             Active          68409744544
    flow_001        1             Active          68409756710
    flow_001        4             Active          68409769302
    pbnoscli# show flow counters all rate
    Flow-Name                  Rate (BPS)          Rate (PPS)
    ===============================================================
    flow1                        0.15 B/s            0.00 P/s
    pbnoscli#
    pbnoscli# show flow all
    
    ===================================
    Flow : flow01 (CLI)
    ===================================
    Status       : enable          
    Network-Port : Ethernet4/1       
    Tool-Port    : Ethernet8/1       
    
    Rule : 1               
    ++++++++++++++++++++++++++++++++++
    Action                   : permit          
    Source IP                : 10.10.0.0       
    Source Mask              : 255.255.255.0   
    Destination IP           : 20.0.20.0       
    Destination Mask         : 255.255.255.0   
    Counters                 : enable          
    Override To        : Ethernet12/1      
    
    ===================================
    Flow : flow02 (CLI)
    ===================================
    Status       : enable          
    Network-Port : Ethernet16/1      
    Tool-Port    : Ethernet20/1      
    
    Rule : 1               
    ++++++++++++++++++++++++++++++++++
    Action                   : permit          
    Source IP                : 2401::1         
    Source Mask              : f::f            
    Destination IP           : 2401::2         
    Destination Mask         : f::f            
    TTL                      : 30              
    Protocol                 : tcp             
    Tosval                   : 4               
    Counters                 : enable          
    pbnoscli# 
    pbnoscli# show flow flow02 rule 1
    
    ===================================
    Flow : flow02 (CLI)
    ===================================
    Status       : enable          
    Network-Port : Ethernet16/1      
    Tool-Port    : Ethernet20/1      
    
    Rule : 1               
    ++++++++++++++++++++++++++++++++++
    Action                   : permit          
    Source IP                : 2401::1         
    Source Mask              : f::f            
    Destination IP           : 2401::2         
    Destination Mask         : f::f            
    TTL                      : 30              
    Protocol                 : tcp             
    Tosval                   : 4               
    Counters                 : enable          
    pbnoscli# 
    pbnoscli# show flow summary 
    Flow-Name       Rule-Id        Status      Counter-Value
    =========================================================
    flow01          1             Active          5643               
    flow02          1             Active          18236               
    pbnoscli# 
    pbnoscli# show flow counters all
    Flow-Name       Rule-Id        ASIC-Stat-Id   Counter-Value
    =============================================================
    flow02          1               65536           18236               
    flow01          1               40960           5643               
    flow02          DropRule        57344           14               
    flow01          DropRule        32768           18               
    pbnoscli# 
    pbnoscli# show flow counters flow01
    Flow-Name       Rule-Id        ASIC-Stat-Id   Counter-Value
    =============================================================
    flow01          1               40960           5643               
    flow01          DropRule        32768           18               
    pbnoscli# 
    pbnoscli# configure terminal 
    pbnoscli(config)# flow flow01
    pbnoscli(config-flow-flow01)# network-ports Ethernet4
    pbnoscli(config-flow-flow01)# tool-ports Ethernet8
    pbnoscli(config-flow-flow01)# rule 1 
      action                Add rule specific action
      deny                  Deny traffic
      permit                Permit traffic
    pbnoscli(config-flow-flow01)# rule 1 action 
      <cr>
      override-pop-vlan       Override action to pop the VLAN
      override-push-vlan-tag  Override action to push VLAN Tag
      override-to             Override to configure a rule specific network tool or analyzer ports
    pbnoscli(config-flow-flow01)# rule 1 action override-to Ethernet12
    pbnoscli# show flow all
    
    ===================================
    Flow : flow01 (CLI)
    ===================================
    Status       : enable          
    Network-Port : Ethernet4/1       
    Tool-Port    : Ethernet8/1       
    
    Rule : 1               
    ++++++++++++++++++++++++++++++++++
    Action                   : permit          
    Source IP                : 10.10.0.0       
    Source Mask              : 255.255.255.0   
    Destination IP           : 20.0.20.0       
    Destination Mask         : 255.255.255.0   
    Counters                 : enable          
    Override To        : Ethernet12/1      
    pbnoscli# 
    pbnoscli# show running-config 
    configure terminal
    !
    interface ethernet Ethernet1/1
    forward-error-correction rs
    type network
    !
    interface ethernet Ethernet4/1
    forward-error-correction rs
    type network
    !
    interface ethernet Ethernet8/1
    forward-error-correction rs
    type tool
    !
    interface ethernet Ethernet12/1
    forward-error-correction rs
    type tool
    !
    interface mgmt
    ip address 10.4.4.53/23 gateway 10.4.4.1
    !
    flow flow01
    network-ports Ethernet1/1,Ethernet4/1
    tool-ports Ethernet8/1
    rule 1 permit src-ip 10.10.0.0/24 dest-ip 20.0.20.0/24 counters enable
    rule 1 action override-to Ethernet12/1
    !
    pbnoscli# 
    pbnoscli# configure terminal 
    pbnoscli(config)# flow flow01
    pbnoscli(config-flow-flow01)# 
      !                     Exit from the current prompt
      description           Configure description for flow
      enable                Enable the flow
      end                   Exit to exec prompt
      exit                  Exit from the current prompt
      network-ports         Configure network or TAP ports
      no                    no form
      pop-vlan              Pop Vlan Tag
      push-vlan-tag         Push VLAN tag
      rule                  Configure rule
      show                  Show commands
      tool-ports            Configure network tool or analyzer ports
      top                   Exit to the configuration prompt
    pbnoscli(config-flow-flow01)# rule 1 permit description "UDF" udf-data 0xb166 udf-extraction-group l2 udf-offset 2 counters enable
    pbnoscli(config-flow-flow01)# rule 2 permit description "UDF" udf-data 0x4500 udf-extraction-group l3 udf-extraction-point ipv4 udf-offset 0 counters enable 
    pbnoscli(config-flow-flow01)# end
    pbnoscli# show flow all
    ===================================
    Flow : flow01 (CLI)
    ===================================
    Status       : enable          
    Network-Port : Ethernet1/1     
    Tool-Port    : Ethernet2/1     
    
    Rule : 1               
    ++++++++++++++++++++++++++++++++++
    Action                   : permit          
    Description              : UDF             
    UDF Data                 : 0xb166          
    UDF Extraction Group     : l2              
    UDF Offset               : 2               
    Counters                 : enable          
    
    Rule : 2               
    ++++++++++++++++++++++++++++++++++
    Action                   : permit          
    Description              : UDF             
    UDF Data                 : 0x4500          
    UDF Extraction Group     : l3              
    UDF Extraction Point     : ipv4            
    UDF Offset               : 0               
    Counters                 : enable          
    pbnoscli# 
     
    
    pbnoscli# show flow counters all
    Flow-Name       Rule-Id        ASIC-Stat-Id   Counter-Value
    =============================================================
    flow01          2               98304           503378220       
    flow01          DropRule        73728           4390145               
    flow01          1               90112           2270112825               
    pbnoscli# 
    pbnoscli# show running-config 
    configure terminal
    !
    interface ethernet Ethernet1/1
    forward-error-correction rs
    type network
    !
    interface ethernet Ethernet2/1
    forward-error-correction rs
    type tool
    !
    interface mgmt
    ip address 10.4.4.53/23 gateway 10.4.4.1
    !
    flow flow01
    network-ports Ethernet1/1
    tool-ports Ethernet2/1
    rule 1 permit description "UDF" udf-data 0xb166 udf-extraction-group l2 udf-offset 2 counters enable
    rule 2 permit description "UDF" udf-data 0x4500 udf-extraction-group l3 udf-extraction-point ipv4 udf-offset 0 counters enable 
    !
    pbnoscli# 

    Command

    push-vlan-tag <vid>

    Description

    push VLAN to traffic matching the rules configured in the map

    Parameters

    vlanid—within 1 to 4094

    Mode

    flow

    Command

    pop-vlan

    Description

    pop Vlan Tag from ingress packets received

    Parameters

    disable/enable

    Mode

    flow

    Push/Pop VLAN
    pbnoscli# configure terminal
    pbnoscli(config)# flow flow01
    pbnoscli(config-flow-flow01)# push-vlan-tag 
      <pushvlanid>          Add VLAN tag (1...4094)
    pbnoscli(config-flow-flow01)# push-vlan-tag 1002
    pbnoscli(config-flow-flow01)# 
    
    //to remove push tag
    pbnoscli(config-flow-flow01)# no push-vlan-tag 
    pbnoscli(config-flow-flow01)# 
    pbnoscli# show flow flow01
    
    ===================================
    Flow : flow01 (CLI)
    ===================================
    Status       : enable          
    Network-Port : Ethernet1/1,Ethernet2/1
    Tool-Port    : Ethernet8/1       
    Push vlan     : enable          
    pbnoscli# 
    pbnoscli# show running-config 
    configure terminal
    !
    interface ethernet Ethernet1/1
    forward-error-correction rs
    type network
    !
    interface ethernet Ethernet2/1
    forward-error-correction rs
    type network
    !
    interface ethernet Ethernet8/1
    forward-error-correction rs
    type tool
    !
    interface mgmt
    ip address 10.4.4.53/23 gateway 10.4.4.1
    !
    flow flow01
    network-ports Ethernet1/1,Ethernet2/1
    tool-ports Ethernet8/1
    push-vlan-tag 1002
    rule 10 permit match-all counters enable
    rule 20 permit match-all ipv6 counters enable
    !
    pbnoscli# 
    pbnoscli# configure terminal 
    pbnoscli(config)# flow flow01             
    pbnoscli(config-flow-flow01)# pop-vlan 
      disable               Disable Vlan stripping
      enable                Enable Vlan stripping
    pbnoscli(config-flow-flow01)# pop-vlan enable 
    pbnoscli(config-flow-flow01)#  
    
    //to disable pop-vlan
    pbnoscli(config-flow-flow01)# pop-vlan disable 
    pbnoscli(config-flow-flow01)# 
    pbnoscli# show flow flow01
    
    ===================================
    Flow : flow01 (CLI)
    ===================================
    Status       : enable          
    Network-Port : Ethernet1/1,Ethernet2/1
    Tool-Port    : Ethernet8/1       
    Pop vlan     : enable          
    pbnoscli# 
    pbnoscli# show running-config 
    configure terminal
    !
    interface ethernet Ethernet1/1
    forward-error-correction rs
    type network
    !
    interface ethernet Ethernet2/1
    forward-error-correction rs
    type network
    !
    interface ethernet Ethernet8/1
    forward-error-correction rs
    type tool
    !
    interface mgmt
    ip address 10.4.4.53/23 gateway 10.4.4.1
    !
    flow flow01
    network-ports Ethernet1/1,Ethernet4/1
    tool-ports Ethernet8/1
    pop-vlan enable
    rule 10 permit match-all counters enable
    rule 20 permit match-all ipv6 counters enable
    !
    pbnoscli#