[CentOS] Simple IP Question

Thu Jul 17 17:02:29 UTC 2008
Bo Lynch <blynch at ameliaschools.com>

On Thu, July 17, 2008 12:39 pm, Matt wrote:
> I have a server located remotely running CentOS 5.x.  I need to have
> two IP's on the same interface.  So I have this:
>
> /etc/sysconfig/network-scripts/ifcfg-eth0
> DEVICE=eth0
> BOOTPROTO=none
> BROADCAST=69.x.x.199
> HWADDR=00:x:x:x:c6:10
> IPADDR=69.x.x.194
> NETMASK=255.255.255.248
> NETWORK=69.x.x.192
> ONBOOT=yes
> GATEWAY=69.x.x.193
> TYPE=Ethernet
>
> So I added this:
>
> /etc/sysconfig/network-scripts/ifcfg-eth0:0
> DEVICE=eth0
> BOOTPROTO=none
> BROADCAST=69.x.x.199
> HWADDR=00:x:x:x:c6:10
> IPADDR=69.x.x.195
> NETMASK=255.255.255.248
> NETWORK=69.x.x.192
> ONBOOT=yes
> GATEWAY=69.x.x.193
> TYPE=Ethernet
>
> Now the only IP that works is the second one.  What am I doing wrong?
>
> Thanks.
>
> Matt
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> http://lists.centos.org/mailman/listinfo/centos
>
Matt,

run ifconfig eth0:2 123.123.123.123 netmask 255.255.255.0 broadcast
123.123.123.255
and if needed
route add -host 123.123.123.123 eth0:2
Change values as needed though...

Then set your ifcfg-eth0:2

Bo