0.9.1

  • iApps Home
  • iControlREST Home
  • iControl (SOAP) Home
  • iRules Home
  • iRulesLX Home
  • TMSH Home

  • Clouddocs > > LINK::lasthop

Version notice:

LINK::lasthop¶

Description¶

Returns the MAC address of the last hop.

Syntax¶

LINK::lasthop [id | name | type]

LINK::lasthop¶

  • Returns the MAC address of the last hop

LINK::lasthop id¶

  • Returns the MAC address of the last hop

LINK::lasthop name¶

  • Returns the name of the last hop

LINK::lasthop type¶

  • Returns the type of the last hop, namely “VLAN”, “VLAN-GROUP”, “TUNNEL”, “LOOPBACK”, or “UKNOWN”

Examples¶

when CLIENT_ACCEPTED {
  set lastmac [LINK::lasthop]
  session add uie [IP::client_addr] $lastmac 180
}


# Logging example
when CLIENT_ACCEPTED {
        log local0. "\[LINK::lasthop\]: [LINK::lasthop], \[LINK::nexhop\]: [LINK::nexthop]"
        log local0. "\[LINK::lasthop\]: [LINK::lasthop] [LINK::lasthop type] [LINK::lasthop name] [LINK::lasthop id]"
}
when SERVER_CONNECTED {
        log local0. "\[clientside {LINK::lasthop}\]: [clientside {LINK::lasthop}], \[clientside {LINK::nexthop}\]: [clientside {LINK::nexthop}]"
        log local0. "\[LINK::lasthop\]: [LINK::lasthop], \[LINK::nexhop\]: [LINK::nexthop]"
}

/var/log/ltm output where CLIENT_MAC is the MAC address of the clientside hop and SERVER_MAC is the serverside hop.

<CLIENT_ACCEPTED>: [LINK::lasthop]: CLIENT_MAC, [LINK::nexhop]: ff:ff:ff:ff:ff:ff
<CLIENT_ACCEPTED>: [LINK::lasthop]: CLIENT_MAC VLAN /Common/clientnet CLIENT_MAC
<SERVER_CONNECTED>: [clientside {LINK::lasthop}]: CLIENT_MAC, [clientside {LINK::nexthop}]: SERVER_MAC
<SERVER_CONNECTED>: [LINK::lasthop]: SERVER_MAC, [LINK::nexhop]: CLIENT_MAC

Related Information¶

Valid Events:


Introduced: BIGIP-9.2.0
Enhanced: BIGIP-11.4.0 (Added subcommands: id, type, name)

The BIG-IP API Reference documentation contains community-contributed content. F5 does not monitor or control community code contributions. We make no guarantees or warranties regarding the available code, and it may contain errors, defects, bugs, inaccuracies, or security vulnerabilities. Your access to and use of any code available in the BIG-IP API reference guides is solely at your own risk.