Date: Fri, 13 Mar 2009 02:20:57 -0500 From: Brooks Davis <brooks@freebsd.org> To: Olivier Cochard-Labb? <olivier@freenas.org> Cc: freebsd-current@freebsd.org Subject: Re: How to configure DHCP client on a bridge ? Message-ID: <20090313072057.GA65389@lor.one-eyed-alien.net> In-Reply-To: <3131aa530903122333x244bd56aue4f4179991942aea@mail.gmail.com> References: <3131aa530903122333x244bd56aue4f4179991942aea@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --] On Fri, Mar 13, 2009 at 07:33:15AM +0100, Olivier Cochard-Labb? wrote: > Hi, > > I'm trying to follow the advice fount in the handbook by configuring > the IP address on the bridge0 interface rather than on a member > interface. > Then I've configured my rc.conf like that: > > cloned_interfaces="bridge0" > ifconfig_bridge0="addm bge0 addm xl0 DHCP" > ifconfig_bge0="up" > ifconfig_xl0="up" > > But, with this configuration, the dhclient didn't start automatically > on the bridge0 interface. > After a reboot, my bridge0 status is: > [olivier@d630]~>ifconfig bridge0 > bridge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 > ether 82:03:c8:73:85:cc > id 00:00:00:00:00:00 priority 32768 hellotime 2 fwddelay 15 > maxage 20 holdcnt 6 proto rstp maxaddr 100 timeout 1200 > root id 00:00:00:00:00:00 priority 32768 ifcost 0 port 0 > member: xl0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> > ifmaxaddr 0 port 5 priority 128 path cost 55 > member: bge0 flags=143<LEARNING,DISCOVER,AUTOEDGE,AUTOPTP> > ifmaxaddr 0 port 2 priority 128 path cost 55 > > I need to manually start the dhclient on the bridge0 for getting my IP address: > > [root@d630]~#dhclient bridge0 > DHCPREQUEST on bridge0 to 255.255.255.255 port 67 > DHCPNAK from 192.168.100.254 > DHCPDISCOVER on bridge0 to 255.255.255.255 port 67 interval 6 > DHCPOFFER from 192.168.100.254 > DHCPREQUEST on bridge0 to 255.255.255.255 port 67 > DHCPACK from 192.168.100.254 > bound to 192.168.100.58 -- renewal in 432000 seconds. > > I'm ussing current: > [root@d630]~#uname -a > FreeBSD d630.freenas.org 8.0-CURRENT FreeBSD 8.0-CURRENT #14: Thu Mar > 12 14:17:22 CET 2009 > root@d630.freenas.org:/usr/obj/usr/src/sys/DellD630 amd64 > > What is the good rc.conf parameters for using a dhclient on a bridge interface ? The problem here is that bridge doesn't generate link state events and thus dhclient never runs. A workaround would be to change DHCP to SYNCDHCP which should work assuming the interface that can see the dhcp server comes up before dhclient gives up. -- Brooks [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD4DBQFJuglZXY6L6fI4GtQRAqqrAKC540Q6FXmxSMDKgtAA25pIPxGDUQCY5RIX jF0BTAatPcmVbzwbAZFydQ== =EdFb -----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20090313072057.GA65389>
