From owner-freebsd-net@FreeBSD.ORG Wed Aug 15 05:37:10 2012 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 46847106564A for ; Wed, 15 Aug 2012 05:37:10 +0000 (UTC) (envelope-from saeedeh.motlagh@gmail.com) Received: from mail-qc0-f182.google.com (mail-qc0-f182.google.com [209.85.216.182]) by mx1.freebsd.org (Postfix) with ESMTP id EC6BE8FC15 for ; Wed, 15 Aug 2012 05:37:09 +0000 (UTC) Received: by qcsg15 with SMTP id g15so1221861qcs.13 for ; Tue, 14 Aug 2012 22:37:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=ow/BJAjqMdZbFRvcQafb+a7M0ML1TbLmSIEN0ZqflZo=; b=tAvm8nu60YSRraIMBvwtu90wTaifEYcsREPFWKaIQSk8KRoztkI4zDvVhoMQbgpsdM CXWoyaKrKIkdJpvI54BNxcXOF8OIdZQcBTL8sLiWZVOrJp36OOWPKr23VlFejeCJ8CAO JApOjKiF5lRT+g2eEsA9yePjrtgPC55RtJ53ffja8TwZatKqZfawj3qRUpVVo05ZncXM 5m2Z93mHKLhae691wT0jZ3PUYRKBXnZVoNedA/iVoZ3fSXEuV/day5Stg952TPd7y9+i 3t9lP/6XNzOKOPmXNTaUJUtkTB0sjUYCgHSrEUJ8F2ZR8tOzsrvSXbxlNh99ivAUsdSF Dvfw== Received: by 10.229.135.194 with SMTP id o2mr10492038qct.125.1345009023681; Tue, 14 Aug 2012 22:37:03 -0700 (PDT) MIME-Version: 1.0 Received: by 10.49.17.137 with HTTP; Tue, 14 Aug 2012 22:36:23 -0700 (PDT) In-Reply-To: References: <37DC844A-4A65-438D-8DD3-B8EFA7B7FE2A@gmail.com> From: saeedeh motlagh Date: Wed, 15 Aug 2012 10:06:23 +0430 Message-ID: To: h bagade , freebsd-net Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: Subject: Re: problem using ng_patch X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Aug 2012 05:37:10 -0000 i have this problem too. please let me know if you find the solution. thanks > > > On Sat, Aug 11, 2012 at 1:07 PM, h bagade wrote: > >> On Sat, Aug 11, 2012 at 12:57 PM, Nikolay Denev wrote: >> >> > On Aug 11, 2012, at 11:07 AM, h bagade wrote: >> > >> > > Hi all, >> > > >> > > I want to use the node ng_patch, to set the ToS field of special >> class of >> > > packets. I try to test the function by a simple test scenario and >> > > encountered problem using it. I have no idea why the problem occurs. >> > > >> > > Here I explain the test scenario I've used. >> > > >> > > I have a topology like this: >> > > >> > > >> > >> |A:192.168.8.8|<---->|192.168.8.26--(B)--192.168.7.26|<---->|C:192.168.7.20| >> > > -------------------------------- >> > > A, C: two end stations >> > > B: a router >> > > -------------------------------- >> > > netgraph settings: >> > > kldload ng_ipfw >> > > ngctl mkpeer ipfw: patch 300 in >> > > ngctl name ipfw:300 tos >> > > ngctl msg tos: setconfig {count=1 csum_flags=1 ops=[ {mode=1 >> value=0x05 >> > > length=1 offset=1}]} >> > > -------------------------------- >> > > ipfw rule: >> > > ipfw add 20 netgraph 300 icmp from any to 192.168.7.20 >> > > >> > > This configuration works well and when A pings C or C pings A, the >> > packets >> > > destined to 192.168.7.20(station C) gets the ToS: 0x05. >> > > The problem occurs when I change the ipfw rule to the following; >> > > >> > > ipfw add 20 netgraph 300 icmp from 192.168.7.20 to any >> > > >> > > By this rule, neither A can ping C nor C can ping A! the packets sent >> to >> > > ng_patch node never comes back to the next ipfw rule! >> > > >> > > I don't know what's the difference between these two scenarios (only >> the >> > > checking from destination address is changed to source address), but >> it's >> > > what I saw in my tests. I really hope to understand what's happening. >> > > >> > > Any hints or comments would help >> > > _______________________________________________ >> > > freebsd-net@freebsd.org mailing list >> > > http://lists.freebsd.org/mailman/listinfo/freebsd-net >> > > To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org >> " >> > >> > Hi, >> > >> > Do you have "sysctl net.inet.ip.fw.one_pass=0" set? >> > >> > Regards, >> > >> > >> yes, As I described I've two scenarios, one work but the other doesn't, >> and >> the only difference is on ipfw rule! >> _______________________________________________ >> freebsd-net@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-net >> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org" >> > >