Forum Discussion
switch host different VIP port
hello guys, I ask you to support the configuration of an iRule. I have a VIP on port 8888 to which I would like to associate an iRule that allows me to direct traffic depending on a host of pool rather than on another. the call is via http://url1.domain.com:8888.
I tried to configure the following iRule but does not work:
a when HTTP_REQUEST { -glob switch [string tolower [HTTP :: host]] { url1.domain.com {pool Pool1 } url2.domain.com { pool Pool2}
}
could you help me?
10 Replies
- Mahmoud_Eldeeb_
Cirrostratus
good question, i'm following
- Sheigh_65772
Cirrus
I may be missunderstanding the question but based upon what you already have in your iRule maybe something like this is what your looking for:
when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "url1.domain.com" { pool Pool1 } "url2.domain.com" { pool Pool2 } } } - Gio_129629
Nimbostratus
Unfortunately it seems to me that my iRule not do it just because the vip is specific with port 8888
- Gio_129629
Nimbostratus
I would like to call and the call http://aaa.domain.com:8888 corresponds pool1 http://bbb.domain.com:8888 corresponds pool2
- Gio_129629
Nimbostratus
See that the request is not only in http, but the door 8888 below. Thanks for your support
- Sheigh_65772
Cirrus
Try putting some logging in there so you know which part of iRule is executing for each attempt. If the correct portion of the iRule is executing when you expect it to then maybe it's a natting issue.
- Gio_129629
Nimbostratus
The natt is correct, pass all protocols, try to put the sensors (if I can) but I think the iRule well written intercepts only http traffic is not the 8888
- Mahmoud_Eldeeb_
Cirrostratus
why it will only intercept http traffic?
- Gio_129629
Nimbostratus
Hi guys, I've written the irue solved by including the door over the hosts as well: when HTTP_REQUEST { switch -glob [string tolower [HTTP::host]] { "url1.domain.com:8888" { pool Pool1 } "url2.domain.com:8888" { pool Pool2 } } }
- Gio_129629
Nimbostratus
Popped the idea by trying to use a httpclass. Thanks for the moral support &128515;!!!
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com