Re: dhclient and random disconnects

2013-01-29 Thread J B
A follow-up:

> third,
> I would test with IPv6 disabled (entirely for the system), regardless of
> connectivity type;
> that also means to explicitly disable that failover setup line in your config
> ipv6_activate_all_interfaces="**YES"
> jb

W/r to IPv6 (disable, enable, etc):
read man pages for rc.conf(5) and search for ipv6;
then set up whatever neccessary in /etc/rc.conf after considering what is in
some preset variables in /etc/defaults/rc.conf.

Btw, where did you get that "**YES" from in your config line for failover ?
ipv6_activate_all_interfaces="**YES"

The flag is "YES" or "NO".

Also, are you running any firewall on your machine ?

jb
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dhclient and random disconnects

2013-01-29 Thread J B
There are few things you should do.

First,
w/r to you complaint about first-kill-then restart, this will do it for you
/etc/rc.d/dhclient lagg0 restart

second,
I remember you wrote that you have a trouble with disconnects even in
wireless-only setup (no failover setup). If so, you should run and debug
wireless only for the time being.
Note:
remember what wpa_supplicant does:
It handles passing the login and encryption credentials to the authentication
server.
It also handles roaming from one wireless access point to another, in order to
maintain connectivity.
Here are some hints on setup:
http://hostap.epitest.fi/gitweb/gitweb.cgi?p=hostap.git;a=blob_plain;f=wpa_supplicant/wpa_supplicant.conf
and
http://www.freebsd.org/cgi/man.cgi?query=wpa_supplicant&sektion=8
and debugging:
http://www.examplenow.com/wpa_supplicant/

third,
I would test with IPv6 disabled (entirely for the system), regardless of
connectivity type;
that also means to explicitly disable that failover setup line in your config
ipv6_activate_all_interfaces="**YES"

jb
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dhclient and random disconnects

2013-01-28 Thread David Demelier
The thing very annoying, is that when my wireless disconnects, I must wait
until wpa_supplicant re-associate to the AP. Then I have no working
connection until I redo dhclient lagg0.

And running dhclient lagg0 will say dhclient already running.. So I always
need to kill it before. That issue does not let me work efficiently as I
need to connect me again and again..


2012/12/14 David Demelier 

> On 13/12/2012 23:39, jb wrote:
>
>> David Demelier  gmail.com> writes:
>>
>>  ...
>>> 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"
>>>
>> According to the example in:
>> http://www.freebsd.org/doc/en_**US.ISO8859-1/books/handbook/**
>> network-aggregation.html
>>
>> this line is missing in your setup:
>> wlans_ath0="wlan0"
>>
>> which is also mentioned in:
>> /etc/defaults/rc.conf
>> ...
>> #wlans_ath0="wlan0" # wlan(4) interfaces for ath0 device
>> ...
>>
>> I can not test it as I do not have access to a FB machine right now.
>> jb
>>
>>
>>
>>
>> __**_
>> freebsd-questions@freebsd.org mailing list
>> http://lists.freebsd.org/**mailman/listinfo/freebsd-**questions
>> To unsubscribe, send any mail to "freebsd-questions-**
>> unsubscr...@freebsd.org "
>>
>
> Yes it is, but was earlier in the rc.conf, I forgot to paste it sorry,
>
> David
>



-- 
Demelier David
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dhclient and random disconnects

2012-12-13 Thread David Demelier

On 13/12/2012 23:39, jb wrote:

David Demelier  gmail.com> writes:


...
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"

According to the example in:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-aggregation.html

this line is missing in your setup:
wlans_ath0="wlan0"

which is also mentioned in:
/etc/defaults/rc.conf
...
#wlans_ath0="wlan0" # wlan(4) interfaces for ath0 device
...

I can not test it as I do not have access to a FB machine right now.
jb




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Yes it is, but was earlier in the rc.conf, I forgot to paste it sorry,

David
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dhclient and random disconnects

2012-12-13 Thread jb
David Demelier  gmail.com> writes:

> ... 
> 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"

According to the example in:
http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-aggregation.html

this line is missing in your setup:
wlans_ath0="wlan0" 

which is also mentioned in:
/etc/defaults/rc.conf
...
#wlans_ath0="wlan0" # wlan(4) interfaces for ath0 device
...

I can not test it as I do not have access to a FB machine right now.
jb




___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dhclient and random disconnects

2012-12-13 Thread jb
David Demelier  gmail.com> writes:

> ...

Logs are your friends.

If the lease actually expires and you have to get a new IP (a new lease), then
you could have a temporary disconnect.
But if dhcp server(s) are working correctly the lease should be renewed or
rebound without problems.

Search  for "dhc" and check how much time (see time stamps) it takes to renew, 
or rebind your IP address, or if it has any trouble with both of them and it is
forced to obtain a new lease:

$ less -i /var/log/messages

Look for any other errors in there too - e.g. WPA2 encryption protocol related,
like failing of security key exchange.

If you find any, post a sufficient copy to the list here.
jb



___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: dhclient and random disconnects

2012-12-13 Thread David Demelier

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-unsubscr...@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="anonym...@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=63
inet6 ::1 prefixlen 128
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x3
inet 127.0.0.1 netmask 0xff00
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 0x 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:9

Re: dhclient and random disconnects

2012-11-30 Thread jb
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-unsubscr...@freebsd.org"


dhclient and random disconnects

2012-11-30 Thread David Demelier

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.


I have never found a solution for that, so I tried for testing, to use 
dhcpcd instead, and it seems to work, I don't have disconnects anymore.


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?


I don't care about using dhcpcd instead of dhclient, but I would like to 
make it working instead of dhclient but 
dhclient_program="/usr/local/sbin/dhcpcd" in the rc.conf does not start 
dhcpcd at boot.


Cheers,

--
David Demelier
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"