Just have installed my brand new and shiny CentOS 6.0 and trying to add IP range to my box. I have created new file /etc/sysconfig/network-scripts/ifcfg-eth0-range0 and placed the following:
[code]
IPADDR_START=xxx.xxx.xxx.xxx
IPADDR_END=xxx.xxx.xxx.xxx
CLONENUM_START=0
[/code]
When I run 'ifup ifcfg-eth0-range0' it gives:
[code]
root@host:/etc/sysconfig/network-scripts#
ifup ifcfg-eth0-range0
Device does not seem to be present, delaying initialization.
[/code]
service network restart gives:
[code]
service network restart
Shutting down interface eth0: [ OK ]
Shutting down loopback interface: [ OK ]
Bringing up loopback interface: [ OK ]
Bringing up interface eth0: SIOCGIFADDR: Cannot assign requested address
SIOCSIFBROADCAST: Cannot assign requested address
SIOCSIFBRDADDR: Cannot assign requested address
SIOCSIFFLAGS: Cannot assign requested address
[ OK ]
[/code]
Nevertheless everything is working as desired, all IP addresses in the range are available, I really want to track down why it spits out SIOCGIF-notice.
list of my /etc/sysconfig/network-scripts directory after all steps above:
[code]
-rw-r--r--. 3 root root 226 Aug 4 14:31 ifcfg-eth0
-rw-r--r--. 1 root root 73 Aug 4 14:29 ifcfg-eth0-range0
-rw-r--r--. 1 root root 254 Sep 1 2010 ifcfg-lo
lrwxrwxrwx. 1 root root 20 Aug 4 11:10 ifdown -> ../../../sbin/ifdown
-rwxr-xr-x. 1 root root 627 Sep 1 2010 ifdown-bnep
-rwxr-xr-x. 1 root root 5059 Sep 1 2010 ifdown-eth
-rwxr-xr-x. 1 root root 781 Sep 1 2010 ifdown-ippp
-rwxr-xr-x. 1 root root 4246 Sep 1 2010 ifdown-ipv6
lrwxrwxrwx. 1 root root 11 Aug 4 11:10 ifdown-isdn -> ifdown-ippp
-rwxr-xr-x. 1 root root 1481 Sep 1 2010 ifdown-post
-rwxr-xr-x. 1 root root 1064 Sep 1 2010 ifdown-ppp
-rwxr-xr-x. 1 root root 651 Sep 1 2010 ifdown-routes
-rwxr-xr-x. 1 root root 1367 Sep 1 2010 ifdown-sit
-rwxr-xr-x. 1 root root 1431 Sep 1 2010 ifdown-tunnel
lrwxrwxrwx. 1 root root 18 Aug 4 11:10 ifup -> ../../../sbin/ifup
-rwxr-xr-x. 1 root root 13454 Sep 1 2010 ifup-aliases
-rwxr-xr-x. 1 root root 859 Sep 1 2010 ifup-bnep
-rwxr-xr-x. 1 root root 9944 Sep 1 2010 ifup-eth
-rwxr-xr-x. 1 root root 11971 Sep 1 2010 ifup-ippp
-rwxr-xr-x. 1 root root 10679 Sep 1 2010 ifup-ipv6
lrwxrwxrwx. 1 root root 9 Aug 4 11:10 ifup-isdn -> ifup-ippp
-rwxr-xr-x. 1 root root 727 Sep 1 2010 ifup-plip
-rwxr-xr-x. 1 root root 954 Sep 1 2010 ifup-plusb
-rwxr-xr-x. 1 root root 2364 Sep 1 2010 ifup-post
-rwxr-xr-x. 1 root root 4154 Sep 1 2010 ifup-ppp
-rwxr-xr-x. 1 root root 1712 Sep 1 2010 ifup-routes
-rwxr-xr-x. 1 root root 3490 Sep 1 2010 ifup-sit
-rwxr-xr-x. 1 root root 2482 Sep 1 2010 ifup-tunnel
-rwxr-xr-x. 1 root root 3770 Sep 1 2010 ifup-wireless
-rwxr-xr-x. 1 root root 4508 Sep 1 2010 init.ipv6-global
-rwxr-xr-x. 1 root root 1125 Sep 1 2010 net.hotplug
-rw-r--r--. 1 root root 9966 Sep 1 2010 network-functions
-rw-r--r--. 1 root root 29835 Sep 1 2010 network-functions-ipv6
[/code]
I'd appreciate any help on this. Thank you!
'Cannot assign requested address' error on setting up ip-range
'Cannot assign requested address' error on setting up ip-ran
Since I'd never seen this notation before, I thought I'd try it out. It works for me. Here's what I did
[code]
# cd /etc/sysconfig/network-scripts
# cat ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:11:22:33:44:55"
NM_CONTROLLED="no"
ONBOOT="yes"
IPADDR=192.168.x.19
NETMASK=255.255.255.0
# cat ifcfg-eth0-range0
IPADDR_START=192.168.x.15
IPADDR_END=192.168.x.17
CLONENUM_START=0
[/code]
One quick `service network restart` later and I have an eth0 and 3 aliases eth0:[0-2].
[code]
# cd /etc/sysconfig/network-scripts
# cat ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="static"
HWADDR="00:11:22:33:44:55"
NM_CONTROLLED="no"
ONBOOT="yes"
IPADDR=192.168.x.19
NETMASK=255.255.255.0
# cat ifcfg-eth0-range0
IPADDR_START=192.168.x.15
IPADDR_END=192.168.x.17
CLONENUM_START=0
[/code]
One quick `service network restart` later and I have an eth0 and 3 aliases eth0:[0-2].