Hi, I recently want to use cbq to control maximum bandwidth between Host A and Host B, like the following: Host A <----connecting Port 1--->|Openflow, bandwidth=10Kb |<---connecting Port2----> Host B
(192.168.1.10) (192.168.1.20) But it's not working! I had tried virous methods include tc, cbq and iptables + cbq, but no one can limit bandwidth. I had used "cbq list" to check the tool that is normal or not, and it monitor the four ports normally. However, the cbq method is correct working on eth0! So I don't know what's the problem. Can somebody help me? the execution steps are like the following: ============cbq execution steps======================== vim /etc/sysconfig/cbq/cbq-0002.nf2 -----cbq-0001.nf2 content------------- DEVICE=nf2c1,1000Mbit,100Mbit RATE=10Kbit WEIGHT=1Kbit PRIO=5 RULE=192.168.1.0/24, -------------------------------------------- #Establishing connection between OpenFlow Switch and NOX controller #(flow transmission was ok) cbq start find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. Then I transfer file from A to B, but bandwidth control no use. =================================================== ============tc execution steps========================== tc qdisc add dev nf2c1 root handle 1 cbq bandwidth 1000Mbit avpkt 1000 cell 8 tc class add dev nf2c1 parent 1: classid 1:2 cbq bandwidth 1000Mbit rate 300Kbit weight 30Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000 bounded tc qdisc add dev nf2c1 parent 1:2 handle 2 tbf rate 100Kbit buffer 10Kb/8 limit 15Kb mtu 1500 tc filter add dev nf2c1 parent 1:0 protocol ip prio 100 u32 match ip dst 192.168.1.0/24 classid 1:2 tc filter add dev nf2c1 parent 1:0 protocol ip prio 100 u32 match ip src 192.168.1.0/24 classid 1:2 #Establishing connection between OpenFlow Switch and NOX controller #(flow transmission was ok) Then I transfer file from A to B, but bandwidth control no use. =================================================== ============cbq+iptables execution steps================== vim /etc/sysconfig/cbq/cbq-0002.nf2 -----cbq-0002.nf2 content------------- DEVICE=nf2c1,1000Mbit,100Mbit RATE=10Kbit WEIGHT=1Kbit PRIO=5 MARK=2 -------------------------------------------- iptables -t mangle -A FORWARD -i nf2c1 -s 192.168.1.0/24 -j MARK --set-mark 2 #Establishing connection between OpenFlow Switch and NOX controller #(flow transmission was ok) cbq start Then I transfer file from A to B, but bandwidth control no use. =================================================== ============cbq execution steps in eth0=================== vim /etc/sysconfig/cbq/cbq-0003.eth -----cbq-0003.eth content------------- DEVICE=eth0,100Mbit,10Mbit RATE=10Kbit WEIGHT=1Kbit PRIO=5 RULE=140.115.155.191 <http://192.168.1.0/24>, -------------------------------------------- cbq start find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. find: warning: you have specified the -maxdepth option after a non-option argument (, but options are not positional (-maxdepth affects tests specified before it as well as those specified after it). Please specify options before other arguments. Then I download file from internet, and it's success! =================================================== Can anybody tell me how to solve this problem? Any suggest will be helpful. Thank you. Yi-Shou
_______________________________________________ openflow-discuss mailing list [email protected] https://mailman.stanford.edu/mailman/listinfo/openflow-discuss
