Skip to content

Packets, Flows and Logs

Packet captures preserve observed bytes, flow records group activity, and logs document producer-defined events. Their fields answer different forensic questions.

By Reviewed by Jeevesh Kumar

Last updated:

Packet captures, flow records and logs describe network activity at different levels of detail. Choose among them by asking what field would answer the question. A TCP acknowledgment number belongs in a packet record. A directional byte total may be available in a flow record. The operation or status recorded by a service belongs in a suitable application log.

Before joining different sources, identify who produced each record, what its timestamps mean and what identifier is available to link it with another record. This is especially important when a monitoring system creates several logs from a single packet capture. Those logs can organize the same observation in useful ways, and their shared origin matters when you assess corroboration.

Key terms

Packet record
An entry containing available packet bytes, a timestamp when present, and metadata such as captured length. It is the starting point for verifying a specific header value.
Flow key
The fields used to group packets for a flow measurement. A change to the key can alter record totals even with the same underlying traffic.
Exporter
A process that sends traffic measurements to a collecting system. Its session and observation domain help identify which definitions apply.
Log schema
The structure and meanings assigned to fields in journal or event records. Check its version before assuming two similarly named fields measure the same event.
Join key
A field or combination of fields used to associate records across sources. The reliability of the join depends on the key’s namespace, reuse and coverage.
IPFIX template
A record describing the fields and widths used to interpret IPFIX Data Records. The same ID can mean different layouts in different decoding contexts.
More key terms (2)
Event time
A producer’s timestamp for a defined stage of an event. It can differ from the time when a collector receives or stores the record.
Packet sampling
Selection of part of the observed packet population for measurement. It limits what a zero count establishes about individual exchanges.

Inspect the Packet Where Sequence Matters

Packet records describe individual observations. The outer link layer may identify how the frame was represented at the interface, while the Internet Protocol (IP) header gives network-layer addresses. A transport header can add ports, flags, sequence numbers or lengths. Where application bytes are available, a tool may display a decoded message. The level at which you read a field affects what it means. A packet’s frame length and its application body length describe different quantities.

Sequence questions are a good fit for packet evidence. A transport acknowledgment seen after a request can indicate receipt of bytes at the peer’s transport layer, and the response status is a separate application field. Use the packet number and direction to document each observation. If application content spans multiple transport segments, record the relevant frame range or reassembly reference. A single packet list label can hide that dependency.

Look for the relevant layer when counts disagree. The packet list might include a TCP acknowledgment with a frame length even though the TCP payload has zero bytes. A summary counting IP bytes can include that acknowledgment while a sum of TCP payload lengths contributes zero for it.

Choose a byte field that measures the same layer before comparing packet and flow totals.

Read the Exporter’s Flow Definition

A flow exporter aggregates traffic under its configured rules. The source and destination addresses, source and destination ports, and protocol are a common five-field key. An exporter can add fields such as an interface or other context. One exporter may keep separate records for each direction, while another emits records with both directions described. The Internet Protocol Flow Information Export (IPFIX) specification defines how templates describe the fields in exported records. IPFIX Protocol Specification

Look up the meanings of start time, end time, byte counts and packet counts before comparing exporters or comparing a record with a capture. A flow database may split a long transfer into successive records at an active timeout. A record can also cover sampled traffic or report counters at a particular layer. If two exports disagree on byte totals, align their direction, time span, counted layer and sampling before treating the difference as a missing transfer.

Timeouts matter for sequence questions as well as totals. Two records with the same key and adjacent time ranges can describe successive intervals of one ongoing transfer. A repeated endpoint pair may also recur after one connection closes and another starts. Retain boundaries and document the basis for any merge.

Read Logs From the Producer’s Viewpoint

An application log can distinguish operations that look similar from a network vantage point. Several requests can use one TCP connection, and each request may have a different path, result or processing time. A service might log after sending its reply or after finishing a separate processing step. The field or event documentation is the basis for choosing which time and outcome belong in the report.

Scroll horizontally if needed to see the full table.

