# Wired & Wireless work together



## sk8harddiefast (Jan 29, 2012)

My system has three LANs. Two wired (re0 and msk0 which are on link aggregation on lagg0) and a Wireless network card (urtw0 / Realtek).

Is it possible to make my wireless card work together with my wired network? Not as a hotspot. Just to scan networks. I think that you can use only wired or wireless. Not both of them together. If is possible, how to do that?

I want to make it because I want to play also with wireless. I have no experience with WiFi.


----------



## bbzz (Jan 29, 2012)

Can you elaborate a bit more? What do you mean "work together"?


----------



## sk8harddiefast (Jan 29, 2012)

Just to have wired and Wireless, both up to work on the same time.
Ok. Lets take an example. I use wired for have access to internet via Ethernet cable. My computer has also WiFi too. Here is the example. (This not happen in reality. Just an example to understand what I want). I hate my neighborhood and I want to find his WiFi key to connect to his network. To do that, I must make my wireless card up and running first of all. Here is the question. Can I do that? I am connected to internet the same time using my wired connection. To bring up my WiFi card, I must bring down my wired card. Can be both of the up and running the same time? Wired to have access to Internet to read how to and WiFi to break my neighborhood's password. Is just an example to understand how exactly I want to make my wired and WiFi work when I say together.


----------



## bbzz (Jan 29, 2012)

Yes, they can work at the same time.


----------



## sk8harddiefast (Jan 29, 2012)

Ok. How to do that? I don't want to crack my neighborhood's key. Just my computer see my wireless card and just I want to make it work. But without bring down my wired connection because on my wired connection I use also ling aggregation on gigabit Ethernet to communicate with FREENAS where I have all my data.


----------



## bbzz (Jan 29, 2012)

Yes, you can use both. You don't need to bring down wired link. Just treat it as different interface.


----------



## sk8harddiefast (Jan 29, 2012)

> Just treat it as different interface.


How to do that? I am completely noob on Wireless networking. I guess that I must give *DHCP* for *urt0* on *rc.conf*.
But It can not be only this!


----------



## bbzz (Jan 29, 2012)

Wireless is just like other interface. Again, what is it that you want to do?


----------



## fbsduser (Jan 29, 2012)

You'll need to add SYNCDHCP to the wireless interface. And if you expect to use WPA add WPA before SYNCDHCP (*ifconfig_wlan0="WPA SYNCDHCP"*).


----------



## sk8harddiefast (Jan 29, 2012)

Just to scan network Interfaces. My wireless card cannot work as hotspot :/ But I don't want to leave here just to sit to do nothing. And my router work as WiFi hotspot too. So I don't need a hotspot. I want to make here work. To see how can I scan a network from terminal. To learn. something new Always I was using only wired. It's time to learn about wireless too.


----------



## sk8harddiefast (Jan 30, 2012)

My */etc/rc.conf*

```
wlans_urtw0="wlan0"
ifconfig_wlan0="SYNCDHCP"
```
My */boot/loader.conf*

```
if_urtw_load="YES"
```
But *ifconfig -a* return

```
urtw0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> metric 0 mtu 2290
	ether 00:15:af:1a:ab:c6
	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:15:af:1a:ab:c6
	nd6 options=29<PERFORMNUD,IFDISABLED,AUTO_LINKLOCAL>
	media: IEEE 802.11 Wireless Ethernet autoselect (autoselect)
	status: no carrier
	ssid "" channel 7 (2442 MHz 11g)
	country US authmode OPEN privacy OFF txpower 0 bmiss 7 scanvalid 60
	bgscan bgscanintvl 300 bgscanidle 250 roam:rssi 7 roam:rate 5
	protmode CTS
```
But *ifconfig wlan0 list scan* return results

```
SSID/MESH ID    BSSID              CHAN RATE   S:N     INT CAPS
HOL ALU WLAN    ba:3e:61:82:39:c3    1   54M  15:6    100 EP   RSN WPA WME
Ember's Net...  4c:ed:de:e7:78:fc    6   54M  20:11   100 EP   WPA RSN
Thomson032077   00:26:44:23:9d:c7   11   54M  37:28   100 EP   RSN WPA
CHAOS           00:26:44:83:f7:3c    1   54M  24:15   100 EP   MESHCONF MESHCONF HTCAP WME
Thomson1908D0   08:76:ff:19:08:d0    6   54M  22:13   100 EP   MESHCONF MESHCONF WPS HTCAP WME
CYTA5C5879      00:26:44:a5:58:20   11   54M  11:2    100 EP   WPS WPA WME
VOLLEYPLAYER    00:25:69:7f:06:dd    6   54M  61:53   100 EP   RSN
MTR             38:22:9d:c0:ff:94    2   54M  41:32   100 EPS  RSN WPA WME
```
That's mean that now my wireless is working but has no carrier because I am not connected somewhere to take an Ip address?


----------



## bbzz (Jan 30, 2012)

http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-wireless.html


----------



## jrm@ (Feb 2, 2012)

Are you trying to get an IP from one of the access points with WPA?

Maybe something similar to this will work.

/etc/rc.conf

```
ifconfig_wlan0="WPA SYNCDHCP"
wlans_urtw0="wlan0"
```

/etc/wpa_supplicant.conf

```
network={
	ssid="HOL ALU WLAN"
	psk="blah blah password"
}
```

This might get you started, but if you want to learn maybe ifconfig() wpa_supplicant() and rc.conf() would be helpful.


----------

