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.
cloned_interfaces="lagg0"
ifconfig_msk0="up"
ifconfig_ath0="ether 18:a9:05:87:38:0a"
ifconfig_wlan0="WPA"
ifconfig_lagg0="laggproto failover laggport msk0 laggport wlan0 DHCP"
ipv6_activate_all_interfaces="YES"

my wpa_supplicant.conf is like this :

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=wheel
eapol_version=1
ap_scan=1
fast_reauth=1

network={
     ssid="osiris-sec"
     proto=WPA2 WPA
     scan_ssid=1
     key_mgmt=WPA-EAP
     pairwise=CCMP TKIP
     group=CCMP TKIP
     eap=TTLS
     ca_cert="/etc/iut-cert.pem"
     anonymous_identity="anonymous at u-strasbg.fr"
     phase2="auth=PAP"
     identity="demelier"
     password="***"
}

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

lease {
   interface "lagg0";
   fixed-address 172.29.23.190;
   option subnet-mask 255.255.0.0;
   option routers 172.29.255.254;
   option domain-name-servers 130.79.200.200;
   option domain-name "u-strasbg.fr";
   option dhcp-lease-time 300;
   option dhcp-message-type 5;
   option dhcp-server-identifier 172.29.255.253;
   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
options=c019b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,TSO4,VLAN_HWTSO,LINKSTATE>
     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
     options=600003<RXCSUM,TXCSUM,RXCSUM_IPV6,TXCSUM_IPV6>
     inet6 ::1 prefixlen 128
     inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
     inet 127.0.0.1 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 172.29.23.190 netmask 0xffff0000 broadcast 172.29.255.255
     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..

Cheers,

David Demelier


More information about the freebsd-questions mailing list