Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


Cloudflare seem to prefer ipv4...
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

Cloudflare seem to prefer ipv4...

I don't know if this is accurate, but I found today that Cloudflare prefers ipv4, if used as round robin system. I installed some servers, some of them ipv4 and some of them ipv6 only and tried to setup a round-robin system for a single web page. I want availability to the servers via a single normal domain name, accessible to the users that only have access to ipv4 in their home's isp.

I use for that the ipv6 gateway cloudflare offers for html access (port 80).

The odd thing is that when I put it to work, I can have access only to the servers that has ipv4 on the A input at cloudflare dns. That does not mean that others do not resolve via Cloudflare. They do, but only if I delete A entries (ipv4) and let only the servers that has ipv6.

I noticed that because the html in each server is differently numbered to identify witch server I am accessing.

So, it seem that if you enter a lot of servers in a single domain name (both A ipv4 and AAAA ipv6 entries), cloudflare will resolve only those in ipv4. If you have in this roundrobin setup only ipv6 servers, then, they are shone normally!

has anyone noticed that or have any knowledge about it?

Comments

  • I found this post confusing, are you talking about CloudFlare itself or CloudFlare's DNS hosting only?

    Are you trying to use CloudFlare as 6to4 proxy?

  • jvnadrjvnadr Member
    edited August 2014

    @nunim No, I'm talking about Coudflare's dns hosting. 6to4 works alone and works in a round robin setup, if it resolves only ipv6 addresses. If I combine to round robin ipv4 and ipv6 hosts, then, it resolves only to ipv4 hosts and ignores in round robin ipv6

  • What if you put only one ipv4, and the rest are ipv6. Does cloudflare only resolve to the single ipv4?

  • jvnadrjvnadr Member
    edited August 2014

    @Faizi Yes, just resolve to the single ipv4. I've tested that with 1 ipv4, 2 ipv4 and 3 ipv4. In all scenarios, I also had in round robin another 4 ipv6. In all cases, I got only any host that resolve to ipv4. When I deleted all ipv4 hosts, then, it started do round robin to all of the ipv6 hosts.

  • So it seems. Even when using ipv6 proxy, it still point to the ipv4 server.

  • Indeed, but when there is only ipv6, works fine!

  • Time to contact cloudflare support ?

    Thanked by 1Mark_R
  • Got this reply from them,

    "The way Round Robin works with CloudFlare, once it has selected a specific record for you to route through, it will continue to route you through this on refreshes due to the cookie that we append. If you were to clear your cookies, and refresh the URL, there would then again be a 50/50 chance that you'll hit the IPv6 record.

    Let me know if you have any further questions or concerns."

  • imperio said: Time to contact cloudflare support ?

    I send a ticket to support 12 hours ago. I'm waiting for an answer (it's a free service, though, I know I cannot be in hurry).

    Faizi said: If you were to clear your cookies, and refresh the URL, there would then again be a 50/50 chance that you'll hit the IPv6 record.

    Not really. In my case, round robin worked between ipv4 hosts. In randomly choose server 3, server 4 or server 5 (but not server 1, 2, 6 and 7 that had ipv6 only).

  • not entirely surw what you meam, but client side usually prefer to take ipv4 first

  • jvnadrjvnadr Member
    edited August 2014

    johnlth93 said: not entirely surw what you meam, but client side usually prefer to take ipv4 first

    What do you mean? Client's pcs wont chose the server in a round robin system. Cloudflare will randomly lead their request to a random server from the RR setup.

    For example, you have the domain example.com in Cloudflare and you give those ips to DNS:

    A record: 12.12.12.12

    A Record: 13.14.15.16

    A Record: 155.155.155.155

    AAAA record: 2001:db8:85a3::::370:0000

    AAAA record: 2001:db8:85a3::::370:1234

    AAAA record: 2001:db8:85a3::::370:5678

    Each one is pointing to one of 6 mirrored servers.

    If you type example.com to your browser, you (your connection) will not be available to chose witch ip from the 6 above will reach. Cloudflare will do it for you. If it leads you to server 1, next viewer will be directed to server 2 or 3, another to server 5 etc.

    That's in theory...

  • johnlth93 said: not entirely surw what you meam, but client side usually prefer to take ipv4 first

    If client has IPv6 and server has IPv6 client will prefer IPv6 first but not IPv4. And you can not really force a DNS to prefer any record for resolving.

    Do you even have IPv6?

  • jvnadr said: That's in theory..

    nope. A modern os will ask for A records to the defined connection's resolvers, and will get the first three; when asking for AAAA the last 3 records. Probably those record will have a short ttl, and will be offered in different order, maybe in round-robin by the authoritative dns. Your browser will first try to connect to the first one, in case of a timeout will connect to the second and so on.

  • jvnadrjvnadr Member
    edited August 2014

    marrco said: Probably those record will have a short ttl, and will be offered in different order, maybe in round-robin by the authoritative dns. Your browser will first try to connect to the first one, in case of a timeout will connect to the second and so on

    No, this is not the way cloudflare works with round robin.

    Actually, cloudflare (unfortunately) does not support a HA option. It cannot detect whether a server is off, to push the request to the next available.

    It is a request that a lot of users has done to cloudflare's forums.

    I have in use a couple of round robin setups with only ipv4. Browser tries to connect to the domain and is giving the request to the dns resolver according to the name servers (in my case, cloudflare's name servers).

    Then, Cloudflare is deciding witch ip should use to lead the browser's request to the actual web site.


    I use it on a live cluster of video restreaming servers. I have my main streamer that is not accessible to the public, and this server is pushing content simultaneously to 7 other servers. All of those servers has identical setup, except a small line in the main html that identify witch server is (e.g. server 1, server 2 etc.).

    So, I have setup a domain in Cloudflare's DNS (let's say as example www.videotest.com) with 7 A records, each one with the ip of each of the restreamer servers. The domain itself points to the nameservers of Cloudflare (e.g. andy.ns.cloudflare.com etc.).

    When I open in my browser the domain www.videotest.com, it opens a random server (e.g. server 4). If I press refresh button in my browser in 10'' or less, I will get the same server (server 4). If I wait 10'' or more, then when I do refresh the browser, I'm getting another random server (not the next in order, server 5, but a random, e.g. server 2).

    So, Cloudflare's round robin is working randomly not only if the browser's request is from another computer/ip, but even if this request for the site is coming from the same computer/viewer.


    SandwichBagGhost said: If client has IPv6 and server has IPv6 client will prefer IPv6 first but not IPv4. And you can not really force a DNS to prefer any record for resolving.

    ^^ Maybe this is the explenation. If my home ISP is only ipv4 compatible (as is for now), cloudflare detect that and leads me only to the ipv4 addresses, because they exist. It do not open the ipv4-to-ipv6 Gateway, because Cloudflare thinks there is no need to do it. But, if there are no any ipv4 addresses, then, the gateway turns on and the system works.

Sign In or Register to comment.