Hi Sergey, I guess what you need is to refine your bgp_agent_map as follows:
bgp_ip=176.**.**.252 ip=0.0.0.0/0 filter='ip' bgp_ip=2001:**:**:1::11 ip=0.0.0.0/0 filter='ip6' Let me know if this works for you. Cheers, Paolo On Fri, Dec 02, 2016 at 08:09:07PM +0200, Сергей Горшков wrote: > Hi all. > > I need your help because I am in a deadlock > > My config > > #cat sfacctd.conf > ! sfacctd configuration > ! > ! > ! > daemonize: true > interface: any > pidfile: /var/run/sfacctd.pid > syslog: daemon > logfile: /var/log/sfacct.log > ! > sfacctd_as_new: bgp > bgp_daemon: true > bgp_agent_map: /etc/pmacct/bgp_agent.map > ! > aggregate: tag,vlan,src_as,dst_as,src_host,dst_host,src_port,dst_port,proto > ! > plugins: mysql > sql_db: pmacct > sql_table_version: 6 > sql_table: acct_v6 > sql_host: localhost > sql_user: ***** > sql_passwd: ***** > sql_refresh_time: 60 > sql_optimize_clauses: true > sql_history: 1h > sql_history_roundoff: h > sql_locking_style: row > ------------------------------------------------------ > > # cat bgp_agent.map > bgp_ip=176.**.**.252 ip=0.0.0.0/0 > bgp_ip=2001:**:**:1::11 ip=0.0.0.0/0 > ------------------------------------------------------ > In this configuration, all IP6 addresses obtained AS 0 > > select * from acct_v6 where ip_src like '%2001:4860%'; > +----------+------+--------+--------+---------------------+-------------------+----------+----------+----------+---------+-------+-------+---------------------+---------------------+ > | agent_id | vlan | as_src | as_dst | ip_src | > ip_dst | src_port | dst_port | ip_proto | packets | bytes | > flows | stamp_inserted | stamp_updated | > +----------+------+--------+--------+---------------------+-------------------+----------+----------+----------+---------+-------+-------+---------------------+---------------------+ > | 0 | 3855 | 0 | 0 | 2001:4860::8:0:8f90 | > 2001:67c:2d40::47 | 0 | 0 | ipv6-i | 2 | 428 | > 0 | 2016-12-01 11:00:00 | 2016-12-01 11:35:01 | > > IP4 everything is fine > > | 0 | 3905 | 15169 | 50581 | 173.194.21.80 | 31.43.60.150 > | 443 | 21668 | tcp | 2 | 3044 | 0 | 2016-12-01 > 11:00:00 | 2016-12-01 11:16:01 | > > If BGP neighbors to change their place > > # cat bgp_agent.map > bgp_ip=2001:**:**:1::11 ip=0.0.0.0/0 > bgp_ip=176.**.**.252 ip=0.0.0.0/0 > > Then get IP6 AS number and get IP4 AS0 > How to make sFacct collated both IP4 and IP6 addresses with an > autonomous system number?? > > > > _______________________________________________ > pmacct-discussion mailing list > http://www.pmacct.net/#mailinglists _______________________________________________ pmacct-discussion mailing list http://www.pmacct.net/#mailinglists
