Troubles in setting QoS

Discussion in 'UK VOIP' started by Lurkos, Apr 14, 2007.

  1. Lurkos

    Lurkos Guest

    Lurkos, Apr 14, 2007
    #1
    1. Advertising

  2. Lurkos

    Loz Guest

    Lurkos wrote:
    > Can anybody help me in setting QoS in my ADSL router?
    > Must I put the IP of my SIP provider in "Destination IP" field and my
    > local IP in "source IP"?
    > What is the source and the destination netmask?
    > The router vendor didn't write any manual. :-(
    > Thanks in advance.


    For source netmask, to match only the IP of the machine which you are
    calling from use 255.255.255.255

    I'd guess the same would apply for destination IP. If it is an ATA you
    are using I'd match from the IP address of the ATA to any destination
    address.
    Loz, Apr 15, 2007
    #2
    1. Advertising

  3. Lurkos

    Lurkos Guest

    Loz wrote:
    >> Can anybody help me in setting QoS in my ADSL router?
    >> Must I put the IP of my SIP provider in "Destination IP" field and my
    >> local IP in "source IP"?
    >> What is the source and the destination netmask?
    >> The router vendor didn't write any manual. :-(
    >> Thanks in advance.

    > For source netmask, to match only the IP of the machine which you are
    > calling from use 255.255.255.255
    > I'd guess the same would apply for destination IP. If it is an ATA you
    > are using I'd match from the IP address of the ATA to any destination
    > address.


    Thanks a lot for your answer. Very useful!
    Does the IP port of SIP is 5060/UDP?
    Do you have any idea on what "TOS Marking" mean?
    Is it a way to indicate the priority of the packets?

    --
    Lurkos
    Lurkos, Apr 16, 2007
    #3
  4. Lurkos

    Loz Guest

    Lurkos wrote:

    >
    > Thanks a lot for your answer. Very useful!
    > Does the IP port of SIP is 5060/UDP?
    > Do you have any idea on what "TOS Marking" mean?
    > Is it a way to indicate the priority of the packets?



    I think the only way is to set the packets as High (all unmarked will be
    sent low anyway - so don't worry about catching everything!)

    It's a bit of an art to get QoS working on these routers I have found -
    it's not very well documented anywhere. But it does seem to work well
    once you get it set up. Since from what I've seen there is no way to
    specify how much outgoing bandwidth you have, do I assume it works it
    out from your sync rate?

    I have just set up a WRT54G with Tomato firmware, QoS on that is an
    absolute breeze and very, very impressive!
    Loz, Apr 16, 2007
    #4
  5. Lurkos

    Lurkos Guest

    Loz wrote:
    > I think the only way is to set the packets as High (all unmarked will
    > be sent low anyway - so don't worry about catching everything!)


    Yes...
    I have to prioritize only the VoIP packets and not e.g. p2p/www
    packets.
    Do you think that is the right way to prioritize (set to High) the
    ports used by SIP/RTP, e.g. 8000-8001/UDP?

    > It's a bit of an art to get QoS working on these routers I have found
    > - it's not very well documented anywhere.


    Unfortunately you are right...

    > But it does seem to work well once you get it set up.


    This is a great news. :)

    > Since from what I've seen there is no way to specify how much
    > outgoing bandwidth you have, do I assume it works it out from
    > your sync rate?


    Excuse me... I can't understand exactly what you mean... :)
    My connection is an ADSL 4096/512.
    However I can't find any possibility to set a rule based on bandwidth.
    The only possibility is to set a rule based on IP and/or Port.

    --
    Lurkos
    Lurkos, Apr 17, 2007
    #5
  6. Lurkos

    Loz Guest

    Lurkos wrote:

    > I have to prioritize only the VoIP packets and not e.g. p2p/www
    > packets.
    > Do you think that is the right way to prioritize (set to High) the
    > ports used by SIP/RTP, e.g. 8000-8001/UDP?


    I think so. Hopefully someone else in this group can confirm. Are you
    using a softphone?


    > Excuse me... I can't understand exactly what you mean... :)
    > My connection is an ADSL 4096/512.
    > However I can't find any possibility to set a rule based on bandwidth.
    > The only possibility is to set a rule based on IP and/or Port.


    That's what I meant. In order for QoS to work it needs to know how much
    bandwidth there is available before you will experience packet loss. I
    assume it must just take the sync rate (i.e: 512k upstream bandwidth
    available)

    You cannot really control downstream bandwidth since it's too late by
    the time it has got to your router.
    Loz, Apr 17, 2007
    #6
  7. Lurkos

    Loz Guest


    > Lurkos wrote:
    >
    >> I have to prioritize only the VoIP packets and not e.g. p2p/www
    >> packets.
    >> Do you think that is the right way to prioritize (set to High) the
    >> ports used by SIP/RTP, e.g. 8000-8001/UDP?

    >


    I logged onto a router, which I believe is the same chipset. Running
    router-tech firmware

    http://img441.imageshack.us/img441/3750/qosdslzf7.jpg

    I'd just check 'normal service' under TOS markings, since they won't be
    honored by your ISP anyway.

    A quick check seems to verify that these settings work.
    Loz, Apr 17, 2007
    #7
  8. Lurkos

    Stuart Clark Guest

    Loz wrote:
    >
    >> Excuse me... I can't understand exactly what you mean... :)
    >> My connection is an ADSL 4096/512.
    >> However I can't find any possibility to set a rule based on bandwidth.
    >> The only possibility is to set a rule based on IP and/or Port.

    >
    > That's what I meant. In order for QoS to work it needs to know how much
    > bandwidth there is available before you will experience packet loss. I
    > assume it must just take the sync rate (i.e: 512k upstream bandwidth
    > available)
    >


    You (the user) don't really need to know, as QoS just controls how the
    router picks packets to send. If you are sending at a rate below the
    outside interface's line rate (ie the ADSL part for an ADSL router) QoS
    doesn't make the slightest difference.

    It only comes into effect where there is more than can be handled where
    it chooses what to send and what to drop rather than deciding at random.

    So I suppose what you say makes sense (it does need to know the line
    rate of the ADSL interface), but isn't something you set any more than
    you can set the line rate for a 10baseT interface (it just "is" 10Mbit).
    Stuart Clark, Apr 18, 2007
    #8
  9. Lurkos

    Loz Guest

    Stuart Clark wrote:
    > You (the user) don't really need to know, as QoS just controls how the
    > router picks packets to send. If you are sending at a rate below the
    > outside interface's line rate (ie the ADSL part for an ADSL router) QoS
    > doesn't make the slightest difference.
    >
    > It only comes into effect where there is more than can be handled where
    > it chooses what to send and what to drop rather than deciding at random.
    >
    > So I suppose what you say makes sense (it does need to know the line
    > rate of the ADSL interface), but isn't something you set any more than
    > you can set the line rate for a 10baseT interface (it just "is" 10Mbit).




    Totally correct, but that's not really what I was getting at. I
    appreciate that you probably know the information below, and the OP
    won't need to really know this, but I'm going to write it anyway :)

    Say you had a 10Mbit line into your ISP (Physically) but they police you
    at 5Mbps since that's all you want to pay for.

    The interface is connected at 10Mbit, but you won't be able to send that
    rate (well without them blackholing the traffic at their end for you) -
    so you'd need to specify the shape rate at 5Mbps at your end, or else
    the QoS will be inefficient for your needs.

    This doesn't matter for ADSL since you'll almost always be able to send
    the sync rate (once you've taken account of ATM overhead) - but with a
    cable router you'll need to specify it since the speed from the router
    to the cable modem will typically be 100Mbps

    I still prefer being able to specify everything, but this makes things
    more complicated I guess. This is something I actually think Cisco
    equipment handles very well indeed, but it's slightly over-budget for
    nearly all home use.

    On my other post with the screenshot, using those settings does appear
    to work - and if I prioritise ICMP as well - pings generally stay around
    40ms - so should work for voice. If I turn the QoS off it shoots upto
    over 1000ms!

    Actually specifying traffic for the ingress direction seems to work too
    - unless I'm imagining things. My guess is that it starts dropping
    packets on the lower classes first in this direction too - which will
    cause TCP to backoff, thus resulting in the amount of data physically
    coming downstream.

    Effect on router CPU isn't too significant either - with Utorrent
    happily using a couple of hundred connections.

    And off-topic: Is anyone having trouble with AIOE's news server, seems a
    lot of posts are taking ages to come through and I'm unable to post
    through it? (Well it lets me but posts never show up!)
    Loz, Apr 18, 2007
    #9
  10. Lurkos

    Stuart Clark Guest

    Loz wrote:
    > Stuart Clark wrote:
    > > You (the user) don't really need to know, as QoS just controls how the
    >> router picks packets to send. If you are sending at a rate below the
    >> outside interface's line rate (ie the ADSL part for an ADSL router) QoS
    >> doesn't make the slightest difference.
    >>
    >> It only comes into effect where there is more than can be handled where
    >> it chooses what to send and what to drop rather than deciding at random.
    >>
    >> So I suppose what you say makes sense (it does need to know the line
    >> rate of the ADSL interface), but isn't something you set any more than
    >> you can set the line rate for a 10baseT interface (it just "is" 10Mbit).

    >
    > Totally correct, but that's not really what I was getting at. I
    > appreciate that you probably know the information below, and the OP
    > won't need to really know this, but I'm going to write it anyway :)
    >
    > Say you had a 10Mbit line into your ISP (Physically) but they police you
    > at 5Mbps since that's all you want to pay for.
    >


    I see what you are getting at, but I'd argue that is a different feature
    connected but independent of QoS, being bandwidth throttling. And a lot
    of routers which might support QoS don't also do throttling :-(

    It is unfortunate that more don't include such feature as they aren't
    really that complex to write (though making them simple to control for
    the average user can be a challenge) as they just use CPU rather than
    needing additional hardware (assuming the CPU power is sufficient as is
    RAM/flash), especially for the increasingly common case of cable modems
    with 100baseT connectors.
    Stuart Clark, Apr 18, 2007
    #10
  11. Lurkos

    Loz Guest

    Stuart Clark wrote:

    > I see what you are getting at, but I'd argue that is a different feature
    > connected but independent of QoS, being bandwidth throttling. And a lot
    > of routers which might support QoS don't also do throttling :-(


    I'm not too sure actually! But to ensure satisfactory QoS the router
    needs to establish just what rate it can send before it'll loose
    packets. It is therefore helpful in my view if you can manually specify
    this. On a per-class basis as well would be even better (you CAN on
    tomato and assign minimum-max data rates per class. Makes a consumer
    grade router really, really impressive!)

    If the router doesn't know what data rate the line can take, how does it
    know where to stop so queues don't get full? If it's a cable modem, it
    can't see the queue on the cable modem.

    So if you set the limit at 99% of what the line can take, and then shape
    the traffic based on this (into the various classes) your EF traffic
    should be fine, and not subject to delay due to the queue, or drops due
    to the queue being full.

    Obviously I appreciate a combined modem/router (i.e: ADSL router) can
    see the Queues on its own interface (I'd assume) so it can work out if
    it's trying to send more than the line will take.


    > It is unfortunate that more don't include such feature as they aren't
    > really that complex to write (though making them simple to control for
    > the average user can be a challenge) as they just use CPU rather than
    > needing additional hardware (assuming the CPU power is sufficient as is
    > RAM/flash), especially for the increasingly common case of cable modems
    > with 100baseT connectors.


    Tomato on the Linksys WRT54G does - I can't give enough praise to this
    firmware. Some of the firmware you couldn't specify the limit and it
    didn't really work without it to be honest.

    I guess if you're router is a linux one running for example busybox, you
    could always muck about and do it yourself, with iptables? I'm not a
    linux person though so I wouldn't really have the first clue about how
    to actually do it.
    Loz, Apr 18, 2007
    #11
  12. Lurkos

    alexd Guest

    Loz wrote:

    > I guess if you're router is a linux one running for example busybox, you
    > could always muck about and do it yourself, with iptables? I'm not a
    > linux person though so I wouldn't really have the first clue about how
    > to actually do it.


    http://lartc.org/wondershaper/

    That might be a good place to start.

    --
    <http://ale.cx/> (AIM:troffasky) ()
    17:19:39 up 5 days, 21:38, 3 users, load average: 0.17, 0.37, 0.36
    Yes. I'm just guessing.
    alexd, Apr 19, 2007
    #12
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Andrew Albert

    QOS for VOIP using 768k of FR / Auto QOS

    Andrew Albert, Feb 6, 2005, in forum: Cisco
    Replies:
    7
    Views:
    1,467
  2. rsjimmy
    Replies:
    3
    Views:
    7,904
    rsjimmy
    Mar 7, 2006
  3. Replies:
    1
    Views:
    2,624
    Scooby
    Apr 10, 2006
  4. dominix
    Replies:
    2
    Views:
    455
    dominix
    Feb 6, 2007
  5. QoS setting problem

    , Sep 17, 2008, in forum: Cisco
    Replies:
    2
    Views:
    1,594
Loading...

Share This Page