Hello. My name's Kate. I love Linux, WordPress - own a WordPress dedicated design studio, a beginner entrepreneur who co-founded Asia software company. This is where i blog about Linux, WordPress, daily life and other interesting stuff
Status: available

You are on the Nineteen Labs » Setup IP in CentOS article.

Setup IP in CentOS

Here is a way to setup IP in CentOS without Plesk

Let’s assume the network interface is eth0. Then there is a file /etc/sysconfig/network-scripts/ifcfg-eth0. This is an eth0 file configuration.

Use vi or other text editor

# vi /etc/sysconfig/network-scripts/ifcfg-eth0DEVICE=eth0
BOOTPROTO=static
BROADCAST=192.168.0.255
HWADDR=00:0C:29:C8:AA:7C
IPADDR=192.168.0.19
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
TYPE=Ethernet

Create Virtual Interface
Create the virtual interface eth0:0 with the IP address 192.168.0.20. Just create the file /etc/sysconfig/network-scripts/ifcfg-eth0:0 (leave out the HWADDR line as it is the same physical network card):

Use vi or other text editor

# vi /etc/sysconfig/network-scripts/ifcfg-eth0:0DEVICE=eth0:0
BOOTPROTO=static
BROADCAST=192.168.0.255
IPADDR=192.168.0.20
NETMASK=255.255.255.0
NETWORK=192.168.0.0
ONBOOT=yes
TYPE=Ethernet

Restart the network
/etc/init.d/network restart

Share : These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • del.icio.us
  • SphereIt
  • BlinkList
  • Reddit
  • StumbleUpon

Add a Comment

XHTML You can use these tags : <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This site powered : WordPress. Made with PC (sorry, MAC), Coffee and Tofu