2.1.1.1. Lab 1 - Create an iRule that Parses the URI to Route Traffic

2.1.1.1.1. Creating your first HTTP iRule that routes traffic based upon the value of the Host name.

The goal of this lab is to route incoming HTTP requests to a specfic pool based on the incoming http host name.

Please create an iRule that will route traffic based on the following table:

Host Name Pool Name
dvwa.f5lab.com dvwa_pool_http
peruggia.f5lab.com peruggia_http_pool
wackopicko.f5lab.com wackopicko_http_pool

Important

  • Estimated completion time: 10 minutes
  1. Open Chrome Browser

  2. Enter https://bigip1 into the address bar and hit Enter

    ../../_images/bigip_login.png
  3. Login with username: admin

    password: admin.F5demo.com

  4. Click Local Traffic -> iRules -> iRules List

  5. Click Create button

    ../../_images/irule_create.png
  6. Enter Name of URI_Routing_iRule

  7. Enter your code

  8. Click Finished

  9. Click Local Traffic -> Virtual Servers -> Virtual Server List

  10. Click on http_irules_vip

    ../../_images/select_vs.png
  11. Click on the Resources tab

  12. Click Manage button for the iRules section

    ../../_images/resources.png
  13. Click on URI_Routing_iRule from the Available box and click the << button, thus moving it to the Enabled box.

    ../../_images/lab1-irules-add.png
  14. Click the Finished button

  15. Open a new tab in Chrome

  16. Enter http://dvwa.f5lab.com/ and ensure you get there

  17. Now enter http://peruggia.f5lab.com/ and ensure you get to the app

  18. Finally, enter http://wackopicko.f5lab.com/ and ensure you can get to that app

    ../../_images/test_sites.png
  19. If you see this image below - it means your iRule did not work.

    ../../_images/it_works.png