Forum Discussion

ggarza_345867's avatar
ggarza_345867
Icon for Nimbostratus rankNimbostratus
Jun 08, 2018

gtm match source send to member in DC

Been working in this GTM irule all day put cant get it to work. This is for a GTM with one member in each DC. Basically need to check source IP and WideIP member status, if up then send to member in correct DC.

 

when DNS_REQUEST { Match on DAServer Networks if { [IP::addr [IP::client_addr] equals 192.168.163.0/24] ) { Check status of member Mobilemail-IT is UP if { [LB::status vs 192.168.163.39] eq "up" } { host 192.168.163.39 } } else { Match on DFServer Networks if { [IP::addr [IP::client_addr] equals 192.168.204.0/24] ) { Check status of Mobilemail-DF is UP if { [LB::status vs 192.168.204.39] eq "up" } { host 192.168.204.39 } } if both are down send to BV else { host 192.168.204.100 }

 

} }

 

2 Replies

  • How are you troubleshooting ? Were you able to use log statements within the iRule to make sure the client IP and the pool member IP are logged after each decision ?

    Check the syntax - there seems to be brackets like ) in the iRule for some reason. You can also use "and" within the iRule:

    if { ([IP::addr [IP::client_addr] equals 192.168.163.0/24]) and ([LB::status vs 192.168.163.39] eq "up") } {

  • I got it working, re did the irule using switch command helped to clean the syntax, using this format was clean and easier to work with...switch [IP::remote_addr] {

     

    "10.10.10.0/24 " { if { [LB::status vs TeasA] eq "up" } {