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

Say I have two subdomains,, and 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, and one on I want anything accessed by to go to, and anything from to go to

I only have ONE external IP. I think this is possible, but not sure how to do it, or even what to look up.
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.

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  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.

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.
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

From novice to tech pro — start learning today.