Search code examples
network-programmingtcpbandwidthipv6ipv4

TCP connection basics


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.


Solution

  • 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.