This section discusses connecting a Linux system to a
network and/or the Internet.
Configuring the network settings the easy way
Configuring your network is very easy with Red Hat Linux and
much of it (if not all of it) is done when you install Linux.
You can change the network configuration by clicking
on the Red Hat in the bottom left corner of your screen,
then System Settings-->Network. You will be guided
through the steps to configuring your network.
The process id described here and an
example is shown next:
Setting your hostname, IP address, netmask, gateway, DNS
server via files
It is sometimes helpful to know what is going on behind the scenes
or if you want to modify the network configuration via changing
For example, assume you want to modify the network configuration
by modifying files with the following:
Networking is set up in 4 files:
- hostname: summer
- domainname: acme.com
- Static IP address: 192.168.12.21
- Netmask: 255.255.255.0
- Gateway: 192.168.12.254
- Primary DNS server: 192.168.12.21
- Secondary DNS server: 192.168.12.23
First, add your host to the /etc/hosts file:
Your /etc/sysconfig/network file would be:
# The next line "127.0.0.1" is needed. Do not remove it.
127.0.0.1 localhost.localdomain localhost
DNS servers are set in: /etc/resolv.conf. An example:
Using ifconfig and route
You normally would not need to use ifconfig or
route unless you
want to change your IP address, disable the Ethernet interface, etc.
change your gateway, etc.
This is sometimes helpful, so the information is here.
To set an ip address:
ifconfig eth0 192.168.12.56 netmask 255.255.255.0 up
To set a default route or gateway ("gw" = "gateway"):
route add default gw 192.168.12.1 eth0
If your system is saying there is no Ethernet card found,
make sure the card is in the kernel.
dmesg | less
Look for any info about eth0 to help track down the problem.
Look for a line line this:
alias eth0 driver-name-like-wdi or 3c503
Where to get more information
Red Hat Network Configuration