Record TypeUnit of ObservationUseful Question
PacketOne recorded frame or packet and its available bytesWhich TCP flags appeared on the return traffic?
FlowA rule-defined group of packetsHow much traffic did this exporter count in the recorded interval?
Application LogOne event as defined by its producerWhat path and result did the service or analyzer record?

A passive protocol analyzer can also produce an application-shaped log by decoding observed packets. An HTTP method recorded by that analyzer describes the request it decoded. A method recorded by the server describes what its logging path reported. Identify which producer made the entry when evaluating why a request appears in one source and is missing from another. Collector ingestion time, retention and parser settings can also affect what a search returns.

Identify which component produced each row. Similar fields can describe different observations.

Check for classification fields before interpreting unusual traffic from a log. A monitor can fill a service label from protocol detection while the observed destination port remains available as a separate field. If you rely on a service classification, note the producer’s rule and verify it against the available protocol details.

Join Using Identifiers and Time Semantics

Start with a stable identifier that both producers document, such as a request ID carried across a trusted service boundary. If all you have is a network tuple, add direction and a bounded time interval. A tuple can recur and a proxy can open a new connection with different endpoints. Write down which address and port appeared at each point and what record, if any, supports the mapping.

When timestamps differ, ask whether each time refers to connection start, request receipt, response completion or export. Record the source timestamp and how you interpreted its clock before you calculate elapsed time. A difference between a flow’s start and a request timestamp can reflect connection setup. A match on the nearest timestamp alone is weak where similar events recur frequently in the same interval.

Make the join inspectable by keeping the raw values beside their normalized counterparts. For example, retain the producer’s timestamp string, the stated zone and the normalized time used to select candidates. If two candidates still fit, keep both in the notes and identify what would distinguish them.

Reconcile Byte Totals Before Inferring a Missing Transfer

A byte-count comparison needs a shared unit of observation. Inspect the exporter’s field name and definition, then choose the corresponding packet field or calculate it from the saved headers. In the IP Flow Information Export (IPFIX) registry, octetDeltaCount includes Internet Protocol (IP) headers and IP payload for the flow since the previous report, if any. Ethernet frame length and transport payload length answer different questions. IANA IPFIX Information Elements, Element 1

In the hypothetical Test Transfer Accounting Practice, a saved capture contains three outbound IPv4 TCP packets with IP total lengths of 440, 640 and 40 bytes. Each has a 20-byte IP header and a 20-byte TCP header. The matching unsampled flow delta reports three packets and 1,120 octets for that direction and interval. The capture’s IP lengths add to 1,120 bytes and the TCP payloads add to 1,000. The 120-byte difference is accounted for by the six headers.

The matching unsampled IPFIX total includes IP headers and IP payload. TCP payload sums use the narrower transport-data measure.

Record which rows contributed to each sum and the fields used for the arithmetic. The agreement shows that the selected packet lengths are consistent with the reported flow volume. It leaves payload content and application outcome open. If there are retransmissions, a packet-based byte count can also exceed the amount of unique application data delivered.

Check Whether Totals Can Be Added Across Records

Identify whether a counter represents an increment since a previous report or a running total. Check the observation point as well. Two records from separate sensors can count the same traffic, and a periodic export may contain several snapshots of one total. Use the producer’s documented field definitions and selection rules to decide which rows can be added. IPFIX Information Model, RFC 7012

In a second part of the practice, the same exporter reports 1,120 octets at 10:00 and 1,560 at 10:01 for an unchanged flow key. The template identifies octetTotalCount, and the exporter records show continuity with no reset across those readings. The increase between reports is 440 octets. If the same values were disjoint delta counters covering successive intervals, their sum would describe 2,680 octets across the two intervals.

Keep the raw counter values, the field identifier, the report times and the calculation. Where the export omits the template or continuity cannot be established, retain the reported counts and leave the increment unresolved. This prevents a premature arithmetic decision from becoming a claim about missing records.

Match an IPFIX Data Record to Its Template

