From owner-freebsd-net@FreeBSD.ORG Mon Oct 22 05:06:40 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 3609916A41B for ; Mon, 22 Oct 2007 05:06:40 +0000 (UTC) (envelope-from sandiegobiker@gmail.com) Received: from wx-out-0506.google.com (wx-out-0506.google.com [66.249.82.233]) by mx1.freebsd.org (Postfix) with ESMTP id CC55113C480 for ; Mon, 22 Oct 2007 05:06:39 +0000 (UTC) (envelope-from sandiegobiker@gmail.com) Received: by wx-out-0506.google.com with SMTP id i29so1107469wxd for ; Sun, 21 Oct 2007 22:06:31 -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:mime-version:content-type; bh=zfvxyvgYoYcCt2x+VLXwo8mbGWDYcheO9lkJbiIvRSY=; b=q48PNHMz6mm1dUZO8tLsdNiLksZy8w9Kq3UHAUUNa/F2UyQiLyEljcI0jxacrx6Mw/MXEJjwgMzEpiQou2VspWTY1pYmqhuG8ibg3VBQhxvj0DjiptqktEORnE8iYngaEiCtz84S2fJu4LWe+BzT2ppzlXIBGRAj19kaDtZNASg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type; b=aCOT2wojIcKOF3PRq2kO1PHwyOKtG+fkCfuzz7ubo3vaqTHmPO79XYIHT6ppi3sqtzV20mEEvzKMCcwwBKgb7rGHIrN/BKyoUmUuL7fp/HBIePGkO0I02grK6kc7PYtqwBCS9sr/gjoyOER+Q+lwcd+3PFRQmew5ulF+Gd+REWM= Received: by 10.70.47.19 with SMTP id u19mr8125458wxu.1193029590713; Sun, 21 Oct 2007 22:06:30 -0700 (PDT) Received: by 10.70.19.9 with HTTP; Sun, 21 Oct 2007 22:06:30 -0700 (PDT) Message-ID: <27cb3ada0710212206h6460a7a6heb9a82dde4d9f1dd@mail.gmail.com> Date: Sun, 21 Oct 2007 22:06:30 -0700 From: "Len Gross" To: "freebsd-net@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: 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: Mon, 22 Oct 2007 05:06:40 -0000 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.) 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