From owner-freebsd-questions@FreeBSD.ORG Thu Dec 13 13:26:39 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 35EFEC5 for ; Thu, 13 Dec 2012 13:26:39 +0000 (UTC) (envelope-from demelier.david@gmail.com) Received: from mail-bk0-f54.google.com (mail-bk0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id B0E878FC08 for ; Thu, 13 Dec 2012 13:26:38 +0000 (UTC) Received: by mail-bk0-f54.google.com with SMTP id je9so1028846bkc.13 for ; Thu, 13 Dec 2012 05:26:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=UFWlSbVSisuA9Cqfxaraa3HVgEcm/6K9mzlPubXsac0=; b=N2N8gT2xZ+4vhw9TTmfduzyCM8Ssifa8jukeuf3tCfrNEiJwiLVyQNsbxLRpFFh0g8 2KD81QoA+2eTbCkuLMBAmckgrN8+4nNTNhAfwdbqkSpeN0bcOh5fCzKwlVY/YznyGhK8 57IkFRe+5HKYmti0umFZ0asEfn0rFIu4HW3qXeAbfrCQeT8D4XqPbgYtpcRwgW+HP/eJ 5+8PPHLX6TCauBjKlWV9dYpCsO9UCQU+rQNo5+/aVAArCszFxqgXYxBFQHTvfy4XAl7k vq3CIalLRk6ugad79GCjr2lEikVbgeGO2hFsrrQDtzlz8ZuTKrE14t04H6Ypl+CQNSHo PTTg== Received: by 10.204.147.25 with SMTP id j25mr1000175bkv.36.1355405197285; Thu, 13 Dec 2012 05:26:37 -0800 (PST) Received: from Melon.malikania.fr (wifi-osiris-sec-23-190.u-strasbg.fr. [130.79.23.190]) by mx.google.com with ESMTPS id o7sm1358621bkv.13.2012.12.13.05.26.34 (version=SSLv3 cipher=OTHER); Thu, 13 Dec 2012 05:26:36 -0800 (PST) Message-ID: <50C9D767.6000604@gmail.com> Date: Thu, 13 Dec 2012 14:25:59 +0100 From: David Demelier User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: freebsd-questions@freebsd.org Subject: Re: dhclient and random disconnects References: <50B8D04D.2020703@gmail.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Dec 2012 13:26:39 -0000 On 30/11/2012 21:15, jb wrote: > David Demelier 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@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@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@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@Melon ~ $ ifconfig ath0: flags=8843 metric 0 mtu 2290 ether 18:a9:05:87:38:0a nd6 options=21 media: IEEE 802.11 Wireless Ethernet autoselect mode 11g status: associated msk0: flags=8843 metric 0 mtu 1500 options=c019b ether 18:a9:05:87:38:0a inet6 fe80::1aa9:5ff:fe87:380a%msk0 prefixlen 64 scopeid 0x2 nd6 options=21 media: Ethernet autoselect (none) status: no carrier lo0: flags=8049 metric 0 mtu 16384 options=600003 inet6 ::1 prefixlen 128 inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3 inet 127.0.0.1 netmask 0xff000000 nd6 options=21 lagg0: flags=8843 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 media: Ethernet autoselect status: active laggproto failover lagghash l2,l3,l4 laggport: wlan0 flags=4 laggport: msk0 flags=1 wlan0: flags=8843 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 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