1

My issue looks similar to this one.

I configure my Broadcom BCM4311 802.11b/g device on FreeBSD 10.3-STABLE like this:

sudo kldload if_bwn 
sudo kldload bwn_v4_ucode 
sudo kldload bwn_v4_lp_ucode 
#
# Now, interface `bwn0` is available
#
sudo ifconfig wlan0 create wlandev bwn0 
sudo ifconfig wlan0 up # at this moment, laptop WiFi LED light turns on
sudo ifconfig wlan0 scan # I can see my wireless router SSID
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf 
sudo ifconfig wlan0 list sta 
sudo dhclient wlan0 
#
# Optionally, rather than dhclient run:
#
sudo ifconfig wlan0 inet 192.168.1.103 netmask 0xffffff00

ifconfig shows wireless network status as associated:

$ ifconfig
bge0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    options=8009b<RXCSUM,TXCSUM,VLAN_MTU,VLAN_HWTAGGING,VLAN_HWCSUM,LINKSTATE>
    ether 00:15:c5:ad:63:9c
    inet 192.168.1.101 netmask 0xffffff00 broadcast 192.168.1.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: Ethernet autoselect (100baseTX <full-duplex>)
    status: active
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 0x2 
    inet 127.0.0.1 netmask 0xff000000 
    nd6 options=21<PERFORMNUD,AUTO_LINKLOCAL>
bwn0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
    ether 00:18:f3:38:a0:36
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
    status: associated
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
    ether 00:18:f3:38:a0:36
    inet 192.168.1.103 netmask 0xffffff00 broadcast 192.168.1.255 
    nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
    media: IEEE 802.11 Wireless Ethernet OFDM/48Mbps mode 11g
    status: associated
    ssid Mine channel 11 (2462 MHz 11g) bssid e8:de:27:6b:3e:67
    country US authmode WPA2/802.11i privacy ON deftxkey UNDEF
    TKIP 2:128-bit txpower 30 bmiss 7 scanvalid 60 bgscan bgscanintvl 300
    bgscanidle 250 roam:rssi 7 roam:rate 5 protmode CTS wme roaming MANUAL
$ 

I disconnect laptop Ethernet cable to check the wireless connection to router by following methods:

Wireless router shows that my laptop is listed among "Current Connected Wireless Clients":

ID  MAC
1   00:18:F3:38:A0:36

Wireless router has a diagnostic ping tool by which I can ping to my laptop, when I do that, timed out message is received:

IP Address/Domain Name: 192.168.1.103

Request timed out

From my laptop I ping to router:

$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host
^C
--- 192.168.1.1 ping statistics ---
5 packets transmitted, 0 packets received, 100.0% packet loss
$ 

arp -an output:

$ arp -an
? (192.168.1.103) at 00:18:f3:38:a0:36 on wlan0 permanent [ethernet]
? (192.168.1.1) at e8:de:27:6b:3e:67 on bge0 expires in 803 seconds [ethernet]
? (192.168.1.101) at 00:15:c5:ad:63:9c on bge0 permanent [ethernet]
$ 

netstat -r output:

$ netstat -r
Routing tables

Internet:
Destination        Gateway            Flags      Netif Expire
default            192.168.1.1        UGS        bge0
localhost          link#2             UH          lo0
192.168.1.0        link#4             U         wlan0
192.168.1.101      link#1             UHS         lo0
192.168.1.103      link#4             UHS         lo0

Internet6:
Destination        Gateway            Flags      Netif Expire
::                 localhost          UGRS        lo0
localhost          link#2             UH          lo0
::ffff:0.0.0.0     localhost          UGRS        lo0
fe80::             localhost          UGRS        lo0
fe80::%lo0         link#2             U           lo0
fe80::1%lo0        link#2             UHS         lo0
ff01::%lo0         localhost          U           lo0
ff02::             localhost          UGRS        lo0
ff02::%lo0         localhost          U           lo0
$ 

