[LARTC] telnet on demand

2002-12-18 Thread it eintz
Hello,
Hopefully this subject is under the scope of this mailing list.
I have the following arrangement:
[Windows] --- [Linux] ---[Router]---[Modem]---[DOS]
The windows is running PCanywhere and so does the DOS
I can telnet into the router and make it dial the modem into the DOS
The windows needs to use telnet to access the DOS.
The question is, How do i make the linux accept a telnet session and when it connects automatically telnet itself into the Router and dial the modem to transfer the content of that telnet session into its session with the Windows.
making the router dial and connect is easy, but i have no idea how to inject lines to one telnet session and then transfer it into another telnet session.
 
Thank you.Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now

Re: [LARTC] PRIO type qdisc

2002-12-18 Thread Paul C. Diem
On Wed, 18 Dec 2002, Hayden Myers wrote:

> > > > I'm looking for a PRIO type qdisc which will prioritize packets (either
> > > > based on DS or filters). Unlike PRIO, I need all the classes to flow into
> > > > a single qdisc (HTB). For example:
> > > >
> > > >  PRIO
> > > >
> > > >   +++
> > > >
> > > > Band0Band1Band2
> > > >
> > > >   +++
> > > >
> > > >   HTB
> > > >
> > > > Does such a qdisc exist or is there a way to get all the PRIO classes to
> > > > flow into a single qdisc?
> > > There is no such qdisc.  And I don't think there is such way.
> > >
> > > But why do you want to do this?
> >
> I had wanted to do similar things a while back before 10 other things beat
> me over the head and set me back.  It's funny because the above topology
> is exactly what I had envisioned but read that it was impossible.  My
> setup is to have a number of users who have bandwidth limiting based on an
> ip but also does priority shaping as well.  I finally decided that I could
> have a top level htb qdisc for the total box bandwidth with seperate
> classes for the users below the box bandwidth qdisc.  Underneath each
> user's class I thought that I could possibly attach a prio qdisc to do
> independent priority scheduling.  I don't know if this works.  It was just
> a thought I had.  If think the manpage shows that you can attach a prio
> to any class.  Does this work and is it a feasable setup?

Right now we have one htb qdisc at the root and a class under it for each
user. We could put a prio qdisc at the root and use htb under each of
prio's band classes. This gets ridiculously complex though as you get more
link levels. I'd really like to be able to priorize the packets at each
node though so that higher priority packets take precendence at each link
(not just at the main link).

Paul C. Diem
[EMAIL PROTECTED]

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] PRIO type qdisc

2002-12-18 Thread Hayden Myers


Hayden Myers
Support Manager
Skyline Network Technologies
[EMAIL PROTECTED]
(410)583-1337 option 2


> > > I'm looking for a PRIO type qdisc which will prioritize packets (either
> > > based on DS or filters). Unlike PRIO, I need all the classes to flow into
> > > a single qdisc (HTB). For example:
> > >
> > >  PRIO
> > >
> > >   +++
> > >
> > > Band0Band1Band2
> > >
> > >   +++
> > >
> > >   HTB
> > >
> > > Does such a qdisc exist or is there a way to get all the PRIO classes to
> > > flow into a single qdisc?
> > There is no such qdisc.  And I don't think there is such way.
> >
> > But why do you want to do this?
> 
I had wanted to do similar things a while back before 10 other things beat
me over the head and set me back.  It's funny because the above topology
is exactly what I had envisioned but read that it was impossible.  My
setup is to have a number of users who have bandwidth limiting based on an
ip but also does priority shaping as well.  I finally decided that I could
have a top level htb qdisc for the total box bandwidth with seperate
classes for the users below the box bandwidth qdisc.  Underneath each
user's class I thought that I could possibly attach a prio qdisc to do
independent priority scheduling.  I don't know if this works.  It was just
a thought I had.  If think the manpage shows that you can attach a prio
to any class.  Does this work and is it a feasable setup?

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] PRIO type qdisc

2002-12-18 Thread Paul C. Diem
On Wed, 18 Dec 2002, Stef Coene wrote:

> On Tuesday 17 December 2002 07:05, Paul C. Diem wrote:
> > I'm looking for a PRIO type qdisc which will prioritize packets (either
> > based on DS or filters). Unlike PRIO, I need all the classes to flow into
> > a single qdisc (HTB). For example:
> >
> >  PRIO
> >
> >   +++
> >
> > Band0Band1Band2
> >
> >   +++
> >
> >   HTB
> >
> > Does such a qdisc exist or is there a way to get all the PRIO classes to
> > flow into a single qdisc?
> There is no such qdisc.  And I don't think there is such way.
>
> But why do you want to do this?

