From owner-freebsd-net@FreeBSD.ORG Sun Oct 2 19:22:16 2005 Return-Path: X-Original-To: freebsd-net@FreeBSD.org Delivered-To: freebsd-net@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 36ED816A41F; Sun, 2 Oct 2005 19:22:16 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (cell.sick.ru [217.72.144.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 772FA43D45; Sun, 2 Oct 2005 19:22:15 +0000 (GMT) (envelope-from glebius@FreeBSD.org) Received: from cell.sick.ru (glebius@localhost [127.0.0.1]) by cell.sick.ru (8.13.3/8.13.3) with ESMTP id j92JMDrW061863 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 2 Oct 2005 23:22:14 +0400 (MSD) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id j92JMDHw061862; Sun, 2 Oct 2005 23:22:13 +0400 (MSD) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Sun, 2 Oct 2005 23:22:13 +0400 From: Gleb Smirnoff To: noname , julian@FreeBSD.org Message-ID: <20051002192213.GA45345@cell.sick.ru> Mail-Followup-To: Gleb Smirnoff , noname , julian@FreeBSD.org, freebsd-net@freebsd.org References: <46a3a47205081415122806a653@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <46a3a47205081415122806a653@mail.gmail.com> User-Agent: Mutt/1.5.6i Cc: freebsd-net@FreeBSD.org Subject: Re: why ng_bridge does not like 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: Sun, 02 Oct 2005 19:22:16 -0000 On Mon, Aug 15, 2005 at 01:12:31AM +0300, noname wrote: n> freebsd 5.4 stable. xl0 is connected via ng_bridge to ngeth0 in this way: n> n> [root@asd:~]# ifconfig xl0 up n> [root@asd:~]# ngctl mkpeer . eiface hook ether n> [root@asd:~]# ifconfig ngeth0 up n> [root@asd:~]# ngctl mkpeer xl0: bridge lower link0 n> [root@asd:~]# ngctl name xl0:lower mybridge n> [root@asd:~]# ngctl connect ngeth0: mybridge: lower link1 n> [root@asd:~]# ngctl connect ngeth0: mybridge: upper link2 n> [root@asd:~]# ngctl msg xl0: setautosrc 0 n> [root@asd:~]# ngctl msg xl0: setpromisc 1 n> [root@asd:~]# ifconfig ngeth0 ether 00:12:12:12:12:12 n> [root@asd:~]# dhclient ngeth0 n> n> using tcpdump I can see dhcp request leaving from ngeth0, passing n> through xl0, dhcp reply comes back through xl0 but it doesn't reach n> ngeth0. Why? n> n> If I give ip-address with ifconfig, everything works fine. Also n> getting ip with dhcp to xl0, without touching netgraph works fine. Any n> clues? Do not use ngeth0: node. This is a ng_ether node, attached to Ethernet interface created by your ng_eiface. After your second command you have created ng_eiface node, and it is left unnamed. Then you use not correct node, but its ng_ether fantom. Probably we should add a protection to avoid ng_ether nodes autocreate theirselves attached to ng_eiface nodes. This is useless and confuses people. Julian, what do you think? -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE