Bind IP's to a server in Linux (CentOS/RedHat)

This article will go over how to bind IP addresses that were assigned and routed to your server. This applies only to Cloud and Dedicated accounts.

  1. SSH into the server. If you are not sure how to SSH, 
  2. Change the directory to /etc/sysconfig/network-scripts
  3. Create a file for the new range; use the next range number or 0 if no new ranges have been added to the server yet.
  4. [root@server network-scripts]# ls -la ifcfg-eth0-range*

    ls: ifcfg-eth0-range*: No such file or directory

    [root@server network-scripts]# touch ifcfg-eth0-range0

  5. Check ifconfig for the next clonenum. The clonenum is the number after the colon, the clonenum we will use is the next largest number in the series. In this case it will be 6.
  6. [root@server network-scripts]# ifconfig | grep "eth0:"

    eth0:1 Link encap:Ethernet HWaddr 00:30:48:8F:77:02
    eth0:2 Link encap:Ethernet HWaddr 00:30:48:8F:77:02
    eth0:3 Link encap:Ethernet HWaddr 00:30:48:8F:77:02
    eth0:4 Link encap:Ethernet HWaddr 00:30:48:8F:77:02

    eth0:5 Link encap:Ethernet HWaddr 00:30:48:8F:77:02

  7. Edit the range* file using the next clonenum as CLONENUM_START. The other information should have been provided to you.
  8. [root@server network-scripts]# cat ifcfg-eth0-range0

    IPADDR_START=xxx..xxx.xxx.xxx
    IPADDR_END=yyy.yyy.yyy.yyy
    NETMASK=255.255.255.zzz

    CLONENUM_START=6

  9. Restart the network.
  10. [root@server network-scripts]# /etc/init.d/network restart

    Shutting down interface eth0: [ OK ]
    Shutting down loopback interface: [ OK ]
    Setting network parameters: [ OK ]
    Bringing up loopback interface: [ OK ]

    Bringing up interface eth0: [ OK ]

  11. Ping the first and last IP addresses and they should work (unless a firewall is blocking those IP's). Otherwise if they do not, changes are the clonenum or netmask was entered incorrectly.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Installing htop

htop is an interactive process viewer for Linux, which is a powerful alternative to the...

Bind Multiple IP Addresses to a Single Network Interface Card (NIC)

This tutorial demonstrates how to bind multiple IP addresses to a single NICI'll be using LAN...

Clear Memory Cache on Linux Server

By default the Linux OS has a very efficient memory management process that should be freeing any...

Set the time on a Linux server

Log into the server via SSHAt the shell prompt run the following command:date MMDDHHmmYYYYFor...

Check your disk usage in Linux

A good way to check your disk usage for folders on your Linux server is via shell.Download...