Configure network settings

Edit configuration files stored in “/etc/sysconfig/network-scripts/

# cd /etc/sysconfig/network-scripts/

Edit / create files as follows:
/etc/sysconfig/network-scripts/ifcfg-eth0 : First Ethernet card configuration file
/etc/sysconfig/network-scripts/ifcfg-eth1 : Second Ethernet card configuration file

# vi ifcfg-eth0

Append / modify as follows:

DEVICE=”eth0″
HWADDR=”00:00:28:XX:XX:XX”
NM_CONTROLLED=”yes”
BOOTPROTO=static
DHCPCLASS=
IPADDR=192.168.1.1
NETMASK=255.255.255.0
ONBOOT=”yes”

Define default gateway (router IP) and hostname in /etc/sysconfig/network file:

# vi /etc/sysconfig/network

Append / modify as follows:

NETWORKING=yes

HOSTNAME=localhost.localdomain

GATEWAY=192.168.1.1

Restart networking setting:

# /etc/init.d/network restart

DNS server define in /etc/resolv.conf file:

# vi /etc/resolv.conf

Setup DNS Server as follows:

nameserver 192.168.1.1

nameserver 8.8.8.8

nameserver 8.8.4.4

After the above settings, now the server is connect to the internet

Howto Red hat enterprise Linux 5 configure the network card