Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Make ipv4 addresses (A rec) default when resolving
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
selig
Guru
Guru


Joined: 31 Jul 2005
Posts: 425
Location: Prague, Czech Republic

PostPosted: Sat Jun 11, 2011 6:11 pm    Post subject: Make ipv4 addresses (A rec) default when resolving Reply with quote

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
View user's profile Send private message
gentoo_ram
Guru
Guru


Joined: 25 Oct 2007
Posts: 398
Location: San Diego, California USA

PostPosted: Sat Jun 11, 2011 6:31 pm    Post subject: Reply with quote

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
View user's profile Send private message
wswartzendruber
Veteran
Veteran


Joined: 23 Mar 2004
Posts: 1227
Location: Jefferson, USA

PostPosted: Sat Jun 11, 2011 6:54 pm    Post subject: Reply with quote

The preferred record type is up to the client, not the server.
Back to top
View user's profile Send private message
selig
Guru
Guru


Joined: 31 Jul 2005
Posts: 425
Location: Prague, Czech Republic

PostPosted: Sat Jun 11, 2011 7:41 pm    Post subject: Reply with quote

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
View user's profile Send private message
new_item
n00b
n00b


Joined: 10 Jun 2011
Posts: 20
Location: Poland

PostPosted: Sun Jun 12, 2011 8:35 am    Post subject: Reply with quote

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
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1942
Location: Zurich, Switzerland

PostPosted: Sun Jun 12, 2011 11:51 am    Post subject: Reply with quote

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 concise, ask for an explanation.
Back to top
View user's profile Send private message
selig
Guru
Guru


Joined: 31 Jul 2005
Posts: 425
Location: Prague, Czech Republic

PostPosted: Sun Jun 12, 2011 12:31 pm    Post subject: Reply with quote

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. :wink: 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
View user's profile Send private message
mefyl
n00b
n00b


Joined: 15 Nov 2012
Posts: 2
Location: Paris

PostPosted: Thu Nov 15, 2012 1:16 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum