关键操作 创建profile 1, tmsh create ltm profile tcp options-set tcp-options “{29 last}” 创建irule 2,irule: when SERVER_CONNECTED { scan [IP::client_addr] {%d.%d.%d.%d} a b c d TCP::option set 29 [binary format cccc $a $b $c $d] all binary scan [binary format cccc $a $b $c $d] H* test log local5. "insert ip to tcp option 29 $test" }

字段插入到三次握手后,用户发起的第一次request method内(抓包看到你们有GET和HEAD方式): 抓包分析用户用HEAD 方式时:

’1d’ – indicates Option-Kind 十进制是29 06 – indicates length of the Option filed in TCP header 十进制是6

‘ 0a 01 0a 01’ – indicates IP (10.1.10.1) in hex-decimal forma 源地址

********************************************************************************8 用GET方式: