Page MenuHomePhabricator

Netflow: generate ASNs from the uacctd BGP thread.
Open, NormalPublicFEATURE REQUEST

Description

At this time it's possible generate ASNs only from network file list, if file exist /etc/pmacct/networks.lst.

  1. I'v found a bug: it is doesn't work until you add a "uacctd_as: file" option in configuration file.
  2. I'v make a patch to add functionality generate ASNs from BGP thread.

From pmacct documentation this is a basic working configuration:
pmacctd_as: bgp
bgp_daemon: true
bgp_daemon_ip: 127.0.0.1
bgp_agent_map: /path/to/agent_to_peer.map
bgp_daemon_port: 17917

The bgp_daemon_port can be changed from the standard BGP port (179/TCP) in order to
co-exist with other BGP routing software which might be running on the same host.
Furthermore, they can safely peer each other by using 127.0.0.1 as bgp_daemon_ip.
In pmacctd, bgp_agent_map does the trick of mapping 0.0.0.0 to the IP address of
the BGP peer (ie. 127.0.0.1: 'id=127.0.0.1 ip=0.0.0.0'); this setup, while generic,
was tested working in conjunction with Quagga 0.99.14. Following a relevant fragment
of the Quagga configuration:

router bgp Y
bgp router-id X.X.X.X
neighbor 127.0.0.1 remote-as Y
neighbor 127.0.0.1 port 17917
neighbor 127.0.0.1 update-source X.X.X.X
!

I'v created a bgp-daemon template in path: system netflow-accounting, and all necessary changes for generation config file and bgp_agent_map. My changes also fix bug described above.

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close
welder created this task.Jul 5 2018, 12:49 PM
syncer triaged this task as Normal priority.
pasik added a subscriber: pasik.Aug 19 2018, 8:12 AM
syncer assigned this task to zsdc.Feb 8 2019, 12:05 AM
zsdc reassigned this task from zsdc to dmbaturin.Feb 26 2019, 3:21 PM
zsdc added a subscriber: zsdc.

According to pmacct configuration, this looks good. We need to check code, and if all is correct I propose to merge this into rolling for testing.
Just the one nuance. Currently, VyOS CLI doesn't allow to set a BGP neighbor to the local IP address. If we accept this patch, then it will be good to remove this restriction.