From owner-freebsd-pf@FreeBSD.ORG Sat Sep 2 07:36:00 2006 Return-Path: X-Original-To: freebsd-pf@freebsd.org Delivered-To: freebsd-pf@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 953D816A4E0 for ; Sat, 2 Sep 2006 07:36:00 +0000 (UTC) (envelope-from tohajime@gmail.com) Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.178]) by mx1.FreeBSD.org (Postfix) with ESMTP id AEA9443D4C for ; Sat, 2 Sep 2006 07:35:59 +0000 (GMT) (envelope-from tohajime@gmail.com) Received: by py-out-1112.google.com with SMTP id o67so1597328pye for ; Sat, 02 Sep 2006 00:35:59 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=FoSEW17HABC1JY+hMrfRwZCFyhur7Wkxq87BQf2ANNIfOn+GSiP+Rx/a1nq0u6hwgpSY5rFo07OVaC0pEFsrTIgDr48TKuf1eihovxDRCwJyvN5tGExb5HBvtnNlAKkQaZ6CcQX2UCbLtLoS4zdeyme1fd43YLDBeQAnLrryVdo= Received: by 10.65.240.17 with SMTP id s17mr3652029qbr; Sat, 02 Sep 2006 00:35:58 -0700 (PDT) Received: by 10.64.209.13 with HTTP; Sat, 2 Sep 2006 00:35:58 -0700 (PDT) Message-ID: Date: Sat, 2 Sep 2006 14:35:58 +0700 From: Hajime To: freebsd-pf@freebsd.org In-Reply-To: MIME-Version: 1.0 References: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: pf+altq (all traffic are in queue default) X-BeenThere: freebsd-pf@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Technical discussion and general questions about packet filter \(pf\)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 02 Sep 2006 07:36:00 -0000 Hello, I want to implement a pf+altq for traffic shaping with freebsd 5.4-Release. I have done kernel compilation in my freebsd box for those pf and altq. Then, my scenario is like this : My network : external-network-----------------------rl0-FreeBSD-xl0-----------------------internal-network 192.168.0.0/24 10.2.0.0/16 I want each http, ssh and ftp traffic going from external-network to internal-network get 25% from total available bandwidth in xl0. This is my pf.conf : #Root Queue altq on xl0 cbq bandwidth 10Mb queue { www, ftp, ssh, std } #Child Queue queue www bandwidth 25% priority 2 cbq(borrow) queue ftp bandwidth 25% priority 2 cbq(borrow) queue ssh bandwidth 25% { ssh_login, ssh_bulk } queue ssh_login bandwidth 25% priority 4 cbq(ecn) queue ssh_bulk bandwidth 75% cbq(ecn) queue std bandwidth 25% priority 3 cbq(default borrow) #Macros ext_net = "192.168.0.0/24" int_net = "10.2.0.0/16" #Filter rule pass out on xl0 proto tcp from $ext_net to $int_net port 80 queue www pass out on xl0 proto tcp from $ext_net to $int_net port { 21, 20 } queue ftp pass out on xl0 proto tcp from any to any port 22 queue(ssh_bulk, ssh_login) Then i test this configuration by generate traffic http, ftp, ssh, etc (the traffic is going from external-network to internal-network). I saw pf status with command "pfctl -vs all", all the traffic are in queue default, not in the each queue ( for ftp, http, ssh etc). Is there any mistake in my pf.conf? please help me. Thx Regards, M. Toha S