FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 07-17-2008, 04:39 PM
Matt
 
Default Simple IP Question

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@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-17-2008, 04:44 PM
"Marko A. Jennings"
 
Default Simple IP Question

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?

In ifcfg-eth0:0, DEVICE line should look like this:

DEVICE=eth0:0

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-17-2008, 04:44 PM
Ralph Angenendt
 
Default Simple IP Question

Matt wrote:
> /etc/sysconfig/network-scripts/ifcfg-eth0
> DEVICE=eth0
>
> /etc/sysconfig/network-scripts/ifcfg-eth0:0
> DEVICE=eth0
^:0

> Now the only IP that works is the second one. What am I doing wrong?

The obvious thing

Cheers,

Ralph
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-17-2008, 04:47 PM
Timothy Selivanow
 
Default Simple IP Question

On Thu, 2008-07-17 at 11:39 -0500, Matt wrote:
> 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?

You want DEVICE=eth0:1 (or what ever your interface alias is)


--Tim

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-17-2008, 05:02 PM
"Bo Lynch"
 
Default Simple IP Question

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@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

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-17-2008, 05:03 PM
Matt
 
Default Simple IP Question

>>DEVICE=eth0:0

Your not gonna believe this but that fixed it right up. ;<) Thanks everybody!

Matthew


> 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?
_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 
Old 07-17-2008, 05:15 PM
Chris Boyd
 
Default Simple IP Question

On Jul 17, 2008, at 11:39 AM, 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


I got tripped up on this a while back. You need to have
DEVICE=eth0:0 in the second script, otherwise you just overwrite the
previously assigned IP address.

_______________________________________________
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos
 

Thread Tools




All times are GMT. The time now is 05:40 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org