This site is brought to you by the Electrical and Computer Engineering department

Red Hat/CentOS

Configuring a network interface

To configure an interface permanently you'll need to edit the interfaces file, /etc/sysconfig/network-scripts/ifcfg-eth0  

Note:  The addresses below are provided as an example only.  ECE-IT will provide the appropriate addresses when a formal request has been received.

Open a terminal window and proceed with the following:

 sudo vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=machinename.ece.utexas.edu
GATEWAY=128.83.xxx.xxx
 sudo vi /etc/sysconfig/network-scripts/ifcfg-eth0

Note:  if there are more than one network adapter, you will see multiple interfaces, (e.g. ifcfg-eth1, ifcfg-eth2, etc).  Select the one that requires a static configuration.

DEVICE=eth0 
BOOTPROTO=STATIC
DHCPCLASS=
HWADDR=00:30:48:56:A6:77
IPADDR=192.168.0.5
NETMASK=255.255.255.0
ONBOOT=yes

Setting up DNS

To cause your machine to consult with a particular server for name lookups, you simply add their addresses to /etc/resolv.conf 

 sudo vi /etc/resolv.conf

enter the following details  

 search ece.utexas.edu
 domain ece.utexas.edu
nameserver 128.83.185.41 
nameserver 128.83.185.40

Restart the networking service

sudo /etc/init.d/network stop 
sudo /etc/init.d/network start