How do I route internally based on the domain being accessed?

Say I have two subdomains, a.domain.com, and b.domain.com. I want my 831 to examine the header, sort-of like apache's virtualhosts do, and based on the IP, send the request to one of my servers.

So - say I have a server on 10.10.10.1, and one on 10.10.10.2. I want anything accessed by a.domain.com to go to 10.10.10.1, and anything from b.domain.com to go to 10.10.10.2.

I only have ONE external IP. I think this is possible, but not sure how to do it, or even what to look up.
kb3llmAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

MysidiaCommented:
That you have only 1 external ip is a problem.  And there are ways to handle it,  but I am not aware of a Cisco 831 being capable of this.

What you have is commonly treated as a load balancing / content switching problem, not a routing problem  (you want to direct requests to the same IP to different dedicated servers based on domain requested).    A common way of doing this is to setup a load balancer appliance;  the load balancer can be configured to forward different domains to different dedicated servers.

A reverse proxy, for example squid, apache, pound on a dedicated Linux server, or say a  Cisco Content Engine appliance,  etc   can also forward the request to the desired frontend webserver based on domain name.





Routers choose the destination based on the IP address in the headers.

Or with policy routing: based on the source address and other criteria like port numbers.

However, when a HTTP request is made, the  DOMAIN NAME is not in the packets at layer 3,  it is only sent inside the actual HTTP request stream.

Your router (and even the destination server)  cannot know the domain name, or tell whether the user entered http://a.com  or entered http://(ip addresss)  into their browser,  without a thorough examination of Application layer data.

Layer 7 inspection of all traffic is expensive, in that the equipment requires special support for it, and a fair amount of CPU power.  The Cisco 831 has fairly little CPU power and doesn't do deep packet inspections.


Something other than a Cisco 831 is really required in order to switch based on domain name in the HTTP request.

Something routing a request based on destination domain needs to examine the request down to the application layer,  before a decision can be made based on domain name.

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
kb3llmAuthor Commented:
Thanks for the informative reply. It makes sense, though it's unfortunate. Oh well - thanks again.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Routers

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.