Solved

add 2nd network card

Posted on 2004-04-23
6
311 Views
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!

Brian
0
Comment
Question by:wxman1
  • 3
  • 2
6 Comments
 
LVL 3

Expert Comment

by:tolgadalkilic
Comment Utility
0
 
LVL 12

Accepted Solution

by:
paullamhkg earned 250 total points
Comment Utility
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

DEVICE=eth1
BOOTPROTO=static
BROADCAST=192.168.255.255
IPADDR=192.168.x.x
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes

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).
0
 

Author Comment

by:wxman1
Comment Utility
paullamhkg

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?
0
Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

 
LVL 12

Expert Comment

by:paullamhkg
Comment Utility
NAME
       hosts - The static table lookup for host names

SYNOPSIS
       /etc/hosts

DESCRIPTION
       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:

       bootstrapping
              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
              backup.

       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
        127.0.0.1       localhost
        192.168.1.10    foo.mydomain.org  foo
        192.168.1.13    bar.mydomain.org  bar
        216.234.231.5   master.debian.org      master
        205.230.163.103 www.opensource.org

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.
0
 

Author Comment

by:wxman1
Comment Utility
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.
0
 

Author Comment

by:wxman1
Comment Utility
thanks for your help.  everything is working now!
0

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

728 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now