TCL procedures to compress/expand a IPv6 address notation
Problem this snippet solves: Hi Folks,
the iRule below contains two TCL procedures to convert an IPv6 address from/to human readable IPv6 address notations within iRules.
The compress_ipv6_add...
Updated Jun 06, 2023
Version 2.0Kai_Wilke
My name is Kai Wilke and I'm working as a Principal Consultant for IT-Security at itacs GmbH - a German consulting company specialized in Microsoft Security cloud solutions, F5 customizations as well as for classic IT-Consulting.
You can find additional information about me and my work here:
https://devcentral.f5.com/articles/q-a-with-itacs-gmbhs-kai-wilke-devcentrals-featured-member-for-february-24890MVP
Kai_Wilke
Oct 10, 2017MVP
Hi Stanislas,
cool stuff, didn't know that the build-in
[IP::addr]
command can handle mixed IPv4/IPv6 notations and will automatically compress IPv6 notations for you. The only difference in the output of my and your iRule is, that your compress procedure (aka. make an IPv6 more human readable) will also remove the mixed IPv4/IPv6 notation. Well milage may vary which notation is more human readable...
And the second iRule and its
[string repeat]
approach is 1:1 comparable with one of the development iRules which I had before I optimized the code...
Cheers, Kai