# hello FreeBSD



## papo (Apr 4, 2012)

Hi,

*I*'m just new to freebsd FreeBSD and *I*'d like to learn it and get started on it. My problem now is related to the configuration of gettin*g* a network connection: actual*l*y a wireless one. I wasn*'*t able to get the handbook on the machine because from the installation freebsd FreeBSD could see the network but not attach to it. 

I have an ath0 interface card and *I* read that *I* had to attach it to wlan0 modifying the file /etc/rc.conf. I got that and started wlan0 also with the scan but if *I* run the command `# ifconfig wlan0` it returns 
	
	



```
status: no carrier
```
I'm sorry to bother but *I* don't real*l*y know and *I*'d like to understand.

*T*hank you.


----------



## SirDice (Apr 4, 2012)

You can read the handbook online. It's also available in other languages.

Handbook: 32.3 Wireless Networking


----------



## papo (Apr 4, 2012)

*T*hank you. *I*'ll go see what you post me.

The handbook says that *I* have to edit /boot/loader.conf file but *I* have no such file in the directory. *S*hould *I* create and edit as the hanbook says*?*


----------



## SirDice (Apr 4, 2012)

Yes, the file doesn't exist by default. Yes, you can create it if needed.


----------



## fonz (Apr 4, 2012)

papo said:
			
		

> The handbook says that i have to edit /boot/loader.conf


Side note: if you're using the (unmodified) GENERIC kernel, there's usually no immediate need to modify/create /boot/loader.conf because if_ath is already there. Your wifi card should be automagically detected when the system boots.

Fonz


----------



## papo (Apr 4, 2012)

Real*l*y strange, *I* edited /boot/loader.conf, *I* edited /etc/rc.conf, *I* ran */etc/rc.d/netif start*.

Then *I* *ifconfig* and 
	
	



```
wlan0 --status: no carrier--
```

I ping 127.0.0.1 and it works. I ping google.com and it does not work.


----------



## SirDice (Apr 4, 2012)

Pinging 127.0.0.1 will always work. It's assigned to lo0.


----------



## wblock@ (Apr 4, 2012)

Quick Wireless Setup On FreeBSD.


----------



## fonz (Apr 4, 2012)

papo said:
			
		

> Then i ifconfig and wlan0 --status: no carrier--...


You'll have to be more precise. What *exactly* did you type?

Assuming that you meant to say you did `# ifconfig wlan0 create wlandev ath0`
have you been able to scan for networks? Have you done the following:
`# ifconfig wlan0 up scan`
`# ifconfig wlan0 list scan`
and if so, what does if say?


----------



## papo (Apr 4, 2012)

*I'*ve done all of the following:


```
# ifconfig wlan0 create wlandev ath0
# ifconfig wlan0 up scan
# ifconfig wlan0 list scan
```

The output *I* get is the wireless network of my home; with all the details (ssid,uuid, channel, ...).
Then when *I* *ifconfig* *I* get no luck. 
	
	



```
status: no carrier
```


----------



## Zare (Apr 4, 2012)

If your home network is protected, you'll need to use wpa_supplicant(8)(). You can use ifconfig(8)() for WEP if you really want, but wpa_supplicant handles both WEP and WPA(2).


----------



## papo (Apr 4, 2012)

*T*hank you for this information (it willbe useful in other situations) but now my home network is not protected by either a WEP or WPA encryption key.


----------



## Zare (Apr 4, 2012)

Ok, then please run these commands and paste output here, after each command. If you can't copy-paste, snap your screen with photo camera and upload the image. If you can't do that either, retype output here, and double check for typing mistakes.


```
# ifconfig ath0
# ifconfig wlan0
# ifconfig wlan0 up list scan
# ifconfig wlan0 ssid YOUR_AP_SSID_HERE channel YOUR_AP_CHANNEL_HERE
# ifconfig wlan0
# dmesg | tail -n 10
```


----------



## papo (Apr 5, 2012)

[cmd=]#ifconfig ath0[/cmd]

```
ath0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
ether 00:12:f1:7f:01:f2
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect mode 11g
status: associated
```

`#ifconfig wlan0`

```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:12:f1:7f:01:f2
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) status: no carrier
ssid G602T_wireless channel 6 (2437 MHz 11g)
regdomain 96 indoor ecm authmode OPEN privacy OFF txpower 20 bmiss 7
scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
roam:rate 5 protmode CTS wme burst bintval 200
```

`#ifconfig wlan0 up list scan`

```
SSID/MESH ID	BSSID	        CHAN RATE	S:N	INT CAPS
G602T_WIRELESS 00:12:f1:01:02:f1 6    54M     -79:-96  200 ESB
```

`#ifconfig wlan G602T_WIRELESS channel 6`

```
ifconfig: G602T_WIRELESS: bad value
```

`#ifconfig wlan0`


```
wlan0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 1500
ether 00:12:f1:7f:01:f2
nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
media: IEEE 802.11 Wireless Ethernet autoselect (autoselect) status: no carrier
ssid G602T_wireless channel 6 (2437 MHz 11g)
regdomain 96 indoor ecm authmode OPEN privacy OFF txpower 20 bmiss 7
scanvalid 60 bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7
roam:rate 5 protmode CTS wme burst bintval 200
```

`#dmesg | tail -n 10`

```
uhub4: 2 ports with 2 removable, self powered
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
Root mount waiting for: usbus5
Root mount waiting for: usbus5
Root mount waiting for: usbus5
Root mount waiting for: usbus5
uhub5: 10 ports with 10 removable, self powered
Trying to mount root from ufs:/dev/ada0p2 [rw]
wlan0: Ethernet address: 00:12:f1:7f:01:f2
```

*T*his is the input and output that *I* get (the mac addresses are different).


----------



## SirDice (Apr 5, 2012)

papo said:
			
		

> ```
> #ifconfig wlan G602T_WIRELESS channel 6 -output-
> ifconfig: G602T_WIRELESS: bad value
> ```



This should be something like

`# ifconfig wlan0 ssid G602T_WIRELESS channel 6`


----------



## papo (Apr 5, 2012)

`#ifconfig wlan0 ssid G602T_WIRELESS channel 6`
-no output-

I've also run: 
`#dhclient wlan0`

```
wlan0: no link ............ giving up
```


----------



## papo (Apr 16, 2012)

I've got the problem fix. Thanks to everyone.


----------



## DutchDaemon (Apr 16, 2012)

How? This is a forum, share solutions.


----------



## papo (Jun 5, 2012)

I beli*e*ve *it* was *the* fault of the router that did*n*'t ke*e*p the signal strai*gh*t. So I changed the router.


----------

