Protocol 43 of 81Layer 7FrameAssembly v3.1.2
llms-full.txt
netflowCisco NetFlow Version 5 Flow Export

Fake a Top-Talker Bandwidth Spike (rtr -> collector netflow UDP 2055)

Default Port / Protocol
UDP 2055
Host Endpoint Rule
Dual-Stack IPv4/IPv6
Wireshark Display Filter
cflow
Standards & Specs
Cisco NetFlow v5
Wire Stack:Ethernet II[802.1Q / QinQ / MPLS]IPv4 / IPv6UDP 2055NetFlow v5

What It Does on the Wire

Want to verify your flow dashboard lights up when a workstation ships 50 GB outbound without actually saturating a 10G link? One netflow packet reports any packets and octets count you ask for.

Cisco NetFlow v5 (netflow) exports summarized IPv4 traffic conversations from routers, switches, and firewalls to bandwidth monitors and NDR collectors (ElastiFlow, Akvorado, SolarWinds, ntopng, PRTG) over UDP port 2055.

Each netflow packet in FrameAssembly builds a complete 72-byte datagram: the 24-byte NetFlow v5 header (version 5, count 1, uptime, timestamps, sequence) followed by a 48-byte flow record containing srcip, dstip, srcport, dstport, IP proto, packets, and octets (byte count).

Test Flow Collector Dashboards & Top-Talker Alerts

Send deterministic packets and octets counters (for example octets 50000000 on TCP 443) to verify bandwidth spike alerts and Grafana dashboards without saturating a real link.

Validate DDoS & Data-Exfiltration NDR Rules

Simulate outbound high-byte flows to external test IPs or high-packet UDP bursts so SOC teams can test NetFlow anomaly signatures.

Collector Port Migration (UDP 2055 / 9995 / 9996)

Override dstport 9995 on netflow statements to verify firewall ACLs and collector listeners on custom UDP ports.

Minimal Quickstart (netflow_quickstart.frasm)

Hit Preview Packets to compile in-browser and eyeball timestamps + wire byte lengths, or ship it straight to the Playground.

netflow_quickstart.frasm6 lines
Open in Playground
host core_rtr { ip 10.0.0.1 }
host collector { ip 10.0.50.20 }
compile {
core_rtr -> collector netflow srcip 10.10.1.25 dstip 198.51.100.40 srcport 52410 dstport 443 proto 6 packets 120 octets 164000
}

What the Compiler Calculates So You Don't Have To

  • Defaults UDP destination port to 2055 and builds the exact 24-byte NetFlow v5 header + 48-byte flow record (72 UDP payload bytes).
  • Populates protocol defaults (proto 6 TCP, packets 10, octets 1500) whenever counters are omitted.
  • Works over either IPv4 or IPv6 outer exporter-to-collector transport IPs (ipfix is available when the exported flow record itself carries IPv6 endpoints).
Multi-Frame Lab · Ready to Compile

Multi-Flow Export: HTTPS Upload Spike, DNS Lookup & ICMP Probe

Exports three sequential NetFlow v5 records from a border router representing a large HTTPS transfer, a UDP DNS query, and an ICMP ping flow.

netflow_collector_test.frasm11 lines
Open in Playground
host border_rtr { ip 172.16.0.1 }
host flow_collector { ip 172.16.100.55 }
compile {
// 1. Large outbound HTTPS transfer (proto 6 = TCP)
border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 203.0.113.80 srcport 54120 dstport 443 proto 6 packets 8500 octets 12240000 wait 2ms
// 2. Internal-to-DMZ DNS flow (proto 17 = UDP)
border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 172.16.10.53 srcport 59102 dstport 53 proto 17 packets 2 octets 148 wait 2ms
// 3. ICMP reachability flow (proto 1 = ICMP)
border_rtr -> flow_collector netflow srcip 10.20.5.14 dstip 8.8.8.8 srcport 0 dstport 0 proto 1 packets 4 octets 336
}
Terminal Commands (FrameAssembly CLI v3.1.2)
# 1. Eyeball relative timestamps, ports & wire lengths in your terminal
frameassembly show netflow_collector_test.frasm

# 2. Compile .frasm -> classic .pcap (tcpdump/tcpreplay/Suricata) or nanosecond .pcapng
frameassembly netflow_collector_test.frasm netflow_collector_test.pcap
frameassembly netflow_collector_test.frasm netflow_collector_test.pcapng

# 3. Round-trip .pcap <-> .frasm whenever you want to scrub or tweak an existing capture
frameassembly reverse netflow_collector_test.pcap netflow_collector_test_edited.frasm

All netflow Keywords & Header Options

Every sub-keyword and header option is lowercase [a-z0-9]+ with zero underscores — mix and match them in any order after netflow:

