Question DNS different domain IPs???

johnyb98

Honorable
Apr 3, 2015
64
0
10,530
0
Please, I would like your help to understand.

a. Two different web sites on the same web server, must have their two different domain names, through their name servers, point on this same web server's public IP. So, as they are on this same web server, they have same IP address?
So let's take as an example: box1.com and box2.com both on web server 1.2.3.4 If we ping them, what is the result IP for each one? I do not think they will both return 1.2.3.4 What have I missunderstood?

b. Where do we find a web server's public IP?

c. On the A record, where and when we will get this public IP?

Thank you!
 

kanewolf

Titan
Moderator
Please, I would like your help to understand.

a. Two different web sites on the same web server, must have their two different domain names, through their name servers, point on this same web server's public IP. So, as they are on this same web server, they have same IP address?
So let's take as an example: box1.com and box2.com both on web server 1.2.3.4 If we ping them, what is the result IP for each one? I do not think they will both return 1.2.3.4 What have I missunderstood?

b. Where do we find a web server's public IP?

c. On the A record, where and when we will get this public IP?

Thank you!
It would depend on HOW this was implemented. Since both box1.com and box2.com have to listen on port 80 (or 443) there has to be something that differentiates them. That could be done in the webserver configuration. That could be done with VMs on the host.
From what you have described so far, I think the IP address of box1.com and box2.com would be 1.2.3.4
 

johnyb98

Honorable
Apr 3, 2015
64
0
10,530
0
Thank you for the answer and help.
As you described, I also know the procedure of getting a public IP address for a domain if building/hosting a website on a web hosting server's VM. In that case, with a web server VM you immediately get a public static IP address that is inserted on the A record.
But, reading these days on DNS system, I am trying to find out all possible cases someone can get this public IP address for A record.
Also, I will agree with you that there is something that differentiates these two domains/sites via their IP addresses. So, if for example:
box1.com = 2.3.4.8
box2.com = 100.101.102.103
If an individual knows both IPs, that is what perfectly works if on a browser's address bar is written the IP and not domain name.
 
They do use the same IP. The magic is done via some form of load balancer or other "master" web server function. There are many companies whose whole business is building these boxes. The ones I know the best are things like F5 from bigip.

The way these used to work is the load balancer would look inside the HTTP packets and get the actual URL. It would then pass it to the actual server. There generally is some form of NAT but there are other ways to handle the IP. It is not important since the server gets the traffic with the proper URL and not the URLs for other servers that share the IP. Once the session is open it uses the combination of ports and IP addresses to make sure the traffic goes to the correct machines.

The new problem came when they started using HTTPS. The problem is the although you could let the load balancer do all the encryption this only works when a one company controls all the servers behind the load balancer. This would be more I have say 10 server that are acting as a single web server but because of capacity I must split the traffic. What has made this almost impossible is that most servers are now using hosting centers. Many different unreated companies are sharing the same IP. The way they "fixed" this was to put the actual URL in a non encrypted field of the HTTPS session. This allows governments and others to spy on the traffic to some extent even though the actual session is encrypted. This is somewhat being addressed by encrypted DNS and other methods to allow the load balancer box to get the actual URL without allowing other people to also get it. This support is only starting to be placed into web browsers and the server balancers.

The short answer to your question is there are magic boxes built by companies like bigip that allow mulitple servers to share the same IP as well as servers have different ip and data center locations and still appear as a single server.

There is big money in being able to support this technology. There is a shortage of people who have all the education and certifications to run this. This is what you see generically called "the cloud"
 

ASK THE COMMUNITY

TRENDING THREADS