When using ifcfg-eth0:x files in /etc/sysconfig/network-scripts/, should each file (where x increments appropriately) point to DEVICE=eth0:x or DEVICE=eth0:0?
I apparently have my alias files all ifcfg-eth0:0 - ifcfg-eth0:7 show DEVICE=eth0:0. Is this right? It seems odd to me and while it does seem odd, the alias IPs are being appropriately responded to, answering pings and nameserver requests.
The output of /sbin/ifconfig is what clued me in to the fact that I may well have done this wrong. This output showed eth0 and eth0:0 only.
Suggestions are welcome and much appreciated.
Thanks, ~Ray
CentOS release 5 (Final) 13:28:59 up 40 days, 1:58, 1 user, load average: 0.00, 0.03, 0.00 kernel: 2.6.18-8.el5
I apparently have my alias files all ifcfg-eth0:0 - ifcfg-eth0:7 show
DEVICE=eth0:0. Is this right? It seems odd to me and while it does seem odd, the alias IPs are being appropriately responded to, answering pings and nameserver requests.
/etc/sysconfig/network-scripts/ifcfg-eth0:0 = DEVICE=eth0:0 /etc/sysconfig/network-scripts/ifcfg-eth0:1 = DEVICE=eth0:1
...
Barry Brimer wrote:
I apparently have my alias files all ifcfg-eth0:0 - ifcfg-eth0:7 show
DEVICE=eth0:0. Is this right? It seems odd to me and while it does seem odd, the alias IPs are being appropriately responded to, answering pings and nameserver requests.
/etc/sysconfig/network-scripts/ifcfg-eth0:0 = DEVICE=eth0:0 /etc/sysconfig/network-scripts/ifcfg-eth0:1 = DEVICE=eth0:1
Hi Barry,
Thanks for your quick response. I am going to make those changes and restart network services in a few minutes.
My question now is, how can the box be responding to all those IPs with the ifcfg-eth0:x files clearly not what they should be?
Not a crucial question, but one of interest.
Thanks again, ~Ray
Quoting Ray Leventhal centos@swhi.net:
Barry Brimer wrote:
I apparently have my alias files all ifcfg-eth0:0 - ifcfg-eth0:7 show
DEVICE=eth0:0. Is this right? It seems odd to me and while it does seem odd, the alias IPs are being appropriately responded to, answering pings and nameserver requests.
/etc/sysconfig/network-scripts/ifcfg-eth0:0 = DEVICE=eth0:0 /etc/sysconfig/network-scripts/ifcfg-eth0:1 = DEVICE=eth0:1
My question now is, how can the box be responding to all those IPs with the ifcfg-eth0:x files clearly not what they should be?
The network init scripts do not actually use /sbin/ifconfig, they really use /sbin/ip from the iproute package. I suspect if you run "ip addr list" you will see all of your IP addresses under "eth0".
Barry
On 9/14/07, Ray Leventhal centos@swhi.net wrote:
http://wiki.centos.org/TipsAndTricks/RangeOfIpsOnEthx
Suggestions are welcome and much appreciated.
Jim Perrin wrote:
On 9/14/07, Ray Leventhal centos@swhi.net wrote:
Hi Jim,
Thank you for the link...it's definitely good to know one can assign a range of IPs with ease using that type of directive.
As my additional IPs were not contiguous, that wasn't an answer for me this time around, but I'm very glad to have learned it!
Regards, ~Ray