[Gllug] adding multiple IP's to one interface?

Xander D Harkness xander at harkness.co.uk
Thu Nov 15 10:30:52 UTC 2001


On Thu, 2001-11-15 at 02:49, Andy McGarty wrote:
> 
> 
> > How do I add more than one IP address to eth0?
> >
> > ifconfig eth0 ip_address_here
> >
> > only enables me to change the address and it goes back to the original
> > on reboot.
> >
> > Thanks
> > Steve.
> >
> I cheat and use linuxconf under Redhat and Mandrake.  There is a setting for
> "IP aliases for virtual hosts".
> 
> Andy
> 
I did this a while back up until I did it on a remote server.  Someone
else had manually added an ip address by creating a new file
/etc/sysconfig/network-scripts/eth0:1 with the new IP address.  I
applied changes to the mail config and it recreated all settings that it
knew about - including removing an IP.  Knocking me off my ssh sessions
and rendering the mail server inaccessable. People using the box were
not so impressed.

For rudimentary configs copy /etc/sysconfig/network-scripts/eth0 to
/etc/sysconfig/network-scripts/eth0:2 etc. and make the changes.  Ensure
that the device in the file is the one you want too ie eth0:2

I know that newer versions of Linuxconf are much better in they say what
they are changing.  I would ensure that the only items you want
configured with linuxconf are the only modules enabled, such as mail.

I still believe that linuxconf is an essential tool for bringing admins
into Linux.

Cheers
Xander


-- 
Gllug mailing list  -  Gllug at linux.co.uk
http://list.ftech.net/mailman/listinfo/gllug




More information about the GLLUG mailing list