Problem solve Get help with specific problems with your technologies, process and projects.

Configure your RHEL4 network

Learn how to use Red Hat Enterprise Linux 4 commands and utilities to configure your network from a GUI or command line.

So you've installed your system, but you cannot get on the network. Or you are on a network, but cannot get outside your local LAN. You will need to start using RHEL4 utilities and/or commands to configure your network. The most important command that you should know is "system-config-network," which is distributed under the GPL and an integral part of RHEL4. You can either type that command in at the command line or from your GUI, go to applications, systems settings and network. This is your basic network admin tool.

Here is what you will see:

From here, you can view your network devices, add new devices or configure existing ones. To add a new NIC, click New; to configure your NIC, you would click on edit make your changes. In this configuration there are 2 active NICs, including a wireless card.

From here, one can set their IP address, subnet mask and default gateway.

More on this topic

Sharing files between Linux servers with NFS

Unix-to-Linux migration: Setting up a network

Hardening Linux: Firewall implementation

One can also add static routes and aliases from this configuration tool. In addition to changing devices, one can also add a new adapter, edit DNS settings, configure IPsec tunnels and even edit the hosts file. I really don't want you to get so used to this tool that you won't know how to edit an /etc/hosts files, but it is certainly a nifty utility for those who may not be ready yet for heavy command line action. If you have a wireless card, you can even configure your wireless settings from here. That would include setting the channel, network name and transmit rate.

Are you ready for the command line? Ready or not, let's go! Other then netstat, iconfig is probably the second most widely used Unix/Linux network command. Type in ifconfig -a on your system, and see what you have:

From here, one can clearly note the IP address, as well as other interface information, like your subnet and broadcast address. You can even determine if there were any packets dropped or network errors on your interfaces. However, using ifconfig, you would be hard pressed to determine which card was wireless. To do that, requires another command. Try iwconfig.

lo        no wireless extensions.

eth0      no wireless extensions.

eth1      IEEE 802.11-DS  ESSID:"wlan"  Nickname:"Prism  I"
          Mode:Managed  Frequency:2.437GHz  Access Point: 00:0F:66:D4:F3:DD
          Bit Rate:11Mb/s   Tx-Power=15 dBm   Sensitivity:1/3
          Retry min limit:8   RTS thr:off   Fragment thr:off
          Encryption key:off
          Power Management:off
          Link Quality=64/92  Signal level=-52 dBm  Noise level=-149 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

sit0      no wireless extensions.

Using this command, you will clearly see which adapter is your wireless (eth1) and use that information accordingly. This command is very similar to ifconfig, but is reserved for your wireless interfaces. Similar to ifconfig, it can be used not only to view information, but also to set specific parameters of your network interfaces, including options such as frequency or transmit rate. Do a man on both of these commands, to retrieve more information on how best to utilize these commands.

You should also start to familiarize yourself with the netstat commands. netstat -rn will give you routing information as it applies to the interfaces on your server. netstat -an will give you specific connection type information. Netstat –i will give you an interface summary.

When you are finished configuring your networking, you're going to want to test your connectivity to the outside. First, try to ping your default gateway (DG). If you can't ping your DG, then you're never going to get to the Internet. If you can ping your DG, but cannot get outside, you may have probably mis-configured the DNS settings for your environment. Check your settings and try again. If your server is on an internal network, there may be firewall issues that might prevent you from doing what it is that you wanted. In this case, check with your security team to ensure that there is nothing preventing you from accessing the outside. If you can ping, then you should be able to get to it from your browser. If you still cannot, then you might want to check your browser configuration. In Firefox, unless you need a proxy, make sure that direct connection to the Internet is checked. If it is, you should be good to go.

Good luck and happy networking!

Dig Deeper on Linux servers