Traffic Prioritization in FreeBSD

Traffic Prioritization in FreeBSD

Post by Bob Lemu » Fri, 20 Sep 2002 06:51:03



Greetings,

I have a FreeBSD-based firewall (ipfw-based) and would like to implement
traffic prioritization.  Some traffic (Web, etc..) is considered less
important than interactive traffic (ssh), and should have priority over the
line.  However, I don't want to cap web, etc traffic at an artificially low
level, since if the bandwidth is free, it should be able to use it.

Essentially, if the bandwidth is open, anything can use it.. if the link is
congested, the interactive traffic should have some priority over the other
bulk/data traffic.

It looks like that may be possible using queues in Dummynet, but I haven't
found a good reference on that.

Any pointers on doing this prioritization, or other ideas on how to
accomplish this?

thanks!

 
 
 

Traffic Prioritization in FreeBSD

Post by Bob Lemu » Fri, 20 Sep 2002 06:58:14


As a side note, the email address is not valid, so please follow up to the
group if you would.

thanks

 
 
 

Traffic Prioritization in FreeBSD

Post by Phillip Michae » Tue, 24 Sep 2002 21:55:12


Check out dummynet.

Phil


Quote:

> As a side note, the email address is not valid, so please follow up to the
> group if you would.

> thanks

 
 
 

Traffic Prioritization in FreeBSD

Post by Bob Lemu » Fri, 27 Sep 2002 07:19:09


Ok, one problem I found was that I was looking at the dummynet man page.  
Apparently its out of date and inaccurate.. however, looking at the
dummynet features on ipfw's man page gives more information.

I'm trying to prioritize traffic on my line, and push interactive and voice
traffic above bulk/batch traffic.  I understand the general pipe
configuration and the queues attached to the pipes to enforce specific
queueing policies, so I'm trying something like this, just illustrating SSH
traffic:

ipfw pipe 1 config bw 384Kbit/s
ipfw add 10 pipe 1 ip from any to any via xl0

ipfw queue 1 config pipe 1 weight 10
ipfw add 15 queue 1 ip from any to any via xl0

ipfw queue 2 config pipe 1 weight 80
ipfw add 17 queue 2 tcp from any to any 22 via xl0
ipfw add 18 queue 2 tcp from any 22 to any via xl0

ipfw add 20 pipe 2 icmp from any to any via xl0
ipfw pipe 2 config bw 20Kbit/s

(note that after these pipes and queues comes the normal firewall
configuration, so I have the kernel set to net.inet.ip.fw.enable=0)

So, on a basic level, only running the pipe configuration (without the queue
lines above) works without a problem.  My ICMP traffic is successfully
limited and constrained, so that sort of config seems good.  However, I'm
trying to weight my bandwidth, not entirely constrict it, so I added the
queues on the first pipe.  When I configure the queues, queue 1 configures
fine, but queue 2 returns an error, as shown:

keet# ipfw queue 1 config pipe 1 weight 10
keet# ipfw queue 2 config pipe 1 weight 80
ipfw: setsockopt(IP_DUMMYNET_CONFIGURE): Invalid argument

In the examples I've seen though, you should be able to attach multiple
queues to a single pipe.  I don't see why the argument would be a problem.

In addition, I'm assuming the ordering of the rules matters, since the
processing will continue after triggering a rule, so I'm ordering them from
broadest to narrowest.  Is that what should happen, or does the weight get
reset as it goes from queue to queue?

thanks!

 
 
 

1. Netscape Plug-ins under Freebsd ??

Folks;
  I am looking at writing a Netscape Plug-in. I have the Netscape
"PluginSDK30b5" from their website. There is no FreeBSD makefile, but
the Linux one runs to completion; creating npsimple.so.
Unfortunately, Netscape 4.04 crashes when I put this in the plugins
directory and ask about loaded plugins.

I notice that the linux binary version specifically calls out ELF
format. Is the problem the lack of the object format? What is the
situation concerning plugins on FreeBSD?

Rip Toren

2. FTP binhex'ed program from UNIX

3. TCP/IP Port Prioritization

4. new menus in workspace ?

5. QoS, Diffserv and port prioritisation with iproute2...HELP!!

6. peer to peer netwoking w/ mandrake 6.0

7. Port Prioritisation with U32 class

8. counting unique words

9. PPP Packet Prioritization.

10. TCP/IP prioritization

11. page prioritization possible?

12. Best way for monitoring traffic in FreeBSD?

13. Traffic shaper for FreeBSD