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 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392
|
<HTML
><HEAD
><TITLE
>flow-fanout</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.73
"></HEAD
><BODY
CLASS="REFENTRY"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><H1
><A
NAME="AEN1"
><SPAN
CLASS="APPLICATION"
>flow-fanout</SPAN
></A
></H1
><DIV
CLASS="REFNAMEDIV"
><A
NAME="AEN6"
></A
><H2
>Name</H2
><SPAN
CLASS="APPLICATION"
>flow-fanout</SPAN
> -- Fanout (replicate) flow exports to many destinations.</DIV
><DIV
CLASS="REFSYNOPSISDIV"
><A
NAME="AEN10"
></A
><H2
>Synopsis</H2
><P
><B
CLASS="COMMAND"
>flow-fanout</B
> [-h] [-A<TT
CLASS="REPLACEABLE"
><I
> AS0_substitution</I
></TT
>] [-d<TT
CLASS="REPLACEABLE"
><I
> debug_level</I
></TT
>] [-f<TT
CLASS="REPLACEABLE"
><I
> filter_fname</I
></TT
>] [-F<TT
CLASS="REPLACEABLE"
><I
> filter_definition</I
></TT
>] [-m<TT
CLASS="REPLACEABLE"
><I
> privacy_mask</I
></TT
>] [-p<TT
CLASS="REPLACEABLE"
><I
> pidfile</I
></TT
>] [-s] [-S<TT
CLASS="REPLACEABLE"
><I
> stat_interval</I
></TT
>] [-V<TT
CLASS="REPLACEABLE"
><I
> pdu_version</I
></TT
>] [-x<TT
CLASS="REPLACEABLE"
><I
> xmit_delay</I
></TT
>] {<TT
CLASS="REPLACEABLE"
><I
>localip/remoteip/port</I
></TT
>} {<TT
CLASS="REPLACEABLE"
><I
>localip/remoteip/port</I
></TT
>...}</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN37"
></A
><H2
>DESCRIPTION</H2
><P
>The <B
CLASS="COMMAND"
>flow-fanout</B
> utility will replicate flows arriving
on localip/remoteip/port to destination(s) specified by localip/remoteip/port.</P
><P
>Flows processed by multiple exporters will be mixed into a single output
stream. This functionality appeared to support Cisco Catalyst exports and
may have other uses.</P
><P
>A SIGQUIT or SIGTERM signal will cause <B
CLASS="COMMAND"
>flow-fanout</B
> to exit.</P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN44"
></A
><H2
>OPTIONS</H2
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>-A<TT
CLASS="REPLACEABLE"
><I
> AS0_substitution</I
></TT
></DT
><DD
><P
>Cisco's NetFlow exports represent the local autonomous system as 0 instead of
the real value. This option can be used to replace the 0 in the export with
the a configured value. Unfortunately under certain configurations AS 0 can
also represent a cache miss or non forwarded traffic so use with caution.</P
></DD
><DT
>-d<TT
CLASS="REPLACEABLE"
><I
> debug_level</I
></TT
></DT
><DD
><P
>Enable debugging.</P
></DD
><DT
>-f<TT
CLASS="REPLACEABLE"
><I
> filter_fname</I
></TT
></DT
><DD
><P
>Filter list filename. Defaults to <TT
CLASS="FILENAME"
>@localstatedir@/cfg/filter</TT
>.</P
></DD
><DT
>-F<TT
CLASS="REPLACEABLE"
><I
> filter_definition</I
></TT
></DT
><DD
><P
>Select the active definition. Defaults to default.</P
></DD
><DT
>-h</DT
><DD
><P
>Display help.</P
></DD
><DT
>-m<TT
CLASS="REPLACEABLE"
><I
> privacy_mask</I
></TT
></DT
><DD
><P
>Apply <TT
CLASS="REPLACEABLE"
><I
>privacy_mask</I
></TT
> to the source and destination IP
address of flows. For example a privacy_mask of 255.255.255.0 would convert
flows with source/destination IP addresses 10.1.1.1 and 10.2.2.2 to 10.1.1.0
and 10.2.2.0 respectively.</P
></DD
><DT
>-p<TT
CLASS="REPLACEABLE"
><I
> pidfile</I
></TT
></DT
><DD
><P
>Configure the process ID file. Use - to disable pid file creation.</P
></DD
><DT
>-s</DT
><DD
><P
>Spoof the source IP address. If the IP address is 0 then it is replaced
with the exporter source IP.</P
></DD
><DT
>-S<TT
CLASS="REPLACEABLE"
><I
> stat_interval</I
></TT
></DT
><DD
><P
>When configured <B
CLASS="COMMAND"
>flow-fanout</B
> will emit a timestamped
message on stderr every <TT
CLASS="REPLACEABLE"
><I
>stat_interval</I
></TT
> minutes
indicating counters such as the number of flows received, packets processed,
and lost flows.</P
></DD
><DT
>-V<TT
CLASS="REPLACEABLE"
><I
> pdu_version</I
></TT
></DT
><DD
><P
>Use <TT
CLASS="REPLACEABLE"
><I
>pdu_version</I
></TT
> format output.
<P
CLASS="LITERALLAYOUT"
> 1 NetFlow version 1 (No sequence numbers, AS, or mask)<br>
5 NetFlow version 5<br>
6 NetFlow version 6 (5+ Encapsulation size)<br>
7 NetFlow version 7 (Catalyst switches)<br>
8.1 NetFlow AS Aggregation<br>
8.2 NetFlow Proto Port Aggregation<br>
8.3 NetFlow Source Prefix Aggregation<br>
8.4 NetFlow Destination Prefix Aggregation<br>
8.5 NetFlow Prefix Aggregation<br>
8.6 NetFlow Destination (Catalyst switches)<br>
8.7 NetFlow Source Destination (Catalyst switches)<br>
8.8 NetFlow Full Flow (Catalyst switches)<br>
8.9 NetFlow ToS AS Aggregation<br>
8.10 NetFlow ToS Proto Port Aggregation<br>
8.11 NetFlow ToS Source Prefix Aggregation<br>
8.12 NetFlow ToS Destination Prefix Aggregation<br>
8.13 NetFlow ToS Prefix Aggregation<br>
8.14 NetFlow ToS Prefix Port Aggregation<br>
1005 Flow-Tools tagged version 5</P
></P
></DD
><DT
>-x<TT
CLASS="REPLACEABLE"
><I
> xmit_delay</I
></TT
></DT
><DD
><P
>Configure a microsecond transmit delay between packets. This may be necessary in some configurations to prevent a transmit buffer overrun.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN106"
></A
><H2
>EXAMPLES</H2
><DIV
CLASS="INFORMALEXAMPLE"
><A
NAME="AEN108"
></A
><P
></P
><P
>Replicate flows arriving to local IP address 10.0.0.1 from the router
exporting with IP address 10.1.1.1 on port 9500 to localhost port 9500
and 10.5.5.5 port 9200. The exports sent to 10.5.5.5 will be sent with
a source IP address of 10.0.0.5 which must be a valid local IP address.</P
><P
> <B
CLASS="COMMAND"
>flow-fanout 10.0.0.1/10.1.1.1/9500 0/0/9500 10.0.0.5/10.5.5.5/9200</B
></P
><P
></P
></DIV
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN112"
></A
><H2
>BUGS</H2
><P
>NetFlow exports do not contain the exporter IP address inside the payload so
the original exporter IP address (typically a router) will be lost when using
<B
CLASS="COMMAND"
>flow-fanout</B
>. A work around for this protocol limitation
is to use local IP aliases and the <TT
CLASS="REPLACEABLE"
><I
>localip</I
></TT
> option.
When the spoofing option is used multiple exporters with different IP addresses
will share the same sequence number but will have the original source IP.
Fixing this requires per source : destination sequence number mapping. It
is much easier to just use multiple instances of flow-fanout running on
different ports. </P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN117"
></A
><H2
>AUTHOR</H2
><P
>Mark Fullmer
<TT
CLASS="EMAIL"
><<A
HREF="mailto:maf@splintered.net"
>maf@splintered.net</A
>></TT
></P
></DIV
><DIV
CLASS="REFSECT1"
><A
NAME="AEN124"
></A
><H2
>SEE ALSO</H2
><P
><SPAN
CLASS="APPLICATION"
>flow-tools</SPAN
>(1)</P
></DIV
></BODY
></HTML
>
|