| Author |
Message |
jcookeman
New Forum Member


Joined: 1058897079
Posts: 5
Location: Groton, CT
|
I ordered the service and am waiting delivery of my unit. I was curious of anyone has traffic shaping running to improve/guarantee smooth operation. I would be happy to contribute to this as well. In particular, I am interested in FreeBSD ipfw or Linux iptables. |
|
|
|
|
 |
frasier
Full Forum Member


Joined: Mar 06, 2003
Posts: 44
Location: UK
|
Hi
Ill just give a brief reply for now to point you in the right direction. As far as QoS goes you might want to look at dummynet or altq under FreeBSD. See what you find on them - let me know if you want any help. |
_________________ Tom Icq Home: 8018364 Icq Work: 121896090 MSN: netgeek_uk@hotmail.com In a world without walls or fences who needs windows or gates?!
 |
|
|
|
 |
jcookeman
New Forum Member


Joined: 1058897079
Posts: 5
Location: Groton, CT
|
|
|
|
 |
Guest

|
For QoS I use HTB under linux, I'm still tweaking, but this is the script I'm using.. feel free to update it, but post it the new one so we can all benefit from it  I based lots of it from wondershaper, so credits also to the author of wondershaper!! I have this script under /etc/conf.d/ in GENTOO. Pass START / STOP or STATUS to it. If anyone has gentoo I'll post the corresponding /etc/init.d/qos script. Your kernel needs support for HTB and you need tc.
------- bash-2.05b$ cat qos #!/bin/sh ###For QoS I use HTB under linux, I'm still tweaking, but this is the script I'm using.. feel free to update it, but post it the new one so we can all benefit from it  I based lots of it from wondershaper, so credits also to the author of wondershaper!! I have this script under /etc/conf.d/ in GENTOO. Pass START / STOP or STATUS to it. If anyone has gentoo I'll post the corresponding /etc/init.d/qos script. Your kernel needs support for HTB and you need tc.
------- bash-2.05b$ cat qos #!/bin/sh ### ### QoS Script for Vonage v.0.1 ### ### Author: Rafael Cabezas ### email: rcabezas AT ureach DOT com ### Thanks also to wondershaper author, as this code uses lots of it. ###
#echo Arg passed = ${1}
#Device Connected to Cable-Modem DEV=eth0 #Cable-Modem Downlink (Set to less than real KBit) DOWNLINK=1500 #Cable-Modem Uplink (Set to less than real KBit) UPLINK=350 #Vonage Assigned Bandwidth in KBit VONAGE_BW=150 #Vonage MAC Address (UPDATE WITH YOURS!) VONAGE_MAC=00:0c:30:xx:xx:xx #not using right now... VONAGE_IP=192.168.0.55 #Interactive Bandwidth in KBps (KBit) INTER_BW=50 #Low Prio Traffic Bandwidth in KBps (KBit) LOWPRIO_BW=20
case ${1} in "START") echo ${1} " - Setting up QoS" echo "Vonage SIP MAC Address = "$VONAGE_MAC # Install root HTB, point default traffic to 1:20: tc qdisc add dev $DEV root handle 1: htb default 20 # Shape everyhting at $UPLINK speed to prevent queues in the (DSL/Cable)Modem # These queues destroy latency. tc class add dev $DEV parent 1: classid 1:1 htb rate ${UPLINK}KBit burst 6k #ceil ${UPLINK}KBit # High Priority class 1:15 to be used by Vonage. tc class add dev $DEV parent 1:1 classid 1:15 htb rate ${VONAGE_BW}KBit ceil ${UPLINK}KBit burst 10k prio 1 #ceil ${UPLINK}KBit # High Priority Interactive class 1:10 to be used for SSH, etc. tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${INTER_BW}kBit ceil ${UPLINK}KBit burst 6k prio 2 # Bulk & Default class 1:20 - Gets a lower priority and less traffic tc class add dev $DEV parent 1:1 classid 1:20 htb rate ${LOWPRIO_BW}kbit ceil ${UPLINK}KBit burst 6k prio 3 # All get Stochastic Fairness (Except Vonage) #/sbin/tc qdisc add dev $DEV parent 1:15 handle 15: sfq perturb 10 tc qdisc add dev $DEV parent 1:10 handle 10: sfq perturb 10 tc qdisc add dev $DEV parent 1:15 handle 15: sfq perturb 10 tc qdisc add dev $DEV parent 1:20 handle 20: sfq perturb 10 # (ssh) TOS Minimum Delay (ssh, NOT scp) in 1:10: tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip tos 0x10 0xff flowid 1:10 # (ping) ICMP (ip protocol 1) In the interactive class 1:10 so that ping is not affected. tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip protocol 1 0xff flowid 1:10 # To speed up d/l while on an upload, put ACK packets in interactive class: tc filter add dev $DEV parent 1: protocol ip prio 10 u32 \ match ip protocol 6 0xff \ match u8 0x05 0x0f at 0 \ match u16 0x10 0xff at 33 \ flowid 1:10 # Put Vonage Traffic (based on mac) on 1:15: iptables -t mangle -I PREROUTING -m mac --mac-source $VONAGE_MAC -j MARK --set-mark 1 /sbin/tc filter add dev $DEV parent 1:0 protocol ip prio 1 handle 1 fw flowid 1:15 # Put Vonage Traffic (based on ip) on 1:15: #tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip src $VONAGE_IP flowid 1:15 #tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 match ip dst $VONAGE_IP flowid 1:15
# Rest is non-interactive and ends up in 1:20 tc filter add dev $DEV parent 1: protocol ip prio 18 u32 match ip dst 0.0.0.0/0 flowid 1:20
# Shape Downlink: tc qdisc add dev $DEV handle ffff: ingress # Filter everything to it, drop everything coming in too fast. tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \ 0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1 echo "Done" ;; "STOP") echo ${1} " - Disabling QoS" tc qdisc del dev $DEV root 2> /dev/null > /dev/null tc qdisc del dev $DEV ingress 2> /dev/null > /dev/null echo "Done" ;; "STATUS") tc -s qdisc ls dev $DEV tc -s class ls dev $DEV echo "Done" ;; esac |
|
|
|
|
 |
