Koozali.org: home of the SME Server

eth1 autostart

Offline maicz

  • **
  • 26
  • +0/-0
eth1 autostart
« on: August 03, 2011, 10:51:19 AM »
That's the scenario:
SME8.0b6 in server-only mode with 2 NIC. First NIC (eth0) is used only by SME. The second NIC (eth1) is used for 2 Virtualbox virtual machines in the same SME Server.

The problem: Each time SME restarts, eth1 is disabled, and VMs have no network. So i have to connect to server and do "ifconfig eth1 up".
Is there any way to automatically enable eth1 at startup?

Thanks,
MV

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: eth1 autostart
« Reply #1 on: August 03, 2011, 11:02:39 AM »
No, SME Server when run in server-only mode will either do NIC bonding or disable one of the two NICs.

Are the NICs identical? If so, perhaps you can use NIC bonding to increase throughput and run your Virtualbox installs as well as normal server functionality over that NIC.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: eth1 autostart
« Reply #2 on: August 03, 2011, 11:03:40 AM »
AFAIK no

I think you should redesign your setup..

install something like Proxmox VE or Vmware ESX on bare metal and then add all the VMs you need.. SME will be one of them...

Offline maicz

  • **
  • 26
  • +0/-0
Re: eth1 autostart
« Reply #3 on: August 03, 2011, 11:37:08 AM »
Unfortunately NICs are different, but maybe i can install 2 identical. I will consider that.

Stefano (Io mi chiamo Michele!! :D ) i've use this setup just because ESXi have some "random hang" problems on this old server.
I've also try Proxmox, but have insufficient CPU performance here for 4 systems in same bare metal.
After all the tests, SME8 + VBox was the best solution for me.

So, no way to autoload eth1 at startup... Ok, I will use 1 NIC for now, and continue my tests... :)

Thanks so much for your reply.
MV

Offline Oosterheert

  • *
  • 18
  • +0/-0
Re: eth1 autostart
« Reply #4 on: August 03, 2011, 12:18:01 PM »
and simply putting ifconfig eth1 up in /etc/rc.d/rc.local?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: eth1 autostart
« Reply #5 on: August 03, 2011, 02:24:59 PM »
and simply putting ifconfig eth1 up in /etc/rc.d/rc.local?
That will most likely not work due to the nature of SME Server and it's internal configuration database and template based configuration files.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline maicz

  • **
  • 26
  • +0/-0
Re: eth1 autostart
« Reply #6 on: August 03, 2011, 02:29:43 PM »
Cactus, I have try that tuff in this moment, and it seems works fine! I have simply eth1 up on startup.
There are some contraindications to do that?

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: eth1 autostart
« Reply #7 on: August 03, 2011, 02:31:30 PM »
There are some contraindications to do that?
I am unsure if that will survive updates, configuration changes and the like. I am also not sure on how this will work with routing traffic and such as this is all handles by template fragments.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline Oosterheert

  • *
  • 18
  • +0/-0
Re: eth1 autostart
« Reply #8 on: August 03, 2011, 02:34:35 PM »
rc.local doesn't seem to be influenced by updates etcetera, have had some things in rc.local since sme 7.0

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: eth1 autostart
« Reply #9 on: August 03, 2011, 02:36:15 PM »
rc.local doesn't seem to be influenced by updates etcetera, have had some things in rc.local since sme 7.0
That might be, but that is not the only thing to worry about IMHO. iptables and masq configuration is set by templates and is updated on configuration changes and updates, so that might affect OP.
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline maicz

  • **
  • 26
  • +0/-0
Re: eth1 autostart
« Reply #10 on: August 03, 2011, 02:48:37 PM »
Ok no matter for now. I will use this config, by monitoring functionality.
I'm not sure will use this system forever. Hope to replace hardware in the future.

Thanks for replys.

Offline Oosterheert

  • *
  • 18
  • +0/-0
Re: eth1 autostart
« Reply #11 on: August 05, 2011, 10:47:47 AM »
That might be, but that is not the only thing to worry about IMHO. iptables and masq configuration is set by templates and is updated on configuration changes and updates, so that might affect OP.
True in itself, but only important in server gateway mode as then you need to have a working firewall or masq.
Topic starter has SME in server-only mode and it seems he doesn't need a firewall on either NIC?
But it is something TS should be aware of and decide on himself indeed.

As far as I know there are no custom templates for rc.local(?) so edditing rc.local seems to be a necessary evil.
Additional firewall rules can be added through http://wiki.contribs.org/SME_Server:Documentation:FAQ#DB_Settings or by simply adding iptables commands in rc.local too

IfI had an extra  NIC autostart in rc.local i think i would prefer to have the corresponding firewall rules in rc.local as well, keeping things in 1 place.
« Last Edit: August 05, 2011, 10:49:30 AM by Oosterheert »

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: eth1 autostart
« Reply #12 on: August 05, 2011, 05:50:48 PM »
As far as I know there are no custom templates for rc.local(?) so edditing rc.local seems to be a necessary evil.

No, no need to edit rc.local. Just add a script or symlink in /etc/e-smith/events/local.