Open Source

Grokking the Linux configuration tools: netconf

Does Linux configuration have you stumbling and bumbling? Can't seem to find the right graphical tool to fit the bill? Never fear! Jack Wallen, Jr., is here to help you out with the Linux graphical network configuration tool netconf.


According to one of the Linux/UNIX track’s latest polls, the primary reason most people don't use Linux is the difficulty of configuration. This is actually a good sign for Linux because it shows (at least with the TechProGuild audience) that installation is no longer the top issue. Now it's simply a matter of education. And that is where this little series comes in.

Within the span of a few Daily Drill Downs, we are going to cover the most popular Linux Graphical User Interface (GUI) tools. These tools will get you up to speed on network configuration, user administration, desktop configuration, modem configuration, sendmail configuration, and file system configuration. With this small arsenal of tools, you should be set to administer any given Linux machine!

Linuxconf
Many of the tools we'll be discussing here are simply modules of the most powerful Linuxconf tool. From this single tool, you can administer nearly all aspects (except desktop environment) of Linux. The unfortunate truth of Linuxconf is that it can be a bit overwhelming. Imagine having one single tool in Windows that houses each and every configuration tool known to Microsoft! You might not even know where to begin. Fortunately, the creators of Linuxconf were smart enough to modularize this hulk. Not only did they make this tool modular, they made it so that you can run the tool either from a GUI or from a console window (which allows you to run via network connection, if configured to do so).

If your current Linux system does not sport the Linuxconf tool, you can get the binary installation files and the source from the Official Linuxconf page for nearly all Linux distributions. Once you have this installed, you will be able to follow along with this series and learn about the various GUI configuration tools available to Linux.

Netconf
The first tool we'll be examining in this series is netconf. The netconf tool is where you will configure all your networking needs. The tool can only be used by root and is opened with the following command:
/sbin/netconf

Once you call the tool, you will see a window very similar to that in Figure A. This is what I like to call the home base. From here, you can choose the various aspects of networking to configure.

Figure A
The netconf tool allows you to configure all aspects of networking.


As you can see in Figure A, the main netconf window allows you to configure a wide variety of networking needs. There are four main tabs (Client Tasks, Server Tasks, Firewalling, Misc), and each tab holds its own specialty. The first tab, Client Tasks, allows you to configure your Linux client for networking. Here you will set up basic Ethernet networking. Out of the six that you see, there are actually three buttons that you will primarily use: Host Name And IP Network Devices, Name Server Specification (DNS), and Routing And Gateways.

Client configuration: DHCP
Let's take a look at configuring a Linux network client. Assuming that you will be configuring either DHCP or a static IP address on a LAN, you will first want to click on the Host Name And IP Network Devices button. You will see a new window that looks similar to that in Figure B.

Figure B
The first window in the Host name section of netconf allows you to configure the fully qualified domain name (FQDN) of your client.


Not much to say about this section, is there? The only information you will enter here is the host name and the domain name. This configuration option writes to the /etc/sysconfig/network file.

The next step in the client side of netconf is the real heart of the client configuration. Click on the Adaptor 1 tab, and you will see the actual address configuration section. Figure C shows Adaptor 1 configured with DHCP, using eth0 and kernel module (driver) 3c59x. The eth0 device is the first Ethernet device found by the system. In this case, the information for eth0 (found by running the dmesg command) looks like this: 3Com PCI 3c905B Cyclone 100baseTx at 0xa000, 00:10:5a:16:be:fb, IRQ 11.

Figure C
Configuring an Ethernet device for DHCP is simple using the netconf tool.


Once you have this information configured, you simply have to click Accept, Quit, and then the Activate The Changes button. You'll then want to run the command
/etc/rc.d/init.d/network restart

which will restart your network connection and, if using DHCP, will request an IP address from the DHCP server.

Client configuration: Static IP
The next type of configuration will take place on the Adaptor 2 tab and will be a static IP configuration. As you can see in Figure D, the configuration of a static IP address is nearly as simple as with the DHCP address. Here you will be required to click the Manual button and then enter your specific information.

Figure D
Configuring a static IP address with netconf is nearly as easy as configuring DHCP.


In Figure D, you can see that the information entered into the Adaptor 2 tab is standard networking information. Included will be:
  • Primary name + Domain: The FQDN
  • Aliases: What your machine will be called
  • IP Address: Your machine's IP address
  • Netmask: Your machine's netmask
  • Net device: The network interface used for this connection
  • Kernel module: The driver used for the Net device
  • I/O Port (not shown): Allows you to configure a specific I/O port for the configured device
  • Irq (not shown): Allows you to configure device interrupt requests per each device

Before you click Accept, make sure the Enable button is selected, and you will be ready to activate your changes. As with the DHCP configuration, you simply have to click Accept | Quit | Activate The Changes. Then run the command:
/etc/rc.d/init.d/network restart

which will restart your network connection, and the static IP address will be configured for this device.

DNS
Now we are going to configure your DNS servers for your client's configuration. From the netconf main menu (see Figure A), click the Name Server Specification (DNS) button, and a new window will pop up that looks surprisingly like that in Figure E.

Figure E
Configuring DNS with netconf can be as simple as letting the DHCP server fill in the blanks or entering your DNS numbers by hand.


Within the DNS configuration window, you see entries for IP name servers 1 through 3, which will be your DNS servers. If your particular Ethernet connection is configured to use DHCP, you should not have to enter any information here. If, however, you are configured for a Manual (static) IP address, you will have to enter at least one nameserver. It is also wise to enter at least one domain name (if your DHCP server did not dish one out to you) to speed up name resolution.

Once you are done with this window, follow the same steps outlined before to accept the changes.

Routing and gateways
This particular button will open a new window that will let you configure several options. What we are going to focus on, simply enough, is configuring the default gateway for your client machine.

When you click on the Routing And Gateways button, you will see a new window that looks similar to that in Figure F.

Figure F
From the Routing And Gateways window you can configure a number of services.


Click the Defaults button to configure the default gateway. A new window will open that resembles Figure G.

Figure G
Configuring the default gateway is as simple as entering the IP address in the text area offered in the default window.


Within the default gateway configuration window, you will enter the default gateway for your network. As with the DNS configuration, if you are using DHCP, you should not have to enter any information here (the system will pick this information up from the DHCP server).

Once you've entered this information, click Accept and then Quit. You will see a window appear that looks similar to Figure H.

Figure H
The final step in quitting netconf allows you a number of options.


Figure H shows the final window in netconf (as seen from Red Hat 7.1). Here you have four possible options: Do Nothing, Do It, Back To Linuxconf, and Help. Most of these are self-explanatory. The only oddity is that by clicking Back To Linuxconf, while working with netconf, you will be transported back to the main netconf window (and not the main Linuxconf window).

Finishing it up
Once you've clicked Do It and your command prompt returns, you have one more step to follow for your network connection to be complete. To apply the changes to your current running setup, you need to restart networking. To do this, run the following command (as root):
/etc/rc.d/init.d/network restart

and your network connection will restart, and the new configurations will apply.

Conclusion
Configuring networking with Linux is actually a very easy and painless process. Sure, you might need to have a bit more information in some cases, but as a network administrator, you should know that information anyway.

We'll continue next time with yet another Linux GUI configuration tool. Are you excited? You should be.

About Jack Wallen

Jack Wallen is an award-winning writer for TechRepublic and Linux.com. He’s an avid promoter of open source and the voice of The Android Expert. For more news about Jack Wallen, visit his website jackwallen.com.

Editor's Picks