# No wifi access without wired connection



## sprock (Nov 11, 2019)

Hello,

I just got wifi working on my MacPro (11.3-RELEASE) via its BCM4321 card.  I can access the machine on the wifi interface via ssh, but only if there is also a wired connection.  I have this same behaviour (tested on a different machine) using a D-Link USB wifi card that uses the 'run' driver, so I doubt the problem is with the BCM4321 or the 'bwn' driver.

I appreciate any hints on what might be the problem.

Thanks,
sprock


----------



## SirDice (Nov 11, 2019)

How did you configure your interfaces? Post the relevant parts from rc.conf.


----------



## sprock (Nov 11, 2019)

Hello,


```
ifconfig_em0="192.168.0.11 netmask 255.255.255.0"
defaultrouter="192.168.0.1"
ifconfig_em0_ipv6="inet6 accept_rtadv"
```

I started the wlan device like this:


```
sudo ifconfig wlan0 create wlandev bwn0
sudo ifconfig wlan0 up
sudo ifconfig wlan0 scan
sudo wpa_supplicant -B -i wlan0 -c /etc/wpa_supplicant.conf
```

Thanks,
sprock


----------



## SirDice (Nov 11, 2019)

While your wireless may be _associated_, you're not really connected because you never configure an IP address on your wireless interface. 


```
#ifconfig_em0="192.168.0.11 netmask 255.255.255.0"
#defaultrouter="192.168.0.1"
#ifconfig_em0_ipv6="inet6 accept_rtadv"

wlans_bwn0="wlan0"
ifconfig_wlan0="WPA DHCP"
```

31.3. Wireless Networking


----------



## sprock (Nov 11, 2019)

Sorry, I missed off

```
sudo dhclient wlan0                                       
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from 192.168.0.1
bound to 192.168.0.23 -- renewal in 302400 seconds.
```


----------



## SirDice (Nov 11, 2019)

Disconnect your wired connection and you'll see it actually works.


----------



## sprock (Nov 11, 2019)

No.  If I boot without the wired connection, or disconnect the wired connection while also logged in via wireless, the wireless connection is dropped.  In the latter case, the wired connection is resurrected if I plug in the ethernet cable.


----------



## SirDice (Nov 11, 2019)

Leave it unplugged. Both your wired and wireless interface are on the same network. Two interfaces on the same network will always cause problems. Use one or the other, not both. 

If you want to be able to switch seamlessly (as seamless as possible), have a look here: Example 31.3. Failover Mode Between Ethernet and Wireless Interfaces


----------



## sprock (Nov 11, 2019)

That is indeed the problem: I can connect by wireless if the ethernet connection is disabled.

Many thanks for you help (and your patience).
sprock


----------

