On running dhclient, I get "wlan0: no link... giving up"

I get this error message. I have a good wpa_supplicant.conf file and here is my rc.conf
Code:
hostname="agevorgyan"
defaultrouter="192.168.1.1."
sshd_enable="YES"
moudesd_nondefault_enable="NO"
dumpdev="AUTO"
zfs_enable="YES"

wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
create_args_wlan0="country Ukraine regdomain etsi2"
 
Don't set defaultrouter if you use DHCP, the proper gateway will get set by DHCP.
 
I get this error message. I have a good wpa_supplicant.conf file and here is my rc.conf
Code:
hostname="agevorgyan"
defaultrouter="192.168.1.1."
sshd_enable="YES"
moudesd_nondefault_enable="NO"
dumpdev="AUTO"
zfs_enable="YES"

wlans_rtwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
create_args_wlan0="country Ukraine regdomain etsi2"
btw, I think there is a typo in defaultrouter. IMO it shouldn't have a trailing dot. anyways, the line should be removed or commented out since it should get set by DHCP.
 
it may seem odd, but I am trying to dig deep into where it is implemented in FreeBSD.
Inquiring minds want to know. That's not odd, that's admirable.

In the kernel or userspace? Where are the commands stored in the tree? What should I look for?
Everything in rc.conf is handled by the rc(8) scripts. It's a fairly complex set of shell scripts that get started by init(8) and starts with executing /etc/rc. Based on rcorder(8) the various scripts in /etc/rc.d/ get executed. For ifconfig_* /etc/rc.d/netif is important. Specifically for DHCP /etc/rc.d/dhclient. You'll notice at the top of those scripts /etc/rc.subr and /etc/network.subr are sourced. The /etc/rc.subr contains generic rc(8) related functions. The /etc/network.subr script contains all the functions related to networking.
 
Back
Top