IP address assignment

  1. Interface configuration using DHCP service example:
    #vim /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    BOOTPROTO=dhcp
    HWADDR= 00-19-DB-AD-19-99
    ONBOOT=yes
  2. Interface configuration using manually set parameters:
    #vim /etc/sysconfig/network-scripts/ifcfg-eth0
    DEVICE=eth0
    HWADDR= 00-19-DB-AD-19-99
    IPADDR=192.168.1.2
    NETMASK=255.255.255.0
    BROADCAST=192.168.1.255
    GATEWAY=192.168.1.1
    ONBOOT=yes
    DNS1=8.8.8.8
    DNS2=8.8.4.4

To check the interface configuration:

  ifconfig eth0

To check the routes:

  netstat -r

To restart the interface and to apply the new settings:

  ifdown eth0 - disable
  ifup eth0 - enable