Skip to content

Conversation

@sever-sever
Copy link
Member

@sever-sever sever-sever commented Nov 12, 2025

Change summary

Add VPP IPFIX configuration and operational mode commands

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes)
  • Migration from an old Vyatta component to vyos-1x, please link to related PR inside obsoleted component
  • Other (please describe):

Related Task(s)

Related PR(s)

How to test / Smoketest result

set vpp ipfix active-timeout '8'
set vpp ipfix collector 10.0.0.2 port '2055'
set vpp ipfix collector 10.0.0.2 source-address '10.0.0.1'
set vpp ipfix flowprobe-record 'l2'
set vpp ipfix flowprobe-record 'l3'
set vpp ipfix flowprobe-record 'l4'
set vpp ipfix inactive-timeout '32'
set vpp ipfix interface eth0
set vpp ipfix interface eth1 direction 'both'
set vpp ipfix interface eth1 flow-variant 'ipv4'
set vpp settings interface eth0 driver 'dpdk'
set vpp settings interface eth1 driver 'dpdk'
set vpp settings unix poll-sleep-usec '2222'

Check VPP collector, interfaces and table:

vyos@r14:~$ 
vyos@r14:~$ show vpp ipfix collectors 
Collector      Source      VRF    MTU    Template Intvl  UDP Cksum
-------------  --------  -----  -----  ----------------  -----------
10.0.0.2:2055  10.0.0.1      0    512                20  off
vyos@r14:~$ 
vyos@r14:~$ 
vyos@r14:~$ show vpp ipfix interfaces 
Interface      VppIfIndex  Flow-variant    Direction
-----------  ------------  --------------  -----------
eth0                    1  ip4             both
eth1                    2  ip4             both
vyos@r14:~$ 
vyos@r14:~$ 
vyos@r14:~$ show vpp ipfix table 
Dumping IPFIX table
 tx 3/1 52:54:00:8d:67:6e 52:54:00:d4:d9:a1 192.168.122.14 -> 192.168.122.1 6 22 60866
 rx 1/-1 52:54:00:d4:d9:a1 52:54:00:8d:67:6e 192.168.122.1 -> 192.168.122.14 6 60866 22

vyos@r14:~$ 


Check collector:

>>> from vyos.vpp import VPPControl
>>> 
>>> vpp = VPPControl()
>>> vpp.api.ipfix_all_exporter_get()
(ipfix_all_exporter_get_reply(_0=912, context=1, retval=0, cursor=4294967295), [ipfix_all_exporter_details(_0=913, context=1, collector_address=IPv4Address('10.0.0.2'), collector_port=2055, src_address=IPv4Address('10.0.0.1'), vrf_id=0, path_mtu=512, template_interval=20, udp_checksum=False)])
>>> 

Smoketest:

vyos@r14:~$ /usr/libexec/vyos/tests/smoke/cli/test_vpp.py -k test_21_vpp_ipfix
test_21_vpp_ipfix (__main__.TestVPP.test_21_vpp_ipfix) ... ok

----------------------------------------------------------------------
Ran 1 test in 10.595s

OK
vyos@r14:~$ 

Checklist:

  • I have read the CONTRIBUTING document
  • I have linked this PR to one or more Phabricator Task(s)
  • I have run the components SMOKETESTS if applicable
  • My commit headlines contain a valid Task id
  • My change requires a change to the documentation
  • I have updated the documentation accordingly

@github-actions
Copy link

github-actions bot commented Nov 12, 2025

👍
No issues in PR Title / Commit Title

@sever-sever sever-sever requested a review from zdc November 12, 2025 11:51
@sever-sever sever-sever added the bp/circinus Create automatic backport for circinus label Nov 12, 2025
@sever-sever sever-sever requested a review from Copilot November 12, 2025 15:15
Copilot finished reviewing on behalf of sever-sever November 12, 2025 15:19
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds VPP IPFIX (IP Flow Information Export) collector configuration functionality to VyOS. It enables users to configure IPFIX flow export from VPP interfaces to external collectors for network traffic analysis.

  • Introduces configuration commands for IPFIX collectors, interfaces, and flow parameters
  • Adds Python library classes to manage VPP IPFIX and flowprobe API calls
  • Includes comprehensive smoke tests for IPFIX configuration validation

Reviewed Changes

