Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From a docker container when I try to curl 'another container name', curl first tries to resolve the name to IPv6. This causes few seconds delay because the web server is not reachable over ipv6.

I removed the link local address on the container interface and also disabled ipv6 on the container's lo and eth0 interface. curl still tries to resolve the name to IPv6 first (unless its forced via curl -4).

This seems wrong. Why does curl try to resolve the name to ipv6 even if ipv6 is disabled ?

share|improve this question
1  
How is IPv6 disabled, in particular? Otherwise, --ipv4 is a relevant flag to curl in that situation. – thrig Feb 24 at 23:41
    
I removed v6 addresses from /etc/hosts and did the following.. sysctl -w net.ipv6.conf.all.autoconf=0, sysctl -w net.ipv6.conf.default.accept_ra=0, sysctl -w net.ipv6.conf.all.disable_ipv6=1 – Manohar Feb 24 at 23:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.