|
|
|
ArcticSilver:]
Hi fe31nz,
I think you've confused a particular name server setup with the way NSLookup works and what it does.
You cannot have multiple IP addresses in the 1 A record (domain record)...............
Nope, fe31nz was correct.
ArcticSilver:
fe31nz:
No, you are wrong about the three IP addresses. Many web servers are distributed over multiple server boxes, and therefore have multiple IP addresses. Not infrequently, such web server boxes are at different physical sites, so that when the Internet has a problem at one location, the other sites will still respond. When you use a web browser to access a domain name that has multiple IP addresses, it will do a DNS lookup and use the first of the returned addresses. If that fails to respond, if it is a good web browser, it will try again with the next address. In order to distribute the traffic amoungst the mutiple IP addresses, and also to help with browsers that only ever use the first IP address that was returned, most DNS servers will produce the IP addresses in a different order each time the same DNS lookup is done. Here is what multiple lookups did from my personal DNS server (Bind 9.10.1 on Windows 7):
[P:\]nslookup api.prowlapp.com
Server: savaidhg.6.jsw.gen.nz
Address: 2406:e001:1:2802::2
Non-authoritative answer:
Name: api.prowlapp.com
Addresses: 23.21.249.174
54.225.207.133
23.23.183.201
[P:\]nslookup api.prowlapp.com
Server: savaidhg.6.jsw.gen.nz
Address: 2406:e001:1:2802::2
Non-authoritative answer:
Name: api.prowlapp.com
Addresses: 23.23.183.201
23.21.249.174
54.225.207.133
[P:\]nslookup api.prowlapp.com
Server: savaidhg.6.jsw.gen.nz
Address: 2406:e001:1:2802::2
Non-authoritative answer:
Name: api.prowlapp.com
Addresses: 23.23.183.201
23.21.249.174
54.225.207.133
[P:\]nslookup api.prowlapp.com
Server: savaidhg.6.jsw.gen.nz
Address: 2406:e001:1:2802::2
Non-authoritative answer:
Name: api.prowlapp.com
Addresses: 54.225.207.133
23.21.249.174
23.23.183.201
The problem with accessing the api.prowlapp.com using only its IP address is a different matter altogether. Many web servers, especially those that provide commercial hosting of many small (and cheap) web sites, do not provides a separate IP address for each site they host. Instead, they use the same IP addresses, but differentiate the sites using the site name provided in the HTTP(S) messages received. So if you manually look up the IP address for any of those sites, you will get the same set of IP addresses. And if you then use only one of those IP addresses to access the site from your browser (or other software), it will not work because the HTTP(S) request will only contain the IP address of the site, but not its name, and the web server will not know which of the many sites it hosts is the one being requested.
Hi fe31nz,
I think you've confused a particular name server setup with the way NSLookup works and what it does.
You cannot have multiple IP addresses in the 1 A record (domain record). What you can however have is multiple name servers with different records.
Generally speaking, you will have multiple clustered name servers (for redundancy) which have the same record between them and hence when you do a NSLookup you get multiple addresses as there are multiple name servers that can tell you where the server for that domain is located.
The name server that is used is the one with the lowest metric that is responsive, hence you can go down the list for redundancy (for the name server, not the host).
In the case of accessing via a domain vs IP address, this could be a problem depending on how the API is hosted (as you have mentioned), however from what has been previously said it is highly likely this is not the case and that an IP address could work. This however is some thing that only the host will know.
No, you are wrong. Multiple A records for the one domain name are normal, frequently used, and what is showing in my post. You do not have multiple IP addresses in one A record, you have multiple A records for the same domain name, with different IP addresses in each, on the same DNS server. Take a look at one of the examples I posted:
[P:\]nslookup api.prowlapp.com
Server: savaidhg.6.jsw.gen.nz
Address: 2406:e001:1:2802::2
Non-authoritative answer:
Name: api.prowlapp.com
Addresses: 54.225.207.133
23.21.249.174
23.23.183.201
What it shows is that nslookup connected to my DNS server using IPv6 on the address savaidhg.6.jsw.gen.nz (2406:e001:1:2802::2). My DNS server did a lookup and returned a response with three different IP addresses for the api.prowlapp.com domain name. It also said it was not the authoritative server for that domain name (it does not host those A records, it had to get them from another DNS server). I ran wireshark to capture the packets on port 53 while I ran that nslookup again, and my DNS server sent a query to another DNS server (ns2.dnsimple.com, 2400:cb00:2049:1::a29f:1904) which responded with a single reply with all three IPv4 adresses in it. There were not three lookups of three different DNS servers, just one lookup to one DNS server and one reply with all three IPv4 addresses. If you do not believe me, please install Wireshark (www.wireshark.org) and try this for yourself.
For accessing api.prowlapp.com, I am quite sure my explanation of why an IP address lookup does not work is correct, as I have tried accessing the site using one of the IP addresses and got this response:
Heroku | No such app
There is no app configured at that hostname.
Perhaps the app owner has renamed it, or you mistyped the URL.
Which is exactly the sort of response you would expect if that web server was hosting multiple web sites on the same address and had received a query that did not have the site specified by name, only by IP address. Accessing the site using a query that includes the name works correctly.
|
|
|