Here's what I'm really trying to accomplish: I have several links of
various speeds. Some of the links feed from other links. For example,

   +---> B +---> E
   |   |
A <---< 10Mbps >---+---> C <---< 6Mbps >---+---> F <---< 6Mbps >---> H
   |
   +---> D <---< 3Mbps >---> G


ie. I have a 10Mbps link from A which feeds B, C and D, a 6Mbps link from
C which feeds E and F, a 6Mbps link from F which feeds H and a 3Mbps link
from D which feeds G. I need to provide multiple levels of service (based
on maximum bandwidth and packet priority) at each node. What I'd like to
do it use htb to cap the bandwidth and some sort of prio qdisc to
prioritize packets. The problem with prio is that I'd need to define the
entire remaining "link tree" for each band at each level. It seems I need
a qdisc which will prioritize packets based on some mark (ie. DS) but only
had one class (instead of as many classes at there are bands like prio).

It looks like gred may do something like this but I can't find any
detailed information on gred. If I'm going about this all wrong, please
let me know.

Paul C. Diem
[EMAIL PROTECTED]

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] WonderShaper on LAN link kills to-host speed

2002-12-18 Thread Kenneth Porter
--On Wednesday, December 18, 2002 10:53 PM +0100 Jose Luis Domingo Lopez
<[EMAIL PROTECTED]> wrote:

> As far as I know, inbound traffic (ingress) can only police packets,
> that is, discard traffic on excess hoping the other end will notice it
> and slow down a bit. If you want to classify incoming traffic

I don't know that I even need the policing function, esp. for LAN traffic
that is only queued at the original sender and in switches. (About 150
clients on a mixed 100/1000 Mbps LAN.) I was just surprised that it killed
traffic so badly. Perhaps I need to read up more on exactly what it's doing.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] WonderShaper on LAN link kills to-host speed

2002-12-18 Thread Kenneth Porter
--On Wednesday, December 18, 2002 10:43 PM +0100 Stef Coene
<[EMAIL PROTECTED]> wrote:

> I'm not sure, but the policer can calculate the rate in the class in 2
> ways.   And maybe your CPU can't handle the calculations.  What CPU do
> you have and  what's the load on the sstem?

It's a P2-233 with 128 MB memory (Dell PowerEdge 4200). It's a bit
memory-starved but otherwise seems to handle the load. It plays router,
mail server, DNS, and file server. (Long-term plan is to offload
non-gateway functions, once another box is freed up.)

What are the "2 ways"? A pointer to source code would be fine, I just need
to know where to start looking.
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] WonderShaper on LAN link kills to-host speed

2002-12-18 Thread Jose Luis Domingo Lopez
On Tuesday, 17 December 2002, at 14:15:39 -0800,
Kenneth Porter wrote:

> What about the ingress policer would do that?
> 
As far as I know, inbound traffic (ingress) can only police packets,
that is, discard traffic on excess hoping the other end will notice it
and slow down a bit. If you want to classify incoming traffic, create
classes, attach queuing disciplines, and those nice things available in
the outgoing traffic, you must:
a) Patch your kernel with IMQ, redirect incoming traffic to it, and
treat this device as you would any "outgoing" traffic, or...
b) ...manage bandwidth in the outgoing direction on the other network
card attached to the router (if this is a router).

I'm sure somebody in this list can explain himslef much better, and
provide links to information and example code, but hope it helps.

-- 
Jose Luis Domingo Lopez
Linux Registered User #189436 Debian Linux Woody (Linux 2.4.20-xfs)
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] HTB steals bandwidth

