Stuff…

I know I will forget.

Stuff… header image 2

Configure a range of IPs on CentOS

June 22nd, 2010 · No Comments

Needed to add 64 IPs to a CentOS 5.4 system and it was going to be a pain adding individual files in /etc/sysconfig/network-scripts/ifcfg-eth0:X

There is a nice way to alias a range of IPs to your interface automatically when the network comes up.

  1. Configure your eth0 interface as normal
  2. Create a new file: /etc/sysconfig/network-scripts/ifcfg-eth0-range0
  3. In the ifcfg-eth0-range0 file you can put the details of the IPs you want to add:
    IPADDR_START=x.x.x.x
    IPADDR_END=y.y.y.y
    CLONENUM_START=0
  4. Restart networking

After you restart networking the start IP you added (x.x.x.x) and all IPs to the end IP (y.y.y.y) should be added as aliases to your eth0 interface.

Tags: Linux · Networking · Operating System

0 responses so far ↓

  • There are no comments yet...

Leave a Comment