Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I can route by IP range by the route command. But is there any domain based route solution?

share|improve this question
1  
Can you please clarify what you mean by domain based route? the term "domain" has been overloaded in the network terminology space. –  pcapademic Dec 27 '09 at 6:08
    
Furthermore it would be useful to give a use case example of what you wish to achieve. –  Dan Carley Dec 27 '09 at 13:30

4 Answers 4

up vote 6 down vote accepted

Routing is a layer 3 technique that gets your packets where they are supposed to go. Layer 3 information is almost only source IP, dest IP and fragmentation information.

Extra information such as domain name is way beyond layer 3, it's more layer 7 (the application layer). Therefore such information is not meant to be used for routing.

There are specific techniques that use information above layer 3, such as Policy Routing which uses layer 4 information (TCP/UDP ports) to route specific packets. That is as high as it goes as far as I know.

If you have control over that domain name, you could specify as specific IP that will then be routed by your routers in a specific way. If you can't do that, I'm afraid it's not going to be possible as far as I know.

share|improve this answer

You use the SRV reccord on the DNS server.

For example:

SUBDOMAIN TTL DATA (priority first)

server1.domain.com : 3600 : 10 10 1337 domain.com

This will map all incoming traffic on domain server1.domain.com to port 1337 on domain.com

As easy as that.

share|improve this answer
    
This applies to some very specific use cases, but does not pertain to the question, I believe. –  Felix Frank Jul 16 at 14:24

You can use host records or DNS to associate a domain with an IP address. The use your existing route method.

share|improve this answer

you can use apache or any other web server. virtual domains or reverse proxy does just that.

share|improve this answer
1  
Virtualhosts / reverse proxying are not related to routing at all –  Dennis Kaarsemaker Apr 13 '13 at 17:30
    
I understand that, it's the strict meaning of "routing". But when you use reverse proxying, you are routing domain requests. It's a solution. Not a layer 3 solution, but still a solution. And the question didn't mention layer 3. Anyway, it's nice to have this explanation in this thread. –  daigorocub Apr 16 '13 at 10:15

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.