QOS and VoIP

Home Page Forums Network Management ZeroShell QOS and VoIP

This topic contains 18 replies, has 0 voices, and was last updated by  olivier1010 8 years, 3 months ago.

Viewing 5 posts - 16 through 20 (of 20 total)
  • Author
    Posts
  • #46263

    atheling
    Member

    @drmca wrote:

    It looks like there is no way to set up working QoS for VOIP phone, at least not using Linksys PAP2T adapter.
    Correct me if I am wrong, but SIP travels over UDP ports specified per line, i.e. 5060 and 5061 in my case. I can QoS those.
    But actual voice traffic travels over RTP protocol using port range specified per device, which would make it impossible to QoS that port range, as we don’t know which SIP port the RTP ports correspond to.
    Basically with the way PAP2T handles VOIP, there is no way to direct one VOIP line’s traffic over one DSL connection, and other VOIP line’s to another.

    Hoping I am making sense.

    Adding

    modprobe nf_nat_sip

    to your pre-boot script will mean that the RTP packets associated with a call setup with SIP will be detected and marked as “related”. This should take care of having to know which RTP packets are associated with which SIP session.

    Next you need to tag the RTP packets for the QOS. I have the following in my QoS classifier:


    MARK udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp spt:5060 MARK set 0xb
    MARK udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 udp dpt:5060 MARK set 0xb
    MARK udp opt -- in * out * 0.0.0.0/0 -> 0.0.0.0/0 helper match "sip" MARK set 0xb

    So anything to or from port 5060 is marked as VoIP. You’d need to add rules for 5061 for your setup.

    #46264

    atheling
    Member

    @drmca wrote:

    It looks like there is no way to set up working QoS for VOIP phone, at least not using Linksys PAP2T adapter.
    Correct me if I am wrong, but SIP travels over UDP ports specified per line, i.e. 5060 and 5061 in my case. I can QoS those.
    But actual voice traffic travels over RTP protocol using port range specified per device, which would make it impossible to QoS that port range, as we don’t know which SIP port the RTP ports correspond to.
    Basically with the way PAP2T handles VOIP, there is no way to direct one VOIP line’s traffic over one DSL connection, and other VOIP line’s to another.

    Hoping I am making sense.

    Sorry, my first answer went off on a little different topic (QoS on VoiP) while I think you were more worried about port mapping for RTP datagrams when you have multiple SIP devices behind a NATed interface.

    modprobe nf_nat_sip

    In your “pre-boot” script is still your answer. This makes the Linux “net filter” (i.e. iptables) smart about SIP datagrams. It will look into the SIP exchange and determine that it needs to open and associate ports for RTP with the SIP session. It will also re-write the SIP datagrams to show the correct IP addresses and ports for the RTP ports that it opened, etc.

    Basically it seems to make SIP through ZS “just work”. At least as far as port mapping and routing are concerned. You still should make sure your traffic classification and quality of service setup assures that your SIP/RTP streams are unaffected if/when other traffic is passing to your ISP.

    #46265

    DrmCa
    Participant

    I am not sure I completely understand your recommendations.
    If you are trying to make VOIP work, then it already works w/o any settings.
    Or are you showing me how to QoS the SIP and RTP packets? Just want to be certain of what I am doing.

    #46266

    atheling
    Member

    @drmca wrote:

    I am not sure I completely understand your recommendations.
    If you are trying to make VOIP work, then it already works w/o any settings.
    Or are you showing me how to QoS the SIP and RTP packets? Just want to be certain of what I am doing.

    Your question seemed to be about how to do port mapping for the RTP “connections” associated with SIP initiated VoIP calls and the issue of having more than one SIP end point on your LAN. Basically the conventional advise to map a range of ports for RTP does not work if you have more than one end point on your NATed LAN.

    The “modprobe nf_nat_sip” solves that issue. If you have the kernel module loaded then it will detect SIP negotiations and handle the RTP port set up and mapping for you. You don’t need to block out a range of ports and map them to one end point or another.

    If I mis-interpreted your question then please excuse my error.

    #46267

    DrmCa
    Participant

    VOIP adapters don’t need ANY port mapping to work.

    Perhaps behind very weird routers they may need NAT entries, but I have not seen such.

    The question is clearly about QOS.

Viewing 5 posts - 16 through 20 (of 20 total)

You must be logged in to reply to this topic.