Linux Network Configuration
In many cases, configuring a Linux server for networking is a snap. When you install Linux, the installation program automatically detects your network adapters and installs the appropriate drivers. Then, you're prompted for basic network configuration information, such as the computer's IP address, host name, and so on.
However, you may need to manually change your network settings after installation. You may also need to configure advanced networking features that aren't configured during installation. In this tutorial, you discover the basic procedures for configuring Linux networking services.
Using the Network Configuration Program
Before you can use a network interface to access a network, you have to configure the interface's basic TCP/IP options, such as its IP address, host name, Domain Name System (DNS) servers, and so on. In this section, learn how to do that by using Fedora's Network Configuration program. You can access this program by choosing System → Administration → Network.
If you prefer a more masochistic approach to configuring your network, see the section "Working with Network Configuration Files," later in this tutorial.
The Network Configuration program lets you configure the basic TCP/IP settings for a network interface by pointing and clicking your way through tabbed windows. Here are the steps:
- Choose System → Administration → Network.
The Network Device Control window appears.
- Click Configure.
This summons the Network Configuration window.
- Select the adapter that you want to configure and then click Edit.
The main window of the Network Configuration lists all the network interfaces installed in your computer. If your computer has more than one interface, make sure that you select the correct one before proceeding.
When you click Edit, the Ethernet Device window appears.
- To configure the device to use DHCP, select the Automatically Obtain
IP Address Settings with DHCP radio button, type the computer's
name in the Hostname text box, and select the Automatically Obtain
DNS Information from Provider option.
If you plan on setting up this computer to be your network's DHCP or DNS server, you shouldn't select this check box. Instead, you should assign a static IP address as described in Step 5.
Some DHCP servers can't provide DNS information. In that case, you shouldn't select the Automatically Obtain DNS Information from Provider option. Instead, you should manually configure your DNS information, as described in Steps 7 and 8.
- To configure the device with a static IP address, select the Statically
Set IP Addresses option and then enter the IP address, subnet mask,
and Default Gateway that you want the adapter to use.
The IP address is most likely located on one of the standard private subnets. You should almost always use a private address in the form 192.168.x.x.
If you're setting up this computer to be the gateway router that will manage traffic between your local network and the Internet, use a static address that is easy to remember, such as 192.168.1.1.
The subnet mask should be the mask that's appropriate for the IP address you choose. For a 192.168.x.x address, use 255.255.255.0.
The default gateway address should be the address of the gateway router that links your network to the Internet. If this computer is the gateway router, specify the gateway address provided to you by your Internet service provider (ISP).
- Click OK.
You're returned to the Network Configuration window.
- Click the DNS tab.
The DNS configuration settings appear.
- Enter the IP addresses for the DNS servers that you want to use.
If your network runs its own DNS server, you can specify its address here. Otherwise, you have to get the DNS server addresses from your ISP.
- Choose File → Save.
Any changes that you've made to the network configuration are saved. Then, an informative dialog box appears with the following message:
Redhat-config-network: Changes are saved. You may want to restart the network and network services or restart the computer.
- Click OK.
You can now close the Network Configuration window.
- Restart the network services.
To find out how to restart, see the next section, "Restarting Your Network."
In this tutorial:
- Managing Linux Systems
- Planning a Linux Server Installation
- Installing Fedora 7
- Getting Used to Linux
- Understanding the file system
- On Again, Off Again
- Using GNOME
- Managing User Accounts
- Linux Network Configuration
- Restarting Your Network
- Working with Network Configuration Files
- The ifcfg files
- The resolv.conf file
- DHCP and DNS
- Configuring DHCP
- Running a DNS Server
- Running Apache
- Starting and Stopping Apache
- Confirming that Apache Is Running
- Using the HTTP Configuration Tool
- Restricting Access to an Apache Server
- Configuring Virtual Hosts
- Setting the Apache User Account
- Running Sendmail
- Installing Sendmail
- Modifying sendmail.mc
- Using SpamAssassin
- Using the Mail Console Client
- Running FTP
- Starting the vsftpd Service
- Configuring FTP