Link to home
Start Free TrialLog in
Avatar of howardzhang
howardzhangFlag for United States of America

asked on

Cisco Router failover solution for a web server

Hi, I have a cisco 1841 router with 2 internet connections. How can I configure it so that both DSL ip and T1ip's port 80 are NAT to the web server. So people from outside can visit the website from two ip at the same time, or when one is down, the other one can automatic pops up. I can't add two static NAT with the same port in router. Thanks a lot.
Avatar of giltjr
giltjr
Flag of United States of America image

You can't.

Say you have DSL public IP address of x.x.1.100 and T1 public IP address of x.x.50.99.  And you web server's name is "myserver.mydom.com".  

Which IP address will the host name reslove to?  Both and use round robin DNS resolution?  Well when on of the links is down, every other DNS request will reslove to the IP address that is down.

You can not use DSL/Cable to backup T1. If you really want backup, you must get two non-broadband Internet connections.  If they are both to the same ISP, the ISP can handle the backup configuration.  If they are different ISP's then you have to get a AS number and do BGP routing.
Avatar of howardzhang

ASKER

It's only for our branch office to use. An outside server needs to grab real time data from our server through some special ports. Since it's critical, I'd like it to try another IP if the first one failed. Is it possible our server can be reached via both connections. It seems pretty hard to realize true failover or load balancing on cisco router. Do I have to use some other equipments? Thanks.
The server can be reached via both connections, but by a different IP address on each one.  There is nothing you can do for automatic failover, because of the reasons I stated above.

You need to see if the software on the brach office can be configured to use multiple IP adresses.  If it can be configured to try a primary IP address first, then a backup IP address second, you can achive the results you want.

If it can't be configured for multiple IP addresses, then what you might be able to do is create a hosts file that has ip address x.x.1.100 for hostname "inside server"  Then get create a script that runs on "outside" server that pings x.x.1.100, if this address responds, it modified the hosts with x.x.1.100 pointing to "inside server".  If the ping does not respond, then the scripts pings x.x.50.99, if that IP address responds then it updates the hosts file with x.x.50.99 pointing to "inside server".  You run this script every 5 minutes or so.  If neither ping responds, the script could do something else because if neiter responds, then their (remote branch office) Internet connection is most likely down.

You need to make sure the script file does not just blindly adds entries to the hosts file, but actually updates/replace the entry for "inside server".
The software can use multiple IPs. But how can I configure NAT on the cisco router. Now I can only configure one static NAT for one port. How can I make the same port from T1/DSL both forwarding to the server? Thanks.
O.K. you can't.   What you want to do is configure the Cisco box to do address nat'ing not port forwarding (a.k.a. PAT).

 But what you can do is configure the "inside server" with two IP addresses and have Cisco box NAT ISP#1 public to "inside private#1" and ISP#2 public to "inside private#2".

I forgot to mention there is a sonicwall firewall in between. All ports are NAT to Sonicwall now. Any new idea? Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Les Moore
Les Moore
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial