cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
32982
Views
30
Helpful
5
Replies

Difference between session and connection

alex_ciobanu
Level 1
Level 1

Not sure this is the right place for this, but I am not able to find a proper definition between these 2 terms.

What is the difference between session and connection, theoritically speaking ?

1 Accepted Solution

Accepted Solutions

mz331wcisco
Level 1
Level 1

Hello

In order to get the meaning of terms Connection and Session let's define first the term Flow.

The definition of a Flow is historically accepted as:

A unidirectional sequence of packets between 2 network endpoints that have the following 7 things in common:

1. Source IP address

2. Destination IP address

3. L3 Protocol type

4. Source port

5. Destination port

6. Tos (Type of Service)

7. Input interface

The terms Connection and Session can have many different meanings depending on the framework that they are used, but it can be said that:

Connection: A bidirectional Flow

Session: Many connections between the same source and same destination

HTH

View solution in original post

5 Replies 5

Kureli Sankar
Cisco Employee
Cisco Employee

Alexandru,

If you read here:

A single connection is created for multiple DNS  sessions, as long as they are between the same two hosts, and the  sessions have the same 5-tuple (source/destination IP address,  source/destination port, and protocol). DNS identification is tracked by  app_id, and the idle timer for each app_id runs independently.

Does this make sense?

-Kureli

...Not really

I was looking for a pure theoretical definition, and comparation between.

I would like to know exactly the difference between one and another, because I see many people confusing these 2 terms or even saying the same thing.

mz331wcisco
Level 1
Level 1

Hello

In order to get the meaning of terms Connection and Session let's define first the term Flow.

The definition of a Flow is historically accepted as:

A unidirectional sequence of packets between 2 network endpoints that have the following 7 things in common:

1. Source IP address

2. Destination IP address

3. L3 Protocol type

4. Source port

5. Destination port

6. Tos (Type of Service)

7. Input interface

The terms Connection and Session can have many different meanings depending on the framework that they are used, but it can be said that:

Connection: A bidirectional Flow

Session: Many connections between the same source and same destination

HTH

To indicate "THROUGH" the box traffic - we use the term connection. ex. FTP connection from inside to outside.

To indicate "TO the box" traffic - we use the term session.  ex. VPN to the outside interface, telnet to the inside interface

Flow VS Session/Connection

Connection will have two flows - forward and reverse flows.

-Kureli

Very Nice Reply Mikis...High 5!!  Thanks   Regards,  Ankur Thukral  Community Manager : Securtiy and VPN

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card