Hi there Please be patient - I''m a newbie at this. Have an internet connection on eth0 - 64K so eth0 = 216.139.165.7 and eth1 = 192.168.0.1 have 4 pcs connected to a hub on eth1 the pc''s are 192.168.0.11 and 22 and 33 and 44 I want to allocate 4kb to 192.168.0.11 and 4kb to 192.168.0.22 and 8kb to 192.168.0.33 and 32kb to 192.168.0.44 so this is a total of 48kb and the rest is used on the server 10.0.0.80 Also - want to make sure that 192.168.0.11 never takes more than 4kb at any time. No fancy stuff like separating http and smtp and things. What''s the simple most elegant way of doing this on eth1. -- Warm regards Carl DAANET 9 Pelewura Crescent, Apapa, Lagos, Nigeria T - +234-1-587-8247 F - +234-1-587-8210 M - +234-803-465-4689 "There are two major products that came out of Berkeley: LSD and Unix. We don''t believe this to be a coincidence." - Jeremy S. Anderson
On Wed, 6 Mar 2002, Greg Scott wrote:> How can your internal server be 10.0.0.80 when the rest of your > internal LAN is 192.168.0.nnn? > - Greg > (Hoping I didn''t put my foot in my mouth again)> so this is a total of 48kb and the rest is used on the server 10.0.0.80/me nobraining ^^^^^^^^^ Yipes sorry - you''re right - I meant 192.168.0.1 (it''s 3am and i''m only knitting with one needle) :) So please be nice :) Warm regards DAANET 9 Pelewura Crescent, Apapa, Lagos, Nigeria T - +234-1-587-8247 F - +234-1-587-8210 M - +234-803-465-4689 "There are two major products that came out of Berkeley: LSD and Unix. We don''t believe this to be a coincidence." - Jeremy S. Anderson
How can your internal server be 10.0.0.80 when the rest of your internal LAN is 192.168.0.nnn? - Greg (Hoping I didn''t put my foot in my mouth again) -----Original Message----- From: Carl Spies [mailto:carl@daanet.com] Sent: Wednesday, March 06, 2002 7:08 PM To: lartc@mailman.ds9a.nl Subject: [LARTC] Simple Beginner Question - allocating 64k Hi there Please be patient - I''m a newbie at this. Have an internet connection on eth0 - 64K so eth0 = 216.139.165.7 and eth1 = 192.168.0.1 have 4 pcs connected to a hub on eth1 the pc''s are 192.168.0.11 and 22 and 33 and 44 I want to allocate 4kb to 192.168.0.11 and 4kb to 192.168.0.22 and 8kb to 192.168.0.33 and 32kb to 192.168.0.44 so this is a total of 48kb and the rest is used on the server 10.0.0.80 Also - want to make sure that 192.168.0.11 never takes more than 4kb at any time. No fancy stuff like separating http and smtp and things. What''s the simple most elegant way of doing this on eth1. -- Warm regards Carl DAANET 9 Pelewura Crescent, Apapa, Lagos, Nigeria T - +234-1-587-8247 F - +234-1-587-8210 M - +234-803-465-4689 "There are two major products that came out of Berkeley: LSD and Unix. We don''t believe this to be a coincidence." - Jeremy S. Anderson _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
> Have an internet connection on eth0 - 64K > so eth0 = 216.139.165.7 > and eth1 = 192.168.0.1 > > have 4 pcs connected to a hub on eth1 > the pc''s are 192.168.0.11 and 22 and 33 and 44 > > I want to allocate 4kb to 192.168.0.11 > and 4kb to 192.168.0.22 > and 8kb to 192.168.0.33 > and 32kb to 192.168.0.44 > > so this is a total of 48kb and the rest is used on the server 10.0.0.80 > > Also - want to make sure that 192.168.0.11 never takes more than 4kb at > any time. > > No fancy stuff like separating http and smtp and things. > > What''s the simple most elegant way of doing this on eth1.Create a HTB qdisc, add a ceiled class of 64K, add 5 classes with the appropriated rate (4 for the LAN''s : 4,4,8,32 kb and 1 for the server 16kb) with ceil = 64kb. But ceil 192.68.0.11 to 4kbit. Mark the packets on eht1 for all ip''s with a different mark and use the fw filter on eth0 to put the traffic in the right class. You can do the same with CBQ of you want. You need to patch the kernel before you can use the HTB qdisc. Stef -- stef.coene@docum.org More QOS info : http://www.docum.org/ Title : "Using Linux as bandwidth manager"
Carl Spies wrote: >>have 4 pcs connected to a hub on eth1 >the pc''s are 192.168.0.11 and 22 and 33 and 44 > >I want to allocate 4kb to 192.168.0.11 > and 4kb to 192.168.0.22 > and 8kb to 192.168.0.33 > and 32kb to 192.168.0.44 > >so this is a total of 48kb and the rest is used on the server 10.0.0.80 > >Also - want to make sure that 192.168.0.11 never takes more than 4kb at >any time. > >No fancy stuff like separating http and smtp and things. > >What''s the simple most elegant way of doing this on eth1. > Here is an addapt of my script but you''ll have to compile htb into the kernel and iproute2; see also http://luxik.cdi.cz/~devik/qos/htb/htbman.htm qdisc->class_limit_48---class 1 4 Kb -> qdisc sfq \_class 2 4 Kb -> qdisc sfq \_class 3 8 Kb -> qdisc sfq \_class 4 32 Kb -> qdisc sfq ... tc filter to put IP in classes. It should go like this: tc qdisc add dev eth1 root handle 1: htb default 10 tc class add dev eth1 parent 1: classid 1:1 htb rate 48kbit ceil 48kbit burst 1k tc class add dev eth1 parent 1:1 classid 1:10 htb rate 4kbit ceil 48kbit burst 1k tc class add dev eth1 parent 1:1 classid 1:11 htb rate 4kbit ceil 48kbit burst 1k tc class add dev eth1 parent 1:1 classid 1:12 htb rate 8kbit ceil 48kbit burst 1k tc class add dev eth1 parent 1:1 classid 1:14 htb rate 32kbit ceil 48kbit burst 1k tc qdisc add dev eth1 parent 1:10 handle 20: sfq perturb 10 tc qdisc add dev eth1 parent 1:11 handle 30: sfq perturb 10 tc qdisc add dev eth1 parent 1:12 handle 40: sfq perturb 10 tc qdisc add dev eth1 parent 1:14 handle 50: sfq perturb 10 tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.11 flowid 1:10 tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.22 flowid 1:11 tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.33 flowid 1:12 tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst 192.168.0.44 flowid 1:13