As somebody previously mentioned, this method is called ip aliasing.

I'm running Mandrake v6.1 where the address for the main interface
(eth0) is set  via DHCPcd and then the alias is set afterwards since it
is a static address.

Here's what ifconfig -a reports
[lars@frid lars]$ /sbin/ifconfig -a
eth0      Link encap:Ethernet  HWaddr 00:A0:C9:72:2F:A0
          inet addr:10.0.3.40  Bcast:10.255.255.255  Mask:255.0.0.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:205581 errors:0 dropped:0 overruns:0 frame:0
          TX packets:114153 errors:0 dropped:0 overruns:0 carrier:0
          collisions:5 txqueuelen:100
          Interrupt:9 Base address:0xa000
 
eth0:0    Link encap:Ethernet  HWaddr 00:A0:C9:72:2F:A0
          inet addr:128.0.200.109  Bcast:128.0.255.255  Mask:255.255.0.0
          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1
          Interrupt:9 Base address:0xa000 

It has worked great and has been rock solid and I haven't noticed any slowness
from doing it this way (I have a Intel PCI EtherExpress Pro100 card).

I have it configured via linuxconf which somebody already mentioned as well;
it did require that I get some patches for Mandrake though so that the 
alias would be auto-magically configured every time at startup.
I believe it was a patch for linuxconf ( or maybe for the network startup
scripts) - search on Mandrake's or Red Hat's (or DejaNews) and 
you'll find the answer easy enough. 

On Wed, 16 Feb 2000, William Ahern wrote:
> On Wed, 16 Feb 2000, you wrote:
> > On Wed, 16 Feb 2000, Timothy Litwiller wrote:
> > 
> > > how do I put two ip addresses to the same network card -
> > > 
> > > specifically I would like to use my public IP address 203.53.###.53 and
> > > a private ip address 192.168.2.53 on the same card.
> ipaliasing.... you can use ifconfig like: ifconfig eth0:[n] where n is the
> numbered address (1,2,3,4...) on that interface., etc. this method is around
> from 2.0.x, but its discouraged. i dunno the new way...
> -- 
> William Ahern
> MIS, JINSA
> 
> ---------------------
> JINSA Online
> http://www.jinsa.org/
> ---------------------
-- 
Lars Nordin
Noble Systems Corporation

Reply via email to