Author Topic: What do I need two NICs for?  (Read 11282 times)

AndiHoffi

  • Newbie
  • *
  • Posts: 8
    • View Profile
What do I need two NICs for?
« on: September 22, 2009, 04:43:49 pm »
Hi,

I did not yet install LinuxMCE, but am currently reading the installation-instructions. What I am wondering most about is the definitive requirement of two NICs - one for the internal LAN and one for the external LAN. There is no doubt about it in the wiki.
Only the FAQ mention that it might be possible to have the core with only one NIC.

At home I have 3-4 PCs running and the core. Each of the PCs should have full access to all the information in the LAN, the internet and the core. There is of course also a WLAN-Router around to offer access to the internet, but I can turn the DHCP-functionality off.
Do I really need two NICs in this setup?
What are the drawbacks of having only one NIC?

Thank you very much for any information.

Regards
Andreas

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: What do I need two NICs for?
« Reply #1 on: September 22, 2009, 04:58:13 pm »
two nics is required for all the automagic network device detection (nas bricks, etc) and for all the filesharing stuff to work best, and for running additional media directors.

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: What do I need two NICs for?
« Reply #2 on: September 22, 2009, 04:58:38 pm »
The drawback of only having one NIC is that it won't work, and it will completely hose your current network.

Currently, the only supported configuration has 2 NICs, even if you simply leave one disconnected.  Read the FAQ and wiki article more carefully for a full explanation of the requirement.

http://wiki.linuxmce.org/index.php/Network_Setup
http://wiki.linuxmce.org/index.php/FAQ#Why_do_I_need_two_network_cards_in_my_Core.3F

rperre

  • Guru
  • ****
  • Posts: 264
    • View Profile
Re: What do I need two NICs for?
« Reply #3 on: September 22, 2009, 05:37:51 pm »
Basically your core will take over your routers function, it will be the dhcp handler and handle firewall for you, everything can be connected via a switch and/or AP to the internal NIC of the core. The core is supposed to be always on. Your core is and will be the gateway to your in house network.

This way you can still get to all your data/media/etc... on your network, you will not loose any of that functionality.

Richard

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: What do I need two NICs for?
« Reply #4 on: September 22, 2009, 06:46:39 pm »
The drawback of only having one NIC is that it won't work, and it will completely hose your current network.
That's not completely true.  It's possible to run with only 1 nic if you set everything up correctly, I did for quite a while when my physical network setup wouldn't allow me the option.  It can be done without completely hosing the current network.  If you install on a box with only one nic the install will create and use a second virtual nic.
Quote

Currently, the only supported configuration has 2 NICs, even if you simply leave one disconnected.  Read the FAQ and wiki article more carefully for a full explanation of the requirement.

http://wiki.linuxmce.org/index.php/Network_Setup
http://wiki.linuxmce.org/index.php/FAQ#Why_do_I_need_two_network_cards_in_my_Core.3F
This is correct.  The only supported config is with 2 physical nics.  It's also highly recommended and just plain works better and easier.

OP - Technically you can use only 1 nic, but don't.  Take this from someone who has done it both ways.  If the core is just a core then it should be very easy, just put it where it shows on the diagram linked above.  If you are using the core as a core/md then you need to find a way to get your internet connection to the core/md is as well as a LAN connection to your switch (I didn't have this at first - the reason I went with 1 nic).  Save yourself some grief and get your LAN wired/configured to support this before you go forward with an LMCE install. 

If nothing else, look at the replies.  Everyone is telling you that you must use 2 nics.  I'm the only one saying it's possible to do it with 1 nic, but don't.  LMCE is designed to work with 2 nics and makes assumptions based on this.  You can still have a DMZ if for some reason you feel the need to have any computers with direct internet access, but even that should not be necessary.

jimbodude

  • Guru
  • ****
  • Posts: 372
    • View Profile
Re: What do I need two NICs for?
« Reply #5 on: September 22, 2009, 07:50:01 pm »
The drawback of only having one NIC is that it won't work, and it will completely hose your current network.
That's not completely true.  It's possible to run with only 1 nic if you set everything up correctly, I did for quite a while when my physical network setup wouldn't allow me the option.  It can be done without completely hosing the current network.  If you install on a box with only one nic the install will create and use a second virtual nic.

The default configuration will always make sure there are at least 2 NICs, even if it has to create a virtual adapter that shares the physical adapter.  If you do no further configuration - for example, if do not understand the intricacies of how LinuxMCE configures the network and how to adjust your own network setup accordingly - then you will have 2 DHCP servers which will conflict - effectively hosing your network...

If you move forward with 1 NIC, and you're savvy enough to disable the DHCP on your router, you're still not out of the woods - since now you don't have a route to the internet - effectively hosing your network.

