why ng_bridge does not like DHCP?

Gleb Smirnoff glebius at FreeBSD.org
Sun Oct 2 12:22:16 PDT 2005


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 at asd:~]# ifconfig xl0 up
n> [root at asd:~]# ngctl mkpeer . eiface hook ether
n> [root at asd:~]# ifconfig ngeth0 up
n> [root at asd:~]# ngctl mkpeer xl0: bridge lower link0
n> [root at asd:~]# ngctl name xl0:lower mybridge
n> [root at asd:~]# ngctl connect ngeth0: mybridge: lower link1
n> [root at asd:~]# ngctl connect ngeth0: mybridge: upper link2
n> [root at asd:~]# ngctl msg xl0: setautosrc 0
n> [root at asd:~]# ngctl msg xl0: setpromisc 1
n> [root at asd:~]# ifconfig ngeth0 ether 00:12:12:12:12:12
n> [root at 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


More information about the freebsd-net mailing list