cancel
Showing results forĀ 
Search instead forĀ 
Did you mean:Ā 
cancel
2449
Views
0
Helpful
5
Replies

CISCO ACE forward to Sorry page

Marcin13666
Level 1
Level 1

Hello everyone,
I have a problem with Cisco ACE. I want to view Sorry pages when primary server farm is not available, but this sorry pages should be loaded from other server farm with specific URL.

When my site (https://www.mysite.com) is not available and all my servers in server farm is shutdown clients who visit page should see on main pages (https://www.mysite.com) Sorry Pages, this sorry pages is on other server farm in specific url. 

So my question is: How to redirect client to other server farm to specific URL where is static pages for example /folder/maintenance.html?

5 Replies 5

Kanwaljeet Singh
Cisco Employee
Cisco Employee

Hi Marcin,

You will need to configure a sorry serverfarm which is basically a backup serverfarm containing a redirect server or the servers which host the MW page. Please see the same configuration below:

host1/Admin(config)# rserver SERVER1
host1/Admin(config-rserver-host)# ip address 192.168.12.4
host1/Admin(config-rserver-host)# inservice
host1/Admin(config-rserver-host)# exit

host1/Admin(config)# rserver SERVER2
host1/Admin(config-rserver-host)# ip address 192.168.12.5
host1/Admin(config-rserver-host)# inservice
host1/Admin(config-rserver-host)# exit

host1/Admin(config)# rserver redirect SERVER3
host1/Admin(config-rserver-redir)# webhost-redirection www.cisco.com 301
host1/Admin(config-rserver-redir)# inservice
host1/Admin(config-rserver-redir)# exit

host1/Admin(config)# rserver redirect SERVER4
host1/Admin(config-rserver-redir)# webhost-redirection www.cisco.com 301
host1/Admin(config-rserver-redir)# inservice
host1/Admin(config-rserver-host)# exit

host1/Admin(config)# serverfarm SFARM1
host1/Admin(config-sfarm-host)# predictor roundrobin
host1/Admin(config-sfarm-host)# rserver SERVER1
host1/Admin(config-sfarm-host-rs)# inservice
host1/Admin(config-sfarm-host-rs)# exit
host1/Admin(config-sfarm-host)# rserver SERVER2
host1/Admin(config-sfarm-host-rs)# inservice
host1/Admin(config-sfarm-host-rs)# exit


host1/Admin(config)# serverfarm redirect SFARM2
host1/Admin(config-sfarm-redirect)# predictor roundrobin
host1/Admin(config-sfarm-redirect)# rserver SERVER3
host1/Admin(config-sfarm-redirect-rs)# inservice
host1/Admin(config-sfarm-redirect-rs)# exit
host1/Admin(config-sfarm-redirect)# rserver SERVER4
host1/Admin(config-sfarm-redirect-rs)# inservice
host1/Admin(config-sfarm-redirect-rs)# exit


host1/Admin(config)# policy-map type loadbalance first-match L7SLBPOLICY
host1/Admin(config-pmap-lb)# class L7SLBCLASS
host1/Admin(config-pmap-lb-c)# serverfarm SFARM1 backup SFARM2

Part in bold is for the backup serverfarm containing redirect servers or can be servers with MW PAGE.

Let me know if you have any questions.

Regards,

Kanwal

Note: Please mark answers if they are helpful.

Thank you for your answer.

In my infrastructure will be:

host1/Admin(config)# rserver SERVER1
host1/Admin(config-rserver-host)# ip address 192.168.12.4
host1/Admin(config-rserver-host)# inservice
host1/Admin(config-rserver-host)# exit
host1/Admin(config)# rserver SERVER2
host1/Admin(config-rserver-host)# ip address 192.168.12.5
host1/Admin(config-rserver-host)# inservice
host1/Admin(config-rserver-host)# exit
host1/Admin(config)# rserver BSERVER3
host1/Admin(config-rserver-host)# ip address 192.168.12.6
host1/Admin(config-rserver-host)# inservice
host1/Admin(config-rserver-host)# exit

host1/Admin(config)# serverfarm SFARM1
host1/Admin(config-sfarm-host)# predictor roundrobin
host1/Admin(config-sfarm-host)# rserver SERVER1
host1/Admin(config-sfarm-host-rs)# inservice
host1/Admin(config-sfarm-host-rs)# exit
host1/Admin(config-sfarm-host)# rserver SERVER2
host1/Admin(config-sfarm-host-rs)# inservice
host1/Admin(config-sfarm-host-rs)# exit

host1/Admin(config)# serverfarm redirect SFARM2
host1/Admin(config-sfarm-redirect)# rserver BSERVER3
host1/Admin(config-sfarm-redirect-rs)# inservice
host1/Admin(config-sfarm-redirect-rs)# exit

host1/Admin(config)# policy-map type loadbalance first-match L7SLBPOLICY
host1/Admin(config-pmap-lb)# class L7SLBCLASS
host1/Admin(config-pmap-lb-c)# serverfarm SFARM1 backup SFARM2

 

This configuration working if maintenance page will be at URL BSERVER3/index.html or other default for http server. But my clients should see page from BSERVER3/folder/maintenance.html. They should see url in they internet browser "www.mysite.com", so redirect isn't good idea.
Have you any other idea?  Thanks

Hi Marcin,

You don't need to redirect if you don't want to. You can host the page (MW page) on the sorry server "BSERVER3" itself. When your primary serverfarm is down, the client request would be forwarded to this server in backup serverfarm which should serve the client MW page.

Regards,

Kanwal

Note: Please mark answers if they are helpful.

It isn't answer for my problem. Imagine situation:

Client is browsing my page. At some point he is browsing https://mypages.com/url1/pages45.html. In this moment all servers in SFARM1 are gone. 

Client after this should see pages from BSFRAM1 in url /folder/maintenance.html.

If I will do like you wrote client see pages BSFARM1/url1/pages45.html or default start pages for BSERVER3

You cannot add a normal host in a redirect serverfarm:

====not good=====

host1/Admin(config)# rserver BSERVER3
host1/Admin(config-rserver-host)# ip address 192.168.12.6
host1/Admin(config-rserver-host)# inservice
host1/Admin(config-rserver-host)# exit

host1/Admin(config)# serverfarm redirect SFARM2
host1/Admin(config-sfarm-redirect)# rserver BSERVER3
host1/Admin(config-sfarm-redirect-rs)# inservice
host1/Admin(config-sfarm-redirect-rs)# exit

=======

To acheive what you want you will need to create a redirect serverfarm and a backup serverfarm and use layer7 classification. something like this:

dvishwak/Admin(config)# rserver redirect SERVER4
dvishwak/Admin(config-rserver-redir)# webhost-redirection http://%h/folder/maintenance.html 301
dvishwak/Admin(config-rserver-redir)# inservice
dvishwak/Admin(config-rserver-host)# exit

dvishwak/Admin(config)# serverfarm redirect SFARM4
dvishwak/Admin(config-sfarm-redirect)# predictor roundrobin
dvishwak/Admin(config-sfarm-redirect)# rserver SERVER4
dvishwak/Admin(config-sfarm-redirect-rs)# inservice
dvishwak/Admin(config-sfarm-redirect-rs)# exit

dvishwak/Admin(config)# rserver BSERVER3
dvishwak/Admin(config-rserver-host)# ip address 192.168.12.6
dvishwak/Admin(config-rserver-host)# inservice
dvishwak/Admin(config-rserver-host)# exit

dvishwak/Admin(config)# serverfarm host SFARM3
dvishwak/Admin(config-sfarm-redirect)# rserver BSERVER3
dvishwak/Admin(config-sfarm-redirect-rs)# inservice
dvishwak/Admin(config-sfarm-redirect-rs)# exit

dvishwak/Admin(config)# class-map type http loadbalance match-any MATCH-SORRY
dvishwak/Admin(config-cmap-http-lb)# match http url /folder/maintenance.html

dvishwak/Admin(config)# policy-map type loadbalance first-match L7SLBPOLICY
dvishwak/Admin(config-pmap-lb)# class MATCH-SORRY
dvishwak/Admin(config-pmap-lb-c)# serverfarm SFARM3dvishwak/Admin(config-pmap-lb-c)# exit
dvishwak/Admin(config-pmap-lb)# class class-default
dvishwak/Admin(config-pmap-lb-c)# serverfarm SFARM1 backup SFARM4

This way the backup SFARM4 will redirect to your desired page while still keeping the URL what you desire, and when the redirect hits us back on the same VIP we catch in the layer 7 class MATCH-SORRY and send it to your desired server.

 

-Regards,
Devendra Vishwakarma

-=Please rate helpful posts and mark answers=-

Review Cisco Networking for a $25 gift card