BIG-IP zero-or-one finder

Zero or one? Look up where each Tcl command, iRules command, configuration object, API and on-box tool on a BIG-IP starts counting, with F5's own wording and the date each source was read, then translate a position into every command's own number and run it. Local, no network.

Netværk

Every place on a BIG-IP found to count from 0 or from 1, with what is counted, how to reach the first and the last, what comes back when nothing is there, and the sources. Filter by where counting starts, or search.

Rules of thumb

  1. Tcl positions count from 0, and end is the last index, the length minus one.
  2. F5's field-style numbers count from 1: getfield fields, URI::path depths, LTM policy path-segment indexes, the legacy matchclass.
  3. Counters return 1 for the first item: HTTP::request_num, table incr.
  4. Many zeros are values, not positions: route domain 0, port 0, connection-limit 0, SSL::verify_result 0, and tcpdump's 0.0.
  5. Lower goes first almost everywhere (event priority, policy ordinals, GTM order, syslog severity), except pool priority groups, where higher wins.
  6. In an if, 0 is false and every other number is true, -1 included: compare an index with >= 0 instead of testing it, and store your own flags as 0 or 1, as the DevCentral iRules Style Guide asks.
Counts from
Try

Showing 76 of 76.

Tcl inside iRules (22)

string index0 Starts at 0

string index counts characters from 0: index 0 is the first character, end the last, and end-1 the one before it. An index below 0, or at the length or beyond, returns an empty string, not an error.

Counts
characters
First
0
Last
end
Nothing there
""

Example string index abcd end-1 returns c

string range0 Starts at 0

string range takes a first and a last index, both counted from 0 and both included: string range $s 0 2 returns three characters. A first index below 0 is read as 0, and a last index past the end is read as end.

Counts
characters, both ends included
First
0
Last
end
Nothing there
""

Example string range abcdef 2 3 returns cd

Watch out Because the last index is included, the result has last minus first plus one characters. The first N characters are string range $s 0 N-1, not N.

string first, string last0 Starts at 0

string first and string last return the index where the text starts, counted from 0, or -1 when it is not there. The optional start index of string first (and last index of string last) uses the same numbering.

Counts
characters
First
0
Nothing there
-1

Example string first q xyz returns -1

Watch out In an if, 0 is false and every other number is true. So if [string first ...] skips the body when the text is at the very start (index 0) and runs it when the text is missing (-1). Test [string first ...] >= 0 instead.

string compare=0 Zero is a value

string compare returns -1, 0 or 1: 0 means the two strings are equal, -1 that the first sorts before the second, and 1 that it sorts after.

Counts
a comparison result, not a position

Example string compare a b returns -1

Watch out Read as a condition, 0 is false: if [string compare $a $b] runs when the strings are different. For equality use string equal or the eq operator, which give 1 when the strings are equal.

true and false in if and expr=0 Zero is a value

In an if condition, and wherever expr reads a value as true or false, 0 is false and every other number is true, -1 included. Tcl also accepts the words true, yes and on, and false, no and off, in upper or lower case and shortened, as long as the short form is not ambiguous: n, t and of work, while o is an error. The DevCentral iRules Style Guide asks you to store state only as 0 or 1.

Counts
a condition, not a position

Example expr {-1 ? "taken" : "skipped"} returns taken

Watch out string is true and string is false follow different rules from if: they accept only 0, 1 and the words, so string is true -1 returns 0 although if treats -1 as true. Without -strict they also return 1 for an empty string, which if rejects with an error.

string replace, wordstart, wordend, is -failindex0 Starts at 0

string replace takes first and last indexes like string range; string wordstart and string wordend take an index and return one; string is with -failindex stores the index of the first character that failed. All count from 0, and the index arguments accept end.

Counts
characters
First
0
Last
end

Example string replace abcdef 1 2 XY returns aXYdef

end, end-N← Counts from the right

end is the last index, which is the length minus one, and end-1 is the one before it. It works in string index, string range, string replace, lindex, lrange, linsert, lreplace and lsort -index.

Counts
positions from the end
Last
end

Example lindex {a b c} end-1 returns b

Watch out end is not the length: in a 4-character string, end is 3. end-0 is the same as end.

lindex0 Starts at 0

lindex counts elements from 0: index 0 is the first element and end the last. A negative index, or one at the number of elements or beyond, returns an empty string.

Counts
list elements
First
0
Last
end
Nothing there
""

Example lindex {a b c} 0 returns a

lrange0 Starts at 0

lrange returns the elements from first to last, counted from 0 and both included: lrange $l 0 1 is the first two. A first index below 0 is read as 0, and a last index past the end as end.

Counts
list elements, both ends included
First
0
Last
end
Nothing there
""

Example lrange {a b c d e} 0 1 returns a b

lsearch0 Starts at 0

lsearch returns the index of the first matching element, counted from 0, or -1 when nothing matches. -start takes an index in the same numbering.

Counts
list elements
First
0
Nothing there
-1

Example lsearch {a b c} z returns -1

Watch out The same trap as string first: a match at index 0 is false in an if, and no match (-1) is true. Compare the result with -1.

linsert, lreplace, lset0 Starts at 0

linsert, lreplace and lset take indexes counted from 0. linsert at 0 (or below) puts the new elements first, and at end (or past the end) appends them.

Counts
list elements
First
0
Last
end

Example linsert {a b c} 0 X returns X a b c

lsort -index0 Starts at 0

lsort -index sorts a list of lists by one element of each sublist, counted from 0: -index 1 sorts by the second element. end and end-N are allowed.

Counts
elements inside each sublist
First
0
Last
end

Example lsort -index 1 {{a 2} {b 1}} returns {b 1} {a 2}

split, then lindex0 Starts at 0

split makes a list, and lindex counts it from 0. When the string starts with the separator, the first element is the empty text before it.

Counts
list elements after the split
First
0
Nothing there
""

Example lindex [split /api/v2/users /] 1 returns api

Watch out A path starts with a slash, so split /api/v2/users / gives four elements, the first one empty: the first segment, api, is element 1, not 0.

regexp -indices, -start0 Starts at 0

With -indices, regexp stores each match as a pair of indexes, the first and the last character, counted from 0 and both included. A group that took no part in the match gets -1 -1. -start takes an index in the same numbering.

Counts
characters
First
0
Nothing there
-1 -1

Example regexp -indices {(b+)} abbbc m; set m returns 1 3

regexp sub-matches, regsub \1 to \91 Starts at 1

Capture groups count from 1, in the order their opening parentheses appear: the first sub-match variable of regexp holds group 1, and regsub writes it as \1. Group 0 is the whole match: the match variable of regexp, and & or \0 in regsub.

Counts
capture groups
First
\1

Example regsub {(a)(b)} ab {\2\1} returns ba

Watch out Group numbers start at 1 while string positions start at 0: in the same regexp -indices call, group 1 can report position 0.

format and scan %n$1 Starts at 1

In format and scan, a position specifier such as %2$s picks an argument (or a variable) by number, and 1 is the first. When one specifier is positional, all of them must be.

Counts
arguments and variables
First
%1$

Example format {%2$s %1$s} a b returns b a

scan %nn A count, not a position

%n stores how much of the input scan has read so far, so it equals the index where the rest of the string starts and can feed string range.

Counts
input read so far

Example scan "ab cd" {%s%n} w n; set n returns 2

Watch out In Tcl 8.4.6 that amount is counted in bytes of UTF-8, not characters: after a character such as é it runs ahead of string range (the scan explainer shows it).

clock format %w %H %M %S %U %W0 Starts at 0

These clock format fields start at 0: %w is the weekday with Sunday 0, %H the hour from 00 to 23, %M and %S from 00 to 59, and %U and %W the week of the year from 00 (in tclsh 8.4.6, 1 January 1970, a Thursday, is week 00 for both).

Counts
weekdays, hours, minutes, seconds, weeks
First
0 / 00

