From owner-freebsd-net@FreeBSD.ORG Sat Nov 26 11:15:33 2005 Return-Path: X-Original-To: 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 CE4B616A41F for ; Sat, 26 Nov 2005 11:15:33 +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 E45CD43D60 for ; Sat, 26 Nov 2005 11:15:32 +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 jAQBFV9H072994 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 26 Nov 2005 14:15:31 +0300 (MSK) (envelope-from glebius@freebsd.org) Received: (from glebius@localhost) by cell.sick.ru (8.13.3/8.13.1/Submit) id jAQBFUln072993; Sat, 26 Nov 2005 14:15:30 +0300 (MSK) (envelope-from glebius@freebsd.org) X-Authentication-Warning: cell.sick.ru: glebius set sender to glebius@freebsd.org using -f Date: Sat, 26 Nov 2005 14:15:30 +0300 From: Gleb Smirnoff To: lasse.saranto@iki.fi Message-ID: <20051126111530.GF25711@cell.sick.ru> References: <1124068996.00350061.1124058001@10.7.7.3> <1128291809.00378058.1128281401@10.7.7.3> <1132421751.269790.260930@g47g2000cwa.googlegroups.com> <20051123101330.GA16522@cell.sick.ru> <7c09d1510511240045j44e4c26ala9e53ebd15e0c337@mail.gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <7c09d1510511240045j44e4c26ala9e53ebd15e0c337@mail.gmail.com> User-Agent: Mutt/1.5.6i Cc: 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: Sat, 26 Nov 2005 11:15:33 -0000 On Thu, Nov 24, 2005 at 10:45:11AM +0200, Lasse Saranto wrote: L> I have the exactly same script (although I've got Realteks) as the original L> poster. If you run dhclient ngeth0 and use tcpdump on ngeth0, you see the L> dhcp discover packets going out, but no replys. But when you use tcpdump on L> the physical interface (as said mine's rl0), you'll find out that dhcp L> replys do come back. Ngeth0 just doesn't somehow notice them. L> L> I've tried with fbsd 5.3 and 5.4. The script is incorrect as I said. When you create a ng_eiface node it is unnamed. But automatically ng_ether node is created attached under ng_eiface and this ng_ether node is named with the name of the ngeth interface. Yes, this is very odd. I should fix ng_ether attaching to ng_eifaces. L> > l> n> [root@asd:~]# ifconfig xl0 up L> > l> n> [root@asd:~]# ngctl mkpeer . eiface hook ether L> > l> n> [root@asd:~]# ifconfig ngeth0 up L> > l> n> [root@asd:~]# ngctl mkpeer xl0: bridge lower link0 L> > l> n> [root@asd:~]# ngctl name xl0:lower mybridge L> > l> n> [root@asd:~]# ngctl connect ngeth0: mybridge: lower link1 L> > l> n> [root@asd:~]# ngctl connect ngeth0: mybridge: upper link2 ^^^^^^^ Here, in these two lines the ngeth0: node is NOT ng_eiface. You should use a script like this (not tested): /usr/sbin/ngctl -f- <<-SEQ mkpeer . eiface hook ether mkpeer xl0: bridge lower link0 name xl0:lower mybridge connect .:hook mybridge: lower link1 connect .:hook mybridge: upper link2 SEQ ifconfig xl0 up ifconfig ngeth0 up L> > l> n> [root@asd:~]# ngctl msg xl0: setautosrc 0 L> > l> n> [root@asd:~]# ngctl msg xl0: setpromisc 1 L> > l> n> [root@asd:~]# ifconfig ngeth0 ether 00:12:12:12:12:12 L> > l> n> [root@asd:~]# dhclient ngeth0 -- Totus tuus, Glebius. GLEBIUS-RIPN GLEB-RIPE