2002-12-18 Thread Stef Coene
On Monday 16 December 2002 18:02, Robert Brueckmann wrote:
> Hi!
>
> I just tested my HTB setup. But I have a problem. Let's assume I run the
> following script (even if it might do nothing useful, just for
> demonstrating my problem):
>
> #!/bin/bash
> /usr/sbin/tc qdisc add dev ppp0 root handle 1: htb default 12
> /usr/sbin/tc class add dev ppp0 parent 1: classid 1:1 htb rate 125kbit ceil
> 125kbit
> /usr/sbin/tc class add dev ppp0 parent 1:1 classid 1:14 htb rate 125kbit
> ceil 125kbit prio 0
> iptables -A POSTROUTING -t mangle -o ppp0 -p tcp --dport ftp-data -j
> MARK --set-mark 14
> tc filter add dev ppp0 parent 1:0 prio 0 protocol ip handle 14 fw flowid
> 1:14
>
> I have an adsl-connection (768kbit down/128kbit up), Linux kernel 2.4.20.
> The script should do nothing to an outgoing ftp-upload, since I grant all
> the available bandwith to it. No other traffic is happending during all
> that, only one ftp-upload from a computer inside the LAN. I start the
> upload without the rules above, and the upload is at a constant maximum of
> 128kbit/sec. After running the script above and waiting for say 5 seconds,
> the upload speed drops down to app. 80 kbit/s! After removing the rules
> above, the speed climbs up again to top speed.
Have you tried with other rates and ceil values?
And you defined a default class 12, but there is no such class.
Ftp-data can use dynamic ports.  So can you check that the iptables line with 
"--dport ftp-data"  is really catching the ftp packets??


Stef

-- 

[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
 http://www.docum.org/
 #lartc @ irc.oftc.net

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] PRIO type qdisc

2002-12-18 Thread Stef Coene
On Tuesday 17 December 2002 07:05, Paul C. Diem wrote:
> I'm looking for a PRIO type qdisc which will prioritize packets (either
> based on DS or filters). Unlike PRIO, I need all the classes to flow into
> a single qdisc (HTB). For example:
>
>  PRIO
>
>   +++
>
> Band0Band1Band2
>
>   +++
>
>   HTB
>
> Does such a qdisc exist or is there a way to get all the PRIO classes to
> flow into a single qdisc?
There is no such qdisc.  And I don't think there is such way.

But why do you want to do this?  

Stef

-- 

[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
 http://www.docum.org/
 #lartc @ irc.oftc.net

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] WonderShaper on LAN link kills to-host speed

2002-12-18 Thread Stef Coene
On Tuesday 17 December 2002 23:15, Kenneth Porter wrote:
> I tried installing the WonderShaper on my internal link, mostly to get the
> SFQ installed. I set uplink and downlink to 10 to match the link speed
> and changed the bandwidth on the cbq line to 100mbit. This killed transfer
> speed *to* the box, knocking it from 30-40 Mbps down to about 800 kbps.
> Commenting out just the ingress control restored the speed.
>
> What about the ingress policer would do that?
I'm not sure, but the policer can calculate the rate in the class in 2 ways.  
And maybe your CPU can't handle the calculations.  What CPU do you have and 
what's the load on the sstem?

> Here's the effective line after shell expansions:
>
> tc filter add dev eth0 parent : protocol ip prio 50 u32 match ip src \
> 0.0.0.0/0 police rate 10kbit burst 10k drop flowid :1

Stef

-- 

[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
 http://www.docum.org/
 #lartc @ irc.oftc.net

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] Traffic is exceeding limits

2002-12-18 Thread Stef Coene
On Wednesday 18 December 2002 13:23, Mindaugas Riauba wrote:
>   I'm trying to setup traffic shaping for a customer.
> Machine is RedHat 7.3 with kernel-smp-2.4.18-18.7.x.
> HZ=512.
>
>   But when I try to load link (using netcat and discard /
> chargen services) bytes count (tc -s qdisc show, sfq qdisc)
> goes quite well over 512kbit (~560kbit). With UDP I can
> even go over 1mbit.
I did the same.  I used ttcp and recorded the bandwidth I could use. But my 
results where nearly perfetc (I recorder the bandwidth on a very log period).  
Recently I tried it with upd data but I had some strange results.  1 UDP data 
stream was shaped perfectly, but 2 UPD data streams can use the full link 
bandwidth.  I still have to test ir further.

Stef


-- 

[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
 http://www.docum.org/
 #lartc @ irc.oftc.net

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] VoIP and CBQ

