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 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582 1583 1584 1585 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720 1721 1722 1723 1724 1725 1726 1727 1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752 1753 1754 1755 1756 1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794 1795 1796 1797 1798 1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809 1810 1811 1812 1813 1814 1815 1816 1817 1818 1819 1820 1821 1822 1823 1824 1825 1826 1827 1828 1829 1830 1831 1832 1833 1834 1835 1836 1837 1838 1839 1840 1841 1842 1843 1844 1845
|
<pre>Network Working Group B. Claise, Ed.
Request for Comments: 3954 Cisco Systems
Category: Informational October 2004
<span class="h1">Cisco Systems NetFlow Services Export Version 9</span>
Status of this Memo
This memo provides information for the Internet community. It does
not specify an Internet standard of any kind. Distribution of this
memo is unlimited.
Copyright Notice
Copyright (C) The Internet Society (2004).
IESG Note
This RFC documents the NetFlow services export protocol Version 9 as
it was when submitted to the IETF as a basis for further work in the
IPFIX WG.
This RFC itself is not a candidate for any level of Internet
Standard. The IETF disclaims any knowledge of the fitness of this
RFC for any purpose, and in particular notes that it has not had
complete IETF review for such things as security, congestion control,
or inappropriate interaction with deployed protocols. The RFC Editor
has chosen to publish this document at its discretion.
Abstract
This document specifies the data export format for version 9 of Cisco
Systems' NetFlow services, for use by implementations on the network
elements and/or matching collector programs. The version 9 export
format uses templates to provide access to observations of IP packet
flows in a flexible and extensible manner. A template defines a
collection of fields, with corresponding descriptions of structure
and semantics.
Table of Contents
<a href="#section-1">1</a>. Introduction. . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-2">2</a>
<a href="#section-2">2</a>. Terminology . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-4">4</a>
<a href="#section-2.1">2.1</a>. Terminology Summary Table . . . . . . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-3">3</a>. NetFlow High-Level Picture on the Exporter. . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-3.1">3.1</a>. The NetFlow Process on the Exporter . . . . . . . . . . <a href="#page-6">6</a>
<a href="#section-3.2">3.2</a>. Flow Expiration . . . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<span class="grey">Claise Informational [Page 1]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-2" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<a href="#section-3.3">3.3</a>. Transport Protocol. . . . . . . . . . . . . . . . . . . <a href="#page-7">7</a>
<a href="#section-4">4</a>. Packet Layout . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-8">8</a>
<a href="#section-5">5</a>. Export Packet Format. . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-5.1">5.1</a>. Header Format . . . . . . . . . . . . . . . . . . . . . <a href="#page-9">9</a>
<a href="#section-5.2">5.2</a>. Template FlowSet Format . . . . . . . . . . . . . . . . <a href="#page-11">11</a>
<a href="#section-5.3">5.3</a>. Data FlowSet Format . . . . . . . . . . . . . . . . . . <a href="#page-13">13</a>
<a href="#section-6">6</a>. Options . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-6.1">6.1</a>. Options Template FlowSet Format . . . . . . . . . . . . <a href="#page-14">14</a>
<a href="#section-6.2">6.2</a>. Options Data Record Format. . . . . . . . . . . . . . . <a href="#page-16">16</a>
<a href="#section-7">7</a>. Template Management . . . . . . . . . . . . . . . . . . . . . <a href="#page-17">17</a>
<a href="#section-8">8</a>. Field Type Definitions. . . . . . . . . . . . . . . . . . . . <a href="#page-18">18</a>
<a href="#section-9">9</a>. The Collector Side. . . . . . . . . . . . . . . . . . . . . . <a href="#page-25">25</a>
<a href="#section-10">10</a>. Security Considerations . . . . . . . . . . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-10.1">10.1</a>. Disclosure of Flow Information Data . . . . . . . . . . <a href="#page-26">26</a>
<a href="#section-10.2">10.2</a>. Forgery of Flow Records or Template Records . . . . . . <a href="#page-26">26</a>
<a href="#section-10.3">10.3</a>. Attacks on the NetFlow Collector. . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#section-11">11</a>. Examples. . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-27">27</a>
<a href="#section-11.1">11.1</a>. Packet Header Example . . . . . . . . . . . . . . . . . <a href="#page-28">28</a>
<a href="#section-11.2">11.2</a>. Template FlowSet Example. . . . . . . . . . . . . . . . <a href="#page-28">28</a>
<a href="#section-11.3">11.3</a>. Data FlowSet Example. . . . . . . . . . . . . . . . . . <a href="#page-29">29</a>
<a href="#section-11.4">11.4</a>. Options Template FlowSet Example. . . . . . . . . . . . <a href="#page-30">30</a>
<a href="#section-11.5">11.5</a>. Data FlowSet with Options Data Records Example. . . . . <a href="#page-30">30</a>
<a href="#section-12">12</a>. References. . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-31">31</a>
<a href="#section-12.1">12.1</a>. Normative References. . . . . . . . . . . . . . . . . . <a href="#page-31">31</a>
<a href="#section-12.2">12.2</a>. Informative References. . . . . . . . . . . . . . . . . <a href="#page-31">31</a>
<a href="#section-13">13</a>. Authors . . . . . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-31">31</a>
<a href="#section-14">14</a>. Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . <a href="#page-31">31</a>
<a href="#section-15">15</a>. Authors' Addresses. . . . . . . . . . . . . . . . . . . . . . <a href="#page-32">32</a>
<a href="#section-16">16</a>. Full Copyright Statement. . . . . . . . . . . . . . . . . . . <a href="#page-33">33</a>
<span class="h2"><a class="selflink" id="section-1" href="#section-1">1</a>. Introduction</span>
Cisco Systems' NetFlow services provide network administrators with
access to IP flow information from their data networks. Network
elements (routers and switches) gather flow data and export it to
collectors. The collected data provides fine-grained metering for
highly flexible and detailed resource usage accounting.
A flow is defined as a unidirectional sequence of packets with some
common properties that pass through a network device. These
collected flows are exported to an external device, the NetFlow
collector. Network flows are highly granular; for example, flow
records include details such as IP addresses, packet and byte counts,
timestamps, Type of Service (ToS), application ports, input and
output interfaces, etc.
Exported NetFlow data is used for a variety of purposes, including
enterprise accounting and departmental chargebacks, ISP billing, data
<span class="grey">Claise Informational [Page 2]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-3" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
warehousing, network monitoring, capacity planning, application
monitoring and profiling, user monitoring and profiling, security
analysis, and data mining for marketing purposes.
This document specifies NetFlow version 9. It describes the
implementation specifications both from network element and NetFlow
collector points of view. These specifications should help the
deployment of NetFlow version 9 across different platforms and
different vendors by limiting the interoperability risks. The
NetFlow export format version 9 uses templates to provide access to
observations of IP packet flows in a flexible and extensible manner.
A template defines a collection of fields, with corresponding
descriptions of structure and semantics.
The template-based approach provides the following advantages:
- New fields can be added to NetFlow flow records without
changing the structure of the export record format. With
previous NetFlow versions, adding a new field in the flow
record implied a new version of the export protocol format and
a new version of the NetFlow collector that supported the
parsing of the new export protocol format.
- Templates that are sent to the NetFlow collector contain the
structural information about the exported flow record fields;
therefore, if the NetFlow collector does not understand the
semantics of new fields, it can still interpret the flow
record.
- Because the template mechanism is flexible, it allows the
export of only the required fields from the flows to the
NetFlow collector. This helps to reduce the exported flow data
volume and provides possible memory savings for the exporter
and NetFlow collector. Sending only the required information
can also reduce network load.
The IETF IPFIX Working Group (IP Flow Information eXport) is
developing a new protocol, based on the version 9 of Cisco Systems'
NetFlow services. Some enhancements in different domains (congestion
aware transport protocol, built-in security, etc... ) have been
incorporated in this new IPFIX protocol. Refer to the IPFIX Working
Group documents for more details.
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
"SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
document are to be interpreted as described in <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>
[<a href="./rfc2119" title=""Key words for use in RFCs to Indicate Requirement Levels"">RFC2119</a>].
<span class="grey">Claise Informational [Page 3]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-4" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h2"><a class="selflink" id="section-2" href="#section-2">2</a>. Terminology</span>
Various terms used in this document are described in this section.
Note that the terminology summary table in <a href="#section-2.1">Section 2.1</a> gives a quick
overview of the relationships between some of the different terms
defined.
Observation Point
An Observation Point is a location in the network where IP packets
can be observed; for example, one or a set of interfaces on a network
device like a router. Every Observation Point is associated with an
Observation Domain.
Observation Domain
The set of Observation Points that is the largest aggregatable set of
flow information at the network device with NetFlow services enabled
is termed an Observation Domain. For example, a router line card
composed of several interfaces with each interface being an
Observation Point.
IP Flow or Flow
An IP Flow, also called a Flow, is defined as a set of IP packets
passing an Observation Point in the network during a certain time
interval. All packets that belong to a particular Flow have a set of
common properties derived from the data contained in the packet and
from the packet treatment at the Observation Point.
Flow Record
A Flow Record provides information about an IP Flow observed at an
Observation Point. In this document, the Flow Data Records are also
referred to as NetFlow services data and NetFlow data.
Exporter
A device (for example, a router) with the NetFlow services enabled,
the Exporter monitors packets entering an Observation Point and
creates Flows from these packets. The information from these Flows
is exported in the form of Flow Records to the NetFlow Collector.
NetFlow Collector
The NetFlow Collector receives Flow Records from one or more
Exporters. It processes the received Export Packet(s); that is, it
parses and stores the Flow Record information. Flow Records can be
optionally aggregated before being stored on the hard disk. The
NetFlow Collector is also referred to as the Collector in this
document.
<span class="grey">Claise Informational [Page 4]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-5" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Export Packet
An Export Packet is a packet originating at the Exporter that carries
the Flow Records of this Exporter and whose destination is the
NetFlow Collector.
Packet Header
The Packet Header is the first part of an Export Packet. The Packet
Header provides basic information about the packet such as the
NetFlow version, number of records contained within the packet, and
sequence numbering.
Template Record
A Template Record defines the structure and interpretation of fields
in a Flow Data Record.
Flow Data Record
A Flow Data Record is a data record that contains values of the Flow
parameters corresponding to a Template Record.
Options Template Record
An Options Template Record defines the structure and interpretation
of fields in an Options Data Record, including defining the scope
within which the Options Data Record is relevant.
Options Data Record
The data record that contains values and scope information of the
Flow measurement parameters, corresponding to an Options Template
Record.
FlowSet
FlowSet is a generic term for a collection of Flow Records that have
a similar structure. In an Export Packet, one or more FlowSets
follow the Packet Header. There are three different types of
FlowSets: Template FlowSet, Options Template FlowSet, and Data
FlowSet.
Template FlowSet
A Template FlowSet is one or more Template Records that have been
grouped together in an Export Packet.
Options Template FlowSet
An Options Template FlowSet is one or more Options Template Records
that have been grouped together in an Export Packet.
<span class="grey">Claise Informational [Page 5]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-6" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Data FlowSet
A Data FlowSet is one or more records, of the same type, that are
grouped together in an Export Packet. Each record is either a Flow
Data Record or an Options Data Record previously defined by a
Template Record or an Options Template Record.
<span class="h3"><a class="selflink" id="section-2.1" href="#section-2.1">2.1</a>. Terminology Summary Table</span>
+------------------+---------------------------------------------+
| | Contents |
| +--------------------+------------------------+
| FlowSet | Template Record | Data Record |
+------------------+--------------------+------------------------+
| | | Flow Data Record(s) |
| Data FlowSet | / | or |
| | | Options Data Record(s) |
+------------------+--------------------+------------------------+
| Template FlowSet | Template Record(s) | / |
+------------------+--------------------+------------------------+
| Options Template | Options Template | / |
| FlowSet | Record(s) | |
+------------------+--------------------+------------------------+
A Data FlowSet is composed of an Options Data Record(s) or Flow Data
Record(s). No Template Record is included. A Template Record defines
the Flow Data Record, and an Options Template Record defines the
Options Data Record.
A Template FlowSet is composed of Template Record(s). No Flow or
Options Data Record is included.
An Options Template FlowSet is composed of Options Template
Record(s). No Flow or Options Data Record is included.
<span class="h2"><a class="selflink" id="section-3" href="#section-3">3</a>. NetFlow High-Level Picture on the Exporter</span>
<span class="h3"><a class="selflink" id="section-3.1" href="#section-3.1">3.1</a>. The NetFlow Process on the Exporter</span>
The NetFlow process on the Exporter is responsible for the creation
of Flows from the observed IP packets. The details of this process
are beyond the scope of this document.
<span class="grey">Claise Informational [Page 6]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-7" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h3"><a class="selflink" id="section-3.2" href="#section-3.2">3.2</a>. Flow Expiration</span>
A Flow is considered to be inactive if no packets belonging to the
Flow have been observed at the Observation Point for a given timeout.
If any packet is seen within the timeout, the flow is considered an
active flow. A Flow can be exported under the following conditions:
1. If the Exporter can detect the end of a Flow. For example, if
the FIN or RST bit is detected in a TCP [<a href="./rfc793" title=""Transmission Control Protocol"">RFC793</a>] connection,
the Flow Record is exported.
2. If the Flow has been inactive for a certain period of time.
This inactivity timeout SHOULD be configurable at the Exporter,
with a minimum value of 0 for an immediate expiration.
3. For long-lasting Flows, the Exporter SHOULD export the Flow
Records on a regular basis. This timeout SHOULD be
configurable at the Exporter.
4. If the Exporter experiences internal constraints, a Flow MAY be
forced to expire prematurely; for example, counters wrapping or
low memory.
<span class="h3"><a class="selflink" id="section-3.3" href="#section-3.3">3.3</a>. Transport Protocol</span>
To achieve efficiency in terms of processing at the Exporter while
handling high volumes of Export Packets, the NetFlow Export Packets
are encapsulated into UDP [<a href="./rfc768" title=""User Datagram Protocol"">RFC768</a>] datagrams for export to the
NetFlow Collector. However, NetFlow version 9 has been designed to
be transport protocol independent. Hence, it can also operate over
congestion-aware protocols such as SCTP [<a href="./rfc2960" title=""Stream Control Transmission Protocol"">RFC2960</a>].
Note that the Exporter can export to multiple Collectors, using
independent transport protocols.
UDP [<a href="./rfc768" title=""User Datagram Protocol"">RFC768</a>] is a non congestion-aware protocol, so when deploying
NetFlow version 9 in a congestion-sensitive environment, make the
connection between Exporter and NetFlow Collector through a dedicated
link. This ensures that any burstiness in the NetFlow traffic
affects only this dedicated link. When the NetFlow Collector can not
be placed within a one-hop distance from the Exporter or when the
export path from the Exporter to the NetFlow Collector can not be
exclusively used for the NetFlow Export Packets, the export path
should be designed so that it can always sustain the maximum
burstiness of NetFlow traffic from the Exporter. Note that the
congestion can occur on the Exporter in case the export path speed is
too low.
<span class="grey">Claise Informational [Page 7]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-8" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h2"><a class="selflink" id="section-4" href="#section-4">4</a>. Packet Layout</span>
An Export Packet consists of a Packet Header followed by one or more
FlowSets. The FlowSets can be any of the possible three types:
Template, Data, or Options Template.
+--------+-------------------------------------------+
| | +----------+ +---------+ +----------+ |
| Packet | | Template | | Data | | Options | |
| Header | | FlowSet | | FlowSet | | Template | ... |
| | | | | | | FlowSet | |
| | +----------+ +---------+ +----------+ |
+--------+-------------------------------------------+
Export Packet
A FlowSet ID is used to distinguish the different types of FlowSets.
FlowSet IDs lower than 256 are reserved for special FlowSets, such as
the Template FlowSet (ID 0) and the Options Template FlowSet (ID 1).
The Data FlowSets have a FlowSet ID greater than 255.
The format of the Template, Data, and Options Template FlowSets will
be discussed later in this document. The Exporter MUST code all
binary integers of the Packet Header and the different FlowSets in
network byte order (also known as the big-endian byte ordering).
Following are some examples of export packets:
1. An Export Packet consisting of interleaved Template, Data, and
Options Template FlowSets. Example: a newly created Template is
exported as soon as possible. So if there is already an Export
Packet with a Data FlowSet that is being prepared for export, the
Template and Option FlowSets are also interleaved with this
information, subject to availability of space.
Export Packet:
+--------+--------------------------------------------------------+
| | +----------+ +---------+ +-----------+ +---------+ |
| Packet | | Template | | Data | | Options | | Data | |
| Header | | FlowSet | | FlowSet | ... | Template | | FlowSet | |
| | | | | | | FlowSet | | | |
| | +----------+ +---------+ +-----------+ +---------+ |
+--------+--------------------------------------------------------+
2. An Export Packet consisting entirely of Data FlowSets. Example:
after the appropriate Template Records have been defined and
transmitted to the NetFlow Collector device, the majority of
Export Packets consists solely of Data FlowSets.
<span class="grey">Claise Informational [Page 8]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-9" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Export Packet:
+--------+----------------------------------------------+
| | +---------+ +---------+ +---------+ |
| Packet | | Data | ... | Data | ... | Data | |
| Header | | FlowSet | ... | FlowSet | ... | FlowSet | |
| | +---------+ +---------+ +---------+ |
+--------+----------------------------------------------+
3. An Export Packet consisting entirely of Template and Options
Template FlowSets. Example: the Exporter MAY transmit a packet
containing Template and Options Template FlowSets periodically to
help ensure that the NetFlow Collector has the correct Template
Records and Options Template Records when the corresponding Flow
Data records are received.
Export Packet:
+--------+-------------------------------------------------+
| | +----------+ +----------+ +----------+ |
| Packet | | Template | | Template | | Options | |
| Header | | FlowSet | ... | FlowSet | ... | Template | |
| | | | | | | FlowSet | |
| | +----------+ +----------+ +----------+ |
+--------+-------------------------------------------------+
<span class="h2"><a class="selflink" id="section-5" href="#section-5">5</a>. Export Packet Format</span>
<span class="h3"><a class="selflink" id="section-5.1" href="#section-5.1">5.1</a>. Header Format</span>
The Packet Header format is specified as:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version Number | Count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sysUpTime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| UNIX Secs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<span class="grey">Claise Informational [Page 9]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-10" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Packet Header Field Descriptions
Version
Version of Flow Record format exported in this packet. The
value of this field is 9 for the current version.
Count
The total number of records in the Export Packet, which is the
sum of Options FlowSet records, Template FlowSet records, and
Data FlowSet records.
sysUpTime
Time in milliseconds since this device was first booted.
UNIX Secs
Time in seconds since 0000 UTC 1970, at which the Export Packet
leaves the Exporter.
Sequence Number
Incremental sequence counter of all Export Packets sent from
the current Observation Domain by the Exporter. This value
MUST be cumulative, and SHOULD be used by the Collector to
identify whether any Export Packets have been missed.
Source ID
A 32-bit value that identifies the Exporter Observation Domain.
NetFlow Collectors SHOULD use the combination of the source IP
address and the Source ID field to separate different export
streams originating from the same Exporter.
<span class="grey">Claise Informational [Page 10]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-11" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h3"><a class="selflink" id="section-5.2" href="#section-5.2">5.2</a>. Template FlowSet Format</span>
One of the essential elements in the NetFlow format is the Template
FlowSet. Templates greatly enhance the flexibility of the Flow
Record format because they allow the NetFlow Collector to process
Flow Records without necessarily knowing the interpretation of all
the data in the Flow Record. The format of the Template FlowSet is
as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowSet ID = 0 | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Template ID 256 | Field Count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Field Type 1 | Field Length 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Field Type 2 | Field Length 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Field Type N | Field Length N |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Template ID 257 | Field Count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Field Type 1 | Field Length 1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Field Type 2 | Field Length 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Field Type M | Field Length M |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Template ID K | Field Count |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Template FlowSet Field Descriptions
FlowSet ID
FlowSet ID value of 0 is reserved for the Template FlowSet.
<span class="grey">Claise Informational [Page 11]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-12" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Length
Total length of this FlowSet. Because an individual Template
FlowSet MAY contain multiple Template Records, the Length value
MUST be used to determine the position of the next FlowSet
record, which could be any type of FlowSet. Length is the sum
of the lengths of the FlowSet ID, the Length itself, and all
Template Records within this FlowSet.
Template ID
Each of the newly generated Template Records is given a unique
Template ID. This uniqueness is local to the Observation
Domain that generated the Template ID. Template IDs 0-255 are
reserved for Template FlowSets, Options FlowSets, and other
reserved FlowSets yet to be created. Template IDs of Data
FlowSets are numbered from 256 to 65535.
Field Count
Number of fields in this Template Record. Because a Template
FlowSet usually contains multiple Template Records, this field
allows the Collector to determine the end of the current
Template Record and the start of the next.
Field Type
A numeric value that represents the type of the field. Refer
to the "Field Type Definitions" section.
Field Length
The length of the corresponding Field Type, in bytes. Refer to
the "Field Type Definitions" section.
<span class="grey">Claise Informational [Page 12]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-13" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h3"><a class="selflink" id="section-5.3" href="#section-5.3">5.3</a>. Data FlowSet Format</span>
The format of the Data FlowSet is as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowSet ID = Template ID | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record 1 - Field Value 1 | Record 1 - Field Value 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record 1 - Field Value 3 | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record 2 - Field Value 1 | Record 2 - Field Value 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record 2 - Field Value 3 | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record 3 - Field Value 1 | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Data FlowSet Field Descriptions
FlowSet ID = Template ID
Each Data FlowSet is associated with a FlowSet ID. The FlowSet
ID maps to a (previously generated) Template ID. The Collector
MUST use the FlowSet ID to find the corresponding Template
Record and decode the Flow Records from the FlowSet.
Length
The length of this FlowSet. Length is the sum of the lengths
of the FlowSet ID, Length itself, all Flow Records within this
FlowSet, and the padding bytes, if any.
Record N - Field Value M
The remainder of the Data FlowSet is a collection of Flow Data
Record(s), each containing a set of field values. The Type and
Length of the fields have been previously defined in the
Template Record referenced by the FlowSet ID or Template ID.
Padding
The Exporter SHOULD insert some padding bytes so that the
subsequent FlowSet starts at a 4-byte aligned boundary. It is
important to note that the Length field includes the padding
bytes. Padding SHOULD be using zeros.
<span class="grey">Claise Informational [Page 13]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-14" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Interpretation of the Data FlowSet format can be done only if the
Template FlowSet corresponding to the Template ID is available at the
Collector.
<span class="h2"><a class="selflink" id="section-6" href="#section-6">6</a>. Options</span>
<span class="h3"><a class="selflink" id="section-6.1" href="#section-6.1">6.1</a>. Options Template FlowSet Format</span>
The Options Template Record (and its corresponding Options Data
Record) is used to supply information about the NetFlow process
configuration or NetFlow process specific data, rather than supplying
information about IP Flows.
For example, the Options Template FlowSet can report the sample rate
of a specific interface, if sampling is supported, along with the
sampling method used.
The format of the Options Template FlowSet follows.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowSet ID = 1 | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Template ID | Option Scope Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Option Length | Scope 1 Field Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Scope 1 Field Length | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Scope N Field Length | Option 1 Field Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Option 1 Field Length | ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Option M Field Length | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Options Template FlowSet Field Definitions
FlowSet ID = 1
A FlowSet ID value of 1 is reserved for the Options Template.
Length
Total length of this FlowSet. Each Options Template FlowSet
MAY contain multiple Options Template Records. Thus, the
Length value MUST be used to determine the position of the next
FlowSet record, which could be either a Template FlowSet or
Data FlowSet.
<span class="grey">Claise Informational [Page 14]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-15" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Length is the sum of the lengths of the FlowSet ID, the Length
itself, and all Options Template Records within this FlowSet
Template ID.
Template ID
Template ID of this Options Template. This value is greater
than 255.
Option Scope Length
The length in bytes of any Scope field definition contained in
the Options Template Record (The use of "Scope" is described
below).
Option Length
The length (in bytes) of any options field definitions
contained in this Options Template Record.
Scope 1 Field Type
The relevant portion of the Exporter/NetFlow process to which
the Options Template Record refers.
Currently defined values are:
1 System
2 Interface
3 Line Card
4 Cache
5 Template
For example, the NetFlow process can be implemented on a per-
interface basis, so if the Options Template Record were
reporting on how the NetFlow process is configured, the Scope
for the report would be 2 (interface). The associated
interface ID would then be carried in the associated Options
Data FlowSet. The Scope can be limited further by listing
multiple scopes that all must match at the same time. Note
that the Scope fields always precede the Option fields.
Scope 1 Field Length
The length (in bytes) of the Scope field, as it would appear in
an Options Data Record.
Option 1 Field Type
A numeric value that represents the type of field that would
appear in the Options Template Record. Refer to the Field Type
Definitions section.
Option 1 Field Length
The length (in bytes) of the Option field.
<span class="grey">Claise Informational [Page 15]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-16" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Padding
The Exporter SHOULD insert some padding bytes so that the
subsequent FlowSet starts at a 4-byte aligned boundary. It is
important to note that the Length field includes the padding
bytes. Padding SHOULD be using zeros.
<span class="h3"><a class="selflink" id="section-6.2" href="#section-6.2">6.2</a>. Options Data Record Format</span>
The Options Data Records are sent in Data FlowSets, on a regular
basis, but not with every Flow Data Record. How frequently these
Options Data Records are exported is configurable. See the
"Templates Management" section for more details.
The format of the Data FlowSet containing Options Data Records
follows.
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowSet ID = Template ID | Length |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record 1 - Scope 1 Value |Record 1 - Option Field 1 Value|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Record 1 - Option Field 2 Value| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record 2 - Scope 1 Value |Record 2 - Option Field 1 Value|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Record 2 - Option Field 2 Value| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Record 3 - Scope 1 Value |Record 3 - Option Field 1 Value|
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|Record 3 - Option Field 2 Value| ... |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| ... | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Options Data Records of the Data FlowSet Field Descriptions
FlowSet ID = Template ID
A FlowSet ID precedes each group of Options Data Records within
a Data FlowSet. The FlowSet ID maps to a previously generated
Template ID corresponding to this Options Template Record. The
Collector MUST use the FlowSet ID to map the appropriate type
and length to any field values that follow.
<span class="grey">Claise Informational [Page 16]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-17" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Length
The length of this FlowSet. Length is the sum of the lengths of
the FlowSet ID, Length itself, all the Options Data Records
within this FlowSet, and the padding bytes, if any.
Record N - Option Field M Value
The remainder of the Data FlowSet is a collection of Flow
Records, each containing a set of scope and field values. The
type and length of the fields were previously defined in the
Options Template Record referenced by the FlowSet ID or
Template ID.
Padding
The Exporter SHOULD insert some padding bytes so that the
subsequent FlowSet starts at a 4-byte aligned boundary. It is
important to note that the Length field includes the padding
bytes. Padding SHOULD be using zeros.
The Data FlowSet format can be interpreted only if the Options
Template FlowSet corresponding to the Template ID is available at the
Collector.
<span class="h2"><a class="selflink" id="section-7" href="#section-7">7</a>. Template Management</span>
Flow Data records that correspond to a Template Record MAY appear in
the same and/or subsequent Export Packets. The Template Record is
not necessarily carried in every Export Packet. As such, the NetFlow
Collector MUST store the Template Record to interpret the
corresponding Flow Data Records that are received in subsequent data
packets.
A NetFlow Collector that receives Export Packets from several
Observation Domains from the same Exporter MUST be aware that the
uniqueness of the Template ID is not guaranteed across Observation
Domains.
The Template IDs must remain constant for the life of the NetFlow
process on the Exporter. If the Exporter or the NetFlow process
restarts for any reason, all information about Templates will be lost
and new Template IDs will be created. Template IDs are thus not
guaranteed to be consistent across an Exporter or NetFlow process
restart.
A newly created Template record is assigned an unused Template ID
from the Exporter. If the template configuration is changed, the
current Template ID is abandoned and SHOULD NOT be reused until the
<span class="grey">Claise Informational [Page 17]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-18" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
NetFlow process or Exporter restarts. If a Collector should receive
a new definition for an already existing Template ID, it MUST discard
the previous template definition and use the new one.
If a configured Template Record on the Exporter is deleted, and re-
configured with exactly the same parameters, the same Template ID
COULD be reused.
The Exporter sends the Template FlowSet and Options Template FlowSet
under the following conditions:
1. After a NetFlow process restarts, the Exporter MUST NOT send any
Data FlowSet without sending the corresponding Template FlowSet
and the required Options Template FlowSet in a previous packet or
including it in the same Export Packet. It MAY transmit the
Template FlowSet and Options Template FlowSet, without any Data
FlowSets, in advance to help ensure that the Collector will have
the correct Template Record before receiving the first Flow or
Options Data Record.
2. In the event of configuration changes, the Exporter SHOULD send
the new template definitions at an accelerated rate. In such a
case, it MAY transmit the changed Template Record(s) and Options
Template Record(s), without any data, in advance to help ensure
that the Collector will have the correct template information
before receiving the first data.
3. On a regular basis, the Exporter MUST send all the Template
Records and Options Template Records to refresh the Collector.
Template IDs have a limited lifetime at the Collector and MUST be
periodically refreshed. Two approaches are taken to make sure
that Templates get refreshed at the Collector:
* Every N number of Export Packets.
* On a time basis, so every N number of minutes.
Both options MUST be configurable by the user on the Exporter.
When one of these expiry conditions is met, the Exporter MUST send
the Template FlowSet and Options Template.
4. In the event of a clock configuration change on the Exporter, the
Exporter SHOULD send the template definitions at an accelerated
rate.
<span class="h2"><a class="selflink" id="section-8" href="#section-8">8</a>. Field Type Definitions</span>
The following table describes all the field type definitions that an
Exporter MAY support. The fields are a selection of Packet Header
fields, lookup results (for example, the autonomous system numbers or
the subnet masks), and properties of the packet such as length.
<span class="grey">Claise Informational [Page 18]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-19" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Field Type Value Length Description
(bytes)
Incoming counter with
length N x 8 bits for the
IN_BYTES 1 N number of bytes associated
with an IP Flow. By default
N is 4
Incoming counter with
length N x 8 bits for the
IN_PKTS 2 N number of packets
associated with an IP Flow.
By default N is 4
FLOWS 3 N Number of Flows
that were aggregated;
by default N is 4
PROTOCOL 4 1 IP protocol byte
Type of service byte
TOS 5 1 setting when entering
the incoming interface
TCP flags; cumulative of
TCP_FLAGS 6 1 all the TCP flags seen in
this Flow
TCP/UDP source port number
L4_SRC_PORT 7 2 (for example, FTP, Telnet,
or equivalent)
IPV4_SRC_ADDR 8 4 IPv4 source address
The number of contiguous
bits in the source subnet
SRC_MASK 9 1 mask (i.e., the mask in
slash notation)
Input interface index.
INPUT_SNMP 10 N By default N is 2, but
higher values can be used
TCP/UDP destination port
L4_DST_PORT 11 2 number (for example, FTP,
Telnet, or equivalent)
<span class="grey">Claise Informational [Page 19]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-20" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
IPV4_DST_ADDR 12 4 IPv4 destination address
The number of contiguous
bits in the destination
DST_MASK 13 1 subnet mask (i.e., the mask
in slash notation)
Output interface index.
OUTPUT_SNMP 14 N By default N is 2, but
higher values can be used
IPV4_NEXT_HOP 15 4 IPv4 address of the next-
hop router
Source BGP autonomous
SRC_AS 16 N system number where N could
be 2 or 4. By default N is
2
Destination BGP autonomous
DST_AS 17 N system number where N could
be 2 or 4. By default N is
2
BGP_IPV4_NEXT_HOP 18 4 Next-hop router's IP
address in the BGP domain
IP multicast outgoing
packet counter with length
MUL_DST_PKTS 19 N N x 8 bits for packets
associated with the IP
Flow. By default N is 4
IP multicast outgoing
Octet (byte) counter with
length N x 8 bits for the
MUL_DST_BYTES 20 N number of bytes associated
with the IP Flow. By
default N is 4
sysUptime in msec at which
LAST_SWITCHED 21 4 the last packet of this
Flow was switched
sysUptime in msec at which
FIRST_SWITCHED 22 4 the first packet of this
Flow was switched
<span class="grey">Claise Informational [Page 20]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-21" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Outgoing counter with
length N x 8 bits for the
OUT_BYTES 23 N number of bytes associated
with an IP Flow. By
default N is 4
Outgoing counter with
length N x 8 bits for the
OUT_PKTS 24 N number of packets
associated with an IP Flow.
By default N is 4
IPV6_SRC_ADDR 27 16 IPv6 source address
IPV6_DST_ADDR 28 16 IPv6 destination address
IPV6_SRC_MASK 29 1 Length of the IPv6 source
mask in contiguous bits
Length of the IPv6
IPV6_DST_MASK 30 1 destination mask in
contiguous bits
IPV6_FLOW_LABEL 31 3 IPv6 flow label as per
<a href="./rfc2460">RFC 2460</a> definition
Internet Control Message
ICMP_TYPE 32 2 Protocol (ICMP) packet
type; reported as
ICMP Type * 256 + ICMP code
MUL_IGMP_TYPE 33 1 Internet Group Management
Protocol (IGMP) packet type
When using sampled NetFlow,
the rate at which packets
SAMPLING_INTERVAL 34 4 are sampled; for example, a
value of 100 indicates that
one of every hundred
packets is sampled
For sampled NetFlow
platform-wide:
SAMPLING_ALGORITHM 35 1 0x01 deterministic sampling
0x02 random sampling
Use in connection with
SAMPLING_INTERVAL
<span class="grey">Claise Informational [Page 21]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-22" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Timeout value (in seconds)
FLOW_ACTIVE_TIMEOUT 36 2 for active flow entries
in the NetFlow cache
Timeout value (in seconds)
FLOW_INACTIVE_TIMEOUT 37 2 for inactive Flow entries
in the NetFlow cache
Type of Flow switching
ENGINE_TYPE 38 1 engine (route processor,
linecard, etc...)
ENGINE_ID 39 1 ID number of the Flow
switching engine
Counter with length
N x 8 bits for the number
TOTAL_BYTES_EXP 40 N of bytes exported by the
Observation Domain. By
default N is 4
Counter with length
N x 8 bits for the number
TOTAL_PKTS_EXP 41 N of packets exported by the
Observation Domain. By
default N is 4
Counter with length
N x 8 bits for the number
TOTAL_FLOWS_EXP 42 N of Flows exported by the
Observation Domain. By
default N is 4
MPLS_TOP_LABEL_TYPE 46 1 MPLS Top Label Type:
0x00 UNKNOWN
0x01 TE-MIDPT
0x02 ATOM
0x03 VPN
0x04 BGP
0x05 LDP
Forwarding Equivalent Class
MPLS_TOP_LABEL_IP_ADDR 47 4 corresponding to the MPLS
Top Label
FLOW_SAMPLER_ID 48 1 Identifier shown
in "show flow-sampler"
<span class="grey">Claise Informational [Page 22]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-23" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
The type of algorithm used
for sampling data:
FLOW_SAMPLER_MODE 49 1 0x02 random sampling
Use in connection with
FLOW_SAMPLER_MODE
Packet interval at which to
FLOW_SAMPLER_RANDOM_INTERVAL 50 4 sample. Use in connection
with FLOW_SAMPLER_MODE
Type of Service byte
DST_TOS 55 1 setting when exiting
outgoing interface
SRC_MAC 56 6 Source MAC Address
DST_MAC 57 6 Destination MAC Address
Virtual LAN identifier
SRC_VLAN 58 2 associated with ingress
interface
Virtual LAN identifier
DST_VLAN 59 2 associated with egress
interface
Internet Protocol Version
Set to 4 for IPv4, set to 6
IP_PROTOCOL_VERSION 60 1 for IPv6. If not present in
the template, then version
4 is assumed
Flow direction:
DIRECTION 61 1 0 - ingress flow
1 - egress flow
IPV6_NEXT_HOP 62 16 IPv6 address of the
next-hop router
BGP_IPV6_NEXT_HOP 63 16 Next-hop router in the BGP
domain
Bit-encoded field
IPV6_OPTION_HEADERS 64 4 identifying IPv6 option
headers found in the flow
MPLS_LABEL_1 70 3 MPLS label at position 1 in
the stack
<span class="grey">Claise Informational [Page 23]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-24" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
MPLS_LABEL_2 71 3 MPLS label at position 2 in
the stack
MPLS_LABEL_3 72 3 MPLS label at position 3 in
the stack
MPLS_LABEL_4 73 3 MPLS label at position 4 in
the stack
MPLS_LABEL_5 74 3 MPLS label at position 5 in
the stack
MPLS_LABEL_6 75 3 MPLS label at position 6 in
the stack
MPLS_LABEL_7 76 3 MPLS label at position 7 in
the stack
MPLS_LABEL_8 77 3 MPLS label at position 8 in
the stack
MPLS_LABEL_9 78 3 MPLS label at position 9 in
the stack
MPLS_LABEL_10 79 3 MPLS label at position 10
in the stack
The value field is a numeric identifier for the field type. The
following value fields are reserved for proprietary field types: 25,
26, 43 to 45, 51 to 54, and 65 to 69.
When extensibility is required, the new field types will be added to
the list. The new field types have to be updated on the Exporter and
Collector but the NetFlow export format would remain unchanged.
Refer to the latest documentation at <a href="http://www.cisco.com">http://www.cisco.com</a> for the
newly updated list.
In some cases the size of a field type is fixed by definition, for
example PROTOCOL, or IPV4_SRC_ADDR. However in other cases they are
defined as a variant type. This improves the memory efficiency in
the collector and reduces the network bandwidth requirement between
the Exporter and the Collector. As an example, in the case IN_BYTES,
on an access router it might be sufficient to use a 32 bit counter (N
= 4), whilst on a core router a 64 bit counter (N = 8) would be
required.
All counters and counter-like objects are unsigned integers of size N
* 8 bits.
<span class="grey">Claise Informational [Page 24]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-25" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h2"><a class="selflink" id="section-9" href="#section-9">9</a>. The Collector Side</span>
The Collector receives Template Records from the Exporter, normally
before receiving Flow Data Records (or Options Data Records). The
Flow Data Records (or Options Data Records) can then be decoded and
stored locally on the devices. If the Template Records have not been
received at the time Flow Data Records (or Options Data Records) are
received, the Collector SHOULD store the Flow Data Records (or
Options Data Records) and decode them after the Template Records are
received. A Collector device MUST NOT assume that the Data FlowSet
and the associated Template FlowSet (or Options Template FlowSet) are
exported in the same Export Packet.
The Collector MUST NOT assume that one and only one Template FlowSet
is present in an Export Packet.
The life of a template at the Collector is limited to a fixed refresh
timeout. Templates not refreshed from the Exporter within the
timeout are expired at the Collector. The Collector MUST NOT attempt
to decode the Flow or Options Data Records with an expired Template.
At any given time the Collector SHOULD maintain the following for all
the current Template Records and Options Template Records: Exporter,
Observation Domain, Template ID, Template Definition, Last Received.
Note that the Observation Domain is identified by the Source ID field
from the Export Packet.
In the event of a clock configuration change on the Exporter, the
Collector SHOULD discard all Template Records and Options Template
Records associated with that Exporter, in order for Collector to
learn the new set of fields: Exporter, Observation Domain, Template
ID, Template Definition, Last Received.
Template IDs are unique per Exporter and per Observation Domain.
If the Collector receives a new Template Record (for example, in the
case of an Exporter restart) it MUST immediately override the
existing Template Record.
Finally, note that the Collector MUST accept padding in the Data
FlowSet and Options Template FlowSet, which means for the Flow Data
Records, the Options Data Records and the Template Records. Refer to
the terminology summary table in <a href="#section-2.1">Section 2.1</a>.
<span class="grey">Claise Informational [Page 25]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-26" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h2"><a class="selflink" id="section-10" href="#section-10">10</a>. Security Considerations</span>
The NetFlow version 9 protocol was designed with the expectation that
the Exporter and Collector would remain within a single private
network. However the NetFlow version 9 protocol might be used to
transport Flow Records over the public Internet which exposes the
Flow Records to a number of security risks. For example an attacker
might capture, modify or insert Export Packets. There is therefore a
risk that IP Flow information might be captured or forged, or that
attacks might be directed at the NetFlow Collector.
The designers of NetFlow Version 9 did not impose any
confidentiality, integrity or authentication requirements on the
protocol because this reduced the efficiency of the implementation
and it was believed at the time that the majority of deployments
would confine the Flow Records to private networks, with the
Collector(s) and Exporter(s) in close proximity.
The IPFIX protocol (IP Flow Information eXport), which has chosen the
NetFlow version 9 protocol as the base protocol, addresses the
security considerations discussed in this section. See the security
section of IPFIX requirement draft [<a href="./rfc3917" title=""Requirements for IP Flow Information Export (IPFIX)"">RFC3917</a>] for more information.
<span class="h3"><a class="selflink" id="section-10.1" href="#section-10.1">10.1</a>. Disclosure of Flow Information Data</span>
Because the NetFlow Version 9 Export Packets are not encrypted, the
observation of Flow Records can give an attacker information about
the active flows in the network, communication endpoints and traffic
patterns. This information can be used both to spy on user behavior
and to plan and conceal future attacks.
The information that an attacker could derive from the interception
of Flow Records depends on the Flow definition. For example, a Flow
Record containing the source and destination IP addresses might
reveal privacy sensitive information regarding the end user's
activities, whilst a Flow Record only containing the source and
destination IP network would be less revealing.
<span class="h3"><a class="selflink" id="section-10.2" href="#section-10.2">10.2</a>. Forgery of Flow Records or Template Records</span>
If Flow Records are used in accounting and/or security applications,
there may be a strong incentive to forge exported Flow Records (for
example to defraud the service provider, or to prevent the detection
of an attack). This can be done either by altering the Flow Records
on the path between the Observer and the Collector, or by injecting
forged Flow Records that pretend to be originated by the Exporter.
<span class="grey">Claise Informational [Page 26]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-27" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
An attacker could forge Templates and/or Options Templates and
thereby try to confuse the NetFlow Collector, rendering it unable to
decode the Export Packets.
<span class="h3"><a class="selflink" id="section-10.3" href="#section-10.3">10.3</a>. Attacks on the NetFlow Collector</span>
Denial of service attacks on the NetFlow Collector can consume so
many resources from the machine that, the Collector is unable to
capture or decode some NetFlow Export Packets. Such hazards are not
explicitly addressed by the NetFlow Version 9 protocol, although the
normal methods used to protect a server from a DoS attack will
mitigate the problem.
<span class="h2"><a class="selflink" id="section-11" href="#section-11">11</a>. Examples</span>
Let us consider the example of an Export Packet composed of a
Template FlowSet, a Data FlowSet (which contains three Flow Data
Records), an Options Template FlowSet, and a Data FlowSet (which
contains two Options Data Records).
Export Packet:
+--------+---------------------------------------------. . .
| | +--------------+ +-----------------------+
| Packet | | Template | | Data |
| Header | | FlowSet | | FlowSet | . . .
| | | (1 Template) | | (3 Flow Data Records) |
| | +--------------+ +-----------------------+
+--------+---------------------------------------------. . .
. . .+-------------------------------------------------+
+------------------+ +--------------------------+ |
| Options | | Data | |
. . .| Template FlowSet | | FlowSet | |
| (1 Template) | | (2 Options Data Records) | |
+------------------+ +--------------------------+ |
. . .--------------------------------------------------+
<span class="grey">Claise Informational [Page 27]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-28" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h3"><a class="selflink" id="section-11.1" href="#section-11.1">11.1</a>. Packet Header Example</span>
The Packet Header is composed of:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Version = 9 | Count = 7 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| sysUpTime |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| UNIX Secs |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Sequence Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Source ID |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<span class="h3"><a class="selflink" id="section-11.2" href="#section-11.2">11.2</a>. Template FlowSet Example</span>
We want to report the following Field Types:
- The source IP address (IPv4), so the length is 4
- The destination IP address (IPv4), so the length is 4
- The next-hop IP address (IPv4), so the length is 4
- The number of bytes of the Flow
- The number of packets of the Flow
Therefore, the Template FlowSet is composed of the following:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowSet ID = 0 | Length = 28 bytes |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Template ID 256 | Field Count = 5 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP_SRC_ADDR = 8 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP_DST_ADDR = 12 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IP_NEXT_HOP = 15 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IN_PKTS = 2 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| IN_BYTES = 1 | Field Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<span class="grey">Claise Informational [Page 28]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-29" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h3"><a class="selflink" id="section-11.3" href="#section-11.3">11.3</a>. Data FlowSet Example</span>
In this example, we report the following three Flow Records:
Src IP addr. | Dst IP addr. | Next Hop addr. | Packet | Bytes
| | | Number | Number
---------------------------------------------------------------
198.168.1.12 | 10.5.12.254 | 192.168.1.1 | 5009 | 5344385
192.168.1.27 | 10.5.12.23 | 192.168.1.1 | 748 | 388934
192.168.1.56 | 10.5.12.65 | 192.168.1.1 | 5 | 6534
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowSet ID = 256 | Length = 64 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 198.168.1.12 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 10.5.12.254 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 192.168.1.1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 5009 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 5344385 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 192.168.1.27 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 10.5.12.23 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 192.168.1.1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 748 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 388934 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 192.168.1.56 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 10.5.12.65 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 192.168.1.1 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 5 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 6534 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<span class="grey">Claise Informational [Page 29]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-30" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Note that padding was not necessary in this example.
<span class="h3"><a class="selflink" id="section-11.4" href="#section-11.4">11.4</a>. Options Template FlowSet Example</span>
Per line card (the Exporter is composed of two line cards), we want
to report the following Field Types:
- Total number of Export Packets
- Total number of exported Flows
The format of the Options Template FlowSet is as follows:
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowSet ID = 1 | Length = 24 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Template ID 257 | Option Scope Length = 4 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Option Length = 8 | Scope 1 Field Type = 3 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Scope 1 Field Length = 2 | TOTAL_EXP_PKTS_SENT = 41 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Field Length = 2 | TOTAL_FLOWS_EXP = 42 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Field Length = 2 | Padding |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<span class="h3"><a class="selflink" id="section-11.5" href="#section-11.5">11.5</a>. Data FlowSet with Options Data Records Example</span>
In this example, we report the following two records:
Line Card ID | Export Packet| Export Flow
------------------------------------------
Line Card 1 | 345 | 10201
Line Card 2 | 690 | 20402
<span class="grey">Claise Informational [Page 30]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-31" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
0 1 2 3
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| FlowSet ID = 257 | Length = 16 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 1 | 345 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 10201 | 2 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| 690 | 20402 |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
<span class="h2"><a class="selflink" id="section-12" href="#section-12">12</a>. References</span>
<span class="h3"><a class="selflink" id="section-12.1" href="#section-12.1">12.1</a>. Normative References</span>
[<a id="ref-RFC2119">RFC2119</a>] Bradner, S., "Key words for use in RFCs to Indicate
Requirement Levels", <a href="https://www.rfc-editor.org/bcp/bcp14">BCP 14</a>, <a href="./rfc2119">RFC 2119</a>, March 1997.
<span class="h3"><a class="selflink" id="section-12.2" href="#section-12.2">12.2</a>. Informative References</span>
[<a id="ref-RFC768">RFC768</a>] Postel, J., "User Datagram Protocol", STD 6, <a href="./rfc768">RFC 768</a>,
August 1980.
[<a id="ref-RFC793">RFC793</a>] Postel, J., "Transmission Control Protocol", STD 7, <a href="./rfc793">RFC</a>
<a href="./rfc793">793</a>, September 1981.
[<a id="ref-RFC2960">RFC2960</a>] Stewart, R., Xie, Q., Morneault, K., Sharp, C.,
Schwarzbauer, H., Taylor, T., Rytina, I., Kalla, M.,
Zhang, L., and V. Paxson, "Stream Control Transmission
Protocol", <a href="./rfc2960">RFC 2960</a>, October 2000.
[<a id="ref-RFC3917">RFC3917</a>] Quittek, J., Zseby, T., Claise, B., and S. Zander,
"Requirements for IP Flow Information Export (IPFIX)",
<a href="./rfc3917">RFC 3917</a>, October 2004.
<span class="h2"><a class="selflink" id="section-13" href="#section-13">13</a>. Authors</span>
This document was jointly written by Vamsidhar Valluri, Martin
Djernaes, Ganesh Sadasivan, and Benoit Claise.
<span class="h2"><a class="selflink" id="section-14" href="#section-14">14</a>. Acknowledgments</span>
I would like to thank Pritam Shah, Paul Kohler, Dmitri Bouianovski,
and Stewart Bryant for their valuable technical feedback.
<span class="grey">Claise Informational [Page 31]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-32" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
<span class="h2"><a class="selflink" id="section-15" href="#section-15">15</a>. Authors' Addresses</span>
Benoit Claise (Editor)
Cisco Systems
De Kleetlaan 6a b1
1831 Diegem
Belgium
Phone: +32 2 704 5622
EMail: bclaise@cisco.com
Ganesh Sadasivan
Cisco Systems, Inc.
3750 Cisco Way
San Jose, CA 95134
USA
Phone: +1 408 527-0251
EMail: gsadasiv@cisco.com
Vamsi Valluri
Cisco Systems, Inc.
510 McCarthy Blvd.
San Jose, CA 95035
USA
Phone: +1 408 525-1835
EMail: vvalluri@cisco.com
Martin Djernaes
Cisco Systems, Inc.
510 McCarthy Blvd.
San Jose, CA 95035
USA
Phone: +1 408 853-1676
EMail: djernaes@cisco.com
<span class="grey">Claise Informational [Page 32]</span></pre>
<hr class='noprint'/><!--NewPage--><pre class='newpage'><span id="page-33" ></span>
<span class="grey"><a href="./rfc3954">RFC 3954</a> Cisco Systems NetFlow Services Export V9 October 2004</span>
Full Copyright Statement
Copyright (C) The Internet Society (2004).
This document is subject to the rights, licenses and restrictions
contained in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a>, and at www.rfc-editor.org, and except as set
forth therein, the authors retain all their rights.
This document and the information contained herein are provided on an
"AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS
OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET
ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE
INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED
WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
Intellectual Property
The IETF takes no position regarding the validity or scope of any
Intellectual Property Rights or other rights that might be claimed to
pertain to the implementation or use of the technology described in
this document or the extent to which any license under such rights
might or might not be available; nor does it represent that it has
made any independent effort to identify any such rights. Information
on the ISOC's procedures with respect to rights in ISOC Documents can
be found in <a href="https://www.rfc-editor.org/bcp/bcp78">BCP 78</a> and <a href="https://www.rfc-editor.org/bcp/bcp79">BCP 79</a>.
Copies of IPR disclosures made to the IETF Secretariat and any
assurances of licenses to be made available, or the result of an
attempt made to obtain a general license or permission for the use of
such proprietary rights by implementers or users of this
specification can be obtained from the IETF on-line IPR repository at
<a href="http://www.ietf.org/ipr">http://www.ietf.org/ipr</a>.
The IETF invites any interested party to bring to its attention any
copyrights, patents or patent applications, or other proprietary
rights that may cover technology that may be required to implement
this standard. Please address the information to the IETF at ietf-
ipr@ietf.org.
Acknowledgement
Funding for the RFC Editor function is currently provided by the
Internet Society.
Claise Informational [Page 33]
</pre>
|