#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    10
    Rep Power
    0

    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

    steevoo
  2. #2
  3. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,745
    Rep Power
    9397
    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

    • [JM] agrees
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    10
    Rep Power
    0
    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
    steevoo
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    10
    Rep Power
    0
    any expert here can help me !!!!!!!!!!!!!!
  8. #5
  9. Come play with me!
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    13,745
    Rep Power
    9397
    What web server are you using? Choices include Apache and IIS.
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    10
    Rep Power
    0
    it is there a way to provide the port to the client as the way we provide the ip???
    thanks you for reply
  12. #7
  13. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,298
    Rep Power
    7170
    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 03:55 PM.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Dec 2011
    Posts
    10
    Rep Power
    0
    Originally Posted by E-Oreo
    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.
    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 ?
    thx for reply
  16. #9
  17. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,298
    Rep Power
    7170
    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.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo