From Christoph's Personal Wiki
Jump to: navigation, search

This article will cover various topics related to F5 BIG-IP load balancers (mainly for the Virtual Edition).

NOTE: Unless otherwise specified, all commands listed herein were tested on BIGIP-15.0.1-0.0.11-vmware.

Miscellaneous commands

  • List VIPs and pools:
$ tmsh list ltm virtual
$ tmsh list ltm pool
  • Set various routes:
[root@AnthosF5:Active:Standalone] config # tmsh create /sys management-route OpenVPN network gateway
[root@AnthosF5:Active:Standalone] config # tmsh create /sys management-route Default-Mgmt network gateway
[root@AnthosF5:Active:Standalone] config # tmsh list /sys management-route
sys management-route Default-Mgmt {
    network default
sys management-route OpenVPN {
[root@AnthosF5:Active:Standalone] config # tmsh list net route
net route external_default_gateway {
    network default

API calls

  • Authenticate to receive temporary token:
$ F5_IP=
$ F5_ADMIN_PASSWD={redacted}
$ TOKEN=$(curl -skXPOST https://${F5_IP}/mgmt/shared/authn/login \
    -H "Content-Type: application/json" \
    -d '{"username":"admin","password":"${F5_ADMIN_PASSWD}","loginProviderName":"tmos"}' |\
    python -c 'import sys,json;data=json.loads(sys.stdin.read());print data["token"]["token"]')
  • Use token to make an API call (here, get information on the partition named "admin_control_plane"):
$ curl -skH "X-F5-Auth-Token: ${TOKEN}" \
    https://${F5_IP}/mgmt/tm/auth/partition/admin_control_plane |\
    python -mjson.tool
    "defaultRouteDomain": 0,
    "fullPath": "admin_control_plane",
    "generation": 306,
    "kind": "tm:auth:partition:partitionstate",
    "name": "admin_control_plane",
    "selfLink": "https://localhost/mgmt/tm/auth/partition/admin_control_plane?ver=15.0.1"

External links