From owner-freebsd-questions@FreeBSD.ORG Thu Mar 24 07:05:09 2011 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 893871065672 for ; Thu, 24 Mar 2011 07:05:09 +0000 (UTC) (envelope-from devnullaccount@yahoo.se) Received: from nm13-vm0.bullet.mail.ird.yahoo.com (nm13-vm0.bullet.mail.ird.yahoo.com [77.238.189.195]) by mx1.freebsd.org (Postfix) with SMTP id EE1BD8FC13 for ; Thu, 24 Mar 2011 07:05:08 +0000 (UTC) Received: from [77.238.189.234] by nm13.bullet.mail.ird.yahoo.com with NNFMP; 24 Mar 2011 07:05:07 -0000 Received: from [212.82.108.253] by tm15.bullet.mail.ird.yahoo.com with NNFMP; 24 Mar 2011 07:05:07 -0000 Received: from [127.0.0.1] by omp1018.mail.ird.yahoo.com with NNFMP; 24 Mar 2011 07:05:07 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 973897.35666.bm@omp1018.mail.ird.yahoo.com Received: (qmail 2546 invoked by uid 60001); 24 Mar 2011 07:05:07 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.se; s=s1024; t=1300950307; bh=W4/ZZKOmo5ZFjmqAd0mz8XsDucaNhUHMMKzVlIdrXhE=; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=gA0cE9UgZHwM4u6yWD8SE1Qs+6MYSGrGgxmb8VsrUxY+zGMCORrkjXFkNRABuWMM37J1dBiDS+Wy+5yCl2FPUhBsp/fawOhJTIyDJZuXxvBoOmZ8e/rq8+/DVwsiza34oIEradecTsVp6kgBjOD+ge/jq6eklokuq6TBvr8iC/M= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.se; h=Message-ID:X-YMail-OSG:Received:X-Mailer:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=wjViQOmlOTJrlkqiWkCxlZ/crTTZ2Y5My02R3O49eguQ1XFfjC0MLyDte7TJgkLT9dB1D16D4GJsgtNjkfd8T1YCpEOpPRTBoNAE9CEV7d1bgXQz+VBOBvF5GC7ZxoIvxwNngb7WTvuq/IlEdNM66Gf/ToDQ8jrd/C3qjMQ319U=; Message-ID: <731656.82698.qm@web29002.mail.ird.yahoo.com> X-YMail-OSG: l5Wi4ugVM1lcRnjcc8W.Wx0LhpoumxZBTQAc1ojqLK3zp0P OM7_FmqB7DKtLdc0yeDDVo5MTqOAvCvI1VSOcuemWH9b4WtgGsSoVwMh9LbK mW2LF3F2vvvojYxaT_ADA3vnv3m0VVMFaI.QSHh.LdeUs5bXNIklH5IdoJE7 _Nm46jF9Vk2wsVVeB1X67a163D3sYZaRtlgtrAPVpbfpSptID6wlw5R.R8lW PA1Rb2JgxIQix7mfmkuLtiBNet7zMXhrcrK4XZ.BI4fxhwmUrgZ2FdfPzI00 kniTpKjwlrY9MREYKr8euwDz0fHBhXVvAhI4dkN1SyWmnvgMV9zQq9BW2DY_ h8G0RS2hu0dWi.3CXIdDb9ZXtuGI- Received: from [213.113.1.56] by web29002.mail.ird.yahoo.com via HTTP; Thu, 24 Mar 2011 07:05:07 GMT X-Mailer: YahooMailClassic/11.4.20 YahooMailWebService/0.8.109.295617 Date: Thu, 24 Mar 2011 07:05:07 +0000 (GMT) From: Chris To: Nerius Landys In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-questions@freebsd.org Subject: Re: Bridge, dpcpd, sshd X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Mar 2011 07:05:09 -0000 --- On Thu, 3/24/11, Nerius Landys wrote: > From: Nerius Landys > Subject: Re: Bridge, dpcpd, sshd > To: "Chris" > Cc: freebsd-questions@freebsd.org > Date: Thursday, March 24, 2011, 1:56 AM > > > > I have a server machine that I use as DHCP server, > sshd login etc, and since I have multiple Ethernet > interfaces on it, I would like to use two of those for the > internal network to avoid adding one more ethernet switch > for just one extra machine. DHCP should configure hosts on > both those interfaces and all the hosts should be on the > same subnet. > > > > So, I set up a bridge interface as per the FreeBSD > handbook (ch. 31.5), but now dhcpd is refusing to start > during boot as it claim that the "bridge0" interface doesn't > exist. If I manually start dhcpd with the same parameters > after the machine has come up, it will start and it will > also work as expected and assign addresses to users > connecting from teh bridge interface. > > > > sshd seems to do something similar, it refuses to > start, but can manually be re-started later on. > > > > Is this some kinf of expected behavior, or does it > sound like I'm doing something badly wrong? Can I force > bride0 to be configured earlier in the boot so it is always > there when the daemons start waking up? > > > > Configuration info below. > > > > TIA, > > =A0Chris > > > > =3D=3D=3D=3D=3D rc.conf extract =3D=3D=3D=3D > > dhcpd_enable=3D"YES" > > dhcpd_ifaces=3D"bridge0" > > cloned_interfaces=3D"bridge0" > > ifconfig_bridge0=3D"addm dc0 addm dc1 up" > > ifconfig_bridge0=3D"inet 172.16.0.100/24" > > ifconfig_dc0=3D"up" > > ifconfig_dc1=3D"up" > > > > =3D=3D=3D=3D=3D sshd.conf extract =3D=3D=3D=3D=3D > > ListenAddress 172.16.0.100 > > > > =3D=3D=3D the dhcpd.conf is quite standard and does not say > anything about the interfaces, that info is in rc.conf above > =3D=3D=3D=3D > > > > =3D=3D=3D /var/log/messages extract =3D=3D=3D=3D > > =A0dhcpd: bridge0: not found >=20 > I am running a very similar setup.=A0 I learned from my > own experience > that sometimes little things like the order of statements > or what's > exactly inside the statement affects the outcome.=A0 In > any case after > much tweaking I got my router to work, and here is my > complete > rc.conf.=A0 People on this mailing list have helped me > come up with my > rc.conf (thank you all): >=20 > gateway_enable=3D"YES" > hostname=3D"speedy.i" > ifconfig_fxp2=3D"DHCP" > cloned_interfaces=3D"bridge0" > ifconfig_bridge0=3D"addm fxp0 addm fxp1 addm re0 addm ath0 > up" > ifconfig_fxp0=3D"up" > ifconfig_fxp1=3D"up" > ifconfig_re0=3D"up" > ifconfig_ath0=3D"ssid speedy.i mode 11g mediaopt hostap > channel 2 -bgscan up" > ipv4_addrs_bridge0=3D"192.168.0.254/24" > ipnat_enable=3D"YES" > hostapd_enable=3D"YES" > sshd_enable=3D"YES" > named_enable=3D"YES" > ntpdate_enable=3D"YES" > ntpd_enable=3D"YES" > linux_enable=3D"YES" > dhcpd_enable=3D"YES" > dhcpd_ifaces=3D"bridge0" > apache22_enable=3D"YES" >=20 > The ath0 stuff is for a wireless access point and is not > needed in > your case.=A0 The rest you can probably understand. >=20 > fxp2 is the external facing interface, it's what is > connecting to AT&T > UVerse via DHCP. >=20 > The line "ipv4_addrs_bridge0" is important and from what I > recall it > needs to come after the interfaces are brought up, just > like in the > above rc.conf. >=20 > Of course there is also some dhcpd config that is not > present here. >=20 > If you still can't get it to work, try disabling dhcpd to > have a > static IP network, try getting that to work first.=A0 > Then add dhcpd > once the static network is working. >=20 Hi Nerius and thanks for your reply. I tried changing rc.conf as per your suggestion and added the ipv4_addrs_ c= ommand, but it did not manage to set any address on the bridge anyway, and = I'm still getting errors starting the daemons because the bridge isn't crea= ted yet. And then I realized how long it has been since I upgraded that machine, it'= s actually running FreeBSD-6.0 (I'm a bit ashamed here...), so I would gues= s that it is so far outdated that these things aren't supposed to work. I g= uess I'll have to bite the bullet and reinstall the machine this weekend an= d try again with the same config and see if that makes it any better. I'll = come back to the list if that doesn't solve it. Thanks for the help /Chris =0A=0A=0A