All packets with the same source address/port and destination address/port within a time period are considered as one flow.
A TCP/IP flow can be uniquely identified by the following parameters within a certain time period:
- Source and Destination IP address
- Source and Destination Port
- Layer 4 Protocol (TCP/UDP/ICMP)
Since UDP is uni-directional, it causes one flow. ICMP is bi-directional, so it causes two flows.
Utility for network administration
The concept is important, since it may be that packets from one flow need to be handled differently from others, by means of separate queues in switches, routers and network adapters, to achieve traffic shaping, fair queueing or Quality of Service. It is also a concept used in network analyzers or in packet tracing.
Applied to Internet routers, a flow may be a host-to-host communication path, or a socket-to-socket communication identified by a unique combination of source and destination addresses and port numbers, together with transport protocol (for example, UDP or TCP). In the TCP case, a flow may be a virtual circuit, also known as a virtual connection or a byte stream.
Packet flow can be represented as a path in a network to model network performance. For example a water flow network can be used to conceptualize packet flow. Channels can be thought of as pipes, with the pipe capacity corresponding to bandwidth and flows corresponding to data throughput. This visualization can help to understand bottlenecks, queuing, and help understand the unique requirements of tailored systems.