hi all in this schema in what device i should implement shapping (htb) ISP-----eth0 -eth1----LAN eth0 or eth1 cheers .:NewBie:. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> in this schema in what device i should implement shapping (htb) > > ISP-----eth0 -eth1----LANIf you implement your shaping/scheduling on eth1, then your LAN will be affected, but not the Linux box itself. If you want your gateway to be affected too, then put it on eth0. Furthermore, if one day you choose to add another LAN on eth2, shapping will also work for the latter without any additional configuration. Regards, -- Jeremie LE HEN aka TtZ/TataZ jeremie.le-hen@epita.fr ttz@epita.fr Hi! I''m a .signature virus! Copy me into your ~/.signature to help me spread! _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
thanks eth1 i guess..can I do shapping/scheduling on my LAN based on subnet ?. |--subnet 10kbit ISP---eth0-eth1---LAN---subnet 20kbit |--subnet 15kbit can htb or any tc do that for me..and how can i know my actual ceiling b/w traffic at eth1, so i can set it ass parent ? i have a 10/100 ethernet. cheers .:NewBie:. jeremie le-hen wrote:>>in this schema in what device i should implement shapping (htb) >> >>ISP-----eth0 -eth1----LAN >> >> > >If you implement your shaping/scheduling on eth1, then your LAN will >be affected, but not the Linux box itself. If you want your gateway >to be affected too, then put it on eth0. Furthermore, if one day you >choose to add another LAN on eth2, shapping will also work for the >latter without any additional configuration. > >Regards, > >_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
hi All. this my script for shapping with htb, to shapping my network subnet ISP--eth--eth1---lan with 4 subnet cat /etc/shorewall/tcstart #!/bin/bash /sbin/tc qdisc add dev eth1 root handle 1: htb default 20 /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 2mbit ceil 2mbit /sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 512kbps ceil 2mbit /sbin/tc class add dev eth1 parent 1:1 classid 1:11 htb rate 512kbps ceil 2mbit /sbin/tc class add dev eth1 parent 1:1 classid 1:12 htb rate 512kbps ceil 2mbit /sbin/tc class add dev eth1 parent 1:1 classid 1:13 htb rate 512kbps ceil 2mbit /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip dst 172.16.0.0/24 flowid 1:10 /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip dst 172.16.32.0/24 flowid 1:11 /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip dst 172.16.64.0/24 flowid 1:12 /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip dst 172.16.128.0/24 flowid 1:13 /sbin/tc qdisc sh qdisc htb 1: dev eth1 r2q 10 default 20 direct_packets_stat 0 when i test with iperf from 172.16.0.227 /usr/local/bin/iperf -c 172.16.0.226 ------------------------------------------------------------ Client connecting to 172.16.0.226, TCP port 5001 TCP window size: 32.5 KByte (default) ------------------------------------------------------------ [ 5] local 172.16.0.228 port 49192 connected with 172.16.0.226 port 5001 [ ID] Interval Transfer Bandwidth [ 5] 0.0-10.0 sec 111 MBytes 92.8 Mbits/sec i dont see bandwith limited that i excpected... did my step correct..or i did something stupid..(again) cheers .:NeWBie:. _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Monday 13 October 2003 13:38, Muhammad Reza wrote:> hi All. > this my script for shapping with htb, to shapping my network subnet > > ISP--eth--eth1---lan with 4 subnet > > cat /etc/shorewall/tcstart > #!/bin/bash > /sbin/tc qdisc add dev eth1 root handle 1: htb default 20 > /sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 2mbit ceil 2mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 512kbps > ceil 2mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:11 htb rate 512kbps > ceil 2mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:12 htb rate 512kbps > ceil 2mbit > /sbin/tc class add dev eth1 parent 1:1 classid 1:13 htb rate 512kbps > ceil 2mbit > /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip > dst 172.16.0.0/24 flowid 1:10 > /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip > dst 172.16.32.0/24 flowid 1:11 > /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip > dst 172.16.64.0/24 flowid 1:12 > /sbin/tc filter add dev eth1 protocol ip parent 1: prio 1 u32 match ip > dst 172.16.128.0/24 flowid 1:13 > > > /sbin/tc qdisc sh > qdisc htb 1: dev eth1 r2q 10 default 20 direct_packets_stat 0 > > when i test with iperf from 172.16.0.227 /usr/local/bin/iperf -c > 172.16.0.226 > ------------------------------------------------------------ > Client connecting to 172.16.0.226, TCP port 5001 > TCP window size: 32.5 KByte (default) > ------------------------------------------------------------ > [ 5] local 172.16.0.228 port 49192 connected with 172.16.0.226 port 5001 > [ ID] Interval Transfer Bandwidth > [ 5] 0.0-10.0 sec 111 MBytes 92.8 Mbits/sec > > i dont see bandwith limited that i excpected... > did my step correct..or i did something stupid..(again)You are mixing bytes and bites. 512kbps is 512kiobyte/s and 2mbit is 2megabit/s. So 512kbps = 512 * 8 = 4mbit/s. It''s still not 92.8 Mbit/sec. Can you also post the output of tc -s -d class show dev eth0 For more info about htb and the tests I did, see www.docum.org. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/