From owner-freebsd-net@FreeBSD.ORG Mon Sep 28 21:50:48 2009 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 DCBED106566B; Mon, 28 Sep 2009 21:50:48 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-yx0-f171.google.com (mail-yx0-f171.google.com [209.85.210.171]) by mx1.freebsd.org (Postfix) with ESMTP id 620978FC13; Mon, 28 Sep 2009 21:50:48 +0000 (UTC) Received: by yxe1 with SMTP id 1so5691673yxe.3 for ; Mon, 28 Sep 2009 14:50:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=acVVDy7kz5JP22RL42vmX5/P75SC0KCAk6fs8QtCQl8=; b=S5anyrvsHYieZuNG0HR+IyminkEMyk2WI9Mtcv3Z1j7A/MDfsb1qod6ANTetTdR0VS aR1pMTt1Qg6ZPPyjrYoJMjKeWqH82KTZlVsm4tmQPEQmjLcuoYKk2bVMCiOKcKbglUrz 1WlK4Euh1lcsQb480Uxrb6NyOlL8pky8F8VVk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=V2zkeiM7kWt/P/o7wH7TfWfqqzgVq9mpJfPfhJ6O6ohJZrHHaUYYff4RF5njhKnm58 A8fzdhRpJkS4b2gV/rysIJH8mR5kd1ppzb3VZKqd6pnlICwFt494suL38Z6fw2NIhLZV y6IKI7t5LorQGYnHrQ/db0DXHhJg0ZzQZWz4c= MIME-Version: 1.0 Received: by 10.150.132.11 with SMTP id f11mr8649682ybd.280.1254174647737; Mon, 28 Sep 2009 14:50:47 -0700 (PDT) In-Reply-To: References: <6201873e0909281321s51e3d485i1074954d43b657d6@mail.gmail.com> Date: Mon, 28 Sep 2009 16:50:47 -0500 Message-ID: <6201873e0909281450x2d457608yd0548db12fb21a97@mail.gmail.com> From: Adam Vande More To: Juli Mallett Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-net@freebsd.org Subject: Re: tap dhcp 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, 28 Sep 2009 21:50:48 -0000 On Mon, Sep 28, 2009 at 4:14 PM, Juli Mallett wrote: > On Mon, Sep 28, 2009 at 13:21, Adam Vande More > wrote: > > Am I doing something wrong here? > > That depends on what you're expecting to happen. What do you think > tap(4) does and what are you trying to accomplish with using it? > Interface bridging controls what happens on packet ingress =97 when a > packet comes in on one side of the bridge it is forwarded out the > other. When dhclient(8) sends out a DHCPDISCOVER on tap0, that goes > through the interface output routine. tap(4) works such that then > would go to a user-space process reading from tap0 and then that > process would forward it on to somewhere else where eventually it > might find a DHCP server. If it does, the DHCP reply would come back, > that user-space process would inject it into the kernel and the > bridging code would pass it out em0. > > I don't entirely understand, let's try a different example. Say we start with the same logical setup minus DHCP: kldload if_tap if_bridge sysctl net.link.tap.user_open=3D1 ifconfig tap0 create ifconfig bridge create ifconfig bridge0 addm tap0 addm em0 Suppose em0 is at 192.168.0.10 and another system 192.168.0.1. Then I can manually assign 192.168.0.11 to tap0 and enter this: ping -S 192.168.0.11 192.168.0.1 Should I recieve a response? From tap(4), and other examples my understanding is yes, but that is not what I'm seeing in practice. Forgive my ignorance, but wouldn't bridge0 pass a response back to tap0? My goal is essentially clone my network connection recieving two DHCP lease= s to the same box. Also I am aware of ifconfig alias, but that didn't seem u= p to the task. --=20 Adam Vande More