3.9k views

In one of the pairs of protocols given below , both the protocols can use multiple TCP connections between the same client and the server. Which one is that?

1. HTTP, FTP
2. HTTP, TELNET
3. FTP, SMTP
4. HTTP, SMTP
0
can anyone confirms that having tcp connection means stateful connection?
+1
+2

@skyby, having TCP connection does not implies stateful connection.

for eg. HTTP uses TCP but a stateless protocol.

SMTP: only one TCP connection.

Reference: https://tools.ietf.org/html/rfc821

TELNET: only one TCP connection.

Reference: https://tools.ietf.org/html/rfc854

HTTP: Multiple connections can be used for each resource.

FTP: FTP uses Telnet protocol for Control info on a TCP connection and
another TCP connection for data exchange

Reference: https://tools.ietf.org/html/rfc959 (See page 8)

edited
+1
Yup..I got confused with other answer keys...coz I answered http and ftp..Our point is right :)
0

@arjun sir  word same   in the above question is having significance ??

0
link is not working (i've tried multiple times)

any other source?
+2
Hello sir

please clear some of my doubts.

1) Questioner is asking Multiple TCP connection b/w same client and server.Now what do i understand from 'multiple TCP connection' is as follows : TCP connections are identified by port numbers so multiple tcp connection mean at the same time client and server are connected over different ports like in case of ftp , where to transfer 'control information ' client(random port)connect with server on port 21 and in case of 'data transfer' server connect with client by using port 20(in case of active mode). SO here we have multiple tcp connections.Am i right?

2) Sir i'm doubtful about the correctness of your argument for http.The link you attached , is considering a scenario when client is connected to server using some intermediary device like proxy server. and in such case he is claiming that there are multiple connections b/w client and server.Yes i'm agree multiple connections but not multiple 'tcp connection'.for all connections source port and destinations port are same so i consider same TCP connection.Because if in that way we are claiming to have multiple tcp connections then all protocols uses multiple tcp connections because intermediary device can be attached in all cases for security purpose(firewall).did i miss something?

3) www.geeksforgeeks.org put argument like 'HTTP may use different TCP connection for different objects of a webpage if non-persistent connections are used'. it's not clear in question that questioner is asking for 'same session' or we may consider even different sessions as this geeksforgeeks argument? If we can even consider different sessions then i think SMTP can also be true (don't know much about TELNET , so can't argument about it).

4) Let suppose in my browser i opened two tabs , in both i opened 'gateoverflow' and reading two different questions. both time i'm connected to same server and in case of both page request i will have different source ports so that server can distinguish like 'whom response what' so in that way client is connected to same server's same port(port 80) with two source ports. is this case of multiple tcp connection ?

pardon me if i asked something stupid and hence wasted your time.
+1

@Rupendra Choudhary I am not an expert, but maybe my analysis of the question can make sense to you as well.

We all agree that FTP uses $2$ simultaneous TCP connections for a successful FTP transfer. So, your point $(1)$ is right.

By now, we have eliminated options $(B)$ and $(D)$.

Now, let's analyze how HTTP uses multiple TCP connections. For this, I will use the example you have given in your point $(4)$.

When you opened a GO question no. $1$ (for example) in one of the browser tabs, your browser effectively opened a TCP connection to port $80$ on GO's servers and requested for a resource with a relative path, say /question-1.

When you will open another GO question in your other browser tab, your browser will again open a new TCP connection to the same port $80$ on GO's servers and will request for another resource with a relative path, say /question-2

This implies that it is possible for HTTP to open multiple TCP connections between the same client and the server.

Option A....most likely

1
2