You will be surprised at how easy this is.  First, you can not assign 2
addresses to the same NIC.  That's a physical thing.  BUT nothing says that
you cann't have more than NIC right?  So we take your NIC and make it look
like it is more than one NIC.  Here's the process.

First, run 'ifconfig' as root, and verify that eth0 is set the way that you
want it to be.  I would do the following:

#ifconfig eth0 10.0.0.20 netmask 255.255.255.0 broadcast + up
        
Then rerun ifconfig by itself to ensure that the settings took place.  Next
you want to setup a virtual interface on the current NIC.  Pretty much the
same as the last command except that we modify the ethernet identifier.

#ifconfig eth0:1 198.98.141.6 netmask 255.255.255.0 broadcast + up

The when you run ifconfig again, you will see 2 ethernet cards with the
different IP's assigned to them.  You can have up to 255 VIF's assigned to
each physical NIC.  Pretty cool huh?  How do you drop the VIF when you
don't want it?  Try this:

#ifconfig eth0:1 0.0.0.0 down

There you go.

Pete

At 10:32 AM 4/21/98 +0200, Cedric MARSOT wrote:
>Hi,
>
>I need to put two network addresses on my network card:
>10.0.0.20 255.255.255.0 gateway: 10.0.0.1
>194.98.141.6 255.255.255.0 gateway: 194.98.141.254
>
>I have installed my RedHat 5.0 with the first address (10.0.0.20). It works
>fine.
>But I try to put another address on my card, and everything goes wrong.
>
>I have define a card (eth1) with netcfg. this interface have 194.98.141.6 as
>ip address, the good netmask and activate at boot time.
>
>For routing, I have default gateway:
>194.98.141.254 on eth1
>and 10.0.0.1 for eth0
>
>And in /etc/conf.modules I put
>aliase eth1    ne0
>(because I have alias eth0 ne0)
>
>When I boot, eth1 is not started.
>
>Can you help me ?
>
>thanks a lot.
>
>--
>cedric
>
>
>-- 
>  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
>http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
>         To unsubscribe: mail [EMAIL PROTECTED] with 
>                       "unsubscribe" as the Subject.
> 
============================================================= 
Pete Durst                                                              e-mail  
[EMAIL PROTECTED]         
P&L   Software                                                          fax         
(613) 634-1341 
Consultant/Programmer                                                                  
 :-) 
============================================================= 


--
  PLEASE read the Red Hat FAQ, Tips, Errata and the MAILING LIST ARCHIVES!
http://www.redhat.com/RedHat-FAQ /RedHat-Errata /RedHat-Tips /mailing-lists
         To unsubscribe: mail [EMAIL PROTECTED] with
                       "unsubscribe" as the Subject.

Reply via email to