How to add a range of ip's in CentOS 6?

Issues related to configuring your network
Post Reply
linuxNewBie_010
Posts: 6
Joined: 2017/03/21 13:45:51

How to add a range of ip's in CentOS 6?

Post by linuxNewBie_010 » 2017/08/03 07:38:01

I have been trying to add range of ip's on my dedicated server which has CentOS 6 x64

Following are the ip's which are assigned to my server.

Primary IP Block
IP Addresses: 162.xxx.xx.82 - 162.xxx.xx.83

Netmask: 255.255.255.0

Gateway: 162.xxx.31.1
Secondary IP Block(trying to add these ip's)
IP Addresses: 199.xxx.xxx.194 - 199.xxx.xxx.254

Netmask: 255.255.255.192

Gateway: 199.xxx.115.193

This is how my /etc/sysconfig/network-scripts folder looks

Image

So far I have tried adding a range file(as u can see in the above img) named ifcfg-eth0-range0.

It has the following:

Code: Select all

DEVICE="eth0"
IPADDR_START=199.xxx.xxx.194
IPADDR_END=199.xxx.xxx.254
CLONENUM_START=0
But when I run "service network restart" command it shows the following error

Code: Select all

Bringing up interface eth0:  Determining if ip address 162.xxx.xx.82 is already in use for device eth0...
: integer expression expecteds/ifup-aliases: line 332: [: 194
: integer expression expecteds/ifup-aliases: line 339: [: 194
I asked support they said I need to check my ifup-aliases file and correct the error on the shown lines, but that file is untouched and is stock/default file how can it have error?

Post Reply