LB::class¶
Description¶
Provides the name of the traffic class that matched the connection
Examples¶
# Ensure that /ltm traffic-class has been applied to the virtual server
# This is a demonstration of TCP connections from rfc6598 addresses any port to any address and any port
# create /ltm traffic-class rfc6598_tclass classification rfc6598 source-address 100.64.0.0 source-mask 255.192.0.0 soure-port 0 destination-address 0.0.0.0 destination-mask 0.0.0.0 destination-port 0 protocol 6
# modify /ltm virtual mytest traffic-classes add { rfc6598_tclass }
# save /sys config
# LB::class returns null if no traffic-class match
when CLIENT_ACCEPTED {
if { "[LB::class]" eq "rfc6598" } {
# Match traffic-class classified as rfc6598, see classification in /ltm traffic-class
log local0.info "Received a connection from an rfc6598/CGNAT network. Client connection from [IP::remote_addr]"
}
}