Copilot reviewed 8 out of 8 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
src/conf_mode/vpp_ipfix.py New configuration mode script implementing IPFIX setup, verification, and application logic
python/vyos/vpp/ipfix/ipfix.py New IPFIX library class providing methods to configure VPP flow exporters and flow probes
python/vyos/vpp/ipfix/init.py Module initialization file for IPFIX library
interface-definitions/vpp.xml.in XML interface definitions for IPFIX configuration options including collectors, interfaces, and flow parameters
data/templates/vpp/startup.conf.j2 VPP startup configuration update to enable flowprobe plugin
data/config-mode-dependencies/vyos-vpp.json Adds vpp_ipfix to configuration dependencies
src/conf_mode/vpp.py Registers vpp_ipfix as a dependent configuration module
smoketest/scripts/cli/test_vpp.py Comprehensive smoke test covering IPFIX configuration, validation, and VPP API verification

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 5 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sever-sever sever-sever force-pushed the T7556 branch 2 times, most recently from 7d74829 to 9a0eb87 Compare November 13, 2025 05:54
Copy link
Contributor

@natali-rs1985 natali-rs1985 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Something is wrong with interface flow-variant and direction

set vpp ipfix active-timeout '135'
set vpp ipfix collector 192.0.0.2 source-address '192.0.0.1'
set vpp ipfix collector 192.0.0.2 template-interval '125'
set vpp ipfix flowprobe-record 'l3'
set vpp ipfix inactive-timeout '135'
set vpp ipfix interface eth1
set vpp settings interface eth0 driver 'dpdk'
set vpp settings interface eth1 driver 'dpdk'
commit

For now everything looks ok with default values for interface options:

vyos@vyos# run show vpp ipfix interfaces
Interface      VppIfIndex  Flow-variant    Direction
-----------  ------------  --------------  -----------
eth1                    2  ip4             both
[edit]
vyos@vyos# run show vpp ipfix collectors
Collector       Source       VRF    MTU    Template Intvl  UDP Cksum
--------------  ---------  -----  -----  ----------------  -----------
192.0.0.2:4739  192.0.0.1      0    512               125  off

Then we change flow-variant to 'l2'

vyos@vyos# set vpp ipfix interface eth1 flow-variant 'l2'
[edit]
vyos@vyos# commit
[edit]
vyos@vyos# run show vpp ipfix interfaces
Interface      VppIfIndex  Flow-variant    Direction
-----------  ------------  --------------  -----------
eth1                    2  l2              both

And then try to change direction

vyos@vyos# set vpp ipfix interface eth1 direction 'rx'
[edit]
vyos@vyos# commit

It is still both in op-mode output

vyos@vyos# run show vpp ipfix interfaces
Interface      VppIfIndex  Flow-variant    Direction
-----------  ------------  --------------  -----------
eth1                    2  l2              both

Now delete ipfix:

vyos@vyos# del vpp ipfix
[edit]
vyos@vyos# commit

It is still in vpp:

vyos@vyos# sudo vppctl sh flowprobe feature
 eth1 l2 rx tx
[edit]
vyos@vyos#

@github-actions
Copy link

This pull request has conflicts, please resolve those before we can evaluate the pull request.

@github-actions
Copy link

Conflicts have been resolved. A maintainer will review the pull request shortly.

Add VPP IPFIX configuration commands:

```
set vpp ipfix active-timeout '8'
set vpp ipfix collector 192.0.2.2 port '2055'
set vpp ipfix collector 192.0.2.2 source-address '192.0.2.1'
set vpp ipfix flowprobe-record 'l2'
set vpp ipfix flowprobe-record 'l3'
set vpp ipfix flowprobe-record 'l4'
set vpp ipfix inactive-timeout '32'
set vpp ipfix interface eth0
set vpp ipfix interface eth1 direction 'both'
set vpp ipfix interface eth1 flow-variant 'ipv4'
```
Copy link
Contributor

@natali-rs1985 natali-rs1985 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested one more time after the fix and everything works as expected.

@github-actions
Copy link

CI integration ❌ failed!

Details

CI logs

  • CLI Smoketests (no interfaces) ❌ failed
  • CLI Smoketests VPP 👍 passed
  • CLI Smoketests (interfaces only) 👍 passed
  • Config tests 👍 passed
  • Config tests VPP 👍 passed
  • RAID1 tests 👍 passed
  • TPM tests 👍 passed

Copy link
Member

@dmbaturin dmbaturin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see no issues with the CLI or the logic and I trust @natali-rs1985's testing.

@dmbaturin dmbaturin merged commit e4fbf90 into current Nov 18, 2025
17 of 18 checks passed
@dmbaturin dmbaturin deleted the T7556 branch November 18, 2025 16:13
@vyosbot vyosbot added mirror-initiated This PR initiated for mirror sync workflow mirror-completed and removed mirror-initiated This PR initiated for mirror sync workflow labels Nov 18, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bp/circinus Create automatic backport for circinus current mirror-completed

Development

Successfully merging this pull request may close these issues.

5 participants