dhclient and random disconnects

David Demelier demelier.david at gmail.com
Thu Dec 13 13:26:39 UTC 2012

On 30/11/2012 21:15, jb wrote:
> David Demelier <demelier.david <at> gmail.com> writes:
>> Hi,
>> In my university, I have a WPA-EAP wifi access point, it requires
>> authentification to access, with dhclient, I'm disconnected randomly and
>> I must run wpa_cli reconfigure / dhclient again to get it working.
> This is really too general - it could be a problem with AP or your box.
> When you say randomly, do you mean like every hour or so, or every 10 min or
> so ? What is the pattern ?
> Does it happen that your box is left alone for extended period of time, that
> is without user and active application activity, while being connected ? If
> so, do you find your box disconnected after such time (what is the time
> interval) ?
> Do the disconnects happen at IP lease renewal times (see output below) ?
>> What could the problem be with dhclient? I don't know very well what
>> these processes are doing. Does the process check for lease by a
>> specific interval?
> Yes, it does IP lease renewal.
> Post to the list the following outputs while using dhclient:
> Your wireless configuration (relevant data only):
> $ cat /etc/rc.conf
> Review /etc/defaults/rc.conf w/r to dhclient and wpa_supplicant.
> Do you have anything related to your wireless card driver in loader(8)
> tunables or sysctl(8) variables ?
> Your wpa_supplicant_conf_file, presumably:
> $ cat /etc/wpa_supplicant.conf
> $ ps auxwww | grep -i dhclient
> Config file:
> $ cat /etc/dhclient.conf
> Your lease renewal log file:
> # cat /var/db/dhclient.leases.????
> $ ifconfig -a
> $ netstat -s
> Any wireless card driver related messages (substitute wpi for yours):
> $ grep -i wpi /var/log/messages
> After that spend some time with:
> $ apropos dhclient
> dhclient(8)              - Dynamic Host Configuration Protocol (DHCP) client
> dhclient-script(8)       - DHCP client network configuration script
> dhclient.conf(5)         - DHCP client configuration file
> dhclient.leases(5)       - DHCP client lease database
> You should not hesitate to contact, if possible, your Uni sys admin and ask
> about it.
> By now you should be an expert - after all you use FreeBSD for a reason :-)
> jb
> _______________________________________________
> freebsd-questions at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe at freebsd.org"

Hello thanks for your answer,

I have setup lagg0 for a failover with ethernet, (note the problem 
appears if I use wlan0 only too)

# Fail over between wired/wireless.
ifconfig_ath0="ether 18:a9:05:87:38:0a"
ifconfig_lagg0="laggproto failover laggport msk0 laggport wlan0 DHCP"

my wpa_supplicant.conf is like this :


     proto=WPA2 WPA
     pairwise=CCMP TKIP
     group=CCMP TKIP
     anonymous_identity="anonymous at u-strasbg.fr"

The dhclient.leases.lagg0 is populated with a very long list of :

lease {
   interface "lagg0";
   option subnet-mask;
   option routers;
   option domain-name-servers;
   option domain-name "u-strasbg.fr";
   option dhcp-lease-time 300;
   option dhcp-message-type 5;
   option dhcp-server-identifier;
   option dhcp-renewal-time 150;
   option dhcp-rebinding-time 262;
   renew 4 2012/12/13 13:16:16;
   rebind 4 2012/12/13 13:18:08;
   expire 4 2012/12/13 13:18:46;

I dont have any driver settings in sysctl.

And the ifconfig :

markand at Melon ~ $ ifconfig
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
     ether 18:a9:05:87:38:0a
     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
     media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
     status: associated
msk0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
     ether 18:a9:05:87:38:0a
     inet6 fe80::1aa9:5ff:fe87:380a%msk0 prefixlen 64 scopeid 0x2
     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
     media: Ethernet autoselect (none)
     status: no carrier
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> metric 0 mtu 16384
     inet6 ::1 prefixlen 128
     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
     inet netmask 0xff000000
     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
lagg0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
     ether 18:a9:05:87:38:0a
     inet6 fe80::1aa9:5ff:fe87:380a%lagg0 prefixlen 64 scopeid 0x4
     inet netmask 0xffff0000 broadcast
     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
     media: Ethernet autoselect
     status: active
     laggproto failover lagghash l2,l3,l4
     laggport: wlan0 flags=4<ACTIVE>
     laggport: msk0 flags=1<MASTER>
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
     ether 18:a9:05:87:38:0a
     inet6 fe80::1aa9:5ff:fe87:380a%wlan0 prefixlen 64 scopeid 0x5
     nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
     media: IEEE 802.11 Wireless Ethernet OFDM/48Mbps mode 11g
     status: associated
     ssid osiris-sec channel 6 (2437 MHz 11g) bssid 00:26:99:23:6d:53
     regdomain 106 indoor ecm authmode WPA2/802.11i privacy ON
     deftxkey UNDEF AES-CCM 2:128-bit AES-CCM 3:128-bit txpower 20 bmiss 7
     scanvalid 450 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
     roam:rate 5 protmode CTS wme burst roaming MANUAL bintval 102

I will also send a mail to the admin to check if I have done something 
wrong or if it is a renegociation problem..


David Demelier

More information about the freebsd-questions mailing list