ALTQ - what I am not aware of that causes side effect of cutting the ftp upload? - BSD

This is a discussion on ALTQ - what I am not aware of that causes side effect of cutting the ftp upload? - BSD ; Hi All, I'm trying to learn ALTQ, but I cannot figure out why it keeps cutting the ftp upload to an external ftp server - even if I don't add "queue something" to any of the "pass out on $ext_if..." ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: ALTQ - what I am not aware of that causes side effect of cutting the ftp upload?

  1. ALTQ - what I am not aware of that causes side effect of cutting the ftp upload?

    Hi All,
    I'm trying to learn ALTQ, but I cannot figure out why it keeps cutting the
    ftp upload to an external ftp server - even if I don't add
    "queue something" to any of the "pass out on $ext_if..."
    and just have:
    e.g. a simple example:
    altq on $ext_if cbq bandwidth 70Kb queue { net0, net1, net2, net3 }
    queue net0 bandwidth 10% cbq(default)
    queue net1 bandwidth 30% priority 2 cbq(borrow red)
    queue net2 bandwidth 30% priority 2 cbq(borrow red)
    queue net3 bandwidth 30% priority 2 cbq(borrow red)

    if only these lines are present i.e. as I understand I don't really use
    these queues unless I add e.g. "queue net2" at the end of "pass out.."
    The download is ok but if I try to upload to an external ftp it cuts the
    transfer almost immediately to an impossible value. What did I miss?


  2. Re: ALTQ - what I am not aware of that causes side effect of cutting the ftp upload?

    PiotrAF wrote:

    > e.g. a simple example:
    > altq on $ext_if cbq bandwidth 70Kb queue { net0, net1, net2, net3 }
    > queue net0 bandwidth 10% cbq(default)
    > queue net1 bandwidth 30% priority 2 cbq(borrow red)
    > queue net2 bandwidth 30% priority 2 cbq(borrow red)
    > queue net3 bandwidth 30% priority 2 cbq(borrow red)
    >
    > if only these lines are present i.e. as I understand I don't really use
    > these queues unless I add e.g. "queue net2" at the end of "pass out.."
    > The download is ok but if I try to upload to an external ftp it cuts the
    > transfer almost immediately to an impossible value. What did I miss?


    All outgoing traffic on $ext_if ends up in one of those four queues. If you
    don't add a queue spec to the end of the rule that lets the ftp upload out,
    it ends up in the default queue (net0 in this case). Because net0 is 10% of
    the bandwidth, and can't borrow, this limits the upload to 10%.

    If net0 could borrow, this would hide the effect by pulling more bandwidth
    into net0; however, you've still got a problem. Set the default queue to
    the one you'd like most traffic to go into, or put ftp upload into a
    different queue.
    --
    Simon Farnsworth

  3. Re: ALTQ - what I am not aware of that causes side effect of cutting the ftp upload?

    On Tue, 22 Nov 2005 08:26:52 +0000, Simon Farnsworth wrote:

    > PiotrAF wrote:
    >
    >> e.g. a simple example:
    >> altq on $ext_if cbq bandwidth 70Kb queue { net0, net1, net2, net3 }
    >> queue net0 bandwidth 10% cbq(default)
    >> queue net1 bandwidth 30% priority 2 cbq(borrow red)
    >> queue net2 bandwidth 30% priority 2 cbq(borrow red)
    >> queue net3 bandwidth 30% priority 2 cbq(borrow red)
    >>
    >> if only these lines are present i.e. as I understand I don't really use
    >> these queues unless I add e.g. "queue net2" at the end of "pass out.."
    >> The download is ok but if I try to upload to an external ftp it cuts the
    >> transfer almost immediately to an impossible value. What did I miss?

    >
    > All outgoing traffic on $ext_if ends up in one of those four queues. If you
    > don't add a queue spec to the end of the rule that lets the ftp upload out,
    > it ends up in the default queue (net0 in this case). Because net0 is 10% of
    > the bandwidth, and can't borrow, this limits the upload to 10%.
    >
    > If net0 could borrow, this would hide the effect by pulling more bandwidth
    > into net0; however, you've still got a problem. Set the default queue to
    > the one you'd like most traffic to go into, or put ftp upload into a
    > different queue.


    Seems reasonable, although I still don't understand why the existance of
    the above without any queue added to neither pass in nor pass out rules,
    limits on;ly the ftp upload, and not everything which as I presume should
    also be treated as default (net0)[ there is possibilty that I didn't check
    it on downloading files though, and I cannot check it right now]
    If so, the question is how to do it in case I have separate in/out limits
    from the ISP i.e. in my case bandwidth 70Kb for in and bandwidth 70Kb for
    out. double it and make 50%/50% queues for in and out?

  4. Re: ALTQ - what I am not aware of that causes side effect of cutting the ftp upload?

    PiotrAF wrote:
    > Seems reasonable, although I still don't understand why the existance of
    > the above without any queue added to neither pass in nor pass out rules,
    > limits on;ly the ftp upload, and not everything which as I presume should
    > also be treated as default (net0)[ there is possibilty that I didn't check
    > it on downloading files though, and I cannot check it right now]
    > If so, the question is how to do it in case I have separate in/out limits
    > from the ISP i.e. in my case bandwidth 70Kb for in and bandwidth 70Kb for
    > out. double it and make 50%/50% queues for in and out?


    Each "altq on" statement only covers outgoing traffic on that interface, not
    incoming. Downloads don't generate much upload traffic (230KByte/s
    generates around 1KByte/s of upload here), so probably aren't getting hit.

    You need to do your queueing on multiple interfaces on a firewall, one for
    traffic going to the ISP, and one for traffic going to your local network.
    --
    Simon Farnsworth

+ Reply to Thread