Author Topic: 2 Network cards needed for core ?  (Read 11057 times)

Naitsirk

  • Newbie
  • *
  • Posts: 5
    • View Profile
2 Network cards needed for core ?
« on: July 23, 2007, 06:17:28 pm »
Hallois

I just read this:
"I have 2 network cards, one connected to my cable modem, the other to my home's ethernet switch"
- from the What to expect LinuxMCE wiki.

Does this mean I have to have two network cards in my linucMCE core (hybrid) for all this to work and have it connected between the modem and router?

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #1 on: July 23, 2007, 06:30:01 pm »
Hallois

I just read this:
"I have 2 network cards, one connected to my cable modem, the other to my home's ethernet switch"
- from the What to expect LinuxMCE wiki.

Does this mean I have to have two network cards in my linucMCE core (hybrid) for all this to work and have it connected between the modem and router?

The short answer is: yes it does.  Allthough it is possible to install a core (or hybrid) with only one physical network interface it is not recommended.
"Change is inevitable. Progress is optional."
-- Anonymous


FallNAngel

  • Making baby steps
  • Posts: 3
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #2 on: July 24, 2007, 04:31:10 pm »
...why does it need two network cards?  I don't plan on using this as a firewall / router, I just want it to serve media.  Unless it's required that it acts as a firewall or router, I can't think of any reason why it would need two network cards.

sandos

  • Regular Poster
  • **
  • Posts: 36
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #3 on: July 25, 2007, 09:17:20 am »
The thinking is that LMCE be in control of the network, and specifically be a DHCP server for the diskless MDs


But you can very easily just "hook" this off of your regular network, so that any MDs will be doubly NAT:ed. Thats how I did it when I installed.

bulek

  • Administrator
  • wants to work for LinuxMCE
  • *****
  • Posts: 909
  • Living with LMCE
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #4 on: July 25, 2007, 10:08:16 am »
Hi,

don't forget the other possible side of the medal. If something goes wrong with your network on Core, then all your local network could be dead. I had this problem and then I sweared that Core will never be master firewall/router again. But I agree that you can fork special small network with MDs and other Core related devices and let the Core be the master for them. Currently I'm running Pluto and somehow it sits for few minutes in network starting phase - and it's a pitty cause LAN doesn't work till Core is fully booted...

HTH,

regards,

Bulek.
Thanks in advance,

regards,

Bulek.

FallNAngel

  • Making baby steps
  • Posts: 3
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #5 on: July 25, 2007, 06:31:38 pm »
Well, I have no problem letting a core do DHCP for diskless booting of the MD (or just assigning them IP addresses in general).  The problem is:
1. I don't want my entire network to be DHCP, which means the router won't be doing it and aside from using it for diskless booting, neither should the Core.
2. The Core shouldn't need to be multihomed to do DHCP anyway
3. I don't want the Core to be in charge of my entire network; I already have a network set up... I just want the Core to do a few things, such as serve media.

Unless the Core is acting as a router and/or firewall for the network (say, sitting between a cable modem and the rest of the network), I see zero reason why the Core would basically be required to have 2 network connections.
« Last Edit: July 25, 2007, 06:34:21 pm by FallNAngel »

1audio

  • Addicted
  • *
  • Posts: 552
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #6 on: July 26, 2007, 08:24:12 am »
1) The core doing the DHCP is essential for the plug and play setup to work and to allow an MD to boot off of it.  (You can work around this but the setup and settings management will be a real IT challenge.)
2) You can use static IP's for anything that doesn't need to interact with the system, if you are using an external router/firewall for outside access.  (This is how I use the system.)
3) Once you have a core running reliably and fully setup it should be a non-issue, the network stuff runs at a higher priority than any of the LMCE stuff and you can restart the DCErouter etc. with no impact on the network.

The first few weeks will be when you are restarting often as you fiddle. After that it should just be another appliance. My Pluto core ran 5 months essentially untouched. I then migrated to LMCE and I'm restarting much more often as I sort out new features and devices.

FallNAngel

  • Making baby steps
  • Posts: 3
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #7 on: July 27, 2007, 04:02:11 pm »
In either case, whether DHCP is necessary or not for the ease of use of LMCE, you still don't need two network cards to do it.

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #8 on: July 27, 2007, 04:49:24 pm »
The short answer is: yes it does.  Allthough it is possible to install a core (or hybrid) with only one physical network interface it is not recommended.
Which one of these words don't you understand?
"Change is inevitable. Progress is optional."
-- Anonymous


sveinh

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #9 on: August 11, 2007, 03:25:44 am »
Oki, I understand that the core should have the dhcp server running on it for discovery etc.

Would it be fair to ask if it has to be the default gateway in the network? If not, would the following be possible?

Internet -- dsl modem (10.0.0.1), nat, no dhcp server
                   |-- LinuxMCE (static 10.0.0.2), dhcp server stating default GW = 10.0.0.1
                                                     10.0.0.10-100 for diskless MDs
                                                     10.0.0.100-254 for other dhcp clients
                   |-- MDs booting from 10.0.0.2
                   |-- other machines dhcp-client


This could mean that if you boot a machine using dhcp-client it would get the dsl-modem as default IP, and the network traffic would not need to go through the LinuxMCE box.

In advance, thanks!

-s

