Koozali.org: home of the SME Server

activating the 2nd NIC?

wykyd

activating the 2nd NIC?
« on: September 17, 2003, 03:09:06 PM »
OK I know this has got to be a stupid question, but I can see the nic in my server admin panel but I can not get to activate it. I want to use it to serve 2 small networks instead of them seperately but I can not get that second nic running. It shows up fine. I have seen posts about getting the 3rd nic up, but as people say they already have 2 I take it it nust be different.

what is it I am missing?

I am using SME-Server 6b3. If that makes a difference

wykyd

Re: activating the 2nd NIC?
« Reply #1 on: September 17, 2003, 04:42:38 PM »
OK I got the NIC running

But I can not get  it to route between the 2 nics.

This is how I set it up

cd /etc
vi modules.conf
alias          Adds NIC and sets driver
ifconfig eth1                  Checks to see if it sees it
ifconfig eth1 up             Brings eth1 up
ifconfig eth1 inet 192.168.2.1       Sets eht1 IP address

Now when I add

Network address               192.168.2.0
Subnet mask                      255.255.255.0
Router                               192.168.2.1

It gives me an error saying can not reach network?
There must be something I have missed

wykyd

Re: activating the 2nd NIC?
« Reply #2 on: September 17, 2003, 05:17:08 PM »
and as soon as I restart the server the config has gone?

How do I make it keep it?

dave

Re: activating the 2nd NIC?
« Reply #3 on: September 17, 2003, 06:38:22 PM »
SME server does all of it's configurations by using config file templates.  The templates will be rebuilt with default values under certain circumstances, some will be rebuilt only when you force a certain event or when you reboot.  

You can read about the templates and how they work as well as how to customize them in the online documentation.

Julie Random

Re: activating the 2nd NIC?
« Reply #4 on: September 17, 2003, 07:22:25 PM »
/etc/modules.conf
alias  (if the card is different to the current one)

copy current green to newgreen eg
copy /etc/sysconfig/network-scripts/ifcfg-eth1 to etc/sysconfig/network-scripts/ifcfg-eth2

modify ifcfg-eth2 to reflect new green network settings

copy this script to admin home directory for reuse if you redo the server config at any time, it gets overwritten when using the templates

goto http://yourserver/server-manager
and add  local network your newgreen and its subnet mask

you should be up and running

wykyd

Re: activating the 2nd NIC?
« Reply #5 on: September 17, 2003, 07:24:51 PM »
OK I found a how to.

http://www.e-smith.org/docs/howto/contrib/net_card.html

This is my slightly modified version ( I only changes device names I think)

create /etc/e-smith/templates-custom/etc/modules.conf/12eth1
      having the following lines:

         {
         push @lines, "alias eth2 3c59x"
         }

# Expand the template:
/sbin/e-smith/expand-template /etc/modules.conf
# Create a config file for each new interface in /etc/sysconfig/network-scripts (The Name of these config files must have the device name in them)

    * Use the eth0 device config file as a template for the new devices.
      cp /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth1
    * edit the config files to include the ip-numbers and netmasks of the additional networks.
      pico /etc/sysconfig/network-scripts/ifcfg-eth1

# Start the interface: (this will happen automatically on reboot, but do it now to save rebooting)

    * /etc/sysconfig/network-scripts/ifup eth1

# Check status of Interfaces:

    * ifconfig eth1

# Check the log file for any error messages
/var/log/messages
# Give the Network "local network" rights with the e-smith web manager.

The Full How To is
http://www.e-smith.org/docs/howto/contrib/net_card.html
thanx to Allen (admin@allenscomputing.com)

I did actualy see this before but I thought it was only needed for 3 cards or more. But as I am on dial up then this would be the third connection.

Anyway all is working now thanx.

I added the local network as

172.168.0.0
255.255.255.0
192.168.0.1

Thanx