December 21st, 2011, 07:39 AM
Multi subdomain configuration
its possible to configure dns that give subdomains the same ip but with differents ports mean
alfa.example.com 10.10.10.1 :550
beta.example.com 10.10.10.1 :560
the subdomains are not for web application all of them , cuz some of them are been used for terminal machine, other for mail server and others. for this reason, i need different port and i dont want to make the port fixed in the local machine .
thank you for reply
December 21st, 2011, 04:33 PM
It is not. DNS only provides names and addresses - no port numbers.
If you must have something like this then set up proxy servers for those addresses. They can proxy requests to wherever you want.
Comments on this post
December 22nd, 2011, 02:44 AM
can you please explain more about proxy server how it can resolve my problem, coz i think to set up a server to provide the port
thx for reply
December 22nd, 2011, 07:41 AM
any expert here can help me !!!!!!!!!!!!!!
December 22nd, 2011, 03:41 PM
What web server are you using? Choices include Apache and IIS.
December 23rd, 2011, 03:04 AM
it is there a way to provide the port to the client as the way we provide the ip???
thanks you for reply
December 23rd, 2011, 04:52 PM
There is no DNS equivalent for port numbers, the local client must know the port number before initiating the connection. The only way to not have to enter the port number manually is to use the application's default port.
If all of your applications run on different port numbers you could set up a router with port forwarding at 10.10.10.1 and it would be able to distribute the requests to different physical servers based on the port number, regardless of which domain the request uses. However, there is no way for the router to automatically determine the port number based on the incoming domain name. This also will not allow you to run multiple applications on the same port number (even if they are on different domains).
A proxy server could direct requests for different domains to different ports IF the protocol supports it. For example, HTTP/1.1 does support this because the domain name is included in the request, however many other protocols do not. I do not know exactly which protocols do and do not support this.
It sounds like the best approach for you would be to get separate IP addresses for each server so that you can use the application's default port.
Also please note that most of the people on here are located in the US, so don't be surprised if you don't get any responses between 2:44 AM and 7:41 AM; most of us are sleeping. Also this is the biggest holiday weekend of the whole year in the US, so these forums will probably be slow for the next three or four days.
Last edited by E-Oreo; December 23rd, 2011 at 04:55 PM.
December 23rd, 2011, 05:24 PM
what about implement serv record server i guess it will resolve my problem if the client support it too but i wonder if the usual DNS cache can work with the srv recorde server in the same way it does with the remote DNS server or does it need a specified DND cache ?
Originally Posted by E-Oreo
thx for reply
December 23rd, 2011, 09:32 PM
Interesting, I didn't know about that type of record. Yes, if the client has support for using a SRV record then I imagine that would do exactly what you need. I'm not sure how widely support this is at the client level, but it seems that bind supports it, so I imagine that server side it is pretty widely supported.
As far as caching go, it depends on the cache. I don't know what you mean by a "usual" DNS cache; the operating system level DNS cache? If serving SRV records is widely supported then I imagine that most DNS caches will support it.