01-07-2014 09:49 PM
01-07-2014 09:49 PM
#iscsi.pol
#dynamic iscsi policy for identifying iscsi traffic, prioritize, protect, and log.
entry iscsi_countedge {
if {
protocol tcp;
destination-port 3260;
}
then {
permit;
count iscsi_countdst;
}
}
entry iscsi_configureedge {
if match all {
count iscsi_countdst >= 100; period 1; hysteresis 50;
}
then {
qosprofile iscsi_countedge qp5;
permit iscsi_configureedge;
cli "enable jumbo-frame ports $port";
cli "create log entry iscsi_detected_onPort_$port"
}
else {
qosprofile iscsi_countedge qp1;
permit iscsi_configureedge;
cli "clear access-list counters";
}
}
entry iscsi_countup {
if {
protocol tcp;
source-port 3260;
} then {
permit;
count iscsi_countsrc;
}
}
entry iscsi_configureup {
if match all {
count iscsi_countsrc >= 100; period 1; hysteresis 50;
} then {
qosprofile iscsi_countup qp5;
permit iscsi_configureup;
# cli "enable jumbo-frame ports $port";
cli "create log entry iscsi_detected_onPort_$port";
} else {
qosprofile iscsi_countup qp1;
permit iscsi_configureup;
cli "clear access-list counters";
}
}