[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Adding IP address



On Mon, 2002-12-02 at 09:19, Mark McCulligh wrote:
> How do you add more then one IP address to a machine for Red Hat 7.3.
> 
> I am setting up a web server with more then one IP address and don't know
> how to add more IPs to the server..

Example if you wanted to add aliases to eth0

Just copy /etc/sysconfig/network-scripts/ifcfg-eth0 to
/etc/sysconfig/network-scripts/ifcfg-eth0:1

Change the necessary settings in ifcfg-eth0:1 and start the dev: ifup
eth0:1

If you need more just continue to add aliases eth0:2, eth0:3, etc....

You can add them without adding the additional files, but of course if
you have to reboot you will have to re-enter them again.

Too add:
ip addr add 192.168.1.20/24 dev eth0 label eth0:1

or

ip addr add 192.168.1.20/24 broadcast 192.168.1.255 dev eth0 label
eth0:1


To delete:
ip addr del 192.168.1.20 dev eth0 label eth0:1


You can see the options to the "ip" command with:
ip help or ip <COMMAND> help


Regards,
	Jim H






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]