[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: why ng_bridge does not like DHCP?
- To: lasse_(_dot_)_saranto_(_at_)_iki_(_dot_)_fi
- Subject: Re: why ng_bridge does not like DHCP?
- From: Gleb Smirnoff <glebius_(_at_)_freebsd_(_dot_)_org>
- Date: Sat, 26 Nov 2005 14:15:30 +0300
- Cc: net_(_at_)_freebsd_(_dot_)_org
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_(_at_)_asd:~]# ifconfig xl0 up
L> > l> n> [root_(_at_)_asd:~]# ngctl mkpeer . eiface hook ether
L> > l> n> [root_(_at_)_asd:~]# ifconfig ngeth0 up
L> > l> n> [root_(_at_)_asd:~]# ngctl mkpeer xl0: bridge lower link0
L> > l> n> [root_(_at_)_asd:~]# ngctl name xl0:lower mybridge
L> > l> n> [root_(_at_)_asd:~]# ngctl connect ngeth0: mybridge: lower link1
L> > l> n> [root_(_at_)_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_(_at_)_asd:~]# ngctl msg xl0: setautosrc 0
L> > l> n> [root_(_at_)_asd:~]# ngctl msg xl0: setpromisc 1
L> > l> n> [root_(_at_)_asd:~]# ifconfig ngeth0 ether 00:12:12:12:12:12
L> > l> n> [root_(_at_)_asd:~]# dhclient ngeth0
--
Totus tuus, Glebius.
GLEBIUS-RIPN GLEB-RIPE
_______________________________________________
freebsd-net_(_at_)_freebsd_(_dot_)_org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-net
To unsubscribe, send any mail to "freebsd-net-unsubscribe_(_at_)_freebsd_(_dot_)_org"
Visit your host, monkey.org