2002-12-18 Thread Stef Coene
On Wednesday 18 December 2002 21:51, James Ma wrote:
> Hi, All,
>
> I did some work on QoS with CBQ. Basically, I wanted to separate VoIP
> traffic from other traffics and give it guarantied bandwidth. I used the
> following scripts to do the work,
>
> #!/bin/sh
>
>
> OPTION="allot 1514 maxburst 20 avpkt 1000"
>
>
> tc qdisc del dev eth0 root
>
>
> tc qdisc add dev eth0 root handle 10: cbq bandwidth 10mbit avpkt 1000
>
> tc class add dev eth0 parent 10: classid 10:2 cbq bandwidth 10mbit rate
> 34kbit $OPTION prio 3 bounded
>
> tc class add dev eth0 parent 10:2 classid 10:10 cbq bandwidth 10mbit rate
> 30kbit $OPTION prio 3
>
> tc class add dev eth0 parent 10:2 classid 10:20 cbq bandwidth 10mbit rate
> 4kbit $OPTION prio3
>
> tc filter add dev eth0 parent 10: protocol ip prio 3 u32 match ip tos 0x20
> 0xf0 flowid 10:2
>
> tc filter add dev eth0 parent 10: protocol ip prio 3 u32 match ip dst 0/0
> flowid 10:2
>
> tc filter add dev eth0 parent 10:2 protocol ip prio 3 u32 match ip tos 0x20
> 0xf0 flowid 10:10
>
> tc filter add dev eth0 parent 10:2 protocol ip prio 3 u32 match ip dst 0/0
> flowid 10:20
>
>
>
>
> It seemed working -- when there was no VoIP traffic, a ftp link was using
> all 34kbit rate. When there was VoIP traffic, the ftp rate dropped to
> 17kbit (which was correct because the voice traffic was using 17kbit).
> Unfortunately, the voice quality was not good. Even if without ftp traffic,
> there were packets loss for voice traffic (if you count from 1 to 20 with
> one handset, you miss certain figures on the other end, they are 4, 5, 8,
> 9, 12, 13 etc). Any one had the same problem before? Any one can explain
> it? Any parameter I should adjust to better suit this application? 
What if you add a small prio qdisc to class 10:10 and 10:20 ??
tc qdisc add dev eth0 parent 10:10 pfifo limit 10
This is a short pfifo that can hold 10 packets.  

Stef

-- 

