add 2nd network card

Posted on 2004-04-23
Last Modified: 2013-12-16
I need to put one of my Linux machines on 2 networks.  It will need to have two different ips: 10.0.x.x and 192.168.X.X.  I am running Redhat 8.0.  I installed a second ethernet card (it is compatible w/ Linux accordinf to HOWTO).  Now, I've booted the computer, and don't know what to do next.  The original card is already configured properly.  Both ethernet cards are differnt, therefore I am sure I need to do something with drivers, but don't know what.  Then I would like to configure the 2nd ethernet card as eth1 but don't know how.  The original card is eth0.  Lastly, I am sure I need to edit etc/hosts, but don't know how?

Thanks in advance!

Question by:wxman1
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2

Expert Comment

ID: 10903086
LVL 12

Accepted Solution

paullamhkg earned 250 total points
ID: 10916025
what u need to do is ensure the driver already installed, normally the system will tell you a new hardware found and request the driver/list out network card for you to select during your RH8.0 startup (plug and play function of RH). since you said the NIC is compatible with linux, so I think the NIC should list out after the new hardware detected.

After that you have to change the /etc/sysconfig/network-scripts/ifcfg-eth1 as below


after the file saved, run ifup eth1 should bring up the new NIC.

or you can use the 'netconfig' in the command prompt/console mode to config your second NIC (eth1).

Author Comment

ID: 10917688

I changed ifcfg-eth1 as you said, with the correct settings.  Now I probably need to edit the etc/hosts but I'm not sure how.

any suggestions?
Get MongoDB database support online, now!

At Percona’s web store you can order your MongoDB database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card. Handle your MongoDB database support now!

LVL 12

Expert Comment

ID: 10925100
       hosts - The static table lookup for host names


       This manual page describes the format of the /etc/hosts file. This file
       is a simple text file that associates IP addresses with hostnames,  one
       line per IP address. For each host a single line should be present with
       the following information:

              IP_address canonical_hostname aliases

       Fields of the entry are separated by any number of  blanks  and/or  tab
       characters.  Text  from  a "#" character until the end of the line is a
       comment, and is ignored.  Host  names  may  contain  only  alphanumeric
       characters, minus signs ("-"), and periods (".").  They must begin with
       an  alphabetic  character  and  end  with  an  alphanumeric  character.
       Aliases  provide  for  name changes, alternate spellings, shorter host-
       names, or generic hostnames (for example, localhost).   The  format  of
       the host table is described in RFC 952.

       The Berkeley Internet Name Domain (BIND) Server implements the Internet
       name server for UNIX systems. It augments or  replaces  the  /etc/hosts
       file  or  host name lookup, and frees a host from relying on /etc/hosts
       being up to date and complete.

       In modern systems, even though the host table has  been  superseded  by
       DNS, it is still widely used for:

              Most  systems  have  a  small host table containing the name and
              address information for important hosts on  the  local  network.
              This  is useful when DNS is not running, for example during sys-
              tem bootup.

       NIS    Sites that use NIS use the host table as input to the  NIS  host
              database.  Even  though NIS can be used with DNS, most NIS sites
              still use the host table with an entry for all local hosts as  a

       isolated nodes
              Very small sites that are isolated from the network use the host
              table instead of DNS. If the local information  rarely  changes,
              and  the  network  is  not connected to the Internet, DNS offers
              little advantage.

EXAMPLE       localhost  foo  bar      master

The above is the man page of /etc/hosts so you can have some idea.

can you tell us what you are planning to do with your 2 NIC linux, so that we can more specify.

Author Comment

ID: 10927607
This is what I am trying to do:

The original card will continue to be used as it has been.  It connects the Linux PC to our LAN.  It needs to be connected to our LAN, and it uses Samba to communicate with the Windows Computers that are on the LAN.

I put the 2nd card in the Linux PC because we have data that is transmitted to us via satellite.  This data comes into a satellite modem, which in turn changes the data format to TCP/IP then broadcasts the data to a proprietary ip address inherant to the satellite modem.  Because the satellite modem is looking for a particular ip address that does not conform to our LAN, I thought this would be the best way to go.

Author Comment

ID: 10929133
thanks for your help.  everything is working now!

Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
It’s 2016. Password authentication should be dead — or at least close to dying. But, unfortunately, it has not traversed Quagga stage yet. Using password authentication is like laundering hotel guest linens with a washboard — it’s Passé.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses

630 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question