teedge77

  • Addicted
  • *
  • Posts: 591
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #10 on: August 11, 2007, 03:43:24 am »
You can work it just fine with one network card. The biggest problem you might run into would be running out of IPs in a 255.255.255.0 subnet. If you have a lto of computers and start getting other devices like orbiters, cameras, media players or whatever that need their own IPs. I already have a firewall and i just turned off DHCP from my file server and use the core for it now. One NIC is fine if you dont mind having all your LinuxMCE stuff on your local network with everything else.
AMD Athlon 64 X2 6000+
Asus M2V Via AM2 ATX
Lite-On LH-20A1S SATA DVD Burner
80GB  SATA-150
EVGA GeForce 7300 GT 512MB DDR2 PCI Express
Sound Blaster Audigy SE
Kingston 2 GB PC6400 DDR2 800MHz
Ultra X-Finity 800-Watt
ZCU000
Cisco 7970
TDM400P

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: 2 Network cards needed for core ?
« Reply #11 on: August 11, 2007, 10:08:36 am »
Hallois

I just read this:
"I have 2 network cards, one connected to my cable modem, the other to my home's ethernet switch"
- from the What to expect LinuxMCE wiki.

Does this mean I have to have two network cards in my linucMCE core (hybrid) for all this to work and have it connected between the modem and router?


All our Cores have a single Network Card. It just is not a problem at all. Just have separate LAN & WAN side Ip ranges;

LAN Side at the core on our systems are;

Core lan address: 192.168.80.1
Core WAN address: 192.168.20.99

We use a DSL or Cable modem with a Wireless/Router in front of the Core and have a single rj45 cable from the Core's LAN card to a LAN port on the router (the core is attached to normal LAN port on the router... not the WAN port on the router). The routers WAN port is then connected to the DSL or Cable modem. The router gets its LAN side setup via DHCP (this depends though on your provider) and has its LAN side DHCP switched off (as the core provides DHCP). Therefore the Router is the gateway on the LAN side and we usually configure ours with a fixed address of 192.168.20.1 (in the same range as the Core's LAN side address of 192.168.20.99) and the same Net Mask as the Core. Then in the Cores Network Setup screen (accessible from Web Admin) you set the WAN side up with;

Core WAN address: 192.168.20.99
Core Net Mask 255.255.255.0
Core WAN gateway: 192.168.20.1 (** ie the router is the gateway)
Core WAN side DNS: 192.168.20.1 (** ie the router supplies the DNS)

We have setup many cores this way without any problems at all.

Hope this helps.

Regards

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

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #12 on: August 12, 2007, 07:44:32 pm »
Oki, I understand that the core should have the dhcp server running on it for discovery etc.

Would it be fair to ask if it has to be the default gateway in the network? If not, would the following be possible?

Internet -- dsl modem (10.0.0.1), nat, no dhcp server
                   |-- LinuxMCE (static 10.0.0.2), dhcp server stating default GW = 10.0.0.1
                                                     10.0.0.10-100 for diskless MDs
                                                     10.0.0.100-254 for other dhcp clients
                   |-- MDs booting from 10.0.0.2
                   |-- other machines dhcp-client


This could mean that if you boot a machine using dhcp-client it would get the dsl-modem as default IP, and the network traffic would not need to go through the LinuxMCE box.

In advance, thanks!

-s

I see no reason why this shouldn't work, and it sounds a lot more sane then the other approach, which in the worst case simply cuts your available bandwith in half.  Usually the outside line itself is a much bigger bottleneck though, but still.

I don't see any options in the web-admin to change these settings, so you might have to try and change "option routers" in "/etc/dhcp3/dhcpd.conf", and of course there is always a chance that LinuxMCE wil overwrite those settings sooner or later.
"Change is inevitable. Progress is optional."
-- Anonymous


sveinh

  • Newbie
  • *
  • Posts: 9
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #13 on: August 12, 2007, 09:38:21 pm »
Oki, I understand that the core should have the dhcp server running on it for discovery etc.

Would it be fair to ask if it has to be the default gateway in the network? If not, would the following be possible?

Internet -- dsl modem (10.0.0.1), nat, no dhcp server
                   |-- LinuxMCE (static 10.0.0.2), dhcp server stating default GW = 10.0.0.1
                                                     10.0.0.10-100 for diskless MDs
                                                     10.0.0.100-254 for other dhcp clients
                   |-- MDs booting from 10.0.0.2
                   |-- other machines dhcp-client


This could mean that if you boot a machine using dhcp-client it would get the dsl-modem as default IP, and the network traffic would not need to go through the LinuxMCE box.

In advance, thanks!

-s

I see no reason why this shouldn't work, and it sounds a lot more sane then the other approach, which in the worst case simply cuts your available bandwith in half.  Usually the outside line itself is a much bigger bottleneck though, but still.

I don't see any options in the web-admin to change these settings, so you might have to try and change "option routers" in "/etc/dhcp3/dhcpd.conf", and of course there is always a chance that LinuxMCE wil overwrite those settings sooner or later.


One final question would be: can the diskless MDs boot from the core when it's not the standard gateway? Anyone?

-s

Zaerc

  • Alumni
  • LinuxMCE God
  • *
  • Posts: 2256
  • Department of Redundancy Department.
    • View Profile
Re: 2 Network cards needed for core ?
« Reply #14 on: August 12, 2007, 09:59:14 pm »

One final question would be: can the diskless MDs boot from the core when it's not the standard gateway? Anyone?

-s

As long as you disable all the other DHCP servers on the network that should be no problem at all.
"Change is inevitable. Progress is optional."
-- Anonymous