Very simple traffic shaping script for H.323

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello - 

What I want to do seems very simple - I want to make sure any H.323
traffic gets processed before anything else entering or leaving this
network.  The network has a videoconferencing device on the LAN at
192.168.16.4.  A Linux firewall NATs an external IP Address to this
internal address and I have appropriate SNAT and DNAT rules that work.

The NAT and connection tracking rules all work great.  Now I need to
make sure other traffic in and out of this network does not interfere
with the H.323 flow.  

After pouring over several RFCs, Howto documents, and lots of other
documentation, I think this very simple script will do the trick.  

The theory - by default, all interfaces have a classless PFIFO queue
with three bands.  So all I need to do is set the appropriate DS bits in
the packet header to the EF (Expedited Forward) value and everything
else will just work.  Linux will put the packets in the top PFIFO
priority band and they'll go thru my Firewall at Warp 9.9 regardless of
other traffic from other users.  

Assumptions:
(1) I don't care about slowing down other traffic flows.  H.323 packets
should be serviced first no matter what.  
(2) Any traffic with source or destination public IP Address
"abc.def.ghi.jkl" or private IP Address 192.168.16.4 is to/from from the
videoconference device.  

After all the reading and studying, is it really this simple?  Does
anyone have ideas on how to test this?  How do I watch packets to see
which packets go into what PFIFO band?

#!/bin/sh

VTC1_PRIVATE="192.168.16.4"
VTC1_PUBLIC="abc.def.ghi.jkl"

IPTABLES="/usr/local/sbin/iptables"

$IPTABLES -t mangle -F
$IPTABLES -t mangle -A PREROUTING -s $VTC1_PRIVATE -j DSCP
--set-dscp-class EF $IPTABLES -t mangle -A PREROUTING -d $VTC1_PUBLIC -j
DSCP --set-dscp-class EF


thanks

- Greg Scott
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux