Advanced iRules
Objective
This guide provides instructions on how to create an iRule leveraging many of the more advanced features.
Using the instructions provided in this document, you can create and explain an iRule with the F5 AI Assistant to help manage your network traffic and application security.
Create iRules
Create a New iRule
Step 1: Create a new iRule.
-
Log into the F5® Distributed Cloud Console.
-
Navigate to the
BIG-IP Utilities
workspace tile or menu.
Note: The homepage is role based, and your homepage may look different due to your role customization. Select
All Workspaces
drop-down menu to discover all options.

Figure: BIG-IP Utilities Tile

Figure: BIG-IP Utilities Menu
- Select
iRules
.

Figure: iRules Menu
- Click
Add iRule
.

Figure: Add iRule
Step 2: Draft a new iRule.
- Draft a new iRule in the code editor provided, which includes syntax highlighting and intellisense.

Figure: Intellisense
Step 3: Optionally, use the F5 AI Assistant to help create your iRule.
- Click
. . .
and selectCreate with AI
.

Figure: Create with AI
- Prompt the AI Assistant to "Generate an iRule to..." and provide your application delivery and security requirements in natural language.

Figure: Generate prompt
- Copy over the generated iRule to the code editor.

Figure: Generated iRule
Step 4: Save your iRule.
- Click
. . .
and selectSave iRule
.

Figure: Save iRule
-
Name your newly created iRule.
-
Optionally, add a description for your iRule.
-
Click
Save iRule
.

Figure: Name and Save iRule
Explain iRules
Explain an Existing iRule
Step 1: Explain an existing iRule.
- Click
. . .
under theAction
column of an existing iRule and selectExplain with AI
.

Figure: Explain with AI
- A summary of the iRule and its components will be shown in the AI Assistant.

Figure: iRule Explanation
Step 2: Explanation directly in the AI Assistant.
- Users can also input iRule code into the AI Assistant for explanation by prompting "Explain
insert iRule Code
".

Figure: iRule Explanation Prompt