I want to add two IP ranges on one NIC card (eth0 and eth0:1). Has anyone done this before?
The CentOS 4 gui keeps locking up when I try it there and the command line ifconfig seems to work, but ifup always returns the error that is never heard (no such device) of eth0:1
thanks
ryanag@zoominternet.net wrote:
I want to add two IP ranges on one NIC card (eth0 and eth0:1). Has anyone done this before?
The CentOS 4 gui keeps locking up when I try it there and the command line ifconfig seems to work, but ifup always returns the error that is never heard (no such device) of eth0:1
If you do ifconfig, then you don't need to do ifup afterwards. It comes up as part of the command. ifup is if you have the device or alias defined and it's not up and running. For CentOS/RHEL, you define the IP aliases in: /etc/sysconfig/network-scripts
In fact, assuming you want the ranges to come up after reboot, it's best to put them there. Note that Linux (as opposed to Solaris, I think?) uses eth0:0 as the first IP alias of eth0 (eth0 itself being the primary/non-alias IP address), not eth0:1. eth0:1 would be for the 2nd IP alias of eth0.
But if you're doing a range, then instead of /etc/sysconfig/network-scripts/ifcfg-eth0:0, you'd want /etc/sysconfig/network-scripts/ifcfg-eth0-range0 and then instead of IPADDR=, use IPADDR_START=starting.ip.address.here and IPADDR_END=ending.ip.address.here
johnn
You are the man. The below worked perfectly. :-)
On Wed, 2005-04-13 at 14:51 -0700, Johnn Tan wrote:
ryanag@zoominternet.net wrote:
I want to add two IP ranges on one NIC card (eth0 and eth0:1). Has anyone done this before?
The CentOS 4 gui keeps locking up when I try it there and the command line ifconfig seems to work, but ifup always returns the error that is never heard (no such device) of eth0:1
If you do ifconfig, then you don't need to do ifup afterwards. It comes up as part of the command. ifup is if you have the device or alias defined and it's not up and running. For CentOS/RHEL, you define the IP aliases in: /etc/sysconfig/network-scripts
In fact, assuming you want the ranges to come up after reboot, it's best to put them there. Note that Linux (as opposed to Solaris, I think?) uses eth0:0 as the first IP alias of eth0 (eth0 itself being the primary/non-alias IP address), not eth0:1. eth0:1 would be for the 2nd IP alias of eth0.
But if you're doing a range, then instead of /etc/sysconfig/network-scripts/ifcfg-eth0:0, you'd want /etc/sysconfig/network-scripts/ifcfg-eth0-range0 and then instead of IPADDR=, use IPADDR_START=starting.ip.address.here and IPADDR_END=ending.ip.address.here
johnn _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On Wed, 2005-04-13 at 17:35 -0400, ryanag@zoominternet.net wrote:
I want to add two IP ranges on one NIC card (eth0 and eth0:1). Has anyone done this before?
The CentOS 4 gui keeps locking up when I try it there and the command line ifconfig seems to work, but ifup always returns the error that is never heard (no such device) of eth0:1
Yes. I have done this on at least two Centos 4.0 systems and it works for me. Both times I configured it via the command line, though. I find the gui frontend for networking does not fill my needs.
-geoff
ryanag@zoominternet.net wrote:
I want to add two IP ranges on one NIC card (eth0 and eth0:1). Has anyone done this before?
When you set up IP ranges, I think the if scripts use eth0:0->n already (one for each IP) (at least it used to, I have not checked this on EL4). There could be some kind of conflict if you try to specify your own alias interface?
John.
The CentOS 4 gui keeps locking up when I try it there and the command line ifconfig seems to work, but ifup always returns the error that is never heard (no such device) of eth0:1
thanks
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos