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 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