jcookeman
New Forum Member


Joined: 1058897079
Posts: 5
Location: Groton, CT
|
Thank you for the contribution... |
|
|
|
|
 |
msilver
Guest

|
I found a script that I modified to give high priority to Vonage traffic. I have used it with mixed results. It helped, but not as much as I would like. It could also use some fine tuning but it's a start.
There is also a way to add dynamic rules, but I haven't figured out how to do that with bandwidth limits.
Anyway, if you use FreeBSD, try this script. You will need dummynet, et al installed in the kernel.
ipfw pipe 1 config bw "14400Kbyte/s" ipfw pipe 2 config bw "14400Kbyte/s"
ipfw queue 10 config weight 90 pipe 1 mask src-port 0xffff ipfw add 50010 queue 10 tcp from any ssh to any via dc0 in
ipfw queue 11 config weight 90 pipe 2 mask dst-port 0xffff ipfw add 50015 queue 11 tcp from any to any ssh via dc0 out
ipfw queue 30 config weight 1 pipe 1 ipfw add 50030 queue 30 icmp from any to any via dc0 in
ipfw queue 31 config weight 1 pipe 2 ipfw add 50035 queue 31 icmp from any to any via dc0 out
ipfw queue 40 config weight 1 pipe 1 ipfw add 50040 queue 40 tcp from any pop3,smtp to any via dc0 in
ipfw queue 41 config weight 1 pipe 2 ipfw add 50045 queue 41 tcp from any to any pop3,smtp via dc0 out
ipfw queue 50 config weight 1 pipe 1 ipfw add 50050 queue 50 tcp from any to any via dc0 in
ipfw queue 51 config weight 1 pipe 2 ipfw add 50055 queue 51 tcp from any to any via dc0 out
ipfw queue 52 config weight 1 pipe 1 ipfw add 50060 queue 52 udp from any to any via dc0 in
ipfw queue 53 config weight 1 pipe 2 ipfw add 50065 queue 53 udp from any to any via dc0 out
ipfw queue 60 config weight 100 pipe 1 ipfw add 10110 queue 60 udp from any 5060 to any via dc0 in ipfw add 10120 queue 60 udp from any 123 to any via dc0 in ipfw add 10130 queue 60 udp from any 5061 to any via dc0 in ipfw add 10140 queue 60 udp from any 69 to any via dc0 in ipfw add 10150 queue 60 udp from any 10000-20000 to any via dc0 in
ipfw queue 61 config weight 100 pipe 2 ipfw add 10210 queue 61 udp from any to any 5060 via dc0 out ipfw add 10220 queue 61 udp from any to any 123 via dc0 out ipfw add 10230 queue 61 udp from any to any 5061 via dc0 out ipfw add 10240 queue 61 udp from any to any 69 via dc0 out ipfw add 10250 queue 61 udp from any to any 10000-20000 via dc0 out |
|
|
|
|
 |
forrie
New Forum Member


Joined: Jan 27, 2005
Posts: 8
|
I'm setting up a new FreeBSD-5.x box, with PF and ALTQ enabled. Does someone have an example queue config for Voip on this.
My bandwidth is Comcast cable.
Thanks. |
|
|
|
|
 |
forrie
New Forum Member


Joined: Jan 27, 2005
Posts: 8
|
Since asking (months ago), I've tried doing some homework (researchig the net, basically), and I've not yet come up with some samples of pf.conf for Vonage.
Someone out here must be using OpenBSD/FreeBSD PF... ?
I've basically a SOHO network (home office), it's relatively simple - but my old system is still using ipfw, and I want to ditch it.
Any help, pointers, or just plain examples, would be appreciated... thank you. |
|
|
|
|
 |
matth
Vonage Forum Master


Joined: Dec 07, 2004
Posts: 281
Location: Williamsport, PA
|
Just so you know.. the ATA itself sets it's TOS high... so you can just look at it.. no need to tag it. |
|
|
|
|
 |
|
|