Manual Chapter : Managing iRules

Applies To:

Show Versions Show Versions

BIG-IQ Centralized Management

  • 6.0.0
Manual Chapter

Managing iRules

How do I change object settings on a managed device?

To change the object settings on a managed device, there are four tasks to perform.

This figure illustrates the workflow you perform to manage the objects on BIG-IP® devices. Changing the settings is the second step in this process.

Workflow for changing object settings on a managed device

Change managed object workflow

Create a new iRule

You can use the BIG-IQ Local Traffic interface to add a new iRule to a managed device.
Important: When revising configurations on devices that belong to a high availability cluster, it is important to let the changes synchronize to the cluster members instead of trying to make the same changes to multiple devices. If you try to replicate changes you made on one device in the cluster, the next config sync attempt could fail.
Important: Rules are different from most other Local Traffic objects in that they associate with virtual servers instead of devices. So to deploy a new iRule to a device, you attach the iRule to a virtual server associated with the target device and then deploy that change.
Note: This is a shared object. Shared objects do not deploy to a device unless they are attached to a device specific object. The table lists device specific and shared objects. When you create a shared object, remember that you must associate it with a device specific before it can deploy to a device.
Device Specific Objects Shared Objects
Node Certificates and Keys
Pool Eviction Policies
SNAT Pool iRules
Virtual Server Monitors
  Profiles
  1. At the top of the screen, click Configuration, then, on the left, click LOCAL TRAFFIC > iRules .
    The screen displays the list of iRules defined on this device.
  2. Click Create.
    The New iRule screen opens.
  3. For Name, type a name for the iRule you are creating.
  4. For Partition, type the name of the BIG-IP device partition on which you want to create the iRule.
  5. For the Body, compose the script sequence that defines the iRule.
    For guidance on creating an iRule, consult the AskF5 (support.f5.com) Knowledge Base. You can search the AskF5 website for iRules documentation that provides an overview of iRules, lists the basic elements that make up an iRule, and shows some examples of how to use iRules.
  6. Click Save & Close.
    The system creates the new iRule with the settings you specified.
To deploy this iRule to a device, attach the iRule to a virtual server associated with the target device and then deploy that change.

Attach iRules to virtual servers

You can use the BIG-IQ Local Traffic interface to attach iRules to a set of virtual servers. Adding an iRule sequence to a group of servers at once can save time and help you cut down on errors that result from performing repetitious tasks.
  1. At the top of the screen, click Configuration, then, on the left, click LOCAL TRAFFIC > Virtual Servers .
    The screen displays the list of virtual servers defined on this device.
  2. Select the check boxes associated with the virtual servers to which you want to attach iRules.
  3. Click Attach iRules.
    The Bulk Attach iRules screen opens.
  4. To specify which iRules to attach to the selected virtual servers, select them in the Available iRules list, and move them to the iRules to be Attached list.
  5. Specify the order in which you want the iRules to attach using the up and down arrows.
  6. For Location, specify the list position to attach these iRules.
    • To add the rules to the beginning of the existing list, click Attach to top of each virtual server's iRules list.
    • To add the rules to the end of the existing list, click Attach to bottom of each virtual server's iRules list.
  7. Use the Duplicate Policy setting to specify whether to keep the iRule list order for iRules that are already attached to the virtual servers.
    • To keep the existing list order, click Keep virtual servers' existing rules list order.
    • To change the existing list order to what you specified previously, click Reorder virtual servers' existing rules to preserve selected rules order.
  8. Click Save & Close.