[squid-users] question about setting TOS for specific media types

From: Brian Landy <brian_at_landy.cx>
Date: Tue, 20 Mar 2012 09:26:33 -0400

Hi, I was hoping to use traffic shaping to reserve bandwidth for http streaming video, and use squid to tag the video traffic separately from other content. I am running OpenBSD 5.0 with squid 2.7, using squid as a transparent non-caching proxy. I am attempting to get squid to set the TOS on the packets from server to client so pf can assign them to an appropriate queue (outbound on the internal interface).

So I tried something like this:

    acl webvideo rep_mime_type -i ^video/MP2T$
    acl webvideo rep_mime_type -i ^video/mp4$
    tcp_outgoing_tos 0x15 webvideo

However, as best I can tell squid is not setting the tos on any of these packets. Have I overlooked something? (the 0x15 was picked at random) I verified I have the rep_mime_types defined properly by setting “http_reply_access deny webvideo” and the content was blocked.

Also, to validate that squid was able to set TOS at all, I tried this:

    acl all src all
    tcp_outgoing_tos 0x15 all

In this case I see the tos set on the packets to the server, but not set on the packets back to the client (which I believe I need set in order to assign the streaming content to the appropriate queue on the inside interface).

Any advice on what I am doing wrong, or whether squid is even the correct approach for this, is greatly appreciated. Thanks!

Brian
Received on Tue Mar 20 2012 - 13:27:02 MDT

This archive was generated by hypermail 2.2.0 : Tue Mar 20 2012 - 12:00:04 MDT