Forum Discussion

kazeem_yusuf1's avatar
kazeem_yusuf1
Icon for Nimbostratus rankNimbostratus
Feb 28, 2018

ADDING A SYSTEM ID TO AN SMPP VIP

I need help on adding a system id to an SMPP VIP for authentication. My topology involves an ESME, two smpp firewalls which communicate via separate F5 vip's To the SMSC.

 

So, my topology looks like this.

 

ESME>>>1ST F5 VIP

 

1ST F5 VIP forwards t0 1st smpp firewalls.

 

1st smpp firewalls are configured to forward to second f5 VIP.

 

1ST SMPP FW>>>>>2ND F5 VIP

 

2nd F5 VIP load balances to 2nd smpp firewalls.

 

2nd f5 vip>>>2nd smpp firewalls.

 

2nd smpp firewalls are configured to forward to third f5 vip.

 

2nd smpp firewalls >>>>> third f5 vip.

 

third f5 vip load balances to SMSC.

 

3rd f5 vip>>>SMSC.

 

i used the irule based on this beautful irule on this thread. https://devcentral.f5.com/questions/balancing-smpp-traffic-based-on-recipient-address.

 

The irule used is listed in comment. The bind tranceiver message hits the 1st smpp firewall, and fails on hitting the second F5 VIP, as the second F5 VIP doesn't have the SYSTEM ID parameter configured.

 

How do i configure the system ID on the 2nd and third F5 VIP's.

 

  • when CLIENT_ACCEPTED { set s_seq_idx 1 set first_bind_resp 1 set mm1 10.199.254.37%5 set mm2 10.199.254.38%5 set mm3 10.199.254.39%5 TCP::collect } when CLIENT_DATA { while { [TCP::payload length] >= 16 } { binary scan [TCP::payload] IH8IIa* len oper status seq p if { [TCP::payload length] < $len } { TCP::collect $len return } switch -glob $oper { 00000002 - 00000009 { set bind_message [TCP::payload $len] } 00000004 { submit_sm set p [string range $p [expr [string first \x00 $p]+1] end] binary scan $p cca* ston snpi p set p [string range $p [expr [string first \x00 $p]+1] end] binary scan $p ccA* dton dnpi p set dest [getfield $p \x00 1] if { $dest starts_with 420 } { use pool or node command node [LB::server pool] member $mm3 9000 } else { pool [LB::server pool] member $mm1 9000 } elseif { pool [LB::server pool] member $mm2 9000 } } 8* { rewrite seq if { [info exists s_seq_map($seq)] } { set old_seq [lindex $s_seq_map($seq) 0] TCP::payload replace 12 4 [binary format I $s_seq_idx] set addr [lindex $s_seq_map($seq) 1] set port [lindex $s_seq_map($seq) 2] use pool or node command pool [LB::server pool] member $addr $port unset s_seq_map($seq) } } } TCP::release $len TCP::notify request } TCP::collect } when SERVER_CONNECTED { if { $first_bind_resp } { TCP::collect } else { TCP::collect -all TCP::respond $bind_message } } when SERVER_DATA { while { [TCP::payload length] >= 16 } { binary scan [TCP::payload] IH8II len oper status seq if { [TCP::payload length] < $len } { TCP::collect $len return } switch -glob $oper { 0* { rewrite seq TCP::payload replace 12 4 [binary format I $s_seq_idx] set s_seq_map($s_seq_idx) "$seq [IP::remote_addr] [TCP::remote_port]" incr s_seq_idx } 80000002 { bind response if { $first_bind_resp } { set first_bind_resp 0 } else { TCP::payload replace 0 [TCP::payload length] "" set len 0 } } } TCP::release $len TCP::notify response } TCP::collect }