From owner-freebsd-net@FreeBSD.ORG Tue Oct 23 02:28:27 2007 Return-Path: Delivered-To: freebsd-net@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2943216A417 for ; Tue, 23 Oct 2007 02:28:27 +0000 (UTC) (envelope-from sandiegobiker@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.238]) by mx1.freebsd.org (Postfix) with ESMTP id A753513C48A for ; Tue, 23 Oct 2007 02:28:26 +0000 (UTC) (envelope-from sandiegobiker@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so1395697wxd for ; Mon, 22 Oct 2007 19:28:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; bh=rXe6QloHQRwnytH27UV5WX9N3FJJN/nZVtOzEzYDnHo=; b=DIGj3lh8v9dtoWKKJ3ESct21AvS6oq8Zks/SxwLDrIqyQ4Fcbko1kGM+vMyAZlauCcoA4MyVDNUF13pebYxnwmGtSOgzrgm/7oB8f1BVL7sxQvL/XFmT1Wosr+K0Ekamh13flXcY8UxAwdR0CXq8aRuDCJSZCf0hr6kvBRp+HOs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:references; b=Aodc2Q8DgFGTmkvYixGHdipNewY9eJ/v2XTyXpTlKi4PZ4Suvry+e2RkNtyo0NyV/ZJkl/Oe/GSHEE7PEEu4UzXklhTy8h37/FITKiEyhO/0VyJT0h+l4e4EE3M7NPrQpZjtB4whYSmvosKEPUDbiyXeqWNKADaZvfZp4zDt8pw= Received: by 10.70.78.8 with SMTP id a8mr9970455wxb.1193106492770; Mon, 22 Oct 2007 19:28:12 -0700 (PDT) Received: by 10.70.19.9 with HTTP; Mon, 22 Oct 2007 19:28:12 -0700 (PDT) Message-ID: <27cb3ada0710221928r63b3e17cg3be567626f49ddc@mail.gmail.com> Date: Mon, 22 Oct 2007 19:28:12 -0700 From: "Len Gross" To: "Marko Zec" In-Reply-To: <200710221420.12674.zec@icir.org> MIME-Version: 1.0 References: <27cb3ada0710212206h6460a7a6heb9a82dde4d9f1dd@mail.gmail.com> <200710221420.12674.zec@icir.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: Netgraph - Breaks "ping" 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: Tue, 23 Oct 2007 02:28:27 -0000 Exactly right. I must have read the ng_ehter man page 20 times, but now it looks obvious. Thanks so much for the help. (Might need more later, as this is just the tip of a project iceberg.) -- Len On 10/22/07, Marko Zec wrote: > > On Monday 22 October 2007 07:06:30 Len Gross wrote: > > I'm trying to "monitor" an ethernet interface with a tee node, but > > ping breaks when I setup the graph. I suspect I'm doing something > > "dumb" with respect to how the Ethernet node and/or the iface (ng0) > > need to be configured in order to make this work, or possibly I'm > > really using ng0 incorrectly. (I've also tried this with a "direct > > connect" of rl0: to ng0: which also doesn't work.) > > You don't need an iface (ng0) node to be able to hook a monitoring ngctl > process to the ng_tee node. Just as you've connected rl0.lower hook to > the tee node, connect the rl0.upper hook to the tee node instead of > ng0. > > Marko > > > > Before Netgraph > > > > Machine Setup > > > > Machine 1 192.168.4.1 > > > > Machine 2: 192.168.4.4 (rl0) > > > > Machine 1 can ping machine 2 going through rl0 > > > > > > > > BSD-1# ifconfig rl0 > > > > rl0: flags=8843 mtu 1500 > > > > options=8 > > > > inet6 fe80::248:54ff:fe8b:1cc8%rl0 prefixlen 64 scopeid 0x3 > > > > inet 192.168.4.4 netmask 0xffffff00 broadcast 192.168.4.255 > > > > ether 00:48:54:8b:1c:c8 > > > > media: Ethernet autoselect (100baseTX ) > > > > status: active > > > > > > > > Now on Machine 2, I set up netgraph: > > > > > > > > Kldload ng_ether > > > > > > > > Using ngctl to create a path from rl0: to tee: to ng0: > > > > Here is the list and show output. > > > > > > > > There are 6 total nodes: > > > > Name: ng0 Type: iface ID: 00000008 > > Num hooks: 1 > > > > Name: tee Type: tee ID: > > 00000007 Num hooks: 4 > > > > Name: rl0 Type: ether ID: 00000004 > > Num hooks: 1 > > > > Name: wi0 Type: ether ID: 00000003 Num > > hooks: 0 > > > > Name: xl0 Type: ether ID: 00000002 > > Num hooks: 0 > > > > Name: ngctl681 Type: socket ID: 00000001 Num > > hooks: 2 > > > > > > > > + show tee: > > > > Name: tee Type: tee ID: 00000007 Num > > hooks: 4 > > > > Local hook Peer name Peer type Peer ID Peer > > hook > > > > > > ---------- --------- --------- ------- > > --------- > > > > > > left2right ngctl681 socket 00000001 upper > > > > > > left ng0 iface 00000008 > > inet > > > > > > right rl0 ether 00000004 > > lower > > > > > > right2left ngctl681 socket 00000001 lower > > > > > > > > + show rl0: > > > > Name: rl0 Type: ether ID: 00000004 Num > > hooks: 1 > > > > Local hook Peer name Peer type Peer ID Peer > > hook > > > > > > ---------- --------- --------- ------- > > --------- > > > > > > lower tee tee 00000007 right > > > > > > > > + show ng0: > > > > Name: ng0 Type: iface ID: 00000008 Num > > hooks: 1 > > > > Local hook Peer name Peer type Peer ID Peer > > hook > > > > > > ---------- --------- --------- ------- > > --------- > > > > > > inet tee tee 00000007 left > > > > > > > > > > > > > > Now I use machine 1 to ping machine 2 and here is what I get on the > > ngctl screen. > > > > > > > > Rec'd data packet on hook "lower": > > > > 0000: 00 48 54 8b 1c c8 00 02 3f 8a d6 44 08 00 45 00 > > .HT.....?..D..E. > > > > 0010: 00 3c 02 19 00 00 80 01 af 52 c0 a8 04 01 c0 a8 > > .<.......R...... > > > > 0020: 04 04 08 00 2a 5c 02 00 21 00 61 62 63 64 65 66 > > ....*\..!.abcdef > > > > 0030: 67 68 69 6a 6b 6c 6d 6e 6f 70 71 72 73 74 75 76 > > ghijklmnopqrstuv > > > > 0040: 77 61 62 63 64 65 66 67 68 69 wabcdefghi > > > > > > > > This looks kind-of right, but I don't get anything back from the ng0 > > node ( i.e no other output to ngctl.) Also, machine 1 "times out" > > its ping. > > > > > > > > BSD-1# ifconfig ng0 > > > > ng0: flags=88d1 mtu > > 1500 > > > > inet6 fe80::201:3ff:fe24:ffe3%ng0 prefixlen 64 scopeid 0x6 > > > > > > > > I've also tried giving ng0 inet addresses, but got the same results. > > > > > > > > Help! > > > > > > > > -- Len > > _______________________________________________ > > 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" > > >