Forum Discussion
nitass
Aug 31, 2013Employee
I'm working on a irule and using MBLB, but its impossible use some commands on events, like TCP::local_port on SERVER_DATA. Some commands works well when IRemove the MBLB, but I need to use it.
doesn't TCP::local_port in SERVER_DATA work?
this is mine.
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.20.111:7
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
mblb { }
tcp { }
}
rules {
myrule
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 23
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm pool foo
ltm pool foo {
members {
200.200.200.101:7 {
address 200.200.200.101
}
200.200.200.111:7 {
address 200.200.200.111
}
}
}
root@(ve11a)(cfg-sync Changes Pending)(Active)(/Common)(tmos) list ltm rule myrule
ltm rule myrule {
when CLIENT_ACCEPTED {
TCP::collect
}
when CLIENT_DATA {
log local0. "[IP::remote_addr][TCP::remote_port] > [IP::local_addr]:[TCP::local_port] payload=[TCP::payload]"
TCP::release
TCP::notify request
TCP::collect
}
when SERVER_CONNECTED {
TCP::collect
}
when SERVER_DATA {
log local0. "[IP::local_addr]:[TCP::local_port] > [IP::remote_addr]:[TCP::remote_port] payload=[TCP::payload]"
TCP::release
TCP::notify response
TCP::collect
}
[root@ve11a:Active:Changes Pending] config tail -f /var/log/ltm
Aug 31 13:40:33 ve11a info tmm[1027]: Rule /Common/myrule : 172.28.20.1759863 > 172.28.20.111:7 payload=1
Aug 31 13:40:33 ve11a info tmm[1027]: Rule /Common/myrule : 200.200.200.14:59863 > 200.200.200.111:7 payload=1
Aug 31 13:40:34 ve11a info tmm[1027]: Rule /Common/myrule : 172.28.20.1759863 > 172.28.20.111:7 payload=2
Aug 31 13:40:34 ve11a info tmm[1027]: Rule /Common/myrule : 200.200.200.14:59863 > 200.200.200.101:7 payload=2
Aug 31 13:40:35 ve11a info tmm[1027]: Rule /Common/myrule : 172.28.20.1759863 > 172.28.20.111:7 payload=3
Aug 31 13:40:35 ve11a info tmm[1027]: Rule /Common/myrule : 200.200.200.14:59863 > 200.200.200.111:7 payload=3
Aug 31 13:40:36 ve11a info tmm[1027]: Rule /Common/myrule : 172.28.20.1759863 > 172.28.20.111:7 payload=4
Aug 31 13:40:36 ve11a info tmm[1027]: Rule /Common/myrule : 200.200.200.14:59863 > 200.200.200.101:7 payload=4