[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
 http://www.docum.org/
 #lartc @ irc.oftc.net

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



Re: [LARTC] Am I correct?

2002-12-18 Thread Stef Coene
On Wednesday 18 December 2002 22:12, [EMAIL PROTECTED] wrote:
> I've got some customers that have lots of bandwidth that are uploading and
> downloading files to our https:// help desk and are using up all of my T-1
> at times. This leaves other customers sucking wind. I've taken a look at
> the '15.10. Example of a full nat solution with QoS' section. Would it work
> for me if I change the section that says eth0 to my internet adapter
> Serial0? If I can do that, will that allow fair sharing between all my
> customers of the https:// help desk?
>
> My setup:
>
> //   /   ///
> https:// |-- |eth0 * Serial0 |-- |INET |
> //   /   ///
>
> My proposed script:
>
> CEIL=1020 # actual is 1024Kbit
> IFACE=Serial0
>
> tc qdisc add dev $IFACE root handle 1: htb default 15
> tc class add dev $IFACE parent 1: classid 1:1 htb rate ${CEIL}kbit ceil
> ${CEIL}kbit
> tc class add dev $IFACE parent 1:1 classid 1:10 htb rate 170kbit ceil
> 170kbit prio 0
> tc class add dev $IFACE parent 1:1 classid 1:11 htb rate 170kbit ceil
> ${CEIL}kbit prio 1
> tc class add dev $IFACE parent 1:1 classid 1:12 htb rate 170kbit ceil
> ${CEIL}kbit prio 2
> tc class add dev $IFACE parent 1:1 classid 1:13 htb rate 170kbit ceil
> ${CEIL}kbit prio 2
> tc class add dev $IFACE parent 1:1 classid 1:14 htb rate 170kbit ceil
> ${CEIL}kbit prio 3
> tc class add dev $IFACE parent 1:1 classid 1:15 htb rate 170kbit ceil
> ${CEIL}kbit prio 3
>
> tc qdisc add dev $IFACE parent 1:12 handle 120: sfq perturb 10
> tc qdisc add dev $IFACE parent 1:13 handle 130: sfq perturb 10
> tc qdisc add dev $IFACE parent 1:14 handle 140: sfq perturb 10
> tc qdisc add dev $IFACE parent 1:15 handle 150: sfq perturb 10
>
> tc filter add dev $IFACE parent 1:0 protocol ip prio 1 handle 1 fw classid
> 1:10
> tc filter add dev $IFACE parent 1:0 protocol ip prio 2 handle 2 fw classid
> 1:11
> tc filter add dev $IFACE parent 1:0 protocol ip prio 3 handle 3 fw classid
> 1:12
> tc filter add dev $IFACE parent 1:0 protocol ip prio 4 handle 4 fw classid
> 1:13
> tc filter add dev $IFACE parent 1:0 protocol ip prio 5 handle 5 fw classid
> 1:14
> tc filter add dev $IFACE parent 1:0 protocol ip prio 6 handle 6 fw classid
> 1:15
>
> iptables -t mangle -I PREROUTING -p icmp -j MARK --set-mark 0x1
> iptables -t mangle -I PREROUTING -p icmp -j RETURN
> iptables -t mangle -I PREROUTING -p tcp -m tcp --sport ssh -j
> MARK --set-mark 0x1
> iptables -t mangle -I PREROUTING -p tcp -m tcp --sport ssh -j RETURN
> iptables -t mangle -I PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK
> SYN -j MARK --set-mark 0x1
> iptables -t mangle -I PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK
> SYN -j RETURN
> iptables -t mangle -I PREROUTING -p tcp -m tcp --sport https -j
> MARK --set-mark 0x3
> iptables -t mangle -I PREROUTING -p tcp -m tcp --sport https -j RETURN
>
> iptables -t mangle -I PREROUTING -m tos --tos Minimize-Delay -j
> MARK --set-mark 0x1
> iptables -t mangle -I PREROUTING -m tos --tos Minimize-Delay -j RETURN
> iptables -t mangle -I PREROUTING -m tos --tos Minimize-Cost -j
> MARK --set-mark 0x5
> iptables -t mangle -I PREROUTING -m tos --tos Minimize-Cost -j RETURN
> iptables -t mangle -I PREROUTING -m tos --tos Maximize-Throughput -j
> MARK --set-mark 0x6
> iptables -t mangle -I PREROUTING -m tos --tos Maximize-Throughput -j RETURN
>
> Thanks in advance for any suggestions
I think this is a good script.  
But different prio's for filters are not usefull.  They only determine the 
order the filters are matched. And in your case, there is no specific order.  
In fact, if you add 1 fw filter with no handle parameter, the mark will be 
used as filter key.  So packets marked with 16 will end up in class 1:16.  I 
think this will save more CPU cycles.

Stef

-- 

[EMAIL PROTECTED]
 "Using Linux as bandwidth manager"
 http://www.docum.org/
 #lartc @ irc.oftc.net

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] Deleting a filter with tc makes traffic bypass all classes and theroot qdisc

2002-12-18 Thread Daniel Egger
Hija,

I've sort of an annoying problem:
I'm shaping traffic with HTB and have several leafs with a low
bandwitdh which are added and removed on demand (together with
the associated classes but even without it won't work).
Now "tc -s class show dev eth1" shows traffic through the whole
tree including the root; when adding another class and an filter
all the traffic gets shaped correctly. As soon as I delete the
filter (also tried the fh trick but that shouldn't matter anyways)
all traffic is completely unshaped and bypasses all classes and
the root qdisc; the statistics in 
"tc -s class show dev eth1" doesn't show any new packets and
the rates ramp up to the network interface maximum effectively
ignoring the default handle. As soon as some leaf and a filter is
readded the whole filter system behaves normal again.

I'm using iproute_20010824-9_i386.deb and kernel 2.4.20 FWIW and
would be *really* grateful for any help.

-- 
Daniel Egger <[EMAIL PROTECTED]>
WirelessCreation

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] Am I correct?

2002-12-18 Thread LARTC
I've got some customers that have lots of bandwidth that are uploading and
downloading files to our https:// help desk and are using up all of my T-1
at times. This leaves other customers sucking wind. I've taken a look at the
'15.10. Example of a full nat solution with QoS' section. Would it work for
me if I change the section that says eth0 to my internet adapter Serial0? If
I can do that, will that allow fair sharing between all my customers of the
https:// help desk?

My setup:

//   /   ///
https:// |-- |eth0 * Serial0 |-- |INET |
//   /   ///

My proposed script:

CEIL=1020 # actual is 1024Kbit
IFACE=Serial0

tc qdisc add dev $IFACE root handle 1: htb default 15
tc class add dev $IFACE parent 1: classid 1:1 htb rate ${CEIL}kbit ceil
${CEIL}kbit
tc class add dev $IFACE parent 1:1 classid 1:10 htb rate 170kbit ceil
170kbit prio 0
tc class add dev $IFACE parent 1:1 classid 1:11 htb rate 170kbit ceil
${CEIL}kbit prio 1
tc class add dev $IFACE parent 1:1 classid 1:12 htb rate 170kbit ceil
${CEIL}kbit prio 2
tc class add dev $IFACE parent 1:1 classid 1:13 htb rate 170kbit ceil
${CEIL}kbit prio 2
tc class add dev $IFACE parent 1:1 classid 1:14 htb rate 170kbit ceil
${CEIL}kbit prio 3
tc class add dev $IFACE parent 1:1 classid 1:15 htb rate 170kbit ceil
${CEIL}kbit prio 3

tc qdisc add dev $IFACE parent 1:12 handle 120: sfq perturb 10
tc qdisc add dev $IFACE parent 1:13 handle 130: sfq perturb 10
tc qdisc add dev $IFACE parent 1:14 handle 140: sfq perturb 10
tc qdisc add dev $IFACE parent 1:15 handle 150: sfq perturb 10

tc filter add dev $IFACE parent 1:0 protocol ip prio 1 handle 1 fw classid
1:10
tc filter add dev $IFACE parent 1:0 protocol ip prio 2 handle 2 fw classid
1:11
tc filter add dev $IFACE parent 1:0 protocol ip prio 3 handle 3 fw classid
1:12
tc filter add dev $IFACE parent 1:0 protocol ip prio 4 handle 4 fw classid
1:13
tc filter add dev $IFACE parent 1:0 protocol ip prio 5 handle 5 fw classid
1:14
tc filter add dev $IFACE parent 1:0 protocol ip prio 6 handle 6 fw classid
1:15

iptables -t mangle -I PREROUTING -p icmp -j MARK --set-mark 0x1
iptables -t mangle -I PREROUTING -p icmp -j RETURN
iptables -t mangle -I PREROUTING -p tcp -m tcp --sport ssh -j
MARK --set-mark 0x1
iptables -t mangle -I PREROUTING -p tcp -m tcp --sport ssh -j RETURN
iptables -t mangle -I PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK
SYN -j MARK --set-mark 0x1
iptables -t mangle -I PREROUTING -p tcp -m tcp --tcp-flags SYN,RST,ACK
SYN -j RETURN
iptables -t mangle -I PREROUTING -p tcp -m tcp --sport https -j
MARK --set-mark 0x3
iptables -t mangle -I PREROUTING -p tcp -m tcp --sport https -j RETURN

iptables -t mangle -I PREROUTING -m tos --tos Minimize-Delay -j
MARK --set-mark 0x1
iptables -t mangle -I PREROUTING -m tos --tos Minimize-Delay -j RETURN
iptables -t mangle -I PREROUTING -m tos --tos Minimize-Cost -j
MARK --set-mark 0x5
iptables -t mangle -I PREROUTING -m tos --tos Minimize-Cost -j RETURN
iptables -t mangle -I PREROUTING -m tos --tos Maximize-Throughput -j
MARK --set-mark 0x6
iptables -t mangle -I PREROUTING -m tos --tos Maximize-Throughput -j RETURN

Thanks in advance for any suggestions

Bernard


___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] VoIP and CBQ

2002-12-18 Thread James Ma



Hi, All,
 
I did some work on QoS with CBQ. Basically, I 
wanted to separate VoIP traffic from other traffics and give it guarantied 
bandwidth. I used the following scripts to do the work,
 


#!/bin/sh


OPTION="allot 1514 maxburst 20 avpkt 1000"
tc qdisc del dev eth0 root 
tc qdisc add dev eth0 root handle 10: cbq bandwidth 10mbit avpkt 1000
tc class add dev eth0 parent 10: classid 10:2 cbq bandwidth 10mbit rate 
34kbit $OPTION prio 3 bounded
tc class add dev eth0 parent 10:2 classid 10:10 cbq bandwidth 10mbit rate 
30kbit $OPTION prio 3 
tc class add dev eth0 parent 10:2 classid 10:20 cbq bandwidth 10mbit rate 
4kbit $OPTION prio3tc filter add dev eth0 parent 10: protocol ip prio 3 
u32 match ip tos 0x20 0xf0 flowid 10:2
tc filter add dev eth0 parent 10: protocol ip prio 3 u32 match ip dst 0/0 
flowid 10:2
tc filter add dev eth0 parent 10:2 protocol ip prio 3 u32 match ip tos 0x20 
0xf0 flowid 10:10
tc filter add dev eth0 parent 10:2 protocol ip prio 3 u32 match ip dst 0/0 
flowid 10:20
It 
seemed working -- when there was no VoIP traffic, a ftp link was using all 
34kbit rate. When there was VoIP traffic, the ftp rate dropped to 17kbit 
(which was correct because the voice traffic was using 17kbit). Unfortunately, 
the voice quality was not good. Even if without ftp traffic, there were packets 
loss for voice traffic (if you count from 1 to 20 with one handset, you 
miss certain figures on the other end, they are 4, 5, 8, 9, 12, 13 
etc).







