# Weird wireless connection problem: I have to do weird series of commands



## curses (Dec 26, 2009)

I know that I already asked a similar question, but it is now marked as solved and indeed for all intents and purposes it is solved. But this is a slightly different problem. I configure my network with ifconfig as shown here: http://forums.freebsd.org/showthread.php?t=9661
Then I run dhclient. Unfortunately it gives me something like 
	
	



```
wlan0 no link.............. giving up
```
And it does that several times upon the same command.
here's what I did.


```
freebsd# dhclient wlan0
wlan0: no link .............. giving up

freebsd# ifconfig wlan0 ssid myqwest1234 wepkey 12345ABC67 deftxkey 1 up
```


```
freebsd# dhcpcd wlan0
err, wlan0: writev: Network is down
err, wlan0: writev: Network is down
err, wlan0: writev: Network is down
err, wlan0: writev: Network is down
```


```
freebsd# dhclient wlan0
DHCPREQUEST on wlan0 to 255.255.255.255 port 67
DHCPACK from ***.***.*.*
bound to ***.***.*.* -- renewal in 43200 seconds.
```
I have found this to work for some reason. It's like magic.
1.: ifconfig wlan0 blahblahblah
ifconfig wlan0 up
dhclient wlan0
2. use DesktopBSD network tool(fails)
3. do 1 again.
I apologize if this is sloppy. I was doing this "on the fly".


----------



## Josef Vit (Apr 26, 2017)

Try:

```
ifconfig wlan0 destroy
/etc/rc.d/netif start iwn0
```

Let's say in /etc/rc.conf is: 
	
	



```
wlans_iwn0="wlan0"
```


----------

