Forum Discussion

Eunsu_Shin's avatar
Eunsu_Shin
Icon for Nimbostratus rankNimbostratus
Aug 22, 2013

iCall for working as if LLCF

I have a customer who want to disable opposite interface if the other side interface is down. For example, an interface 1.1 is connected to downstream firewall and an interface 1.2 is connected to upstream router. In this case, once interface 1.1 is down then BIG-IP disable interface 1.2 immediately. And then if 1.1 is up, re-enable interface 1.2. If 1.2 is down, do same thing like above.

 

I think that it's doable via iCall but no referenceable sample code here.

 

Is there anyone who got similar requirement or has sample code I can refer to?

 

  • Here's one way to do it with an iCall:

    1. Create scripts for each up/down command (ex. /var/temp/interface_1_1_down.conf):

      sys icall script interface_1_1_down {
          app-service none
          definition {
              exec tmsh modify net interface 1.1 disabled
          }
          description none
          events none
      }
      sys icall handler triggered interface_1_1_down {
          script interface_1_1_down
          subscriptions {
              interface_1_1_down {
                  event-name interface_1_1_down
              }
          }
      }
      
    2. Merge these scripts into the config:

      tmsh load sys config merge file /var/temp/interface_1_1_down.conf
      
    3. Modify /config/user_alert.conf:

      alert interface_1_1_down "text in log that reports interface 1.1 down" {
          exec command="tmsh generate sys icall event interface_1_1_down"
      }
      

    You'd create one for each event and corresponding command. You'll also need to figure out exactly what the log statement will look like when the interface is disabled, as this is what triggers the user_alert.conf config.