Hi Evgeniy,

In the most basic scenario you should add a bgp_agent_map statement
to your directive and point it to a file with the following content:  

id=192.168.1.1      ip=192.168.1.2
id=192.168.1.1      ip=192.168.1.3

IPv6 is an element that can complicate mapping, especially in dual
stack scenarios. I advice to read CONFIG-KEYS section for bgp_agent_map
and look at the examples/agent_to_peer.map.example file in the standard
pmacct distribution tarball.

Cheers,
Paolo

On Tue, Oct 02, 2012 at 02:40:23PM +0300, Evgeniy Kozhuhovskiy wrote:
> I have two netflow exporters (for example, 192.168.1.2 and 192.168.1.3) and
> one bgp peer (192.168.1.1)
> 
> How to map them correctly?
> 
> On Tue, Oct 2, 2012 at 10:55 AM, Paolo Lucente <[email protected]> wrote:
> 
> > Hi Evgeniy,
> >
> > Is the router exporting NetFlow and BGP peering with the same IP
> > address? If not a mapping (bgp_agent_map) is required.
> >
> > Cheers,
> > Paolo
> >
> > On Mon, Oct 01, 2012 at 11:22:11AM +0300, Evgeniy Kozhuhovskiy wrote:
> > > I'm trying to make per-as traffic statistics.
> > >
> > > sql_table_type[bgpstat]: bgp
> > > sql_optimize_clauses[bgpstat]: true
> > > aggregate[bgpstat]: src_as, dst_as, peer_src_as, peer_dst_as
> > >
> > > bgp_daemon: true
> > > bgp_daemon_ip: xx.xx.xx.xx
> > > bgp_daemon_max_peers: 4
> > > bgp_aspath_radius: 3
> > > bgp_follow_default: 1
> > > nfacctd_as_new: bgp
> > > bgp_peer_src_as_type: bgp
> > >
> > > >From router (display bgp peer):
> > > xx.xx.xx.xx    ASyyyy  4          0         26        119   00:25:03
> > > Established
> > >
> > > But in mysql there is nothing about per-AS stat:
> > >
> > > mysql> select * from acct_bgp;
> > >
> > +----------+--------+--------+-------------+-------------+-------------+-------------+-------+---------+------------+-----+----------+-------------+---------------------+---------------+
> > > | agent_id | as_src | as_dst | peer_as_src | peer_as_dst | peer_ip_src |
> > > peer_ip_dst | comms | as_path | local_pref | med | packets  | bytes
> >   |
> > > stamp_inserted      | stamp_updated |
> > >
> > +----------+--------+--------+-------------+-------------+-------------+-------------+-------+---------+------------+-----+----------+-------------+---------------------+---------------+
> > > |        0 |      0 |      0 |           0 |           0 |             |
> > >           |       |         |          0 |   0 | 83567175 | 52910636865 |
> > > 0000-00-00 00:00:00 | NULL          |
> > >
> > +----------+--------+--------+-------------+-------------+-------------+-------------+-------+---------+------------+-----+----------+-------------+---------------------+---------------+
> > >
> > > --
> > > With best regards, Evgeniy Kozhuhovskiy
> >
> > > _______________________________________________
> > > pmacct-discussion mailing list
> > > http://www.pmacct.net/#mailinglists
> >
> > _______________________________________________
> > pmacct-discussion mailing list
> > http://www.pmacct.net/#mailinglists
> >
> 
> 
> 
> -- 
> With best regards, Evgeniy Kozhuhovskiy

_______________________________________________
pmacct-discussion mailing list
http://www.pmacct.net/#mailinglists

Reply via email to