Thread: Re: [bwm-tools-tech] error during #bwmd --foreground
Brought to you by:
nkukard
From: rajveer s. <raj...@re...> - 2006-02-24 13:27:36
|
=0AMr. Larry Smith,=0A=0AI'm really so happy by seeing ur reply so quickl= y. Thanks u so much. both of the errors have been resolved. Further i need = ur help as /etc/bwm_tools/firewall.xml file is mistry for me. So i want som= e comments as per mine scenario as bwlow please:-=0A=0A=0AI've two NIC CARD= S installed on my system as below=0Aeth0:- 192.168.0.11 (local lan interfac= e)=0Aeth1:- 172.16.0.73 ( Internet interface)=0A=0Aon my lan there are two = ohter windows machines are connected. their IPs are 192.168.0.2,192.168.0.1= respectively.=0A=0Aon my eth1 interface cable connection is connected whic= h speed is 64kbps.=0Anow i want to shape my traffice as below:-=0A=0A32kbps= for my machine that is working as firewall/gateway/proxy.=0A=0A16 kbps to = 192.168.0.1=0Aand 16 kbps to 192.168.0.2=0A=0Athat's it.=0A=0Anow somebody,= please give step by step instruction, so that, i can do it.I appreciate if= any help can be provided. I will be able to understand it's working concep= ts then i will be able to paly with this bwm-tools. Please also provide ins= truction to display graphs and monitor bandwidth uses.=0A=0A=0Athanks for u= r kind consideration.=0A=0A=0A=0A=0A=0A=0AOn Fri, 24 Feb 2006 Larry Smith w= rote :=0A>On Friday 24 February 2006 06:47, rajveer singh wrote:=0A> > Hell= o guys,=0A> >=0A> > when i tried to run #bwmd --foreground command. it's sh= ows some error as=0A> > below.. Please guide me why r these problems and ho= w to shor out.=0A> >=0A> > linux:~ # bwmd --foreground=0A> > BWM Daemon v0.= 2.2 - Copyright (c) 2003-2005 Linux Based Systems Design=0A> >=0A> > BWMD: = Loaded 9 flows and 8 queues=0A> > BWMD: Found 0 modules to load=0A> > IPQ r= unner started...=0A> > Received error message: IPQ =3D Unknown error, SYSTE= M =3D Success=0A> > Flow runner started...=0A> > flowControl: Error binding= to socket: Address already in use=0A> > Report runner started...=0A> > Cre= ating report file /var/bwm_tools/out_dsl.dat=0A> > Stat error on "/var/bwm_= tools/out_dsl.dat": No such file or directory=0A> > Creating report file /v= ar/bwm_tools/out_jane.dat=0A> > Stat error on "/var/bwm_tools/out_jane.dat"= : No such file or directory=0A> > Creating report file /var/bwm_tools/out_n= iels.dat=0A> > Stat error on "/var/bwm_tools/out_niels.dat": No such file o= r directory=0A> > Creating report file /var/bwm_tools/out_kobe.dat=0A> > St= at error on "/var/bwm_tools/out_kobe.dat": No such file or directory=0A> > = Creating report file /var/bwm_tools/out_ron.dat=0A> > Stat error on "/var/b= wm_tools/out_ron.dat": No such file or directory=0A> > Creating report file= /var/bwm_tools/out_hendrik.dat=0A> > Stat error on "/var/bwm_tools/out_hen= drik.dat": No such file or directory=0A> > Creating report file /var/bwm_to= ols/out_icarus.dat=0A> > Stat error on "/var/bwm_tools/out_icarus.dat": No = such file or directory=0A> > Creating report file /var/bwm_tools/out_xabbu.= dat=0A> > Stat error on "/var/bwm_tools/out_xabbu.dat": No such file or dir= ectory=0A> > Creating report file /var/bwm_tools/out_other.dat=0A> > Stat e= rror on "/var/bwm_tools/out_other.dat": No such file or directory=0A> >=0A>= =0A>Rajveer,=0A>=0A> > BWMD: Found 0 modules to load=0A>=0A>Looks like two = errors. First is that it found no modules to load. Believe=0A>you require= at least "ip_queue". Mine looks like this:=0A>=0A> <modules>=0A> <load= name=3D"ip_queue"/>=0A> </modules>=0A>=0A>in the <global> section of your= firewall.xml=0A>=0A>The second error is that BWM defaults to using /var/bw= m_tools directory for=0A>its logging/data files. This directory _must_ exi= st before you start bwmd.=0A>It can create the flow files as necessary, but= cannot create the directory.=0A>=0A>Try "mkdir /var/bwm_tools" and it shou= ld fix the second error.=0A>=0A>--=0A>Larry Smith=0A>SysAd ECSIS.NET=0A>sys= ad...@ec...=0A>=0A>=0A>=0A>=0A>-------------------------------------------= ------------=0A>This SF.Net email is sponsored by xPML, a groundbreaking sc= ripting language=0A>that extends applications into web and mobile media. At= tend the live webcast=0A>and join the prime developer group breaking into t= his new coding territory!=0A>http://sel.as-us.falkag.net/sel?cmd=3Dlnk&kid= =3D110944&bid=3D241720&dat=3D121642=0A>____________________________________= ___________=0A>bwm-tools-tech mailing list=0A>bwm...@li...urcefo= rge.net=0A>https://lists.sourceforge.net/lists/listinfo/bwm-tools-tech=0A |
From: Kobe L. <ko...@mo...> - 2006-02-25 22:36:43
|
Did you check the good working with 'bwm_monitor' and is the bwmd deamon running? Also, try iptables -L -n -v to see any counters going up Greetz Kobe rajveer singh wrote: > > > Hi all, > > Thanks Mr. Kobe for providing steps it helps me a lot. but i goes to > monitor there nothing is happening. > my /etc/bwm_tools/firewall's contents are as below > > # Global configuration and access classes > > > > <global> > <modules> > <load name="ip_queue"/> > </modules> > <class name="out_machine1"> > <address name="out_machine1_tcp" proto="tcp" src="192.168.0.1"/> > <address name="out_machine1_udp" proto="udp" src="192.168.0.1"/> > </class> > > <class name="out_machine2"> > <address name="out_machine2_tcp" proto="tcp" src="192.168.0.2"/> > <address name="out_machine2_udp" proto="udp" src="192.168.0.2"/> > </class> > > </global> > > > # Access control lists > # Network address translation > # Traffic flows > > <traffic> > > # Rate can be specified in either IN, OUT or TOTAL (rate-total) > # If rate-total == 0, no rate limits > > > <flow name="main_line" stats-len="5" queue-size="262144" > queue-len="400" max-rate="64000" burst-rate="65000" report-timeout="60"> > <flow name="flow_machine1" max-rate="16000" burst-rate="32000" > queue-size="16384" report-timeout="60"> > <queue prio="99" nfmark="1001"> > out_machine1; > </queue> > </flow> > <flow name="flow_machine2" max-rate="16000" burst-rate="32000" > queue-size="16384" report-timeout="60"> > <queue prio="99" nfmark="1002"> > out_machine2; > </queue> > </flow> > </flow> > </traffic> > </firewall> > > and my contents of /etc/sysconfig/iptables are as below: > > # Generated using BWM Firewall v0.2.2: Sat Feb 25 18:06:44 2006 > > *mangle > :OUTPUT ACCEPT > :INPUT ACCEPT > :FORWARD ACCEPT > -A FORWARD --source 192.168.0.1 --protocol tcp -j MARK --set-mark 1001 > -A FORWARD --source 192.168.0.1 --protocol udp -j MARK --set-mark 1001 > -A FORWARD --source 192.168.0.2 --protocol tcp -j MARK --set-mark 1002 > -A FORWARD --source 192.168.0.2 --protocol udp -j MARK --set-mark 1002 > COMMIT > *filter > :OUTPUT ACCEPT > :bwmd - > :INPUT ACCEPT > :FORWARD ACCEPT > -A bwmd -m mark ! --mark 0 -j QUEUE > COMMIT > > when i tried to create graph as per below > linux:~ # bwm_graph --flow="out_machine1 --start="2006/02/25 18:28" > --end="2006/02/25 18:30" output=/etc/file1 > > > > > > > > > > > > > nothing happen > > I'm thinking it's some problem in my firewall setup. I tried to > recognise it. but unable to find it. > > > > On Sat, 25 Feb 2006 Kobe Lenjou wrote : > >Steps are easy. > > > >First you have to 'mark' you traffic in the <global> section, you > need to mark each and every packet you want to shape zo in your case > this would be something like: > ><class name="out_machine1"> > > <adress name="out_machine1_tcp" src-iface="eth0" proto="tcp" > src="192.168.0.1" dst="!192.168.0.0/24"> > > <adress name="out_machine1_udp" src-iface="eth0" proto="udp" > src="192.168.0.1" dst="!192.168.0.0/24"> > ></class> > ><class name="out_machine2"> > > ... same thing for the other IP > ></class> > > > > > >Then you need to 'limit' each 'flow' in the <traffic> section; > something like this > > > ><flow name="flow_machine1" max-rate="16000" burst-rate="32000" > queue-size="16384" report-timeout="60"> > > <queue prio="99" nfmark="1001"> > > out_machine1; > > </queue> > ></flow> > ><flow name="flow_machine2" max-rate="16000" burst-rate="32000" > queue-size="16384" report-timeout="60"> > > <queue prio="99" nfmark="1002"> > > out_machine1; > > </queue> > ></flow> > > > >This limiets each host to an upstream speed op 16k with burst to 32k. > > > >Greetz > >Kobe > > > > > >rajveer singh wrote: > >> > >> Mr. Larry Smith, > >> > >>I'm really so happy by seeing ur reply so quickly. Thanks u so much. > both of the errors have been resolved. Further i need ur help as > /etc/bwm_tools/firewall.xml file is mistry for me. So i want some > comments as per mine scenario as bwlow please:- > >> > >> > >>I've two NIC CARDS installed on my system as below > >>eth0:- 192.168.0.11 (local lan interface) > >>eth1:- 172.16.0.73 ( Internet interface) > >> > >>on my lan there are two ohter windows machines are connected. their > IPs are 192.168.0.2,192.168.0.1 respectively. > >> > >>on my eth1 interface cable connection is connected which speed is > 64kbps. > >>now i want to shape my traffice as below:- > >> > >>32kbps for my machine that is working as firewall/gateway/proxy. > >> > >>16 kbps to 192.168.0.1 > >>and 16 kbps to 192.168.0.2 > >> > >>that's it. > >> > >>now somebody, please give step by step instruction, so that, i can > do it.I appreciate if any help can be provided. I will be able to > understand it's working concepts then i will be able to paly with this > bwm-tools. Please also provide instruction to display graphs and > monitor bandwidth uses. > >> > >> > >>thanks for ur kind consideration. > >> > >> > >> > >> > >> > >> > >>On Fri, 24 Feb 2006 Larry Smith wrote : > >> >On Friday 24 February 2006 06:47, rajveer singh wrote: > >> > > Hello guys, > >> > > > >> > > when i tried to run #bwmd --foreground command. it's shows some > error as > >> > > below.. Please guide me why r these problems and how to shor out. > >> > > > >> > > linux:~ # bwmd --foreground > >> > > BWM Daemon v0.2.2 - Copyright (c) 2003-2005 Linux Based Systems > Design > >> > > > >> > > BWMD: Loaded 9 flows and 8 queues > >> > > BWMD: Found 0 modules to load > >> > > IPQ runner started... > >> > > Received error message: IPQ = Unknown error, SYSTEM = Success > >> > > Flow runner started... > >> > > flowControl: Error binding to socket: Address already in use > >> > > Report runner started... > >> > > Creating report file /var/bwm_tools/out_dsl.dat > >> > > Stat error on "/var/bwm_tools/out_dsl.dat": No such file or > directory > >> > > Creating report file /var/bwm_tools/out_jane.dat > >> > > Stat error on "/var/bwm_tools/out_jane.dat": No such file or > directory > >> > > Creating report file /var/bwm_tools/out_niels.dat > >> > > Stat error on "/var/bwm_tools/out_niels.dat": No such file or > directory > >> > > Creating report file /var/bwm_tools/out_kobe.dat > >> > > Stat error on "/var/bwm_tools/out_kobe.dat": No such file or > directory > >> > > Creating report file /var/bwm_tools/out_ron.dat > >> > > Stat error on "/var/bwm_tools/out_ron.dat": No such file or > directory > >> > > Creating report file /var/bwm_tools/out_hendrik.dat > >> > > Stat error on "/var/bwm_tools/out_hendrik.dat": No such file or > directory > >> > > Creating report file /var/bwm_tools/out_icarus.dat > >> > > Stat error on "/var/bwm_tools/out_icarus.dat": No such file or > directory > >> > > Creating report file /var/bwm_tools/out_xabbu.dat > >> > > Stat error on "/var/bwm_tools/out_xabbu.dat": No such file or > directory > >> > > Creating report file /var/bwm_tools/out_other.dat > >> > > Stat error on "/var/bwm_tools/out_other.dat": No such file or > directory > >> > > > >> > > >> >Rajveer, > >> > > >> > > BWMD: Found 0 modules to load > >> > > >> >Looks like two errors. First is that it found no modules to > load. Believe > >> >you require at least "ip_queue". Mine looks like this: > >> > > >> > <modules> > >> > <load name="ip_queue"/> > >> > </modules> > >> > > >> >in the <global> section of your firewall.xml > >> > > >> >The second error is that BWM defaults to using /var/bwm_tools > directory for > >> >its logging/data files. This directory _must_ exist before you > start bwmd. > >> >It can create the flow files as necessary, but cannot create the > directory. > >> > > >> >Try "mkdir /var/bwm_tools" and it should fix the second error. > >> > > >> >-- > >> >Larry Smith > >> >SysAd ECSIS.NET > >> >sy...@ec... > >> > > >> > > >> > > >> > > >> >------------------------------------------------------- > >> >This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > >> >that extends applications into web and mobile media. Attend the > live webcast > >> >and join the prime developer group breaking into this new coding > territory! > >> > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > >> >_______________________________________________ > >> >bwm-tools-tech mailing list > >> >bwm...@li... > >> >https://lists.sourceforge.net/lists/listinfo/bwm-tools-tech > >> > >> > >> > >><http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3> > > > > > > <http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3> |
From: rajveer s. <raj...@re...> - 2006-02-27 05:26:12
|
Dear Mr, Kobe,=0Ai checked it with bwm_monitor, there was not movement in t= raffice. I'm 100% sure that bwmd deamen is already running as u can see the= following output: -=0Alinux:~ # ps -aux|grep bwmd=0AWarning: bad ps syntax= , perhaps a bogus '-'? See http://procps.sf.net/faq.html=0Aroot 6842 = 0.0 0.3 12144 1632 ? Ssl 10:24 0:00 bwmd=0Aroot 7196 0.0= 0.1 1828 612 pts/1 S+ 10:34 0:00 grep bwmd=0Alinux:~ #=0A=0AAn= d this please this is the output of bwm_monitor=0A=0A BWM Monitor v0.2.2 - = Copyright (c) 2003-2005 Linux Based Systems Design ├──	= 472;──────────&= #9472;──────────= ;──────────^= 72;──────────&#= 9472;─┐│ = &= #9474;│ ┌───────γ= 2;──────┐ = = ││ │ main_line │ = = ││ │-flow_machine1│ = = ││ │ flow_machine2│ ┌─┤= Traffic Flow: flow_machine1 ├─────^= 72;──────────&#= 9472;────┐ = ││ └──────&= #9472;───────┘ │= │ = ││ │ = Limits: │ = ││ │ = │ = ││ │ M= ax Rate : 16000 Burst Rate: 32000 │ = ││ │ Qu= eue Len: 64 Queue Size: 16384 │ = ││ │ = │ = ││ │ Curre= nt: │ = ││ │ = │ = ││ │ Rate = : 0 Rate Avg : 0 │ = ││ │ Pkt/s = : 0 Pkt/s Avg : 0 │ = ││ │ Queue Le= n: 0.00% Queue Size: 0.00% │ = ││ │ Bursts = : 0 Drops : 0 │ = ││ │ = │ = ││ │ = │ = ││ │ = Press any key to quit... │ = ││ └──&= #9472;──────────= ;──────────^= 72;──────────&#= 9472;──────────= ────────┘ =0A= =0A=0Athis is a output of iptables -L -n -v=0Alinux:~ # iptables -L -v -n= =0AChain INPUT (policy ACCEPT 185 packets, 49326 bytes)=0A pkts bytes targe= t prot opt in out source destination=0A 8484 3253= K bwmd all -- * * 0.0.0.0/0 0.0.0.0/0=0A=0ACh= ain FORWARD (policy ACCEPT 0 packets, 0 bytes)=0A pkts bytes target pro= t opt in out source destination=0A 5 310 bwmd = all -- * * 0.0.0.0/0 0.0.0.0/0=0A=0AChain OUTPU= T (policy ACCEPT 8732 packets, 3148K bytes)=0A pkts bytes target prot o= pt in out source destination=0A=0AChain bwmd (2 refer= ences)=0A pkts bytes target prot opt in out source = destination=0A 5 310 QUEUE all -- * * 0.0.0.0/0 = 0.0.0.0/0 MARK match !0x0=0A 8483 3253K ACCEPT all = -- * * 0.0.0.0/0 0.0.0.0/0=0Alinux:~ #=0A=0Aand this= is a output of iptables -L -n -v -t mangle=0Alinux:~ # iptables -L -v -n -= t mangle=0AChain PREROUTING (policy ACCEPT 10069 packets, 3604K bytes)=0A p= kts bytes target prot opt in out source destinati= on=0A=0AChain INPUT (policy ACCEPT 9160 packets, 3494K bytes)=0A pkts bytes= target prot opt in out source destination=0A=0AC= hain FORWARD (policy ACCEPT 5 packets, 310 bytes)=0A pkts bytes target = prot opt in out source destination=0A 0 0 MARK= tcp -- * * 192.168.0.1 0.0.0.0/0 MAR= K set 0x3e9=0A 5 310 MARK udp -- * * 192.168.0.1 = 0.0.0.0/0 MARK set 0x3e9=0A 0 0 MARK tcp -- = * * 192.168.0.2 0.0.0.0/0 MARK set 0x3ea=0A = 0 0 MARK udp -- * * 192.168.0.2 0.0.0.0/= 0 MARK set 0x3ea=0A=0AChain OUTPUT (policy ACCEPT 9253 packets, 3= 338K bytes)=0A pkts bytes target prot opt in out source = destination=0A=0AChain POSTROUTING (policy ACCEPT 9258 packets, 3338= K bytes)=0A pkts bytes target prot opt in out source = destination=0A=0AChain bwmd (0 references)=0A pkts bytes target pro= t opt in out source destination=0A 0 0 QUEUE = all -- * * 0.0.0.0/0 0.0.0.0/0 MARK m= atch !0x0=0A 0 0 ACCEPT all -- * * 0.0.0.0/0 = 0.0.0.0/0=0Alinux:~ #=0A=0AYou can see in mangle table's bwmd chain, t= he counter is not going up where as the bwmd chain of filter chain is happe= ning something. Please see and suggest me where i'm making mistakes=0A=0AWi= th thanks & regards=0A=0ARajveer Singh=0A=0AOn Sun, 26 Feb 2006 Kobe Lenjou= wrote :=0A>Did you check the good working with 'bwm_monitor' and is the bw= md deamon running?=0A>=0A>Also, try iptables -L -n -v to see any counters g= oing up=0A>=0A>Greetz=0A>Kobe=0A>=0A>rajveer singh wrote:=0A>>=0A>> Hi all= ,=0A>>=0A>>Thanks Mr. Kobe for providing steps it helps me a lot. but i goe= s to monitor there nothing is happening.=0A>>my /etc/bwm_tools/firewall's c= ontents are as below=0A>>=0A>> # Global configuration and access classe= s=0A>>=0A>>=0A>>=0A>> <global>=0A>><modules>=0A>> <load nam= e=3D"ip_queue"/>=0A>></modules>=0A>> <class name=3D"out_machine1">= =0A>><address name=3D"out_machine1_tcp" proto=3D"tcp" src=3D"192.168.0.1"/= >=0A>><address name=3D"out_machine1_udp" proto=3D"udp" src=3D"192.168.0.1"= />=0A>></class>=0A>>=0A>> <class name=3D"out_machine2">=0A>><addres= s name=3D"out_machine2_tcp" proto=3D"tcp" src=3D"192.168.0.2"/>=0A>><addre= ss name=3D"out_machine2_udp" proto=3D"udp" src=3D"192.168.0.2"/>=0A>></cla= ss>=0A>>=0A>></global>=0A>>=0A>>=0A>> # Access control lists=0A>> = # Network address translation=0A>> # Traffic flows=0A>>=0A>>= <traffic>=0A>>=0A>> # Rate can be specified in either IN, = OUT or TOTAL (rate-total)=0A>> # If rate-total =3D=3D 0, no rate li= mits=0A>>=0A>>=0A>><flow name=3D"main_line" stats-len=3D"5" queue-size=3D"2= 62144" queue-len=3D"400" max-rate=3D"64000" burst-rate=3D"65000" report-tim= eout=3D"60">=0A>> <flow name=3D"flow_machine1" max-rate=3D"16000" b= urst-rate=3D"32000" queue-size=3D"16384" report-timeout=3D"60">=0A>> = <queue prio=3D"99" nfmark=3D"1001">=0A>> = out_machine1;=0A>> </queue>=0A>> </flow>=0A>> = <flow name=3D"flow_machine2" max-rate=3D"16000" burst-rate=3D"32000" que= ue-size=3D"16384" report-timeout=3D"60">=0A>> <queue prio= =3D"99" nfmark=3D"1002">=0A>> out_machine2;=0A>> = </queue>=0A>> </flow>=0A>></flow>=0A>></traffic>=0A>>= </firewall>=0A>>=0A>>and my contents of /etc/sysconfig/iptables are as belo= w:=0A>>=0A>># Generated using BWM Firewall v0.2.2: Sat Feb 25 18:06:44 2006= =0A>>=0A>>*mangle=0A>>:OUTPUT ACCEPT=0A>>:INPUT ACCEPT=0A>>:FORWARD ACCEPT= =0A>>-A FORWARD --source 192.168.0.1 --protocol tcp -j MARK --set-mark 10= 01=0A>>-A FORWARD --source 192.168.0.1 --protocol udp -j MARK --set-mark = 1001=0A>>-A FORWARD --source 192.168.0.2 --protocol tcp -j MARK --set-mar= k 1002=0A>>-A FORWARD --source 192.168.0.2 --protocol udp -j MARK --set-m= ark 1002=0A>>COMMIT=0A>>*filter=0A>>:OUTPUT ACCEPT=0A>>:bwmd -=0A>>:INPUT A= CCEPT=0A>>:FORWARD ACCEPT=0A>>-A bwmd -m mark ! --mark 0 -j QUEUE=0A>>COMMI= T=0A>>=0A>>when i tried to create graph as per below=0A>>linux:~ # bwm_grap= h --flow=3D"out_machine1 --start=3D"2006/02/25 18:28" --end=3D"2006/02/25 1= 8:30" output=3D/etc/file1=0A>> >=0A>> >=0A>> >=0A>> >=0A>> >=0A>> >=0A>>not= hing happen=0A>>=0A>>I'm thinking it's some problem in my firewall setup. I= tried to recognise it. but unable to find it.=0A>>=0A>>=0A>>=0A |
From: Kobe L. <ko...@mo...> - 2006-02-27 06:06:35
|
Then your rules are wrong ;-) You should be able to figure this ons out! Check: - the ip adresses used - try other 'general rules' like 'each packet coming on 'eth0' (or whatever you lan interface is) rajveer singh wrote: > > Dear Mr, Kobe, > i checked it with bwm_monitor, there was not movement in traffice. I'm > 100% sure that bwmd deamen is already running as u can see the > following output: - > linux:~ # ps -aux|grep bwmd > Warning: bad ps syntax, perhaps a bogus '-'? See > http://procps.sf.net/faq.html > root 6842 0.0 0.3 12144 1632 ? Ssl 10:24 0:00 bwmd > root 7196 0.0 0.1 1828 612 pts/1 S+ 10:34 0:00 grep bwmd > linux:~ # > > And this please this is the output of bwm_monitor > > BWM Monitor v0.2.2 - Copyright (c) 2003-2005 Linux Based Systems > Design > ├───────────────────────────────────────────────┐│ > > ││ > ┌──────────────┐ > > ││ │ main_line > │ > ││ > │-flow_machine1│ > > ││ │ flow_machine2│ ┌─┤ > Traffic Flow: flow_machine1 > ├─────────────────────┐ > ││ > └──────────────┘ > │ > │ ││ > │ Limits: > │ ││ > │ > │ > ││ │ Max Rate : 16000 > Burst Rate: 32000 │ > ││ │ Queue Len: > 64 Queue Size: 16384 │ > ││ │ > │ > ││ │ Current: > │ > ││ │ > │ > ││ │ > Rate : 0 Rate Avg : 0 │ > ││ > │ Pkt/s : 0 Pkt/s Avg : 0 │ > ││ > │ Queue Len: 0.00% Queue Size: 0.00% │ > ││ > │ Bursts : 0 Drops : 0 > │ ││ > │ > │ ││ > │ > │ > ││ │ Press any key > to quit... │ > ││ > └─────────────────────────────────────────────────────┘ > > > > this is a output of iptables -L -n -v > linux:~ # iptables -L -v -n > Chain INPUT (policy ACCEPT 185 packets, 49326 bytes) > pkts bytes target prot opt in out source destination > 8484 3253K bwmd all -- * * 0.0.0.0/0 0.0.0.0/0 > > Chain FORWARD (policy ACCEPT 0 packets, 0 bytes) > pkts bytes target prot opt in out source destination > 5 310 bwmd all -- * * 0.0.0.0/0 0.0.0.0/0 > > Chain OUTPUT (policy ACCEPT 8732 packets, 3148K bytes) > pkts bytes target prot opt in out source destination > > Chain bwmd (2 references) > pkts bytes target prot opt in out source destination > 5 310 QUEUE all -- * * 0.0.0.0/0 > 0.0.0.0/0 MARK match !0x0 > 8483 3253K ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 > linux:~ # > > and this is a output of iptables -L -n -v -t mangle > linux:~ # iptables -L -v -n -t mangle > Chain PREROUTING (policy ACCEPT 10069 packets, 3604K bytes) > pkts bytes target prot opt in out source destination > > Chain INPUT (policy ACCEPT 9160 packets, 3494K bytes) > pkts bytes target prot opt in out source destination > > Chain FORWARD (policy ACCEPT 5 packets, 310 bytes) > pkts bytes target prot opt in out source destination > 0 0 MARK tcp -- * * 192.168.0.1 > 0.0.0.0/0 MARK set 0x3e9 > 5 310 MARK udp -- * * 192.168.0.1 > 0.0.0.0/0 MARK set 0x3e9 > 0 0 MARK tcp -- * * 192.168.0.2 > 0.0.0.0/0 MARK set 0x3ea > 0 0 MARK udp -- * * 192.168.0.2 > 0.0.0.0/0 MARK set 0x3ea > > Chain OUTPUT (policy ACCEPT 9253 packets, 3338K bytes) > pkts bytes target prot opt in out source destination > > Chain POSTROUTING (policy ACCEPT 9258 packets, 3338K bytes) > pkts bytes target prot opt in out source destination > > Chain bwmd (0 references) > pkts bytes target prot opt in out source destination > 0 0 QUEUE all -- * * 0.0.0.0/0 > 0.0.0.0/0 MARK match !0x0 > 0 0 ACCEPT all -- * * 0.0.0.0/0 0.0.0.0/0 > linux:~ # > > You can see in mangle table's bwmd chain, the counter is not going up > where as the bwmd chain of filter chain is happening something. Please > see and suggest me where i'm making mistakes > > With thanks & regards > > Rajveer Singh > > On Sun, 26 Feb 2006 Kobe Lenjou wrote : > >Did you check the good working with 'bwm_monitor' and is the bwmd > deamon running? > > > >Also, try iptables -L -n -v to see any counters going up > > > >Greetz > >Kobe > > > >rajveer singh wrote: > >> > >> Hi all, > >> > >>Thanks Mr. Kobe for providing steps it helps me a lot. but i goes to > monitor there nothing is happening. > >>my /etc/bwm_tools/firewall's contents are as below > >> > >> # Global configuration and access classes > >> > >> > >> > >> <global> > >><modules> > >> <load name="ip_queue"/> > >></modules> > >> <class name="out_machine1"> > >><address name="out_machine1_tcp" proto="tcp" src="192.168.0.1"/> > >><address name="out_machine1_udp" proto="udp" src="192.168.0.1"/> > >></class> > >> > >> <class name="out_machine2"> > >><address name="out_machine2_tcp" proto="tcp" src="192.168.0.2"/> > >><address name="out_machine2_udp" proto="udp" src="192.168.0.2"/> > >></class> > >> > >></global> > >> > >> > >> # Access control lists > >> # Network address translation > >> # Traffic flows > >> > >> <traffic> > >> > >> # Rate can be specified in either IN, OUT or TOTAL (rate-total) > >> # If rate-total == 0, no rate limits > >> > >> > >><flow name="main_line" stats-len="5" queue-size="262144" > queue-len="400" max-rate="64000" burst-rate="65000" report-timeout="60"> > >> <flow name="flow_machine1" max-rate="16000" > burst-rate="32000" queue-size="16384" report-timeout="60"> > >> <queue prio="99" nfmark="1001"> > >> out_machine1; > >> </queue> > >> </flow> > >> <flow name="flow_machine2" max-rate="16000" > burst-rate="32000" queue-size="16384" report-timeout="60"> > >> <queue prio="99" nfmark="1002"> > >> out_machine2; > >> </queue> > >> </flow> > >></flow> > >></traffic> > >></firewall> > >> > >>and my contents of /etc/sysconfig/iptables are as below: > >> > >># Generated using BWM Firewall v0.2.2: Sat Feb 25 18:06:44 2006 > >> > >>*mangle > >>:OUTPUT ACCEPT > >>:INPUT ACCEPT > >>:FORWARD ACCEPT > >>-A FORWARD --source 192.168.0.1 --protocol tcp -j MARK --set-mark 1001 > >>-A FORWARD --source 192.168.0.1 --protocol udp -j MARK --set-mark 1001 > >>-A FORWARD --source 192.168.0.2 --protocol tcp -j MARK --set-mark 1002 > >>-A FORWARD --source 192.168.0.2 --protocol udp -j MARK --set-mark 1002 > >>COMMIT > >>*filter > >>:OUTPUT ACCEPT > >>:bwmd - > >>:INPUT ACCEPT > >>:FORWARD ACCEPT > >>-A bwmd -m mark ! --mark 0 -j QUEUE > >>COMMIT > >> > >>when i tried to create graph as per below > >>linux:~ # bwm_graph --flow="out_machine1 --start="2006/02/25 18:28" > --end="2006/02/25 18:30" output=/etc/file1 > >> > > >> > > >> > > >> > > >> > > >> > > >>nothing happen > >> > >>I'm thinking it's some problem in my firewall setup. I tried to > recognise it. but unable to find it. > >> > >> > >> > > > > <http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3> |
From: Kobe L. <ko...@mo...> - 2006-02-24 19:40:23
|
Steps are easy. First you have to 'mark' you traffic in the <global> section, you need to mark each and every packet you want to shape zo in your case this would be something like: <class name="out_machine1"> <adress name="out_machine1_tcp" src-iface="eth0" proto="tcp" src="192.168.0.1" dst="!192.168.0.0/24"> <adress name="out_machine1_udp" src-iface="eth0" proto="udp" src="192.168.0.1" dst="!192.168.0.0/24"> </class> <class name="out_machine2"> ... same thing for the other IP </class> Then you need to 'limit' each 'flow' in the <traffic> section; something like this <flow name="flow_machine1" max-rate="16000" burst-rate="32000" queue-size="16384" report-timeout="60"> <queue prio="99" nfmark="1001"> out_machine1; </queue> </flow> <flow name="flow_machine2" max-rate="16000" burst-rate="32000" queue-size="16384" report-timeout="60"> <queue prio="99" nfmark="1002"> out_machine1; </queue> </flow> This limiets each host to an upstream speed op 16k with burst to 32k. Greetz Kobe rajveer singh wrote: > > > Mr. Larry Smith, > > I'm really so happy by seeing ur reply so quickly. Thanks u so much. > both of the errors have been resolved. Further i need ur help as > /etc/bwm_tools/firewall.xml file is mistry for me. So i want some > comments as per mine scenario as bwlow please:- > > > I've two NIC CARDS installed on my system as below > eth0:- 192.168.0.11 (local lan interface) > eth1:- 172.16.0.73 ( Internet interface) > > on my lan there are two ohter windows machines are connected. their > IPs are 192.168.0.2,192.168.0.1 respectively. > > on my eth1 interface cable connection is connected which speed is 64kbps. > now i want to shape my traffice as below:- > > 32kbps for my machine that is working as firewall/gateway/proxy. > > 16 kbps to 192.168.0.1 > and 16 kbps to 192.168.0.2 > > that's it. > > now somebody, please give step by step instruction, so that, i can do > it.I appreciate if any help can be provided. I will be able to > understand it's working concepts then i will be able to paly with this > bwm-tools. Please also provide instruction to display graphs and > monitor bandwidth uses. > > > thanks for ur kind consideration. > > > > > > > On Fri, 24 Feb 2006 Larry Smith wrote : > >On Friday 24 February 2006 06:47, rajveer singh wrote: > > > Hello guys, > > > > > > when i tried to run #bwmd --foreground command. it's shows some > error as > > > below.. Please guide me why r these problems and how to shor out. > > > > > > linux:~ # bwmd --foreground > > > BWM Daemon v0.2.2 - Copyright (c) 2003-2005 Linux Based Systems Design > > > > > > BWMD: Loaded 9 flows and 8 queues > > > BWMD: Found 0 modules to load > > > IPQ runner started... > > > Received error message: IPQ = Unknown error, SYSTEM = Success > > > Flow runner started... > > > flowControl: Error binding to socket: Address already in use > > > Report runner started... > > > Creating report file /var/bwm_tools/out_dsl.dat > > > Stat error on "/var/bwm_tools/out_dsl.dat": No such file or directory > > > Creating report file /var/bwm_tools/out_jane.dat > > > Stat error on "/var/bwm_tools/out_jane.dat": No such file or directory > > > Creating report file /var/bwm_tools/out_niels.dat > > > Stat error on "/var/bwm_tools/out_niels.dat": No such file or > directory > > > Creating report file /var/bwm_tools/out_kobe.dat > > > Stat error on "/var/bwm_tools/out_kobe.dat": No such file or directory > > > Creating report file /var/bwm_tools/out_ron.dat > > > Stat error on "/var/bwm_tools/out_ron.dat": No such file or directory > > > Creating report file /var/bwm_tools/out_hendrik.dat > > > Stat error on "/var/bwm_tools/out_hendrik.dat": No such file or > directory > > > Creating report file /var/bwm_tools/out_icarus.dat > > > Stat error on "/var/bwm_tools/out_icarus.dat": No such file or > directory > > > Creating report file /var/bwm_tools/out_xabbu.dat > > > Stat error on "/var/bwm_tools/out_xabbu.dat": No such file or > directory > > > Creating report file /var/bwm_tools/out_other.dat > > > Stat error on "/var/bwm_tools/out_other.dat": No such file or > directory > > > > > > >Rajveer, > > > > > BWMD: Found 0 modules to load > > > >Looks like two errors. First is that it found no modules to load. > Believe > >you require at least "ip_queue". Mine looks like this: > > > > <modules> > > <load name="ip_queue"/> > > </modules> > > > >in the <global> section of your firewall.xml > > > >The second error is that BWM defaults to using /var/bwm_tools > directory for > >its logging/data files. This directory _must_ exist before you start > bwmd. > >It can create the flow files as necessary, but cannot create the > directory. > > > >Try "mkdir /var/bwm_tools" and it should fix the second error. > > > >-- > >Larry Smith > >SysAd ECSIS.NET > >sy...@ec... > > > > > > > > > >------------------------------------------------------- > >This SF.Net email is sponsored by xPML, a groundbreaking scripting > language > >that extends applications into web and mobile media. Attend the live > webcast > >and join the prime developer group breaking into this new coding > territory! > >http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 > >_______________________________________________ > >bwm-tools-tech mailing list > >bwm...@li... > >https://lists.sourceforge.net/lists/listinfo/bwm-tools-tech > > > > <http://adworks.rediff.com/cgi-bin/AdWorks/sigclick.cgi/www.rediff.com/signature-home.htm/1507191490@Middle5?PARTNER=3> |