Mike McGrath wrote:
-----Original Message-----
From: fedora-list-bounces@xxxxxxxxxx on behalf of Jonathan Carpenter
Sent: Sat 11/19/2005 10:25 PM
To: Fedora-Redhat-List
Subject: Multiple IP with one nic
I have several servers that are not doing to much and I need to combine them
in to one. Is there anyway that I can give one server multiple IP's and
hostnames? So the network will see this one server as several?
Thanks,
create file:
/etc/sysconfig/network-scripts/ifcfg-eth0:0
in it put:
#######
DEVICE=eth0:0
BOOTPROTO=static
BROADCAST=10.10.0.255
IPADDR=10.10.0.150
NETMASK=255.255.255.0
NETWORK=10.10.0.0
ONBOOT=yes
TYPE=Ethernet
#######
replace the information in this example with your network settings, then restart the network
service network restart
Test, and repeat with eth0:1 eth0:2 and so on.
-Mike
Actually these aliased interface definitions inherit settings from the
parent interface defined by ifcfg-eth0
So all you need in ifcfg-eth0:0 etcetera are the changed settings, e.g.
DEVICE=eth0:0
IPADDR=10.10.0.150
FYI - aliased interface definitions are applied when the parent
interface is started or stopped, So ifup eth0 will also bring up
eth0:0. It used to be true and still may be - I haven't tested recently
- that ifcfg-eth0 has ONBOOT=yes then the aliased interfaces will be
brought up at boot regardless of the ONBOOT setting in ifcfg-eth0:0 file.
Chris
--
"Spend less! Do more! Go Open Source..." -- Dirigo.net
Chris Johnson, RHCE #807000448202021