If you move forward with 1 NIC, disable the router's DHCP, and configure your Core's network setup just right (which takes at least some networking knowledge), then you've introduced an unnecessary point of failure into the setup, and you have an overcomplicated network for your home - but it does work ok.  Of course, as soon as you tell anyone you have a 1 NIC setup you'll get flamed, because such a setup is "not supported".

2 out of 3 cases end in hosing your network.  1 requires a fairly significant amount of smarts - I'd guess that if one has enough smarts to get to that point, they would have read the FAQ and the Network Setup and immediately known how to get to that point.  After that realization, one would immediately realize that such a setup doesn't really provide anything except extra work and complexity.

The bottom line is exactly what I said - put 2 NICs in the box (what's an extra NIC? $10?), save yourself a bunch of configuration work and unplanned downtime due to configuration mistakes or accidents or poor assumptions in the code, and avoid the flame war that this stupid topic always brings up.  Anything is technically possible - it is Linux after all, and Linux is pretty good in the networking department - but the practical points outweigh the "it should be possible this way" points on this particular issue.

OP - Technically you can use only 1 nic, but don't.  Take this from someone who has done it both ways.
Join the club.
« Last Edit: September 22, 2009, 07:52:52 pm by jimbodude »

skeptic

  • Addicted
  • *
  • Posts: 615
    • View Profile
Re: What do I need two NICs for?
« Reply #6 on: September 22, 2009, 08:12:33 pm »
Agree 100%.  I just wanted to point out that it is possible to run with 1 nic if you are in a situation like I was - no practical way to get a connection from both your internal and external networks to a core/md hybrid.  It's just not worth it, it's better to find a way to get the wiring addressed to support it. 

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: What do I need two NICs for?
« Reply #7 on: September 22, 2009, 10:20:48 pm »
Agree 100%.  I just wanted to point out that it is possible to run with 1 nic if you are in a situation like I was - no practical way to get a connection from both your internal and external networks to a core/md hybrid.  It's just not worth it, it's better to find a way to get the wiring addressed to support it. 

Your absolutely right skeptic...I have run my home Core that way for years....it works 100% fine if its setup that way correctly.

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

colinjones

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 3003
    • View Profile
Re: What do I need two NICs for?
« Reply #8 on: September 22, 2009, 10:48:28 pm »
AndiHoffi - its simple, read http://wiki.linuxmce.org/index.php/Network_Setup and it will answer all your questions.

It shows you how for the sake of a $15 NIC, you can easily setup the LMCE how it is supposed to be, and without much/any impact to your existing network.

Only even consider a single NIC installation if 1) you have read an understood the above article, but you have some unusual reason that means that the uphill battle represented by point 2 is still the path of least resistance for you, and 2) you have extensive networking experience on how to work around the 2 NIC requirement, and extensive LMCE experience to understand what this will break in LMCE and how to fix it, because if you go with a single NIC installation, you will find it extremely hard to find any support on the forums if/when it doesn't work or if it breaks at a later date.

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: What do I need two NICs for?
« Reply #9 on: September 23, 2009, 02:07:18 am »
AndiHoffi - its simple, read http://wiki.linuxmce.org/index.php/Network_Setup and it will answer all your questions.

It shows you how for the sake of a $15 NIC, you can easily setup the LinuxMCE how it is supposed to be, and without much/any impact to your existing network.

Only even consider a single NIC installation if 1) you have read an understood the above article, but you have some unusual reason that means that the uphill battle represented by point 2 is still the path of least resistance for you, and 2) you have extensive networking experience on how to work around the 2 NIC requirement, and extensive LinuxMCE experience to understand what this will break in LinuxMCE and how to fix it, because if you go with a single NIC installation, you will find it extremely hard to find any support on the forums if/when it doesn't work or if it breaks at a later date.

Hasn't broken for me yet in let's see... Hmmm...nearly 5 years... ;-) ...hey but what do i know...

The only real issue I sometimes see is that if we have say 4-5 TV & DVD streams being served from my Core (in my system all the storage is in the Core itself) to the various MD's then all those streams are going up a single 100mbit LAN cable to the LAN side router...that sometimes causes some slight jerkiness in the video playback. Apart from that I've not see any NIC related problems at all I have to say.

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

AndiHoffi

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: What do I need two NICs for?
« Reply #10 on: September 23, 2009, 10:07:35 am »
Thank you for all the answers.
Now at least I know that the trouble of wiring the core will probably be easier than setting up LinuxMCE without a 2nd NIC in the core.

What all the linked articles and the replies do not answer is the conceptual necessity of a 2nd NIC. If you want to distinguish between internal and external LAN, there is no doubt about the necessity of two NICs. But if you setup your network as outlined below, why can't you just put your broadband-router into the internal LAN (with DHCP turned off)?
http://wiki.linuxmce.org/images/3/38/After.PNG
If someone wants to access the internet directly from the internal LAN, it's fine by me :)

