Network Configuration

The Network Configuration module provides a nice, clean interface to most of the important network configuration details on your system (Figure 13-2). It is possible to set IP addresses, create IP aliases, define routing and gateway information, configure DNS clients, and edit the /etc/hosts file.

click to expand
Figure 13-2: Network Configuration

Network Interfaces

Clicking the Network Interfaces icon will open a page similar to Figure 13-3, which allows you to configure the currently active interfaces as well as interfaces that are brought up at boot time (usually these will be the same).

click to expand
Figure 13-3: Network Interfaces

The Interfaces Active Now section is a list of interfaces that are currently up. The same data could be gathered by running ifconfig -a from the command line. The section below that, Interfaces Activated at Boot Time, is the list of interfaces that are configured permanently on the system. These can optionally be brought up on boot.

To edit an interface, either Active or Boot, simply click the name of the interface. You will be presented with a page similar to Figure 13-4.

click to expand
Figure 13-4: Editing a bootup interface

Here it is possible to specify the IP address for the system or to choose DHCP or BOOTP to auto-configure the IP. Also editable from this page are Netmask and Broadcast settings.

Adding a new interface is equally simple. From the main page, click the Create new interface under either Interface Active Now for a temporary interface or Interfaces Activated at Boot Time for a permanent interface. Then on the configuration page, choose a name for the interface. Manually enter the IP, or choose DHCP or BOOTP for automatic IP configuration. If manually entering the IP, also enter the Netmask and Broadcast settings, or select Automatic for these settings, if preferred and available (Automatic is only available when creating an Active interface.

Note when editing a just-created Boot interface it is possible to activate it immediately by clicking Save and Apply rather than simply Save.

Routing and Gateways

Routing is an encompassing term that basically refers to the paths that your system should take to reach certain hosts and networks. In the simplest configuration, you will only have one route, known as the default router or gateway. This simply means the all packets that are bound for a network that is not local will be sent to the address defined by the default route setting.

In Figure 13-5 the Default router is blank, because on the example machine, the route is set automatically by DHCP. It could contain an IP or a host name, if a router did need to be defined. Default route device simply defines which device, on systems with more than one device, will be considered the default device. This device name could be any active device on your system, such as eth0. The Act as router option turns on packet forwarding on some Linux systems. On Red Hat Linux systems this is done in /etc/sysconfig/network or /etc/sysctl.conf on versions from 6.2 onward.

click to expand
Figure 13-5: Routing and gateways

Static routes provide a means for some traffic to choose another route to some known host or network, rather than going through the default route. This is commonly used for accessing local networks on different subnets through a single multi-homed host, or a host having more than one network interface. For example, if my system were on the 192.168.1.0/24 local subnet, and I had a second subnet on 172.16.1.0/24. I could provide a static route with the interface value of eth0 and a Network of 172.16.1.0, a Netmask of 255.255.255.0, and finally, a Gateway of 192.168.1.23, assuming the host at 192.168.1.23 also had an active interface on the 172.16.1.0 network.

DNS Client

The DNS Client module allows you to configure your system's resolver settings (Figure 13-6). Usually, all you need to do is add your name server's IPs to this list. In the case shown in the following figure, there is a local caching name server running on IP 127.0.0.1, as well as two remote name servers as backups. Resolution order allows you to select the order in which the system will try to resolved host names. In the example in the figure, DNS will be checked first, followed by the /etc/hosts file. Other available resolution options are NIS and NIS+. Finally, the Search domains field usually contains the domain name where your computer is located, and possibly others. Search domains will be searched first if a fully qualified domain name is not entered. For example, if I tried to ping a host named gigi on the machine shown in the example, the name gigi.swell would be looked up first, and then if there was no such system in DNS or /etc/hosts it would try to resolve just the name gigi.

click to expand
Figure 13-6: DNS Client

Host Addresses

The /etc/hosts file is another common resolution method on UNIX systems. It is a very simple way to deal with a small number of host addresses. However, because host files are not easily shared amongst multiple computers, its usage is limited. Nonetheless, Webmin does provide a nice means of editing your hosts file, so I'm going to document it.

In Figure 13-7 there are a number of IP addresses and the host names they are associated with. Clicking any of the IPs will allow you to edit the entry. Creating a new entry is done by clicking Add a new host address. If you only have a very small network, a host file on each machine may be all you need; otherwise, use DNS for most resolution tasks.


Figure 13-7: Host addresses

Tip 

When testing Apache virtual hosts that are not yet ready for production use, it can be useful to configure the address and host name here, so that you can browse your test server on the host name where it will eventually live. Of course, you can do the same thing by running a local DNS server, but the hosts file is a simpler way to achieve the same task.



The Book of Webmin... or How I Learned to Stop Worrying and Love UNIX
The Book of Webmin: Or How I Learned to Stop Worrying and Love UNIX
ISBN: 1886411921
EAN: 2147483647
Year: 2006
Pages: 142
Authors: Joe Cooper

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net