[LARTC] Network shaper for gateway with massive p2p traffic
Hi, I have made this script, that I use for controlling the bandwidth on a gateway for about 100 computers. It is working quite effectively to limit the use of p2p programs (and other programs), so that you can surf undisturbed. Also, it improves internet access in general, so that one large download doesn't take up all your bandwidth. I was wondering if someone would like to test it, and give me their opinion about it. Maybe what I should improve. The link is http://p2pshaper.sourceforge.net cheers, Nikolaj Fogh ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] tables and default
I already setup several 2 gateways boxes, with rules too decide which lan should use which gateway. Now I'm stuck with a simpler problem. At home I was just making some experimental setup: * 1 adsl (ppp0) * 1 more tables in rt_tables (200 ping) called bluff * table 'bluff *has not* a default route [EMAIL PROTECTED] root # ip ro li table bluff 192.168.5.0/24 dev eth1 scope link * ip rule add from 192.168.5.2 table bluff prio 50 [EMAIL PROTECTED] root # ip ru li 0: from all lookup local 50: from 192.168.5.0/24 lookup bluff 32766: from all lookup main 32767: from all lookup default Now I would think that pinging from 192.168.5.2 outside the LAN should not work and in fact: [EMAIL PROTECTED] root # ip ro get 62.207.143.51 from 192.168.5.2 RTNETLINK answers: Invalid argument but if I try I can flawlessly get out. Is this related to SNAT? In my opinion that should come afterwords since SNAT in in the POSTrouting chain. Any hints? TYA sandro *:-) -- Sandro Dentella *:-) e-mail: [EMAIL PROTECTED] http://www.tksql.orgTkSQL Home page - My GPL work ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] help on ADSL shaping
Hi I have read the howto on qdisc's a few times but I cant figure out how to use the shaping capabilities to serve my needs. In the village whera I live we have created a wireless local network consisting of 10 houses. One of these houses has an ADSL connection and services this connection to the other houses. To gain access to the network a member must have an accesspoint in client mode, the idea is that if each house has to use a certain accesspoint (with a specific known ip address) to access the router then it must be possible to shape the traffic so no single house can dominate the out (and thus the incomming) traffic. The configuration: House with ADSL:A client house: ((o)) ((0)) | |(Known ip) eth0 | | |Linux router|---| AP | | AP |---| router | | SuSE 8.2 | | | | ---- eth1 || PC 1 | | PC 2 | | ---- __--__--__ | Internet | -- One house might need to connect 1 PC another house 3, but I need to be sure that one house doesn't swallow the whole bandwidth. Is this possible? Best Regards Jakob Simon-Gaarde ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] help on ADSL shaping
[EMAIL PROTECTED] wrote: Hi I have read the howto on qdisc's a few times but I cant figure out how to use the shaping capabilities to serve my needs. In the village whera I live we have created a wireless local network consisting of 10 houses. One of these houses has an ADSL connection and services this connection to the other houses. To gain access to the network a member must have an accesspoint in client mode, the idea is that if each house has to use a certain accesspoint (with a specific known ip address) to access the router then it must be possible to shape the traffic so no single house can dominate the out (and thus the incomming) traffic. The configuration: House with ADSL:A client house: ((o)) ((0)) | |(Known ip) eth0 | | |Linux router|---| AP | | AP |---| router | | SuSE 8.2 | | | | ---- eth1 || PC 1 | | PC 2 | | ---- __--__--__ | Internet | -- One house might need to connect 1 PC another house 3, but I need to be sure that one house doesn't swallow the whole bandwidth. Is this possible? Best Regards Jakob Simon-Gaarde ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/ Hi, You can use the tc program, and htb qdiscs to ensure that people are guaranteed some bandwidth, so that one host cannot dominate the network.As it is the Internet link that is the weak point, you need to shape at the gateway. I am currently working on a script that deals out the bandwidth evenly amongst hosts, so that when only one host uses the link, it gets full speed, but if two are on it is 50/50, and so on. I hope to have it finished in a month or so. Maybe you can use that Also, if it is p2p traffic you are worried about, you could try the p2pshaper. I posted a link in a earlier post. cheers Nikolaj Fogh ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] Urgen Help:Kernel crashed in HTB.
HiAll I patched htb3.6 to mips liunx 2.4.17.But when I run htb,the mips linux box will say: Unhandled kernel unaligned access in unaligned.c:emulate_load_store_insn, line 346.Then the kernel crashed . Would anyone like to tell me how to solve this problem?Thank you very much! Best Regards swcims [EMAIL PROTECTED] 2004-08-02
Re: [LARTC] tables and default
Hello Sandro, : * 1 adsl (ppp0) : * 1 more tables in rt_tables (200 ping) called bluff All OK! : * table 'bluff *has not* a default route This is the problem. :[EMAIL PROTECTED] root # ip ro li table bluff :192.168.5.0/24 dev eth1 scope link : : * ip rule add from 192.168.5.2 table bluff prio 50 : :[EMAIL PROTECTED] root # ip ru li :0: from all lookup local :50: from 192.168.5.0/24 lookup bluff :32766: from all lookup main :32767: from all lookup default : : Now I would think that pinging from 192.168.5.2 outside the LAN : should not work and in fact: : : [EMAIL PROTECTED] root # ip ro get 62.207.143.51 from 192.168.5.2 : RTNETLINK answers: Invalid argument : : but if I try I can flawlessly get out. First thing--I don't know why you are seeing this error from 'ip route get'. This should return the real route chosen. You could always try the ping and then check the route cache. This should help you identify the actual route chosen. Here's what's happening. - kernel gets packet and needs to select a route - according to rule 0, we look up in table local - perform route lookup in table local--no match! - according to rule 50, we look up in table bluff - perform route lookup in table local--no match! - according to rule 32767, we look up in table main - perform route lookup in table main-- MATCH! - route packet out default gateway If you add a route to table bluff as follows, you should effectively prevent 192.168.5.0/24 from reaching any network other than 192.168.5.0/24. ip route add blackhole default table bluff Now, any packets addressed from 192.168.5.0/24 will be blackholed. This may not be quite what you desire, particularly if packets addressed from 192.168.5.0/24 are created by your own router, so you could always say: ip rule del prio 50 from 192.168.5.0/24 table bluff ip rule add prio 50 from 192.168.5.0/24 iif eth1 table bluff Then again, you don't describe your network completely, so I could be steering you wrong here. And by the way, unless you have some very strange (but not inconceivable) routes on your hosts inside the 192.168.5.0/24 network, you won't need to specify the route 192.168.5.0/24 dev eth1 scope link in table bluff. : Is this related to SNAT? In my opinion that should come : afterwords since SNAT in in the POSTrouting chain. Nope! No SNAT problem here! -Martin -- Martin A. Brown --- SecurePipe, Inc. --- [EMAIL PROTECTED] ___ LARTC mailing list / [EMAIL PROTECTED] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/