Example clock format 0 -format {%w %H %U %W} -gmt 1 returns 4 00 00 00

clock format %u %d %e %j %m %V %I1 Starts at 1

These clock format fields start at 1: %u is the weekday with Monday 1 and Sunday 7, %d and %e the day of the month, %j the day of the year from 001, %m the month from 01, %I the 12-hour clock from 01, and %V the ISO 8601 week from 01.

Counts
weekdays, days, months, weeks
First
1 / 01 / 001

Example clock format 0 -format {%u %d %j %m %V} -gmt 1 returns 4 01 001 01 01

Watch out %w and %u number the same day differently: Sunday is 0 for %w and 7 for %u, while Monday is 1 for both.

binary scan @0 Starts at 0

In binary scan, @ moves the cursor to an absolute byte position, and position 0 is the first byte. A position past the end leaves the cursor after the last byte.

Counts
bytes
First
@0

Example binary scan ABC @1a1 x; set x returns B

info level, uplevel, upvar0 Starts at 0

info level is 0 at the top (the global level) and 1 inside a proc called from there. uplevel and upvar take a relative level, where 1 (the caller) is the default, or an absolute one written with #: #0 is the global level.

Counts
levels of the call stack
First
#0

Example proc lv {} { info level }; lv returns 1

expr {int(rand()*N)}0 Starts at 0

rand() returns a value between 0 and 1, never 1 itself, so int(rand()*N) is a whole number from 0 to N-1: exactly the lindex positions of a list with N elements.

Counts
list positions
First
0
Last
N-1

Example expr {int(rand()*3)} returns 0, 1, 2

Commands F5 adds to iRules (30)

getfield1 Starts at 1

getfield splits a string on a character or a string and returns one field. F5's page: the field number is 1 indexed, so field 1 is the text before the first separator.

Counts
fields
First
1

Example getfield "www.example.com:8080" ":" 1 returns www.example.com

Watch out When the string starts with the separator, field 1 is the empty text before it, so the first segment of a path is field 2. F5's page has no example with a leading separator; the translator flags it.

substr0 Starts at 0

substr starts at an index counted from 0: F5's page says the skip count is the index of the first character returned, where 0 is the first character. The terminator is either a length or a text to stop before.

Counts
characters
First
0

Example substr "abcdefghijklm" 2 4 returns cdef

F5's pages disagree F5's rule says a numeric terminator returns that many characters, so 0 would return nothing, yet the published example with 0 returns the rest of the string, and the API page marks that line as not working on 11.5.4 and 11.6.0.

findstr0 Starts at 0

findstr finds the search text, then skips a number of characters counted from the first character of the match: 0, the default, returns the match itself. To start right after the search text, skip its length.

Counts
characters from the match
First
0

Example findstr "aaa123456xxyz" "aaa" 3 "xyz" returns 123456x

Watch out substr counts its skip from the start of the string and findstr from the start of the match, although F5's substr page says the two use these arguments in the same way.

domain← Counts from the right

domain returns the last N labels of a dotted name, counted from the right: in F5's example, 1 gives com and 2 gives domain.com. A count larger than the number of labels returns the whole name.

Counts
labels, from the right
Last
1

Example domain www.sub.my.domain.com 2 returns domain.com

Watch out For a name such as www.sub.my.domain.co.uk, 2 returns co.uk, not the organisation's name (F5's own example).

URI::path1 Starts at 1

URI::path with a start (and an end) depth returns part of the directory path, and depth 1 is the first directory: F5's page says the range needs start >= 1, and its example shows that 0 raises a Tcl error.

Counts
directory depth
First
1

Example URI::path "/path/to/file.ext?param=value" 2 returns /to/

F5's pages disagree F5's example contradicts itself: a comment says the depth is 3 where the output shows 2, a start of 3 returns / while a start of 4 returns /path/to/, and the tmsh copy of the page leaves those lines out.

HTTP::request_num, HTTP2::requests1 Starts at 1

