root/trunk/src/renetcolParam.h @ 158

Revision 144, 8.2 KB (checked in by andreu, 12 years ago)

DoS detection - detection in core (todo: email notification with renetcolSEC module)

Line 
1/*
2 * File: renetcolParam.h
3 *
4 * Authors: ANDREU Francois-Xavier
5 *
6 * Copyright (C) 2007-2010 GIP RENATER
7 */
8
9/*  This file is part of renetcol.
10 *
11 *  renetcol is free software; you can redistribute it and/or modify
12 *  it under the terms of the GNU General Public License as published by
13 *  the Free Software Foundation; either version 2 of the License, or
14 *  (at your option) any later version.
15 *
16 *  renetcol is distributed in the hope that it will be useful,
17 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
18 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 *  GNU General Public License for more details.
20 *
21 *  You should have received a copy of the GNU General Public License
22 *  along with renetcol; if not, write to the Free Software
23 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
24 */
25#ifndef RENETCOLPARAM_H
26#define RENETCOLPARAM_H
27
28/**************************************
29 * Parameters which MUST be changed:
30 **************************************/ 
31/*
32 * your collector address - syntax: 10.0.0.90, can be empty
33*/
34#define RECEPTION_ADDRESS ""
35
36/*
37 * your collector port to recept netflow export
38 */ 
39#define RECEPTION_PORT 1111
40
41/*
42 * routers index max + 1 (index of the first column who begins the line,
43 * (not necessary the number of routers)
44 */
45#define ROUTER_INDEX_MAX 55
46
47/*
48 * FILE with your routers IP address
49*/ 
50#define ROUTERS_LIST "<path to renetcol>/renetcol-0.0.14beta/conf/routers.txt"
51
52/*
53 * FILE with your prefix/subnet
54 */
55#define SUBNETS_LIST "<path to renetcol>/renetcol-0.0.14beta/conf/IPv4_Subnet_Aggregation_based_on_SNMP_index.txt"
56
57/*
58 * FILE with your IPv6 prefixes list
59 */
60#define SUBNETS_V6_LIST "<path to renetcol>/renetcol-0.0.14beta/conf/IPv6_Subnet_Aggregation_based_on_SNMP_index.txt"
61
62/*
63 * FILE with the list of AS with accounting
64 */
65#define AS_LIST "<path to renetcol>/renetcol-0.0.14beta/conf/AS.txt"
66
67/*
68 * constants, here a subnet is include in a prefix
69 */
70#define MAX_IPV4_PREFIX 4000
71#define MAX_IPV4_SUBNET 1000
72#define MAX_AS 3
73#define MAX_IPV6_PREFIX 500
74#define MAX_IPV6_SUBNET 100
75
76#define MAX_PKTS_DOS 30000      /* dos threshold */
77#define RATIO_DOS 200   /* packets average size */
78#define RATIO_FIELD 69  /* field 69 is a "reserved" field who is not used actualy. */
79
80/*
81 * FILE for the rules
82 */
83#define RULES_FILE "<path to renetcol>/renetcol-0.0.14beta/conf/rules.txt"
84
85/*
86 * FILE with SNMP index of the interfaces
87 * tagged "C"ustomers or "B"ackbone
88 */
89#define INTERFACES_TYPE_LIST "<path to renetcol>/renetcol-0.0.14beta/conf/SNMP_INDEX.txt"
90
91/*
92 * maximum SNMP index for one router
93 */
94#define MAX_SNMP_INDEX 900
95
96/*
97 * maximum number of interfaces by router (one interface == one SNMP index)
98 */ 
99#define MAX_INDEX_BY_ROUTER 150
100
101/*
102 * RRD files paths
103 */
104#define PREFIX_RRD_LOCATION "/mnt/data/RRD/RENATER/IPv4_SUBNET/"
105#define MATRIX_RRD_LOCATION "/mnt/data/RRD/RENATER/MATRIX/"
106#define AS_RRD_LOCATION "/mnt/data/RRD/RENATER/AS/"
107#define SNMP_INDEX_RRD_LOCATION "/mnt/data/RRD/RENATER/SNMP_INDEX/"
108#define MIB_RRD_LOCATION "/mnt/data/RRD/RENATER/RENETCOL_MIB/"
109
110/*
111 * RRD filenames (static names), location : "MIB_RRD_LOCATION"
112 */
113#define GLOBAL_MIB_RRD_FILE "RENETCOL_GLOBAL_COUNTERS.rrd"
114#define IPV4_MIB_RRD_FILE "RENETCOL_IPV4_MIB.rrd"
115#define IPV6_MIB_RRD_FILE "RENETCOL_IPV6_MIB.rrd"
116#define L4_IPV4_MIB_RRD_FILE "RENETCOL_L4_IPV4_MIB.rrd"
117#define L4_IPV6_MIB_RRD_FILE "RENETCOL_L4_IPV6_MIB.rrd"
118#define FLOWSIZE_IPV4_MIB_RRD_FILE "RENETCOL_FLOWSIZE_IPV4_MIB.rrd"
119#define FLOWSIZE_IPV6_MIB_RRD_FILE "RENETCOL_FLOWSIZE_IPV6_MIB.rrd"
120#define L7_IPV4_MIB_RRD_FILE "RENETCOL_L7_IPV4_MIB.rrd"
121#define L7_IPV6_MIB_RRD_FILE "RENETCOL_L7_IPV6_MIB.rrd"
122
123/*
124 * Your CoS - DSCP field in decimal notation, EF PHB 101110 (46) == ToS 10111000 (184)
125 */
126#define FIRST_CoS 46  /* EF, Premium - dec 46, bin 101110 - ToS 10111000 */
127#define SECOND_CoS 34 /* AF41, Best than BE - dec 34, bin 100010 - ToS 10001000*/
128#define THIRD_CoS 8   /* CS1, Less than BE - dec 8, bin 001000 - 00100000 */
129#define FOURTH_CoS 0  /* Best Effort or All flows if not in the 3 others class */
130
131/****************************************************************
132 * the following parameters CAN be changed but it's NOT REQUIRED
133 ***************************************************************/
134#define STEP 5
135#define FIELD_TYPE_NUMBER 216
136#define MAX_RULES_PER_FIELD 100
137#define SHMSIZE 33554432
138#define SOCKET_BUFFER_SIZE 1500
139#define TIME_OUT 300
140#define RRD_EXTENSION ".rrd"
141#define RRD_PARAM_PREFIX_0 "rrdcreate"
142#define RRD_PARAM_PREFIX_1 "--start"
143#define RRD_PARAM_PREFIX_2 "1106560200"
144#define RRD_PARAM_PREFIX_3 "--step"
145#define RRD_PARAM_PREFIX_4 "300"
146#define RRD_PARAM_PREFIX_5 "DS:inFlows:GAUGE:600:U:U"
147#define RRD_PARAM_PREFIX_6 "DS:outFlows:GAUGE:600:U:U"
148#define RRD_PARAM_PREFIX_7 "DS:inBytes:GAUGE:600:U:U"
149#define RRD_PARAM_PREFIX_8 "DS:outBytes:GAUGE:600:U:U"
150#define RRD_PARAM_PREFIX_9 "DS:inPkts:GAUGE:600:U:U"
151#define RRD_PARAM_PREFIX_10 "DS:outPkts:GAUGE:600:U:U"
152#define RRD_PARAM_PREFIX_11 "DS:inFirstCoS:GAUGE:600:U:U"
153#define RRD_PARAM_PREFIX_12 "DS:outFirstCoS:GAUGE:600:U:U"
154#define RRD_PARAM_PREFIX_13 "DS:inSecondCoS:GAUGE:600:U:U"
155#define RRD_PARAM_PREFIX_14 "DS:outSecondCoS:GAUGE:600:U:U"
156#define RRD_PARAM_PREFIX_15 "DS:inThirdCoS:GAUGE:600:U:U"
157#define RRD_PARAM_PREFIX_16 "DS:outThirdCoS:GAUGE:600:U:U"
158#define RRD_PARAM_PREFIX_17 "DS:inFourthCoS:GAUGE:600:U:U"
159#define RRD_PARAM_PREFIX_18 "DS:outFourthCoS:GAUGE:600:U:U"
160#define RRD_PARAM_PREFIX_19 "RRA:AVERAGE:0.5:1:2100"
161#define RRD_PARAM_PREFIX_20 "RRA:AVERAGE:0.5:24:1550"
162#define RRD_PARAM_PREFIX_21 "RRA:AVERAGE:0.5:288:1594"
163#define RRD_PARAM_PREFIX_22 "RRA:AVERAGE:0.5:2016:1040"
164#define RRD_PARAM_PREFIX_23 "RRA:MAX:0.5:1:2100"
165#define RRD_PARAM_PREFIX_24 "RRA:MAX:0.5:24:1550"
166#define RRD_PARAM_PREFIX_25 "RRA:MAX:0.5:288:1594"
167#define RRD_PARAM_MATRIX_0 "rrdcreate"
168#define RRD_PARAM_MATRIX_1 "--start"
169#define RRD_PARAM_MATRIX_2 "1106560200"
170#define RRD_PARAM_MATRIX_3 "--step"
171#define RRD_PARAM_MATRIX_4 "300"
172#define RRD_PARAM_MATRIX_5 "DS:Flows:GAUGE:600:U:U"
173#define RRD_PARAM_MATRIX_6 "DS:Bytes:GAUGE:600:U:U"
174#define RRD_PARAM_MATRIX_7 "DS:Pkts:GAUGE:600:U:U"
175#define RRD_PARAM_MATRIX_8 "RRA:AVERAGE:0.5:1:2100"
176#define RRD_PARAM_MATRIX_9 "RRA:AVERAGE:0.5:24:1550"
177#define RRD_PARAM_MATRIX_10 "RRA:AVERAGE:0.5:288:1594"
178#define RRD_PARAM_MATRIX_11 "RRA:AVERAGE:0.5:2016:1040"
179#define RRD_PARAM_MATRIX_12 "RRA:MAX:0.5:1:2100"
180#define RRD_PARAM_MATRIX_13 "RRA:MAX:0.5:24:1550"
181#define RRD_PARAM_MATRIX_14 "RRA:MAX:0.5:288:1594"
182#define RRD_PARAM_AS_0 "rrdcreate"
183#define RRD_PARAM_AS_1 "--start"
184#define RRD_PARAM_AS_2 "1106560200"
185#define RRD_PARAM_AS_3 "--step"
186#define RRD_PARAM_AS_4 "300"
187#define RRD_PARAM_AS_5 "DS:inFlows:GAUGE:600:U:U"
188#define RRD_PARAM_AS_6 "DS:outFlows:GAUGE:600:U:U"
189#define RRD_PARAM_AS_7 "DS:inBytes:GAUGE:600:U:U"
190#define RRD_PARAM_AS_8 "DS:outBytes:GAUGE:600:U:U"
191#define RRD_PARAM_AS_9 "DS:inPkts:GAUGE:600:U:U"
192#define RRD_PARAM_AS_10 "DS:outPkts:GAUGE:600:U:U"
193#define RRD_PARAM_AS_11 "RRA:AVERAGE:0.5:1:2100"
194#define RRD_PARAM_AS_12 "RRA:AVERAGE:0.5:24:1550"
195#define RRD_PARAM_AS_13 "RRA:AVERAGE:0.5:288:1594"
196#define RRD_PARAM_AS_14 "RRA:AVERAGE:0.5:2016:1040"
197#define RRD_PARAM_AS_15 "RRA:MAX:0.5:1:2100"
198#define RRD_PARAM_AS_16 "RRA:MAX:0.5:24:1550"
199#define RRD_PARAM_AS_17 "RRA:MAX:0.5:288:1594"
200#define RRD_PARAM_INDEX_0 "rrdcreate"
201#define RRD_PARAM_INDEX_1 "--start"
202#define RRD_PARAM_INDEX_2 "1106560200"
203#define RRD_PARAM_INDEX_3 "--step"
204#define RRD_PARAM_INDEX_4 "300"
205#define RRD_PARAM_INDEX_5 "DS:inFlows:GAUGE:600:U:U"
206#define RRD_PARAM_INDEX_6 "DS:outFlows:GAUGE:600:U:U"
207#define RRD_PARAM_INDEX_7 "DS:inBytes:GAUGE:600:U:U"
208#define RRD_PARAM_INDEX_8 "DS:outBytes:GAUGE:600:U:U"
209#define RRD_PARAM_INDEX_9 "DS:inPkts:GAUGE:600:U:U"
210#define RRD_PARAM_INDEX_10 "DS:outPkts:GAUGE:600:U:U"
211#define RRD_PARAM_INDEX_11 "RRA:AVERAGE:0.5:1:2100"
212#define RRD_PARAM_INDEX_12 "RRA:AVERAGE:0.5:24:1550"
213#define RRD_PARAM_INDEX_13 "RRA:AVERAGE:0.5:288:1594"
214#define RRD_PARAM_INDEX_14 "RRA:AVERAGE:0.5:2016:1040"
215#define RRD_PARAM_INDEX_15 "RRA:MAX:0.5:1:2100"
216#define RRD_PARAM_INDEX_16 "RRA:MAX:0.5:24:1550"
217#define RRD_PARAM_INDEX_17 "RRA:MAX:0.5:288:1594"
218#define RRD_UPDATE_0 "rrdupdate"
219#define RECEPT_PORT "52571"
220#define VAR_SHARED_SIZE 4
221#define FILE_TEMPO "/tmp/rules.tmp"
222
223#endif /* RENETCOLPARAM_H */
Note: See TracBrowser for help on using the browser.