Internet Protocol Flow Information Export (IPFIX) uses a Template Record to describe the fields and widths in a sequence of Data Records. A Template ID has meaning within the exporter’s Transport Session and Observation Domain. The collecting system needs the applicable template before it can interpret a Data Set. A template obtained after the session changed may describe a different layout even when its identifier is the same. IPFIX Protocol Specification, RFC 7011

Scroll horizontally if needed to see the full table.

Matching fieldWhat to retain
Exporter and Transport SessionProducer identity and session relevant to the data
Observation DomainDomain ID on the Data Set’s enclosing message
TemplateTemplate ID and layout in effect for that record

In a hypothetical archived export, the collector reports Template ID 264 for data from two observation domains. Domain 7 defines four address and port fields and a packet count. Domain 8 defines a different record. If the only preserved template for ID 264 came from domain 7, apply it only to matching records within its valid session and lifetime. Treat the other record values as unresolved unless the corresponding domain 8 template or trustworthy collector output is available.

Template ID is scoped to the exporter’s transport session and observation domain. Keep domain 8 field values unresolved until its layout can be verified.

When the packet question depends on a missing port or count, first identify whether the field was absent from the template, absent from an intermediate export, or empty in the database. Record the source of that determination. Even a valid collector table can contain rows from multiple template layouts. Before comparing values across domains, confirm that the fields actually refer to the same metric and that a default value has not been inserted during normalization.

Separate Log Event Time From Receipt Time

A source may record a timestamp when a local event occurs, and a collector may separately record when the entry arrives or is stored. Use the event time to associate records only when its meaning and clock basis are suitable. The collector time helps explain delayed, batched or reordered records and may be the only time available if the origin supplied none. The Syslog Protocol, RFC 5424

In a hypothetical export, a gateway assigns event_time when it writes its reply and the collector assigns received_at when the record arrives. Three records show gateway event times of 09:06:10, 09:06:13 and 09:06:18. They all reach the collector at 09:08:00. Counting by the collector’s timestamp creates a burst of three events in the 09:08 bucket. The gateway timestamps instead support three separate recorded events before 09:07, subject to clock accuracy.

Binning by arrival time creates one apparent burst. Preserve event_time and received_at as distinct fields.

Preserve both values and map them to the original field names. A packet at 09:06:13 can then be assessed against the producer’s event time, with the appropriate offset and uncertainty. If a row carries only collector time, retain that label and limit the temporal claim to when the collector recorded it. In RFC 5424 syslog, optional timeQuality data may document whether the originator considers its time zone known and its clock synchronized. Syslog Time Quality, RFC 5424

Assess What a Sampling Rule Can Answer

Sampling selects part of the observed traffic before some measurements are formed. Ask which packets had a chance of being selected, what the selector did and whether the collector stored raw counts or adjusted estimates. One trigger can produce enough traffic to appear under the sampling policy. A brief exchange with few packets can be much less visible. The Packet Sampling (PSAMP) protocol specifies ways to report selection and its context. PSAMP Protocol Specifications, RFC 5476

Suppose a hypothetical meter selects every hundredth packet on its input and exports summaries of the selected set. An authorized test sends three relevant datagrams separated by unrelated traffic. A zero count in the summaries is compatible with all three passing the input without any being selected. Multiplying a selected count by one hundred can model a configured estimate. That calculation alone leaves the fate of these three individual datagrams unresolved.

If the issue is whether the exchange accounts for a sizable volume, inspect the estimator’s intended use and whether it applies to the interval, interfaces and traffic mix of interest. If the issue is whether any one of the three datagrams reached a service, a complete application transaction record or suitable saved packet evidence addresses that question more directly. State whether any reported total came from selected packets, an estimated population or a separate complete counter.

Casework Example

Lesson Review

Check Your Understanding

Question 1 of 5· 0 answered
Which record usually preserves the TCP flags of one observed segment?

Test yourself on Network Forensics with free, timed mocks.

Practice Network Forensics questions

Found this useful? Pass it along.