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
}
}
- Alexander_Malae
Nimbostratus
I'm sorry, - Alexander_Malae
Nimbostratus
Can anyone explain how "relate_server" works?
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