curl / Mailing Lists / curl-library / Single Mail
Buy commercial curl support. We help you work out your issues, debug your libcurl applications, use the API, port to new platforms, add new features and more. With a team lead by the curl founder Daniel himself.

ipv6 connect timeout

From: Lars Sunde via curl-library <curl-library_at_lists.haxx.se>
Date: Fri, 22 Aug 2025 07:51:45 +0000

Hello,

We are running C++ software that uses libCurl 8.5 on Windows 10 and 11 that perform HTTP operations.

During testing I notice a difference in some rare situations when running the software in Window 11 and in a virtual machine. The virtual machine is Oracle Virtual Box with Windows 11 host and Windows 10 guest OS).

We enabled CURLOPT_VERBOSE to debug the issue when the software attempts to perform a HTTP post operation.

Here is the output from Windows 11;

  1.
Host localhost:8010 was resolved
  2.
IPv6: ::1
  3.
IPv4: 127.0.0.1
  4.
Trying [::1]:8010...
  5.
Trying 127.0.0.1:8010...
  6.
Connect to localhost (127.0.0.1) port 8010

Step 4 in the above list uses approximately 200ms to execute before moving on to trying 127.0.0.1.

Here is the output from Windows 10 inside Oracle Virtual Box;

  1.
Host localhost:8010 was resolved
  2.
IPv6: ::1
  3.
IPv4: 127.0.0.1
  4.
Trying [::1]:8010...
  5.
ipv6 connect timeout after 2985ms, move on
  6.
Connection timeout after 3378 ms
  7.
Close connection

Step 4 in the above list uses approximately 2985ms to execute before moving on ...

Windows 11 has the following interfaces (according to "route print" command)

  *
Intel(R) Ethernet Connection
  *
VirtalBox Host-only Ethernet Adpter
  *
Software Loopback Interface

Windows 10 inside VirtualBox has the following interfaces (according to "route print" command)

  *
Intel(R) PRO/1000 MT
  *
Software Loopback Interface


Why does Windows 10 inside a virtual machine use 15 times as much time to try IPv6 before moving on? How can I possible reduce or remove this difference? I have read above CURLOPT_IPRESOVE but really need to understand the problem before considering this solution.

Appreciate any input

Regards, Lars


-- 
Unsubscribe: https://lists.haxx.se/mailman/listinfo/curl-library
Etiquette:   https://curl.se/mail/etiquette.html
Received on 2025-08-22