src_host -> dst_host netflow [srcip <ipv4>] [dstip <ipv4>] [srcport <0..65535>] [dstport <0..65535>] [proto <0..255>] [packets <number>] [octets <number>]
Keyword / OptionAccepted ValueDefaultEffect on Packet
srcip <ipv4> | dstip <ipv4>IPv4 address (e.g. 10.10.1.25)Outer host IPv4 (or 10.0.0.1 / 10.0.0.2)Sets the exported IPv4 Source and Destination addresses inside the 48-byte NetFlow v5 record.
srcport <0..65535> | dstport <0..65535>Port number 0..65535Outer UDP ports or 0 / 80Sets the exported flow’s L4 ports inside the NetFlow record (or overrides UDP ports when used at transport level).
proto <0..255>IP protocol number (6 TCP, 17 UDP, 1 ICMP)6 (TCP)Sets byte 38 (prot) of the NetFlow v5 flow record.
packets <number>32-bit packet count10Sets the dPkts 32-bit packet counter for the flow.
octets <number>32-bit byte count1500Sets the dOctets 32-bit Layer 3 byte counter for the flow.

Cross-Layer Wrappers Valid with netflow

802.1Q VLAN / QinQ / MPLS tags, IPv4/IPv6 QoS & TTL fields, wait gaps, and transport overrides allowed on this protocol

10 options
OptionRange / FormatDefaultEffect on Packet
wait <number><ns|us|ms|s|m>Time gap (ns, us, ms, s, m)10msAdvances the packet timestamp clock after sending this packet and before the next packet (wait 0ns sends back-to-back).
payload "<text>" | hexpayload "<hex>"Quoted text or hex bytes (choose one)OmittedAppends or overrides raw payload bytes ("deadbeef" or "de:ad:be:ef") and updates packet lengths and checksums.
srcmac <mac> | dstmac <mac>Colon, hyphen, or Cisco dot MACHost MAC / RFC multicast MACOverrides the 14-byte Ethernet II source or destination MAC address for this single packet.
vlan <0..4095> [pcp <0..7>] [dei <0|1>]VLAN ID 0..4095, PCP 0..7, DEI 0..1UntaggedWraps the packet in an IEEE 802.1Q VLAN tag (0x8100) with optional 802.1p QoS priority.
qinq <0..4095> [innervlan <0..4095>]Outer S-VLAN 0..4095, Inner C-VLAN 0..4095Untagged (innervlan 1 when qinq is set)Double-tags the packet with outer IEEE 802.1ad S-Tag (0x88a8) plus inner IEEE 802.1Q C-Tag (0x8100).
mpls <0..1048575> [exp|tc <0..7>] [bos <0|1>] [mplsttl <0..255>]Label 0..1048575, exp/tc 0..7, bos 0..1, ttl 0..255Unlabeled (at most 1 mpls tag per packet)Inserts a 32-bit MPLS label header (0x8847) ahead of the Layer 3 header.
ttl <0..255> [dscp <0..63>] [ecn <0..3>]TTL/Hop Limit 0..255, DSCP 0..63, ECN 0..3ttl 64, dscp 0, ecn 0Sets IPv4 TTL or IPv6 Hop Limit plus DiffServ (DSCP) and ECN QoS markings.
ipid <0..65535> [df] [mf] [fragoffset <0..8191>]IPv4 ID, DF/MF flags, fragment offset 0..8191ipid 1, flags 0, fragoffset 0Sets IPv4 Identification, Do-Not-Fragment (df), More-Fragments (mf), and fragment offset (ignored over IPv6).
flowlabel <0..1048575>20-bit IPv6 Flow Label (0..1048575)0Sets the 20-bit IPv6 Flow Label for ECMP routing tests (ignored when running over IPv4 hosts).
srcport <0..65535> | dstport <0..65535>Port number 0..65535srcport 49152 (remembered), UDP 2055Overrides source or destination port and remembers the port pair automatically on <- replies.

Gotchas & Quick Fixes

NetFlow v5 Flow Records Only Hold IPv4 Flow Addresses (Use ipfix for IPv6 Flows)

Avoid
core_rtr -> collector netflow srcip 2001:db8::10 dstip 2001:db8::20
Valid v3.1.2 Syntax
core_rtr -> collector ipfix srcip 2001:db8::10 dstip 2001:db8::20

Classic Cisco NetFlow v5 has fixed 32-bit IPv4 srcaddr/dstaddr slots. To export IPv6 flow records, use ipfix (RFC 7011 / NetFlow v10).

Byte Count Is Called octets (Not bytes)

Avoid
core_rtr -> collector netflow packets 50 bytes 64000
Valid v3.1.2 Syntax
core_rtr -> collector netflow packets 50 octets 64000

Following Cisco NetFlow terminology (dOctets), specify the byte counter with octets <number>.

Field Guide 04
Encrypted SNMPv3 Traps, Syslog & NetFlow From Your Desk