Date: Sat, 26 Nov 2005 14:15:30 +0300 From: Gleb Smirnoff <glebius@freebsd.org> To: lasse.saranto@iki.fi Cc: net@freebsd.org Subject: Re: why ng_bridge does not like DHCP? Message-ID: <20051126111530.GF25711@cell.sick.ru> In-Reply-To: <7c09d1510511240045j44e4c26ala9e53ebd15e0c337@mail.gmail.com> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051126111530.GF25711>