0.9.1

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

  • Clouddocs > > LINK::nexthop

Version notice:

LINK::nexthop¶

Description¶

Returns the MAC address of the next hop. Returns the broadcast address ff:ff:ff:ff:ff:ff when called before a serverside connection has been established.

Syntax¶

LINK::nexthop [id | name | type]

LINK::nexthop¶

  • Returns the MAC address of the next hop

LINK::nexthop id¶

  • Returns the MAC address of the next hop

LINK::nexthop name¶

  • Returns the name of the next hop

LINK::nexthop type¶

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

Examples¶

# log requests
 when CLIENT_ACCEPTED {
     set info "client { [IP::client_addr]:[TCP::client_port] -> [IP::local_addr]:[TCP::local_port] }"
     append info " ethernet { [string range [LINK::lasthop] 0 16] -> [string range [LINK::nexthop] 0 16] tag [LINK::vlan_id] qos [LINK::qos] }"
     log local0. $info
 }


 # Logging example
 when CLIENT_ACCEPTED {
         log local0. "\[LINK::lasthop\]: [LINK::lasthop], \[LINK::nexhop\]: [LINK::nexthop]"
 }
 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]"
         log local0. "\[serverside {LINK::nexthop}\]: [serverside {LINK::nexthop}] [serverside {LINK::nexthop type}] [serverside {LINK::nexthop name}] [serverside {LINK::nexthop id}]"
         log local0. "\[serverside {LINK::lasthop}\]: [serverside {LINK::lasthop}] [serverside {LINK::lasthop type}] [serverside {LINK::lasthop name}] [serverside {LINK::lasthop id}]"
 }

 /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
 <SERVER_CONNECTED>: [clientside {LINK::lasthop}]: CLIENT_MAC, [clientside {LINK::nexthop}]: SERVER_MAC
 <SERVER_CONNECTED>: [LINK::lasthop]: SERVER_MAC, [LINK::nexhop]: CLIENT_MAC
 <SERVER_CONNECTED>: [serverside {LINK::nexthop}]: CLIENT_MAC VLAN /Common/inet2CLIENT_MAC
 <SERVER_CONNECTED>: [serverside {LINK::lasthop}]: SERVER_MAC VLAN /Common/snet SERVER_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.