Somtimes you need to configure or reconfigure your network settings. What options are available for doing that? In Redhat (applies to Fedora & Centos too), there are 3 different methods for configuring the network settings:
[1] The command line text based GUI tool (No X Windows required) – system-config-network
[2] You can edit the configuration files stored in /etc/sysconfig/network-scripts/ directory.
[3] Use The GUI tool (X Windows required) – system-config-network
Let’s look at each of the options.
Command Line Based GUI Tool
From a terminal window, type: system-config-network and press return. You should see the following displayed:
From there you can change your device settings.
Edit The Network Configuration Files Directly
From a terminal window type:
cd /etc/sysconfig/networking-scripts
You will need to edit the following filess:
/etc/sysconfig/network-scripts/ifcfg-eth0 (and eth1 if you have another card.) /etc/sysconfig/network-scripts/ifcfg-eth0
Change or Add New Info
cd /etc/sysconfig/network-scripts/
vi ifcfg-eth0
Change or Add The Following Lines
# Xen Virtual Ethernet DEVICE=eth0 BOOTPROTO=none BROADCAST=10.10.1.255 HWADDR=56:36:DC:8F:D5:59 IPADDR=10.10.1.73 NETMASK=255.255.255.0 NETWORK=10.10.1.0 ONBOOT=yes GATEWAY=10.10.1.1 TYPE=EthernetSetup A Default Gateway
vi /etc/sysconfig/network NETWORKING=yes NETWORKING_IPV6=no HOSTNAME=myhostname GATEWAY=10.10.1.1
Make sure your DNS entries are correct. Set them to the correct values, whatever those are. For example:
vi /etc/resolv.conf nameserver 10.10.1.13 nameserver 10.10.1.14 search mydomain.comSave the file & restart the network service:
service network restartThe GUI Tool
You can also launch the system-config-network tool in GUI mode. From a command line where you are running X-Windows, type system-config-network, or chose System / Administration / Network from the menu. You should see:
Configure your network settings here.