dmesg output from creating wlan0 interface up to dhclient command:

wlan0: Ethernet address: 00:18:f3:38:a0:36
bwn0: firmware version (rev 410 patch 2160 date 0x751a time 0x7c0a)
wlan0: ieee80211_new_state_locked: pending INIT -> SCAN transition lost
bwn0: status of RF switch is changed to OFF
bwn0: please turn on the RF switch
bwn0: firmware version (rev 410 patch 2160 date 0x751a time 0x7c0a)
bwn0: status of RF switch is changed to OFF
bwn0: please turn on the RF switch
wlan0: link state changed to UP
bwn0: need multicast update callback
bwn0: need multicast update callback
bwn0: need multicast update callback

Configuration files

I don't use /etc/rc.conf, I do everything manually. I use following wpa_supplicant configuration:

$ cat /etc/wpa_supplicant.conf 
network={
    ssid="Mine"
    psk=79a174594e2ec3563ff4c35c1a82a006b19df646fa020aaf53078d34d09ed962
}
$

I wonder if anybody can give a hand.


UPDATE:

Now, I'm using /etc/rc.conf like this:

#
# Kernel modules to load after local disks are mounted
#
kld_list="linux nvidia if_bwn bwn_v4_ucode bwn_v4_lp_ucode fuse"
#
# DELL LATITUDE | D820
#
hostname="D820"
#
# $ sudo ifconfig wlan0 create wlandev bwn0
#
wlans_bwn0="wlan0"
#
# $ sudo ifconfig wlan0 up
# $ sudo ifconfig wlan0 scan
# $ sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
# $ sudo dhclient wlan0
#
wpa_supplicant_conf_file="/etc/wpa_supplicant.conf"
ifconfig_wlan0="WPA DHCP"
#
# gnome3-lite desktop environment services
#
#dbus_enable="YES"
#hald_enable="YES"
#gdm_enable="YES" # GDM will start automatically when the system boots
#gnome_enable="YES"
#linux_enable="YES"
##
## To enable the tor server
##
#tor_enable="YES"
##
## web proxy of choice
##
#polipo_enable="YES"
#privoxy_enable="YES"
##
##For Linux compatibility to be enabled at boot time
##
linux_enable="YES"
  • 1
    It might be useful to include any networking specific stuff in /etc/rc.conf and /etc/wpa_supplicant.conf <- remove/alter SSID and pass. One thing that does stand out is that after you reported disconnecting the Ethernet cable, your default route is still trying to use bge0…With the Ethernet cable disconnected, what happens when you do a service netif restart (might need the wlan details in /etc/rc.conf for persistence, not sure) – forquare Jun 19 '16 at 9:34
  • 1
    OK, simple enough /etc/wpa_supplicant.conf, interesting that you don't use /etc/rc.conf, but shouldn't matter. What happens if you don't configure bge0 (i.e. your wired interface) and only configure bwn0/wlan0? – forquare Jun 19 '16 at 9:54
  • 1
    @forquare Problem solved. I rebooted and I did NOT run sudo dhclient bge0. Therefore, without assigning any IP address to bge0, I started configuring bwn0/wlan0. And now I'm writing this comment with my laptop WiFi connection. Can you please post an answer and explain what was wrong and why it got solved. – user3405291 Jun 19 '16 at 10:15
1

When you booted your laptop and configured the wired bge0 interface via dhclient, it became the default route (as seen in the rightmost column in the output of netstat -r). When you later configured your wireless bwn0 interface and disconnected the wired interface, it wasn't set to be the default route. When you tried to access the network (or reply to requests), traffic was trying to use bge0 but it was disconnected.

Rebooting your laptop you can just configure the wireless interface and not have this problem.

If you want to move from wired to wireless in the future, I believe you can do the following:

route change default -iface wlan0
route change default 192.168.1.1

This sets the default route interface to the wireless one, which resets the router address, so we re-add it in the second line.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.