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.
- Configure your eth0 interface as normal
- Create a new file: /etc/sysconfig/network-scripts/ifcfg-eth0-range0
- 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 - 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.
0 responses so far ↓
There are no comments yet...
Leave a Comment