| View previous topic :: View next topic |
| Author |
Message |
selig Guru


Joined: 31 Jul 2005 Posts: 416 Location: Prague, Czech Republic
|
Posted: Sat Jun 11, 2011 6:11 pm Post subject: Make ipv4 addresses (A rec) default when resolving |
|
|
I have just set up an ipv6 router.
This is my problem:
| Code: |
>>> Emerging (1 of 18) x11-proto/xproto-7.0.21
>>> Downloading 'ftp://gentoo.mirror.dkm.cz/pub/gentoo/distfiles/xproto-7.0.21.tar.bz2'
--2011-06-11 19:52:11-- ftp://gentoo.mirror.dkm.cz/pub/gentoo/distfiles/xproto-7.0.21.tar.bz2
=> `/var/tmp/Distfiles/xproto-7.0.21.tar.bz2'
Resolving gentoo.mirror.dkm.cz... 2001:470:1f0b:13d2::49, 86.49.49.49
Connecting to gentoo.mirror.dkm.cz|2001:470:1f0b:13d2::49|:21...
|
This is my ISP's mirror. Apparently, they set up an AAAA record for gentoo.mirror.dkm.cz but the IP address 2001:470:1f0b:13d2::49 is unreachable (or so it seems). I cannot even ping it - however, my IPv6 setup is fine, I can access IPv6 servers without a problem.
I would like the system to prefer IPv4 addresses if both are returned from the DNS query. Is this possible? |
|
| Back to top |
|
 |
gentoo_ram Guru

Joined: 25 Oct 2007 Posts: 395 Location: San Diego, California USA
|
Posted: Sat Jun 11, 2011 6:31 pm Post subject: |
|
|
| You can't really "fix" the DNS query. Instead, maybe the best option is to set the fetch options in /etc/make.conf to include the "-4" flag to wget. Not sure how to do that, but that's approach I would take. |
|
| Back to top |
|
 |
wswartzendruber Veteran


Joined: 23 Mar 2004 Posts: 1197 Location: Jefferson, USA
|
Posted: Sat Jun 11, 2011 6:54 pm Post subject: |
|
|
| The preferred record type is up to the client, not the server. |
|
| Back to top |
|
 |
selig Guru


Joined: 31 Jul 2005 Posts: 416 Location: Prague, Czech Republic
|
Posted: Sat Jun 11, 2011 7:41 pm Post subject: |
|
|
| So does it need to be specified for every client (if it has such an option) or is there also a system-wide setting? |
|
| Back to top |
|
 |
new_item n00b

Joined: 10 Jun 2011 Posts: 20 Location: Poland
|
Posted: Sun Jun 12, 2011 8:35 am Post subject: |
|
|
| selig wrote: | | So does it need to be specified for every client (if it has such an option) or is there also a system-wide setting? |
I am kind of a n00b when it comes to IPv6. But did you try to add IPv4 record in /etc/hosts ? AFAIK it is searched before dns query, so it might work.
It could be solution for limited amount of domains. |
|
| Back to top |
|
 |
Veldrin Veteran


Joined: 27 Jul 2004 Posts: 1931 Location: Zurich, Switzerland
|
Posted: Sun Jun 12, 2011 11:51 am Post subject: |
|
|
well plan B would be to remove ipv6 altogether (i.e. in kernel)
a slightly less drastic option is to disable ipv6 protocol wise (edit /etc/modprobe.d/aliases.conf, and enable alias net-pf-10 off). This only works, if ipv6 is built as a module (and not built in).
just my .02$
V. _________________ read the portage output!
If my answer is too short, just ask for an explanation. |
|
| Back to top |
|
 |
selig Guru


Joined: 31 Jul 2005 Posts: 416 Location: Prague, Czech Republic
|
Posted: Sun Jun 12, 2011 12:31 pm Post subject: |
|
|
So I take it that it is impossible. I have just set up IPv6 because I want it so I am definitely not going to disable it. As a workaround I have put the mirror's IPv4 address into make.conf instead of its hostname and this works (at least until they change the IP address). I just hope that there are not many such sites with broken IPv6... |
|
| Back to top |
|
 |
mefyl n00b

Joined: 15 Nov 2012 Posts: 1 Location: Paris
|
Posted: Thu Nov 15, 2012 1:16 pm Post subject: |
|
|
I know I'm exhuming a one year old thread, but I had the same problem and came up with (what I think is) a better solution, so it might help anyone with this issue. Since the problem is rsync choosing the ipv6 address, on can simply force it to prefer the ipv4 version by passing it -4. This can be done with the PORTAGE_RSYNC_EXTRA_OPTS option. So, in /etc/make.conf (or /etc/portage/make.conf nowadays):
| Code: | | PORTAGE_RSYNC_EXTRA_OPTS="-4" |
No need to hardcode an IP in your host file this way.
Cheers, |
|
| Back to top |
|
 |
|