Forum Discussion
2 Replies
You don't need an iRule for this. Add the 4 servers (with the correct port) to the LB pool and attach the pool to your VS.
The BIG-IP will perform port translation for the 2 servers listening on port 62077.
Cheers,
Kees
Hello Ajit,
Both 32077 and 62077 are non-standard ports. I would expect the URL to look something like http://domain.com:32077/ which means the host header would be domain.com:32077.
Based on comments you gave, it's not that the F5 isn't sending the request to the correct port, it's that the server is not responding to the request properly. Perhaps the server is expecting a different port in the host header?
I'm making a lot of assumptions, but could you try something like this?
Change port in host header
Noteswhen HTTP_REQUEST_SEND { clientside { set HOST [getfield [HTTP::host] : 1] set PORT [getfield [HTTP::host] : 2] if {($PORT ne "") && ($PORT != [TCP::server_port])} { port is different, change the port in the Host Header HTTP::header replace Host "${HOST}:[TCP::server_port]" } clean up variables unset HOST PORT } }
- I chose
because it fires after the server connection allowing reliable use of theHTTP_REQUEST_SEND
command. TechnicallyTCP::server_port
should also work based on the scenario you described (i.e. pool members are configured with actual ports 32077/62077).LB::server port
- Because
is a server-side event, any changes to the request need to be done in aHTTP_REQUEST_SEND
context.clientside
- The rule is checking to see if the port exists in the host header
, this may not be needed in your scenario.($PORT ne "")
If it turns out the port is the issue, more action may be necessary to account for any HTML content in the server's response that are not relative and have full URLs containing
.domain:port
- I chose