Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 7 Feb 2004 16:30:28 -1000 (HST)
From:      Vincent Poy <vince@oahu.WURLDLINK.NET>
To:        ipfw@FreeBSD.ORG
Subject:   FreeBSD Traffic Shaping help needed
Message-ID:  <20040207161857.C8264-100000@oahu.WURLDLINK.NET>

next in thread | raw e-mail | index | archive | help
Greetings all:

	I have a ADSL connection where the upstream pipe is smaller than
the downstream with it at 1.5Mbps/384kbps now and will be upgrading to
6Mbps/608kbps soon.  The issue I'm having is that whenever I upload, it
fills the upstream to full capacity and the downstream would lag as the
ACKs can't be send back in time.  I only have one interface (xl0) on my
notebook so what I want to do is exclude the traffic between
209.204.138.224/29 and 192.168.0.0/16 from being part of the three queues
shown below as the IP ranges are all local on the Cisco Catalyst Gigabit
Ethernet switch and the FreeBSD box is already functioning correctly as a
NAT router with these options in the KERNEL config:

options         IPFIREWALL
options         IPDIVERT
options         DUMMYNET
options         BRIDGE

This is what my script looks like so far:

ipfw enable one_pass
ipfw add pipe 1 config bw 384Kbit/s
ipfw add queue 1 all from any to any out xmit xl0
ipfw add queue 1 config pipe 1 weight 20
ipfw add allow all from 192.168.0.0/16 to 192.168.0.0/16
ipfw add allow all from 192.168.0.0/16 to 209.204.138.224/29
ipfw add allow all from 209.204.138.224/29 to 209.204.138.224/29
ipfw add allow all from 209.204.138.224/29 to 209.204.138.224/29
ipfw add queue 1 from any to any
ipfw add allow all from 192.168.0.0/16 to 192.168.0.0/16
ipfw add allow all from 192.168.0.0/16 to 209.204.138.224/29
ipfw add allow all from 209.204.138.224/29 to 209.204.138.224/29
ipfw add allow all from 209.204.138.224/29 to 209.204.138.224/29
ipfw add queue 2 from any to any
ipfw add queue 2 tcp from any to any 22 out xmit xl0
ipfw add queue 2 udp from any to any out xmit xl0
ipfw add queue 2 config pipe 1 weight 25
ipfw add allow all from 192.168.0.0/16 to 192.168.0.0/16
ipfw add allow all from 192.168.0.0/16 to 209.204.138.224/29
ipfw add allow all from 209.204.138.224/29 to 209.204.138.224/29
ipfw add allow all from 209.204.138.224/29 to 209.204.138.224/29
ipfw add queue 3 from any to any
ipfw add queue 3 tcp tcpflags ack iplen 0-80 from any to any out xmit xl0
ipfw add queue 3 config pipe 1 weight 30

	Am I doing this correctly since how do I exclude the define IP's
only from each of the 3 individual queues?  Thanks!


Cheers,
Vince - vince@WURLDLINK.NET - Vice President             ________   __ ____
Unix Networking Operations - FreeBSD-Real Unix for Free / / / / |  / |[__  ]
WurldLink Corporation                                  / / / /  | /  | __] ]
San Francisco - Honolulu - Hong Kong                  / / / / / |/ / | __] ]
HongKong Stars/Gravis UltraSound Mailing Lists Admin /_/_/_/_/|___/|_|[____]
Almighty1@IRC - oahu.DAL.NET Hawaii's DALnet IRC Network Server Admin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040207161857.C8264-100000>