Forum Discussion
Alexander_Malae
Nimbostratus
Aug 02, 2010RTSP and related_server rule
Hello,
I need to get working the scheme described below.
I have the following scheme:
[Internal RTSP-Sources] - [RTSP Servers Pool] - [BigIP F5] - [SNAT] - {Internet} - [ External RTSP- Source ]
|
\ {RTSP Clients}
I have setuped static mapping of rtsp url to an external rtsp source on my rtsp-servers.
When RTSP client is connecting to an external VIP and requesting this static url then BigIP forwards request to a server from RTSP Servers pool, and then server is staring to connect to an external rtsp-source.
When RTSP session from rtsp-server is started and when all of the SETUP's and DESCRIBES are done, then external source is starting a stream of udp-flow to BigIP BIP, but f5 is droping this udp flow as non-related traffic.
I've searched for the decision for this issue, and have found the "relate_server" command, which setups a related established connection in a connection-table.
I wrote the following iRule for this issue:
when SERVER_CONNECTED {
log "Test_iRule2 connection from[IP::client_addr]:[TCP::client_port]. \
Mapped to [serverside {IP::local_addr}]:[serverside {TCP::local_port}] \
-> [IP::server_addr]:[serverside {TCP::remote_port}]"
}
when RTSP_RESPONSE {
if { [RTSP::header exists "Transport"] } {
set transport [RTSP::header value "Transport"]
log local0. "0.1 $transport"
set ::client_addr [IP::client_addr]
set ::server_addr [IP::server_addr]
set ::snat_addr [IP::local_addr]
set ::client_port [findstr $transport "client_port=" 12 ";"]
set ::server_port [findstr $transport "server_port=" 12 ";"]
log local0. "$::snat_addr $::server_addr $::client_addr
$::client_port $::server_port"
relate_server {
proto 17
clientflow external $::snat_addr $::client_port $::server_addr $::server_port
serverflow internal $::client_addr $::client_port $::server_addr $::server_port
}
unset ::client_addr
unset ::server_addr
unset ::snat_addr
unset ::client_port
unset ::server_port
}
}
2 Replies
- Alexander_Malae
Nimbostratus
I'm sorry,
text was posted partially, i'll write my questions below. - Alexander_Malae
Nimbostratus
Can anyone explain how "relate_server" works?
Does it accept array as input type for client_port and server_port?
I need to create a related connection for all ports in udp flow.
And why relate_server command doesn't see local variables of RTSP_RESPONSE scope?
Does any alternative way to get all my setup working exist?
Version information of my BigIP:
Version BIG-IP 9.4.8 Build 355.0 Final
License Type Production
Licensed Date Sep 29, 2009
Active Modules
* LTM 1600 (OFEYWUC-GWMAOHM)
o ADD LTM MODULE
o ADD IPV6 GATEWAY
o ADD RATE SHAPING
o ADD RAMCACHE
o 50 MBPS COMPRESSION
o SSL 500 TPS
o ADD SSL CMP
Optional Modules
* ADD CLIENT AUTHENTICATION
* ADD GTM Module
* ADD LC Module
* ADD MAX COMPRESSION
* ADD MESSAGE SECURITY MODULE
* ADD PROTOCOL SECURITY MANAGER MODULE
* ADD ROUTING BUNDLE
* ADD SSL MAX TPS
* ADD WAN OPTIMIZATION BUNDLE
* ADD WAN OPTIMIZATION MODULE
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