Re: [bwm-tools-tech] Can't find the error
Brought to you by:
nkukard
From: Nigel K. <nk...@lb...> - 2005-05-24 15:54:34
|
sorry if i didn't read your email fully (heavy work load atm, 6hr response time... heh), is this a standalone box or a firewall with 2 network cards? if its a firewall with 2 ethernet cards, the -j QUEUE must be in the FORWARD chains, if its a standalone box you must have -j QUEUE in the INPUT and OUTPUT chains... the same changes go for the marking, but this in the mangle table. -Nigel Darren Cassar wrote: > Hello, > > > > If anyone of you guys/gals (if any) could spare some time and show me > where I am wrong, please do so. I have setup bwm tools and am trying > to manage bandwidth used by two pcs behind the router. The router is a > pc - Suse 9.1, 2 interfaces ... > > > > I will describe step by step what I am doing and what I would like to > do. I don't want BWM to do firewalling, I need it only to manage > bandwidth. > > I am downloading files from an web page using download accelerator at > a constant speed of about 320KBps - it won't decrease! > > > > Using IPTABLES */- iptables -A INPUT -m mark ! -mark 0 -j > QUEUE/* > > n */iptables -t mangle -A FORWARD -p TCP -s 172.17.100.4 -j MARK > --set-mark 1001/* > > n */iptables -t mangle -A FORWARD -p TCP -s 172.17.100.3 --dport > 80 -j MARK --set-mark 1002/* > > n */iptables -t mangle -A FORWARD -p TCP -s 172.17.100.3 --dport > 22 -j MARK --set-mark 1003/* > > > > after executing the above commands, I made sure they were ok using > iptables -L -n -v -t mangle > > from the following it seems doing fine! > > > > */xejku2:/opt/lampp/htdocs/wt # iptables -L -n -v -t mangle/* > > */Chain PREROUTING (policy ACCEPT 988K packets, 850M bytes)/* > > */ pkts bytes target prot opt in out source > destination/* > > */ /* > > */Chain INPUT (policy ACCEPT 28902 packets, 2858K bytes)/* > > */ pkts bytes target prot opt in out source > destination/* > > */ /* > > */Chain FORWARD (policy ACCEPT 958K packets, 847M bytes)/* > > */ pkts bytes target prot opt in out source > destination/* > > */ 404K 17M MARK tcp -- * * 172.17.100.4 > 0.0.0.0/0 MARK set 0x3e9/* > > */ 216 9925 MARK tcp -- * * 172.17.100.3 > 0.0.0.0/0 tcp dpt:80 MARK set 0x3ea/* > > */ 0 0 MARK tcp -- * * 172.17.100.3 > 0.0.0.0/0 tcp dpt:22 MARK set 0x3eb/* > > */ /* > > */Chain OUTPUT (policy ACCEPT 20674 packets, 3028K bytes)/* > > */ pkts bytes target prot opt in out source > destination/* > > */ /* > > */Chain POSTROUTING (policy ACCEPT 978K packets, 850M bytes)/* > > */ pkts bytes target prot opt in out source > destination/**//* > > > > Then, using command /path/to/bwmd -c file.xml -f --- file.xml being > attatched below, I get an output, which I am interpreting as a good > sign ****** > > > > <firewall> > > <global> > > <modules> > > <load name="ip_queue"/> > > </modules> > > <class name="all_out"> > > <address name="c_all_out"/> > > </class> > > </global> > > > > #Traffic flows > > <traffic> > > <flow name="darren1" max-rate="1000" report-timeout="40"> <queue > prio="99" nfmark="1001"> all_out; </queue> </flow> > > <flow name="darren2" max-rate="1000" report-timeout="40"> <queue > prio="50" nfmark="1002"> all_out; </queue> </flow> > > <flow name="darren3" max-rate="1000" report-timeout="90"> <queue > prio="75" nfmark="1003"> all_out; </queue> </flow> > > </traffic> > > </firewall> > > > > ****** (the output mentioned above is shown here) > > */xejku2:/opt/lampp/htdocs/wt # /programs/bwm_tools-0.2.1/bwmd/bwmd -c > darren.xml -f/* > > */BWM Daemon v0.2.1 - Copyright (c) 2003-2005 Linux Based Systems Design/* > > */ /* > > */BWMD: Loaded 3 flows and 3 queues/* > > */BWMD: Found 1 modules to load/* > > */Loading ip_queue...done/* > > */IPQ runner started.../* > > */Flow runner started.../* > > */Stat thread started.../* > > */Report runner started.../* > > > > Please, if anyone is noticing some gross mistake tell me, cos I cannot > understand where I am wrong! > > > > Thanks to everyone, > > > > > > Darren Cassar > > > > Email ad...@da... <mailto:ad...@da...> > > URL www.darrencassar.com <http://www.darrencassar.com> > -- Nigel Kukard, PhD CompSc (Chief Executive Officer) Linux Based Systems Design Web: www.lbsd.net Email: nk...@lb... Tel: (+27) 023 349 8000 Cell: (+27) 082 333 3723 Fax: (+27) 023 349 1395 Support: 086 747 7600 Address: LIGT House, 2 Klipdrift Rd, Rawsonville Linux Systems Design & Technology Solutions The best language to use is the language that was designed for what you want to use it for. ===================================================================== Disclaimer ---------- The contents of this message and any attachments are intended solely for the addressee's use and may be legally privileged and/or confidential information. This message may not be retained, distributed, copied or used if you are not he addressee of this message. If this message was sent to you in error, please notify the sender immediately by reply e-mail and then destroy the message and any copies thereof. Opinions, conclusions and other information in this message may be personal to the sender and is not that of Linux Based Systems Design, LinuxRulz or any of it's subsideries, associated companies or principals and is therefore not endorsed by Linux Based Systems Design or LinuxRulz. Due to e-maill communication being insecure, Linux Based Systems Design and LinuxRulz do not guarantee confidentiality, security, accuracy or performance of the e-mail. Any liability for viruses is excluded to the fullest extent. |