Or put differently:
In my home, the broadband-router and the remaining PCs are in the same room, but there is no chance to get an eithernet-cable to the core. With one NIC, I would just use the existing WLAN or a powerline-eithernet and I would be fine. But with two NICs I will be needing two distinct connections between the two rooms: broaband->core and core->PCs.
And I am getting curious about the conceptual reason for the decision to support two NICs only in LinuxMCE and make me go through the hassle of doing this setup.

Regards
Andreas

ShamIAm

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: What do I need two NICs for?
« Reply #11 on: September 23, 2009, 11:01:31 am »
It isn't about internal network and external network, it is about the Core controlling the topology. Two NIC's make the system more easily configured for PNP. LinuxMCE has several features that require certain network topologies, or at least knowledge of the network layout to work consistently, and when in the supported two NIC layout the core creates these topologies.

The diagram you reference seems to indicate two NIC's one to the left of the core (external), and one to the right(MCE network). You will need to connect the broadband router to the core on the switch part of the router, not the external interface port (once you disable the DHCP). You can also pickup a switch for about the same price as a NIC, sell your router on E-bay and probably pay for both.

Things like auto-detecting network devices when plugged into the network, Asterik, IP Cameras, Network booting MD's, and other things that I can't think of each have their own dependencies on the network configuration, for this to work and be PNP you need two NIC's unless you want to dive into how each of these packages interact with the DCE Router, the network, and Kubuntu. If you do please post your findings, several of us would like to know what you find.
« Last Edit: September 23, 2009, 11:11:24 am by ShamIAm »

AndiHoffi

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: What do I need two NICs for?
« Reply #12 on: September 23, 2009, 11:37:19 am »
The diagram you reference seems to indicate two NIC's one to the left of the core (external), and one to the right(MCE network). You will need to connect the broadband router to the core on the switch part of the router, not the external interface port (once you disable the DHCP). You can also pickup a switch for about the same price as a NIC, sell your router on E-bay and probably pay for both.
You are saying that I can connect everything including the broadband-router to the internal LAN and just leave the second NIC without any connection? Did I understand this correctly?
Quote
Things like auto-detecting network devices when plugged into the network, Asterik, IP Cameras, Network booting MD's, and other things that I can't think of each have their own dependencies on the network configuration, for this to work and be PNP you need two NIC's unless you want to dive into how each of these packages interact with the DCE Router, the network, and Kubuntu. If you do please post your findings, several of us would like to know what you find.
But why should the PNP-functions stop working only because I have a broadband-router in the internal LAN?

wierdbeard65

  • Guru
  • ****
  • Posts: 449
    • View Profile
    • My Quest
Re: What do I need two NICs for?
« Reply #13 on: September 23, 2009, 11:45:09 am »
But if you setup your network as outlined below, why can't you just put your broadband-router into the internal LAN (with DHCP turned off)?

What you need to remember is that (AFAIK) the ultimate goal is to have an appliance solution. I.e. plug it in and it works. To do what you suggest would require knowledge of the router and how to reconfigure it, as well as sorting out stuff like the default routes so the 'net is accessible.

Remember, most ISP's supply you with a connection assuming their router is the center of your network and that you know little to nothing about networking. MCE makes the same first assumption and will (I hope) eventually make the second. It's either a USB connection to 1 computer, or an ethernet connection (often with a built-in switch etc.) and provides all the DHCP etc. You end up with a "turf war" over who runs the network ;)

So, your choice is to hack in to your router and play with it's settings. Play with the default routes etc. or simply connect the router to a second NIC and let it "just work". If you don't want a second switch, you can use a crossover cable for this or (I have had working with Linux, but not with MCE) even the USB!

As everyone here is saying, why make work for yourself? Life's too short as it is!
Paul
If you have the time to help, please see where I have got to at: http://wiki.linuxmce.org/index.php/User:Wierdbeard65

AndiHoffi

  • Newbie
  • *
  • Posts: 8
    • View Profile
Re: What do I need two NICs for?
« Reply #14 on: September 23, 2009, 12:21:17 pm »
As everyone here is saying, why make work for yourself? Life's too short as it is!
First reason: Because I am a bit stubborn and would like to understand the reasons for limitations that cause me trouble :)
Second reason: Wiring will be tough.
Third reason: I like the ideas behind LinuxMCE and will probably be using many features in the future. But currently, I just want to do the first small step and do not need an always-on-media-server. But what I do need is an always-on-router for the internet-access. Thus the idea was to be able to turn the core/md off when it is not needed. An always-on-machine consumes more electricity and there is the risk of it being too loud for the living-room. When we are watching TV, the noise does not disturb anybody. But what about reading a book? Thus the one-NIC-approach is quiet charming.

The simplest solution for the moment seems to be to install XP-MCE or some other MCE-Solution that does not go as far as LinuxMCE for the moment. But I don't want to give up that easily :)