Forum Discussion
Filip_Verlaeckt
Dec 14, 2010Historic F5 Account
replace port by other port in TCP payload
Hi
In order to be able to loadbalance the T3 protocol between clients and WebLogic servers I need to be able to replace the VIP port number in the TCP payload by the port of the member to which the request is loadbalanced.
So the client contacts the VIP on port 7099, and the BIGIP loadbalances the request to one of the two existing Weblogic instances on the same IP address, i.e. either to port 7051 or 7081.
It seems that the client writes the originally accessed port (7099) in the TCP payload of the T3 protocol. In order to make the connection work through the BIGIP I need to replace the 7099 in the payload by -say- 7051.
However the 7099 in the payload is binary. I tried the following:
when CLIENT_DATA {
STREAM::expression {@\x1b\xbb@\x1b\x8b@}
STREAM::enable
}
It seems that the BIGIP inserts the hexcode "c2" between "1b" and "8b"in the result. Anyone knows why this happens?
Thanks
Filip
4 Replies
- hoolio
Cirrostratus
Hi Filip,
Can you try setting the encoding to UTF8?when CLIENT_DATA { STREAM::encoding utf-8 STREAM::expression {@\x1b\xbb@\x1b\x8b@} STREAM::enable }
Aaron - Filip_VerlaecktHistoric F5 AccountHi
Thanks for the reply. Unfortunately STREAM::encodig is not valid in a client_data context:
error: line 2: [command is not valid in current event context (CLIENT_DATA)] [STREAM::encoding utf-8]
Filip - hoolio
Cirrostratus
I couldn't find any documentation on STREAM::encoding. But it looks like you can set the stream encoding in STREAM_MATCHED. Can you try this?when CLIENT_DATA { STREAM::expression {@\x1b\xbb@\x1b\x8b@} STREAM::enable } when STREAM_MATCHED { STREAM::encoding utf-8 }
Aaron - Filip_VerlaecktHistoric F5 AccountI tried the STREAM_matched event but this still results in an additional "c2" addition. I will try the TCP::payload replace command...
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
