Forum Discussion
Nat_Thirasuttakorn
Employee
Nov 22, 2004node command does not work with host name
I tested 9.0.1. and found that node command does not work with host name
any idea how to make it work? (with out creating pool)
for example:
if my_class = "somethi...
unRuleY_95363
Nov 24, 2004Historic F5 Account
First, you need to use 9.0.2. he he he...
Second, you need to use a few undocumented rule commands/events for resolving the name.
Also, I'd like to point out that there's a shortcut for getfield combined with findclass. If you pass a 3rd argument to findclass, it is used as a separator which causes the trailing portion of the class entry to be returned instead of the entire class entry. This allows findclass to be used where you would otherwise need to combine it with getfield.
Example:
rule direct_name {
when HTTP_REQUEST {
set hostname [findclass "something" $::my_class " "]
Hold HTTP data until hostname is resolved
HTTP::collect
Start a name resolution on the hostname
NAME::lookup $hostname
}
when NAME_RESOLVED {
node [NAME::response] 80
Release the hold on HTTP
HTTP::release
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects