assigning multiple ip addresses to NIC on bootupm, how?

Ferindo Middleton Jr fmiddleton at verizon.net
Thu Jul 21 01:11:52 UTC 2005


I tried setting up an ifcfg-eth0-range0 file in 
/etc/sysconfig/network-scripts

with the following inside the file :

IPADDR_START=192.168.1.3
IPADDR_END=192.168.1.10
CLONENUM_START=0
NO_ALIASROUTING=yes

This didn't work when I rebooted. Looking at the service calls during 
bootup, it said "OK" for the ifcfg-eth0-range0 service but when it got 
to the httpd service, the extra addresses weren't recognized and the 
httpd couldn't bind to the virtual ip addresses I'm specifying in my 
httpd.conf file. And, of course when I run ifconfig, it only shows the 
original address I have setup for this NIC: 192.168.1.2 and the loopback 
interface.

Additionally, when I run the "Network" tool in Gnome, this program 
doesn't like this new file I made at all.

Mike, is there some other configurations that need to be set besides the 
ifcfg-eth0-range0 file that need to be set in order for this to work. I 
already have a ifcfg-eth0 file with this inside:

# Linksys|Network Everywhere Fast Ethernet 10/100 model NC100
DEVICE=eth0:1
BOOTPROTO=none
BROADCAST=192.168.1.255
HWADDR=00:04:5A:77:17:1C
IPADDR=192.168.1.2
NETMASK=255.255.255.0
NETWORK=192.168.1.0
ONBOOT=yes
TYPE=Ethernet
USERCTL=no
PEERDNS=no
GATEWAY=192.168.1.1
IPV6INIT=yes

Oh, and "hip-hip hooray" for kernel-2.6.12-1.1398_FC4.

Ferindo

Mike Klinke wrote:

>On Saturday 09 July 2005 09:31, Ferindo Middleton Jr wrote:
>
>  
>
>>I run the following commands at the shell to  assign the
>>additional ip address to my FC4 server's NIC.
>>ifconfig eth0:2 192.168.1.3
>>ifconfig eth0:3 192.168.1.4
>>
>>I do this because I need to make these additional addresses
>>available for virtual hosts to accept requests  on my apache
>>apache web server.
>>
>>How can I get these commands to run on boot up automatically
>>without me having run them manually. My httpd service fails to
>>start on boot up because it requires these addresses to already
>>be available on the NIC, but my setup initially only bring eth0:1
>>up on 192.168.1.2.
>>
>>Ferindo
>>
>>    
>>
>
>As an addendum to Alexander's advice, you can also take a read 
>through the comments in the file:
>
>/etc/sysconfig/network-scripts/ifup-aliases
>
>
>For example, I use the file:
>
>ifcfg-eth0-range0
>
>
>like so:
>
>============
>IPADDR_START=192.168.1.42
>IPADDR_END=192.168.1.180
>CLONENUM_START=0
>NO_ALIASROUTING=yes
>============
>
>to create aliases for all addresses from ...42 to ...180 in a single 
>file which will be handy if you plan to expand your alias usage in 
>the future as you won't have to create individual files.
>
>
>Regards, Mike Klinke
>
>
>
>
>  
>

-- 
Ferindo Middleton
Chief Architect
Sleekcollar.com




More information about the fedora-list mailing list