File: lpref.map.example

package info (click to toggle)
pmacct 1.7.8-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 11,904 kB
  • sloc: ansic: 110,430; sh: 4,794; cpp: 4,375; python: 3,632; makefile: 525
file content (44 lines) | stat: -rw-r--r-- 2,038 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
! 
! bgp_src_local_pref_map: BGP source local preferecence map 
!
! File syntax is key-based. Read full syntax rules in 'pretag.map.example' in
! this same directory.
!
! nfacctd, sfacctd: valid keys: id, ip, in, bgp_nexthop, src_mac.
!
! list of currently supported keys follow:
!
! 'id'			ID value to assign to a matching packet or flow. Other
!			than hard-coded local preference values, this field also
!			accepts the 'bgp' keyword which triggers a BGP lookup
!			and returns its result: useful to handle exceptions.
! 'ip'			MATCH: in nfacctd this is compared against the source
!			IP address of the device originating NetFlow packets;
!			in sfacctd this is compared against the AgentId field
!			of received sFlow samples. Expected argument are an IP
!			address or prefix (ie. XXX.XXX.XXX.XXX/NN). 0.0.0.0/0
!			would match all IPv4 addresses; ::/0 would match all
!			IPv6 addresses.
! 'in'                  Input interface.
! 'bgp_nexthop'         BGP next-hop of the flow source IP address (RPF-like).
!                       This value is compared against the corresponding BGP
!                       RIB of the exporting device.
! 'peer_dst_as'         First AS hop within the AS-PATH of the source IP address
!                       (RPF-like). This value is compared against the BGP RIB
!                       of the exporting device (see 'bgp_daemon' configuration
!                       directive).
! 'src_mac'             Source MAC address of the flow. Requires NetFlow v9,
!			IPFIX or sFlow.
!
! A few examples follow. Let's define: LP=100 identifies customers, LP=80 identifies peers
! and LP=50 identifies IP transit.
!
! Customer connected to router with IP address 192.168.2.1, SNMP ifIndex 7 
!
id=100		ip=192.168.2.1	in=7

! A way to model multiple services, ie. IP transit and peering, off the same interface.
! Realistically services should be delivered off different sub-interfaces, but still ... 
! 
id=50		ip=192.168.1.1 	in=7	bgp_nexthop=10.10.10.1
id=80		ip=192.168.1.1 	in=7	bgp_nexthop=10.10.10.2