6

What is the difference between session and flow in networks? In fact, I always visualize flow as a set of packets having the same source and destination. What confuses me is session. So I'd like to know the difference.

Thank you

2
  • This is a very broad question, and frankly I'm not sure what you're asking. Please google "TCP/IP session" and if you have specific questions after doing some research maybe we can help. Jan 5, 2017 at 19:53
  • 1
    I have elaborated the question furthur.
    – Katherine
    Jan 5, 2017 at 20:00

3 Answers 3

4

A flow is the data-plane stream of packets between sender and receiver that shares key IP header information. For example, a client at 10.1.1.1 port 12398 communicating with a server at 192.168.1.1 port 22 for SSH is a specific flow that can be captured as the key fields don't change.

A session is the control-plane communication between sender and receiver. The TCP 3-way handshake creates a session that establishes a connection between the sender's source port and receiver's destination listening port. TCP window size, initial sequence and acknowledge values, and keepalives are negotiated as part of building the session.

Basically, flow represents the data-plane and session represents the control-plane.

Edit: Removed bidirectional requirement for a flow.

1
  • 2
    Flows can be unidirectional.
    – Ron Trunk
    Jan 5, 2017 at 22:36
2

To use an analogy, a flow is me speaking to you. A session is a conversation between us.

2
  • A flow is me speaking to you --> Sounds like one direction flow right? A session is a conversation between us --> unidirectional flow, right?
    – Katherine
    Jan 5, 2017 at 23:34
  • A conversation implies a bidirectional flow -- I speak to you and you speak to me.
    – Ron Trunk
    Jan 6, 2017 at 1:39
0

A session typically involves a handshake and some back and forth communication whereas a flow may not involve a handshake and the communication may be uni-directional. Think of a Web session vs a multicast flow.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.