HTTP::request_num counts the HTTP transactions on the current connection including the current one, so the first request returns 1. HTTP2::requests counts the same way for the HTTP/2 session and returns 0 when HTTP/2 is not active.

Counts
requests on the connection
First
1

Example HTTP::request_num returns 1

HTTP::header at, HTTP::header value0 Starts at 0

HTTP::header at returns the name of the header at a zero-based index, so 0 is the first header line. Asking for the value of a header that is not there returns an empty string.

Counts
header lines
First
0
Nothing there
""

Example HTTP::header value header_1 returns value_3

Watch out When a header appears more than once, HTTP::header value works on the last one, while SIP::header without an index returns the first. HTTP::header values returns them all.

HTTP::payload, TCP::payload, UDP::payload, SSL::payload0 Starts at 0

The payload commands take a byte offset counted from 0: F5's HTTP::payload page says that to replace the whole payload the offset should be 0, and the TCP, UDP and SSL payload pages show the same base in their examples.

Counts
bytes
First
0

Example TCP::payload replace 0 [TCP::payload length] "" returns the collected TCP payload is now empty (F5's example)

TCP::offsetn A count, not a position

Despite its name, TCP::offset is not a position: F5's page says it returns the number of bytes currently held in memory by TCP::collect.

Counts
bytes collected (a count)

Example TCP::offset returns the number of bytes collected so far

Watch out Use it as a length, not as the offset of the last byte: with N bytes held, the last one is at offset N minus 1.

SSL::cert, SSL::cert issuer0 Starts at 0

SSL::cert and SSL::cert issuer take an index from 0: F5's page says zero denotes the first certificate in the chain the peer sent and one the next. SSL::cert count is the total, so the last index is the count minus 1.

Counts
certificates in the peer's chain
First
0
Last
[SSL::cert count] - 1

Example SSL::cert 0 returns the first certificate the peer sent (F5's examples use it as the client's own certificate)

F5's pages disagree One of F5's examples has the comment "Check if there is more than one client cert" above a test for a count greater than 0, which means at least one.

SSL::extensions -index0 Starts at 0

SSL::extensions -index returns the N-th extension, zero-indexed in F5's words, and SSL::extensions count is how many arrived.

Counts
TLS extensions
First
0
Last
[SSL::extensions count] - 1

Example SSL::extensions -index 0 returns the first extension received, as bytes

Watch out F5's own example loops from 0 and prints the number plus one for people: count from 0 in code and from 1 in messages.

class element, class match/search -index0 Starts at 0

With -index, class match and class search return entry indexes, and class element takes one; F5's example lists the first three matches as 0 1 2. Without an option, class match returns 1 for a match and 0 for none.

Counts
data group entries
First
0

Example class search -all -index string_dg starts_with "abc" returns 0 1 2

Watch out F5 warns that these indexes are not guaranteed to stay the same when the data group changes, even between events.

F5's pages disagree An example comment on F5's page calls lindex $element 1 the key, but in the name and value pair that index is the value.

matchclass (legacy)1 Starts at 1

The legacy matchclass returns the matching row's index counted from 1, and 0 when nothing matches, so the result works as a condition. F5's page adds that lindex counts from 0, hence the minus 1 in its example.

Counts
data group rows
First
1
Nothing there
0

Example lindex $::color [expr {$idx - 1}] returns the matching row of the old list-style data group

F5's pages disagree The same page states that no match returns 0, yet its example tests the result against -1.

TMM::cmp_unit, TMM::cmp_group0 Starts at 0

TMM::cmp_unit returns the number (0-x) of the CPU, the TMM instance, running the rule, and F5's example calls 0 the first TMM instance. TMM::cmp_group returns the group (0-x), which is always 0 on platforms other than a chassis. TMM::cmp_count is how many TMMs run.

Counts
TMM instances and groups
First
0
Last
[TMM::cmp_count] - 1

Example TMM::cmp_unit returns 0 on the first TMM instance

SIP::route, SIP::record-route, SIP::via0 Starts at 0

SIP::route and SIP::record-route take a numeric zero-based index (or the word top), and SIP::via takes a zero-based index too, according to the tmsh copy of its page. Without an index, SIP::via returns the first Via.

Counts
SIP header entries
First
0

Example SIP::via 0 returns the protocol part of the first Via header

DIAMETER::avp ... index0 Starts at 0

DIAMETER::avp picks the Nth AVP with a given code by a zero-based index, and leaving the index out works exactly like index 0, the first one.

Counts
AVPs with the same code
First
0

Example DIAMETER::avp data get 8 octetstring index 1 vendor-id 3375 returns mno

RADIUS::avp ... index0 Starts at 0

F5's RADIUS::avp examples read repeated attributes with index 0, 1, 2 and so on, and stop at the first empty result. The page never states the base in words.

Counts
attribute instances
First
0
Nothing there
""

Example RADIUS::avp 26 "string" index 0 vendor-id 10415 vendor-type 13 returns the first matching vendor-specific attribute, as a string

MESSAGE::field value0 Starts at 0

MESSAGE::field value takes an optional index that F5's page calls 0-based. A field that is not there returns an empty string, and the order of repeated fields depends on the protocol.

Counts
field instances
First
0
Nothing there
""

Example MESSAGE::field value Via 0 returns the first Via field of the message

NAME::response address0 Starts at 0

NAME::response address takes an index from 0 to 15 inclusive; without one it returns the list of up to 16 records, and null when none came back. F5 deprecated it in version 15.1 in favour of the RESOLVER and DNSMSG commands.

Counts
address records
First
0
Last
15
Nothing there
null

Example NAME::response address 0 returns the first address returned by NAME::lookup

JSON::array (BIG-IP 21.0)0 Starts at 0

The JSON::array commands, which F5 lists as introduced in BIG-IP 21.0.0, count positions from 0: inserting at an index equal to the size appends, and removing slides the later values down by one. The page never writes the base in words.

Counts
array values
First
0
Last
[JSON::array size $ary] - 1

Example JSON::array get $ary 0 returns the first value of the array

RESOLV::lookup, DNSMSG::section0 Starts at 0

RESOLV::lookup and DNSMSG::section return Tcl lists, so lindex 0 is the first item; F5's RESOLV::lookup page uses exactly that to get a single address.

Counts
addresses and records
First
0
Last
end
Nothing there
""

Example lindex [RESOLV::lookup $hostname] 0 returns the first address the lookup returned

F5's pages disagree F5's DNSMSG::record example stores lindex $answer 1 in a variable named first_rr, but index 1 is the second record.

whereis0 Starts at 0

whereis returns a Tcl list with the continent, the country and the state, in that order, so F5's example reads the continent with lindex 0 and the country with lindex 1.

Counts
list positions
First
0

Example lindex [whereis [IP::client_addr]] 1 returns the client's country code

active_members -list, members -list0 Starts at 0

active_members -list returns a Tcl list of address and port pairs for the active members, and members -list covers every member, so lindex 0 is the first pair in the list.

Counts
pool members
First
0

Example lindex [active_members -list my_pool] 0 returns 192.168.1.1 80

Watch out F5's pages do not say in what order the members come, so the first pair is not a particular member: do not build logic on a position.

table incr1 Starts at 1

table incr starts a missing key at 0, adds 1 unless told otherwise, and returns the value after adding, so the first call returns 1.

Counts
a counter
First
1

Example table incr hits returns 1

STATS::incr fields1 Starts at 1

F5's page says the fields of a Statistics profile are numbered from 1 to 32, but STATS::incr takes the field's name, not its number.

Counts
fields of a Statistics profile
First
1
Last
32

Example STATS::incr my_stats hits returns the hits field of the my_stats profile goes up by 1

when ... priority0 Starts at 0

An event's priority runs from 0 to 1000 inclusive and defaults to 500, and lower numbers run first, so priority 0 runs before the higher numbers on that event. The DevCentral iRules Style Guide asks for a priority on every event, with 500 when you have no other starting point.

Counts
event priority values
First
0
Last
1000

Example when HTTP_REQUEST priority 0 { ... } returns this HTTP_REQUEST body runs before the ones at the default 500

F5's pages disagree The same F5 page also says a priority can be assigned between 1 and 1000.

MR::message clone IDs1 Starts at 1

MR::message clone -count numbers the new clones from the previous clone count plus 1, so the first clone of a message gets ID 1; the original has no clone ID (an empty string).

Counts
message clones
First
clone_count_before + 1

Example MR::message clone -count 2 returns two clones, with clone IDs 1 and 2 for a message that had none

F5's pages disagree F5's page describes clone_count as the number of clones including the original, and in the same sentence says it returns 0 when there are no clones.

MR::connection_instance0 Starts at 0

MR::connection_instance returns text in the form instance of total, and F5's page says incoming connections return 0 of 1: the instance counts from 0.

Counts
connection instances
First
0

Example MR::connection_instance returns 0 of 1

SSL::verify_result=0 Zero is a value

SSL::verify_result returns 0 for X509_V_OK, which F5's table describes as the operation was successful; the other numbers are verification error codes.

Counts
a result code, not a position

Example SSL::verify_result returns 0

Watch out Read as a condition, success is false: if [SSL::verify_result] runs when verification failed. Compare with 0 to say what you mean.

LB::server priority, LB::server route_domain=0 Zero is a value

LB::server priority returns 1 when the pool member has no priority configured, and LB::server route_domain returns null when the route domain is 0, the default.

Counts
a priority value and a route domain

Example LB::server priority returns 1

F5's pages disagree The pool member setting itself, priority-group, defaults to 0 in the tmsh reference, so the 1 that LB::server reports for an unconfigured member does not match the configured default. Not tested on a BIG-IP.

Configuration objects (12)

route domain ID (%ID)0 Starts at 0

Route domain 0 is the default: F5's routing guide says that with no route domains created every route belongs to route domain 0, and that an address without a %ID uses the partition's default route domain, or route domain 0 in Common. The tmsh reference adds that when no route is found, the system searches route domain 0.

Counts
route domains
First
0

Example 10.10.10.30%2:80 returns a pool member on 10.10.10.30, port 80, in route domain 2

pool member priority-group, min-active-members0 Starts at 0

A pool member's priority-group runs from 0 to 65535 and defaults to 0, and higher numbers get traffic first, so 0 is the lowest group: its members receive traffic only when every member in the higher groups is unavailable. A min-active-members of 0 turns priority group activation off.

Counts
priority groups
First
0
Last
65535

Example priority-group 0 returns the lowest priority group (the default)

Watch out Here the bigger number wins, the opposite of event priority, LTM policy ordinals and GTM order, where the lower number goes first.

ratio (pool member, wide IP pool, GTM member)1 Starts at 1

Ratio weights default to 1 for LTM pool members, and the AS3 schema gives 1 as the default for GSLB pool members too; it allows 0 to 100 for an LTM pool member.

Counts
load balancing weight
First
1

Example ratio 1 returns the default weight

connection-limit, queue-depth-limit, reselect-tries=0 Zero is a value

In these fields 0 is not a size, it means no limit: a connection-limit of 0 allows unlimited connections on virtual servers, pool members and route domains, a queue-depth-limit of 0 means no limit, and reselect-tries 0 means the system does not try another pool member.

Counts
limits

Example connection-limit 0 returns no connection limit

virtual server port 0 (any)=0 Zero is a value

Port 0 on a virtual server means every port: F5 describes a default wildcard virtual server as one that uses port 0 and handles traffic for all services. The tmsh examples write the port as any.

Counts
service ports

Example destination 11.11.11.12:any returns a virtual server on 11.11.11.12 for every port

ltm policy rule ordinal, conditions and actions0 Starts at 0

Inside an LTM policy rule, conditions and actions are numbered 0, 1 and so on, as F5's tmsh example shows. Rules carry an ordinal: the lower value comes first, and DevCentral's article on matching strategies says 0 is the default and is not shown.

Counts
rules, conditions and actions
First
0

Example conditions add { 0 { http-host host not values { askf5.com } request } } returns the first condition of the rule

F5's pages disagree The iControl REST reference describes the ordinal as a positive integer, while the default is 0.

ltm policy path-segment index, unnamed-query-param index1 Starts at 1

In an LTM policy condition, path-segment index and unnamed-query-param index count from 1, and negative values count from the right.

Counts
path segments and query parameters
First
1
Last
-1

Example http-referer path-segment index 2 values { to } returns the condition looks at the second segment of the Referer path

Watch out The first segment of /api/v2 is index 1 in a policy and element 1 after split in Tcl, for different reasons: the policy counts from 1, while Tcl counts from 0 and has an empty element before the leading slash.

ltm policy-strategy precedence ordinal1 Starts at 1

The precedence table of an LTM policy strategy starts at 1, and a lower value is a higher precedence: best-match uses it to decide which matching condition is the most specific.

Counts
precedence ranks
First
1

Example 1 request tcp port returns the highest precedence in the table

GTM wide IP pool order, pool member-order0 Starts at 0

In BIG-IP DNS, a wide IP's pools and a pool's members carry an order that starts at 0: F5's lab creates the first pool with order 0, and the AS3 schema defaults memberOrder to 0. Global Availability takes the first pool in the list for as long as it is available.

Counts
pools and members, in order
First
0

Example pools add { www.example.com_pool { order 0 } } returns the wide IP's first pool

traffic-group-1, traffic group unit ID1 Starts at 1

Every BIG-IP comes with traffic-group-1, the floating group that new floating objects join by default, and traffic-group-local-only: the floating group is numbered from 1. A traffic group's unit ID is between 1 and 15.

Counts
traffic groups
First
1
Last
15

Example traffic-group-1 returns the pre-configured floating traffic group

APM acl-order0 Starts at 0

acl-order places an APM ACL in the list of ACLs, and a lower number sits higher in the list.

Counts
ACL positions
First
0

Example create acl MyACL { acl-order 3 ... } returns MyACL's place in the list of ACLs

F5's pages disagree The tmsh reference describes acl-order 3 as the third ACL in the list, which counts from 1, while F5's Ansible module documentation says the lowest number, 0, is the topmost, which makes 3 the fourth.

Platform and hardware (5)

interface names (1.1, 1/1.1, mgmt)1 Starts at 1

BIG-IP interfaces are named slot.port, such as 1.1, 1.2 and 2.1 in F5's examples, so both numbers start at 1. On a VIPRION the blade's slot comes first, as in 1/1.2 (slot 1, interface 1.2), and the management interface is named mgmt.

Counts
interfaces
First
1.1

Example create vlan my_vlan interfaces add { 1.2 1.3 1.4 } returns a VLAN on interfaces 1.2, 1.3 and 1.4

F5OS ports (rSeries 1.0, VELOS 1/1.0)1 Starts at 1

On F5OS, rSeries ports are numbered from 1.0 to the last port (10.0 on the r5000 series, 20.0 on the r10000 series). On VELOS a bundled port is 1/1.0, and the same port unbundled into four is 1/1.1 to 1/1.4.

Counts
physical ports
First
1.0

Example interfaces interface 1.0 returns the first port of an rSeries appliance

Watch out The .0 is not a port 0: on VELOS it marks a port that is not split, and the split parts are .1 to .4.

VIPRION slots, LCD slot 0, vCMP guest slots1 Starts at 1

VIPRION slots count from 1: F5's LCD article says the slot ID is counted from 1, so blade 2 is 2, and tmsh lists cluster members 1 to 8. On an appliance the same LCD commands use slot 0.

Counts
chassis slots
First
1
Last
8

Example lcdwarn -c 0 0 returns clears the level 0 LCD warnings of slot 0, an appliance

Watch out In vCMP, a guest's slots setting is a number of slots (greater than zero, default 1), not a slot number.

software volumes (HD1.1, MD1.1)1 Starts at 1

Software volumes are named HDX.Y (MDX.Y on RAID, CFX.Y on compact flash), where X is the disk and Y the volume on it; F5's examples start at HD1.1 and MD1.1.

Counts
disks and volumes
First
HD1.1

Example reboot volume HD1.1 returns reboots into the first volume of the first disk

TMM and CPU IDs (tmm0, Sys::TMM 0.0)0 Starts at 0

TMM instances are numbered from 0: tmsh shows Sys::TMM: 0.0 to 0.7 on an eight-TMM platform, and the processes start at tmm.0. With HTSplit only even IDs are used: the 10th TMM has the ID 18.

Counts
TMM instances
First
0

Example tmsh show sys tmm-info | grep Sys::TMM returns Sys::TMM: 0.0 ... Sys::TMM: 0.7

APIs and declarations (3)

iControl REST $skip, $top0 Starts at 0

In iControl REST paging, $skip is how many objects to skip, so the first page is $skip=0 (F5's bug note fetches the first 100 pools that way), and $top is how many to return.

Counts
objects to skip
First
$skip=0

Example GET /mgmt/tm/ltm/pool?$skip=0&$top=100 returns the first 100 pools

iControl REST pageIndex, startIndex1 Starts at 1

The paging fields of an iControl REST response count from 1: in DevCentral's example the first page reports pageIndex 1 and startIndex 1.

Counts
pages and positions
First
1

Example GET /mgmt/tm/ltm/pool?$top=2 returns pageIndex: 1, startIndex: 1

Watch out So the same first page is $skip=0 in the request and startIndex 1 in the response.

iControl SOAP Log::SyslogLevel1 Starts at 1

The iControl SOAP Log::SyslogLevel values sit one above the syslog numbers: LOG_LEVEL_EMERG is 1 and LOG_LEVEL_DEBUG 8, with 0 for an unknown level. ASM::SeverityName on the same site uses the syslog numbers, EMERG 0 to DEBUG 7.

Counts
syslog levels
First
LOG_LEVEL_EMERG = 1

Example LOG_LEVEL_EMERG returns 1

Watch out Converting between them is off by one: a SyslogLevel value minus 1 is the syslog severity.

Logging and packet capture (4)

syslog severity (0 to 7)0 Starts at 0

Syslog severities run from 0, the most severe (emerg), to 7 (debug). In a BIG-IP log line, the digit between the colons after the message code is the severity, with 0 being the highest.

Counts
severity levels
First
0 = emerg
Last
7 = debug

Example 01220001:3: returns severity 3, err

Watch out A bigger number is less severe: 3 (err) is worse than 6 (info).

syslog facility local0 to local70 Starts at 0

BIG-IP uses the syslog facilities local0 to local7, and local0 is BIG-IP's own: F5 maps it to /var/log/ltm, where iRule messages logged with local0 land. The local-syslog default facility is local0.

Counts
syslog facilities
First
local0
Last
local7

Example log local0. "hello" returns a line in /var/log/ltm

tcpdump -i 0.0=0 Zero is a value

In tcpdump on a BIG-IP, 0.0 is not interface number 0: it means all TMM interfaces at once. It does not capture the management interface and is not rate-limited, so use filters.

Counts
an interface name, not a number

Example tcpdump -i 0.0 returns traffic on every TMM interface

F5 Ethernet trailer: slot and tmm0·1 0 and 1 together

The F5 Ethernet trailer in a capture records the chassis slot and the TMM that handled each packet, and F5's Wireshark example for TMM0 on Slot1 reads slot == 1 and tmm == 0: slots count from 1, TMMs from 0.

Counts
blades and TMMs

Example f5ethtrailer.slot == 1 and f5ethtrailer.tmm == 0 returns packets handled by the first TMM on the first blade

API endpointGEThttps://ronutz.com/api/v1/f5-bigip-index-base-finderDocumented, not served. Opens the specification.

Referencer

Appears in these workflows