views:

77

answers:

3

Hi,

This a basic doubt, but I wanted to know that if establish two TCP connections between the same two machines, will the packets in both the connection follow the same path(same link and nodes). The reason why I am asking this is because I want to measure the bandwidth between the two machines for both IPv4 and Ipv6 TCP connection and I want to make sure that both these connections follow the same path.

+1  A: 

In theory, not necessarily, but in practice, it depends upon where the two machines are located. If there is only one set of routers between the two machines, then the answer to your question is yes.

rmk
+4  A: 

Unless you have control of the network and routing between the two hosts you should never make that assumption. This is especially true with IPv4 vs IPv6 as there aren't too many native IPv6 networks yet and the tunnels may follow vastly different routes than "direct" IPv4.

To make matters even worse, IIRC there is nothing stopping some intermediary network from routing half your packets via one link and half via some other, so you can't really assume that every TCP packet in one connection will follow the same path either.

andri
This is even more true if you consider multiple network interfaces on the same networks.
D.Shawley
Thank you for your response.So what I understand is even for two IPv4 TCP connections between the same machines, the packets in both the conns can follow different paths. Also in a single TCP connection different packets may follow different paths.But usually two TCPv4 packets may follow the same path and only in few scenarios it may follow different paths.Please correct me if I am wrong.
You're on a slippery slope there, but for sessions that don't last for too long this will quite likely be true. Also, you should really read up on TCP window scaling -- that will have serious repercussions on your measurements (especially when using short sessions and/or there are transmission errors).In short: you really need to think about what kind of accuracy you want from your measurements.
andri
My main aim is to measure bandwidth for both IPv4 and IPv6 TCP connection. Based on these performance parameters I will decide which one is better to transfer the data.But my concern is how to measure the bandwidth for the other connection. That is,if the application is transferring data on TCPv4 conn ,I can measure bandwidth for this connection by dividing the number of bytes received within a given period of time.But how do I do that for TCPv6 conn. One way I thought was of calculating the BW for TCPv6 by calculating RTT first and dividing the congestion window for TCPv6 conn with this RTT.
but both the methods are different.Is the right way to do it?I am really stuck up on this issue.
A: 

2 TCPv4 connections could follow different paths, though it's not usual. a TCPv4 nd a TCPv6 is probably using different paths for not full TCPv6 implementation. [ It's usual having IPv6 island connecting IPv4 nodes with tunnels. ].

For the Internet, surely BGPv6 routes are quite different to BGPv4.

KikoV