From owner-freebsd-net@FreeBSD.ORG Fri Feb 9 20:54:06 2007 Return-Path: X-Original-To: freebsd-net@freebsd.org 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 5576716A402 for ; Fri, 9 Feb 2007 20:54:06 +0000 (UTC) (envelope-from julian@elischer.org) Received: from outO.internet-mail-service.net (outO.internet-mail-service.net [216.240.47.238]) by mx1.freebsd.org (Postfix) with ESMTP id 3E5AB13C441 for ; Fri, 9 Feb 2007 20:54:06 +0000 (UTC) (envelope-from julian@elischer.org) Received: from mx0.idiom.com (HELO idiom.com) (216.240.32.160) by out.internet-mail-service.net (qpsmtpd/0.32) with ESMTP; Fri, 09 Feb 2007 12:31:21 -0800 Received: from [10.251.22.38] (nat.ironport.com [63.251.108.100]) by idiom.com (Postfix) with ESMTP id BDC33125ADE; Fri, 9 Feb 2007 12:54:03 -0800 (PST) Message-ID: <45CCDF66.90505@elischer.org> Date: Fri, 09 Feb 2007 12:53:58 -0800 From: Julian Elischer User-Agent: Thunderbird 1.5.0.9 (Macintosh/20061207) MIME-Version: 1.0 To: Tomas Svensson References: <45CC686F.1050409@tutus.se> In-Reply-To: <45CC686F.1050409@tutus.se> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-net@freebsd.org Subject: Re: problem with ng_device as tun replacement 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: Fri, 09 Feb 2007 20:54:06 -0000 Tomas Svensson wrote: > Hi, > > I am trying to replace the tun interface using netgraph by linking > ng_device and ng_iface: > > ngctl mkpeer iface dummy inet > ngctl mkpeer ng0: device inet inet > > then I try to use it as a drop-in replacement for tun, but it doesn't > really work: > > 1. If I send an IP packet through /dev/ngd0 (after doing a normal > open()), the packet doesn't get sent until I write a second packet to > the device. Do you know it the ng-device device is hanging onto it, or the ng_iface device is getting it but not passing it on? If you don't know, you can put a 'tee' node between them and use nghook(8) to see when the packet is passed between the nodes. > > 2. If i route packets to ng0: it works even worse, with very long and > strange delays. once again.. please use a TEE node to isolate the delays.. > > I can do the same with tun and it works fine. I also tried using the > netgraph user library to open a socket, and this works too (but I can't > use it since the performance is very poor). > Any ideas? > > -Tomas > > _______________________________________________ > 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"