Any one had the same problem before? Any one 
can explain it? Any parameter I should adjust to better suit this 
application?

Another thing I noticed was, when I changed 
the parameters for "allot" (ex 300) and "avpkt" (ex 500) in order to 
seek better setting for this application, the CBQ stopped doing 
anything, so the rate was the NIC rate instead of 34kbit. I could 
change "maxburst" but it didn't improve the voice quality. Could any one tell me 
how to use these parameters?

Thanks,

James 


Re: [LARTC] nano.txt

2002-12-18 Thread Nuno Miguel Pais Fernandes
Try google cache :)

Nuno

On Wed, 2002-12-18 at 08:36, hare ram wrote:
> Hi
>  
>  
> does any one have this File
> seems to be this site is down
> http://www.linuxvirtualserver.org/~julian/#routes-2.4
>  
> thanks
> hare
-- 
Nuno Miguel Pais Fernandes <[EMAIL PROTECTED]>
Eurotux S.A.



signature.asc
Description: This is a digitally signed message part


[LARTC] fragment in CBQ?

2002-12-18 Thread James Ma



Hi, All,
 
Does any body know if CBQ could do packet 
fragment? Or may be there is other tool in linux could do it? 
 
The reason I need to do it is that, I want to set 
up QoS using CBQ for voice packet, but too big TCP packet in the low priority 
queue will cause intolerable jitter for the 
voice traffic since the outbound rate is only 64kbps.
 
Regards,
 
James


Re: [LARTC] nano.txt

2002-12-18 Thread Nikolay Datchev
This site is redirected to some other site in ssi.bg domain.

Alas, ssi.bg domain is down, changing nameservers' addresses... I'll send
you a note when it is up again.

-- Nikolay Datchev

On Wed, 18 Dec 2002, hare ram wrote:

> Hi
>
>
> does any one have this File
> seems to be this site is down
> http://www.linuxvirtualserver.org/~julian/#routes-2.4
>
> thanks
> hare
>

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] Traffic is exceeding limits

2002-12-18 Thread Mindaugas Riauba

  I'm trying to setup traffic shaping for a customer.
Machine is RedHat 7.3 with kernel-smp-2.4.18-18.7.x.
HZ=512.

  But when I try to load link (using netcat and discard /
chargen services) bytes count (tc -s qdisc show, sfq qdisc)
goes quite well over 512kbit (~560kbit). With UDP I can
even go over 1mbit.

  What can be done to ensure tighter limits?

  Thanks,

  Mindaugas

  burst and cburst were set by tc and equals 2175b. r2q = 10.

  No more tc rules exists now.

$TC qdisc del dev eth0 root
$TC qdisc del dev eth1 root

$TC qdisc add dev eth0 root handle 1: htb
$TC qdisc add dev eth1 root handle 1: htb

$TC class add dev eth0 parent 1: classid 1:200 htb rate 512kbit
$TC class add dev eth1 parent 1: classid 1:200 htb rate 512kbit

$TC qdisc add dev eth0 parent 1:200 handle 200: sfq perturb 10
$TC qdisc add dev eth1 parent 1:200 handle 200: sfq perturb 10

$TC filter add dev eth0 parent 1: protocol ip prio 1 u32 match ip src $ip
flowid 1:200
$TC filter add dev eth1 parent 1: protocol ip prio 1 u32 match ip dst $ip
flowid 1:200

___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/



[LARTC] nano.txt

2002-12-18 Thread hare ram



Hi
 
 
does any one have this File
seems to be this site is down
http://www.linuxvirtualserver.org/~julian/#routes-2.4
 
thanks
hare