From owner-freebsd-questions@freebsd.org Thu Dec 27 12:42:24 2018 Return-Path: Delivered-To: freebsd-questions@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id E946C135DA84; Thu, 27 Dec 2018 12:42:23 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from mx.catwhisker.org (mx.catwhisker.org [198.144.209.73]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 6C8FB71C21; Thu, 27 Dec 2018 12:42:21 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.15.2/8.15.2) with ESMTP id wBRCgIfV032325; Thu, 27 Dec 2018 12:42:18 GMT (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.15.2/8.15.2/Submit) id wBRCgIJ5032324; Thu, 27 Dec 2018 04:42:18 -0800 (PST) (envelope-from david) Date: Thu, 27 Dec 2018 04:42:18 -0800 From: David Wolfskill To: freebsd-questions@freebsd.org, freebsd-wireless@freebsd.org Subject: Re: DHCP problems while connecting with a Wifi AP Message-ID: <20181227124218.GT22302@albert.catwhisker.org> References: <20181227122517.GA3208@c720-r314251> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="Nx8xdmI2KD3LNVVP" Content-Disposition: inline In-Reply-To: <20181227122517.GA3208@c720-r314251> User-Agent: Mutt/1.11.1 (2018-12-01) X-Rspamd-Queue-Id: 6C8FB71C21 X-Spamd-Bar: --------- Authentication-Results: mx1.freebsd.org; spf=pass (mx1.freebsd.org: domain of david@catwhisker.org designates 198.144.209.73 as permitted sender) smtp.mailfrom=david@catwhisker.org X-Spamd-Result: default: False [-9.05 / 15.00]; ARC_NA(0.00)[]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip4:198.144.209.73]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.20)[multipart/signed,text/plain]; TO_DN_NONE(0.00)[]; DMARC_NA(0.00)[catwhisker.org]; NEURAL_HAM_LONG(-1.00)[-1.000,0]; RCVD_COUNT_THREE(0.00)[3]; IP_SCORE(-3.68)[ip: (-9.73), ipnet: 198.144.192.0/19(-4.77), asn: 7961(-3.82), country: US(-0.08)]; MX_GOOD(-0.01)[cached: mx.catwhisker.org]; RCPT_COUNT_TWO(0.00)[2]; RCVD_IN_DNSWL_NONE(0.00)[73.209.144.198.list.dnswl.org : 127.0.10.0]; NEURAL_HAM_SHORT(-0.96)[-0.961,0]; SIGNED_PGP(-2.00)[]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+,1:+]; ASN(0.00)[asn:7961, ipnet:198.144.192.0/19, country:US]; RCVD_TLS_LAST(0.00)[] X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Dec 2018 12:42:24 -0000 --Nx8xdmI2KD3LNVVP Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Dec 27, 2018 at 01:25:17PM +0100, Matthias Apitz wrote: >=20 > Hello, >=20 > I'm using my (Ubuntu) mobile device as AP to connect my FreeBSD laptop > to the Internet. While this is working fine most of the times, I > encounter in some situation problems getting an IP addr with DHCP from > the mobile. It looks somehow like a race condition between WPA > associating and DHCP (dhclient) asking to early (and giving up). Here is > a typical situation when it does not work: > ...=20 > Any ideas re/ the following question: >=20 > 1. How could I delay the dhclient until connection is fine? > 2. Why the BOOTP/DHCP are not logged by the ipfilter? >=20 > This could smell as a problem caused by the AP, but any other device > (for example an iPhone) connects fine and gets an IP addr. >=20 > Thanks >=20 > matthias > .... You might investigate the use of "synchronous_dhclient" in /etc/rc.conf: synchronous_dhclient (bool) Set to =E2=80=9CYES=E2=80=9D to start dhclient(8) s= ynchronously at startup. This behavior can be overridden on a per-interfa= ce basis by replacing the =E2=80=9CDHCP=E2=80=9D keyword in t= he ifconfig_=E2=9F=A8interface=E2=9F=A9 variable with =E2=80= =9CSYNCDHCP=E2=80=9D or =E2=80=9CNOSYNCDHCP=E2=80=9D. FWIW, I use 'synchronous_dhclient=3D"YES"' in my laptop's /etc/rc.conf, (and have done since 2012/01/26 12:39:23). Peace, david --=20 David H. Wolfskill david@catwhisker.org Yes, Mr. Trump, your behavior IS a disgrace -- to put it very nicely. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --Nx8xdmI2KD3LNVVP Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGTBAEBCgB9FiEE4owz2QxMJyaxAefyQLJg+bY2PckFAlwkyKpfFIAAAAAALgAo aXNzdWVyLWZwckBub3RhdGlvbnMub3BlbnBncC5maWZ0aGhvcnNlbWFuLm5ldEUy OEMzM0Q5MEM0QzI3MjZCMTAxRTdGMjQwQjI2MEY5QjYzNjNEQzkACgkQQLJg+bY2 Pckcugf8CAeKralLco48xtNjvAjNnmAlgPKnZS2BLbFI35GGxJTpXnlYeThbdDwL 2q+0zgZpakVMAquHfmpGavM04QH+vwb8nseIXS4i9X8qGoSdFtV3bJOwCnSLsTAv hPLeVY1VXhzAi6DDwYGvOvO+Dt3/fnzvCcGZAIoHfD/gZ8077DK6DX2xRqcW6iER ZIM6VP32S/2dFs1h1w0zt690S/2WXbxby8dF/7ft6cIwJjuLftFQxZPnE8wQG1go SCOkuerNQXkCSrhHey7HNAetTem3q+l1qnd3IHHjRFDcYwtSE1Ac+1Onabl2hvac Kf8mO0z7shEhFHbbOMQBwjCii1gQyw== =hw90 -----END PGP SIGNATURE----- --Nx8xdmI2KD3LNVVP--