Date: Fri, 4 Oct 2019 20:40:44 +0200 From: Matthias Apitz <guru@unixarea.de> To: freebsd-net@freebsd.org Subject: dhclient gives wrong IP addr when leases file exists Message-ID: <20191004184044.GA2521@c720-r342378>
next in thread | raw e-mail | index | archive | help
When I go from my home network's AP (192.168.178.1) where I have as IP addr 192.168.178.24 to the 'road' and use as AP my mobile it associates fine to the AP of my phone, but does not get a correct IP addr from it via DHCP: # ifconfig wlan0 wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 90:48:9a:92:9e:43 inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 ^^^^^^^^^^^^ groups: wlan ssid "Matthiass iPhone" channel 1 (2412 MHz 11g ht/20) bssid c6:0c:f7:42:62:81 regdomain 108 indoor ecm authmode WPA2/802.11i privacy ON deftxkey UNDEF AES-CCM 2:128-bit txpower 20 bmiss 7 scanvalid 60 protmode CTS ampdulimit 64k ampdudensity 4 shortgi wme burst roaming MANUAL media: IEEE 802.11 Wireless Ethernet MCS mode 11ng status: associated nd6 options=2b<PERFORMNUD,ACCEPT_RTADV,IFDISABLED,AUTO_LINKLOCAL> I kill the dhclient alwaya and launch it by hand to see the problem: why it is bound to the wrong IP addr (of my AP at home): # killall dhclient # dhclient wlan0 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 DHCPACK from 172.20.10.1 bound to 192.168.178.24 -- renewal in 42768 seconds. ^^^^^^^^^^^^^^^^^^^^^^^^^ ????? # ifconfig wlan0 wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 90:48:9a:92:9e:43 inet 0.0.0.0 netmask 0xff000000 broadcast 255.255.255.255 ^^^^^^^^^^^^ groups: wlan ssid "Matthiass iPhone" channel 1 (2412 MHz 11g ht/20) bssid c6:0c:f7:42:62:81 regdomain 108 indoor ecm authmode WPA2/802.11i privacy ON deftxkey UNDEF AES-CCM 2:128-bit txpower 20 bmiss 7 scanvalid 60 protmode CTS ampdulimit 64k ampdudensity 4 shortgi wme burst roaming MANUAL media: IEEE 802.11 Wireless Ethernet MCS mode 11ng status: associated nd6 options=2b<PERFORMNUD,ACCEPT_RTADV,IFDISABLED,AUTO_LINKLOCAL> When I move the file about the leases away, it works fine: # killall dhclient # mv /var/db/dhclient.leases.wlan0 /var/db/dhclient.leases.wlan0.away # dhclient wlan0 DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 6 DHCPOFFER from 172.20.10.1 DHCPREQUEST on wlan0 to 255.255.255.255 port 67 DHCPACK from 172.20.10.1 bound to 172.20.10.2 -- renewal in 42768 seconds. # ifconfig wlan0 wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500 ether 90:48:9a:92:9e:43 inet 172.20.10.2 netmask 0xfffffff0 broadcast 172.20.10.15 ^^^^^^^^^^^^^^^^ groups: wlan ssid "Matthiass iPhone" channel 1 (2412 MHz 11g ht/20) bssid c6:0c:f7:42:62:81 regdomain 108 indoor ecm authmode WPA2/802.11i privacy ON deftxkey UNDEF AES-CCM 2:128-bit txpower 20 bmiss 7 scanvalid 60 protmode CTS ampdulimit 64k ampdudensity 4 shortgi wme burst roaming MANUAL media: IEEE 802.11 Wireless Ethernet MCS mode 11ng status: associated nd6 options=2b<PERFORMNUD,ACCEPT_RTADV,IFDISABLED,AUTO_LINKLOCAL> Any ideas? matthias -- Matthias Apitz, ✉ guru@unixarea.de, http://www.unixarea.de/ +49-176-38902045 Public GnuPG key: http://www.unixarea.de/key.pub 3. Oktober! Wir gratulieren! Der Berliner Fernsehturm wird 50 aus: https://www.jungewelt.de/2019/10-02/index.php
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20191004184044.GA2521>