Author Topic: How can I use the wi-fi card as a second NIC?  (Read 5967 times)

rages

  • Guru
  • ****
  • Posts: 182
    • View Profile
How can I use the wi-fi card as a second NIC?
« on: April 25, 2010, 12:10:20 pm »
I'm assembling my new mini-core with ATOM ION motherboard.. I can use the wi-fi card as a second NIC?

wlan0 does not appear in the web admin, but I managed to install the drivers and make it work.

I also tried to manually edit / etc / network / interfaces by adding all the parameters necessary, but then when you restart the core resumes the configuration set in the web admin.


Emanuele

THEVILLAIN

  • Regular Poster
  • **
  • Posts: 41
    • View Profile
Re: How can I use the wi-fi card as a second NIC?
« Reply #1 on: April 25, 2010, 05:27:34 pm »
You should NOT use a wifi card as a nic on a MD, nor a core, since PXE booting is required.  You can use an hardware only access point, that talks to another hardware access point where there are configured as a bridge. If the access point are in the 2.4 Ghz range, then there will be lots of interference and your experience may not be great.  MD losing connection to the core. Many linksys/netgear routers and the like have a bridge AP (access point) function that should work as well.  Some of the newer draft N have multiple antennas and work in the 5 Ghz range so they might work better.
   Note that adding wireless to your network can greatly compromise the security even with MAC filtering and WPA2.

  If you do decide to go the wireless route, report back with your experience.
« Last Edit: April 25, 2010, 05:33:42 pm by THEVILLAIN »

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: How can I use the wi-fi card as a second NIC?
« Reply #2 on: April 25, 2010, 06:48:52 pm »
I'm assembling my new mini-core with ATOM ION motherboard.. I can use the wi-fi card as a second NIC?

wlan0 does not appear in the web admin, but I managed to install the drivers and make it work.

I also tried to manually edit / etc / network / interfaces by adding all the parameters necessary, but then when you restart the core resumes the configuration set in the web admin.


Emanuele


The LAN side NIC needs to be wired so that MD's can PXE boot. You can use WiFi for mobile Orbiters (not MD's) and you should add a low-cost WiFi AP to enable this.

All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: How can I use the wi-fi card as a second NIC?
« Reply #3 on: April 25, 2010, 07:52:52 pm »
You can probably get the Wifi working on the external side (WAN/Internet) of a core, as mentioned trying to use it on the internal side (LAN) is a no-no.  The issue I see is trying to use an ION as a core/md hybrid if this is what you are attempting.  I'm using an ION as just a MD, 2G ram, 1.6Ghz single core cpu.  My experiences + looking at benchmarks tells me it would not make a good hybrid.  Some of the slowness may be from the network drive, and it plays movies beautifully, but it feels underpowered as it is in some areas.

rages

  • Guru
  • ****
  • Posts: 182
    • View Profile
Re: How can I use the wi-fi card as a second NIC?
« Reply #4 on: April 25, 2010, 08:02:09 pm »
I want to use the wi-fi card (802.11n) for the external-WAN and Gigabit Ethernet on the inside.
I currently have only an MD made by another atom with 3M touch screen.

I repeat my request is possible or not set wlan0 as NIC?

Emanuele

Tred

  • Veteran
  • ***
  • Posts: 68
    • View Profile
Re: How can I use the wi-fi card as a second NIC?
« Reply #5 on: April 25, 2010, 09:38:47 pm »
I don't know if you can have the wireless in the computer but I have PXE booting over wireless but you need a fast (wireless N) connection. Install a second NIC (there are some USB gigabit adapters that are linux compatible I'm sure) and hook that to a wireless N router then on the MD side use a wireless ethernet bridge (I'm using Apple's Wireless N Airport Express) and make sure that both are set on bridge mode (eg NAT and DHCP are both turned off) Good luck and make sure you have really good signal before you try this!

rages

  • Guru
  • ****
  • Posts: 182
    • View Profile
Re: How can I use the wi-fi card as a second NIC?
« Reply #6 on: April 25, 2010, 11:34:42 pm »
I have not explained well ... Skeptic is the only one who understood, but did not answer my question exactly.

In summary:

- Core / hybrid (ASUS Atom N330 2GB 1066Mhz Ram 250Gb HD, USB Wireless N, Gigabit Ethernet)

- MD (N330 1Gb RAM 533Mhz Intel Gigabit Ethernet + 3M touch screen)

How do I set the wireless N as external / WAN NIC and ethernet as internal NIC?

Emanuele

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: How can I use the wi-fi card as a second NIC?
« Reply #7 on: April 26, 2010, 12:26:07 am »
Assuming you are trying to connect the second wifi nic to a wireless AP... set its ip to something in the 192.168.80.xxx range, and turn DHCP off.

edit /etc/network/interfaces with your favorite editor and insert
Code: [Select]
auto wlan0
iface wlan0 inet static
        address 192.168.80.1
        netmask 255.255.255.0

then edit /etc/rc.local before exit 0 with the following, replacing "ESSID in quotes" with the essid... in quotes (this is for an AP without password)
Code: [Select]
ifconfig wlan0 down
dhclient -r wlan0
iwconfig wlan0 essid "ESSID_IN_QUOTES"
iwconfig wlan0 mode Managed
ifconfig wlan0 up
dhclient wlan0

now turn that into an executable that runs on startup
Code: [Select]
sudo chmod +x /etc/rc.local
finally run it
Code: [Select]
sudo sh /etc/rc.local

Let me know if you have problems or are trying to do something else
« Last Edit: April 26, 2010, 05:00:44 am by l3mce »
I never quit... I just ping out.

rages

  • Guru
  • ****
  • Posts: 182
    • View Profile
Re: How can I use the wi-fi card as a second NIC?
« Reply #8 on: April 26, 2010, 11:59:51 pm »
ok ..I think I have come to a working configuration for what I wanted, thanks to post l3mce and various other posts on the forum.
This is the configuration

/etc/network/interfaces
Code: [Select]
auto lo
        iface lo inet loopback
auto wlan0
iface wlan0 inet dhcp
auto eth0
iface eth0 inet static
        address 192.168.80.1
        netmask 255.255.255.0

I use WPA2 security and for this I created a configuration file to set the password:

Code: [Select]
sudo nano /etc/wpa_supplicant.conf
Code: [Select]
network={
   ssid="my-ESSID"                         
   psk="my-password"
   key_mgmt=WPA-EAP WPA-PSK
   proto=RSN WPA
   pairwise=CCMP TKIP
 }

then edit /etc/rc.local
Code: [Select]
ifconfig wlan0 down
dhclient -r wlan0
wpa_supplicant -Dwext -iwlan0 -c /etc/wpa_supplicant.conf -dd -B
ifconfig wlan0 up
dhclient wlan0

after this ...

Code: [Select]
sudo chmod +x /etc/rc.local
reboot

l3mce

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1084
    • View Profile
Re: How can I use the wi-fi card as a second NIC?
« Reply #9 on: April 27, 2010, 02:08:13 pm »
Yes... I see now... external... sorry. Glad you got it working!
I never quit... I just ping out.