ovs-ofctl add-meter <bridge> meter=<id>,<meter-parameter>
In PicOS OVS, each meter only support configure one meter band.
The counters of one meter are the same as the flow entry counters which the meter applied.
Â
PicOS OVS supports meters from Openflow 1.3. In different Hardware Models, the maximum count of meters that PicOS OVS supports is different. User can use the command to check the maximum count.
admin@PicOS-OVS$ovs-ofctl meter-features br0 OFPST_METER_FEATURES reply (OF1.4) (xid=0x2): max_meter:2048 max_bands:1 max_color:3 band_types: drop dscp_remark capabilities: kbps burst stats
ovs-ofctl add-meter <bridge> meter=<id>,kbps[,burst,stats],band=type=drop,rate=<rate>[,burst_size=<size>][,prec_level=<level>]
Add a meter, the type=drop.
Example:
Without burst size. Limit the rate as 30000kbps.
root@PicOS-OVS$ovs-ofctl add-meter br0 meter=1,kbps,band=type=drop,rate=30000
With burst size. Limit the rate as 30000kbps.
root@PicOS-OVS$ovs-ofctl add-meter br0 meter=2,kbps,burst,band=type=drop,rate=30000,burst_size=30000
ovs-ofctl add-meter <bridge> meter=<id>,kbps[,burst,stats],band=type= dscp_remark,rate=<rate>,prec_level=<level>[,burst_size=<size>]
Add a meter, the type=dscp_remark.
Â
Example:
Without burst_size. The prec_level=14.
root@PicOS-OVS$ovs-ofctl add-meter br0 meter=2,kbps,band=type=dscp_remark,rate=30000,prec_level=14
With burst_size. The prec_level=14.
root@PicOS-OVS$ovs-ofctl add-meter br0 meter=2,kbps,burst,band=type=dscp_remark,rate=30000,prec_level=14,burst_size=30000
Â
If one meter applies to multiple flow entries, all the flow entries will share the meter rate.
Example:
root@PicOS-OVS$ovs-ofctl add-meter br0 meter=1,kbps,band=type=drop,rate=30000 root@PicOS-OVS$ovs-ofctl add-flow br0 in_port=11,dl_dst=22:00:00:00:00:00,dl_src=22:11:11:11:11:11,dl_type=0x0800,actions=meter:1,output:13 root@PicOS-OVS$ovs-ofctl add-flow br0 in_port=12,dl_dst=22:00:00:00:00:00,dl_src=22:11:11:11:11:22,dl_type=0x0800,actions=meter:1,output:13
The result: the total rate in port te-1/1/13 is limit to 30000 kbps.
Copyright © 2024 Pica8 Inc. All Rights Reserved.