The first thing to determine when getting hooked up is whether you're connecting to a local area network, such as a group of computers in an office, or a wide area network, such as the Internet. Before continuing, it's important to know what hardware you have and how you intend to connect. If you're going to dial into another computer, make sure your modem is installed and that the cables are attached correctly. If you're using a network card, make sure it is installed properly and that the cables are correctly connected. In other words, no matter what network configuration you specify, if every phone line or cable is not in place, you'll never get connected.
Setting up a network connection over Ethernet requires an entirely different type of setup. Network connections to Token Ring or ARCnet networks follow a similar procedure, but will not be discussed here.
First you will need to have an Ethernet card installed.
Start Linuxconf by typing linuxconf at the shell prompt.
Open Config => Networking => Client tasks => Host names and IP network devices. The Host name tab will request a hostname, which should be specified by default unless you did not setup your networking during the installation process. If it is not already specified, please take the time now to configure it. It should be specified as localhost.localdomain. Skip this tab. Select the tab for Adaptor 1.
The first item on this screen is a checkbox to indicate whether this adaptor is enabled or not. If this is the one you intend to use, it should be checked. Below that is a choice of Config modes. Manual means that you will be providing all the information and entering it yourself. Dhcp and Bootp mean that your machine will be getting its network configuration information from a remote DHCP or BOOTP server. If you're not sure what option to choose, talk to your network administrator.
Required fields for DHCP or BOOTP:
Net device — The type of network card you are using; for example, eth0 would be the appropriate entry to use the first Ethernet card.
Kernel module — The correct module based on your network card; refer to the Official Red Hat Linux Reference Guide for a list of kernel modules.
For DHCP and BOOTP configurations, you only need to specify the Net device and the Kernel module. For the Net device, you will choose from a list in which the eth prefix represents Ethernet cards, arc specifies an ARCnet card and tr specifies Token Ring cards. A complete list of network cards and their respective modules can be found in Official Red Hat Linux Reference Guide. For the most up-to-date list, please see our website at:
http://hardware.redhat.com/ |
The netmask information may be already be set for you. However, depending upon the type of network you are joining or setting up, you may need to fill in this field. The most common value for this field is 255.255.255.0.
Required fields for manual configuration:
Primary name + domain — The primary name is the name of your computer; the domain is how your network is specified. For example, foo.bar.com; foo is the primary name and bar.com is the domain.
IP address — The address of the machine will follow this pattern: x.x .x.x. For example, 192.168.0.13.
Net device — The type of network card you are using; eth0 would be the appropriate entry to use the first Ethernet card.
Kernel module — The correct module based on your network card.
Information on network devices and kernel modules is described above. The appropriate Primary name + domain and IP address will depend on whether you are adding the computer to an existing network or creating a new network. For connecting to an existing network, contact your network administrator for the information.
If you're setting up a private network that will not ever be connected to the Internet, then you can choose any Primary name + domain name you want and you have several choices for IP addresses (see Table 14-1).
Table 14-1. Addresses and Examples
Available addresses | Examples |
---|---|
10.0.0.0 - 10.255.255.255 | 10.5.12.14 |
172.16.0.0 - 172.31.255.255 | 172.16.9.1, 172.28.2.5 |
192.168.0.0 - 192.168.255.25 [a] | 192.168.0.13 |
Notes: a. You should not use these IP addresses if you connect to the Internet, since 192.168.0.* and 192.168.255.* cannot be considered private. If you want your network to be connected to the Internet, or think you might want to at some point in the future, do yourself a favor and get yourself non-private addresses now. |
The three sets of numbers above correspond to class a, b, and c networks respectively. The classes are used to describe the number of IP addresses available as well as the range of numbers. The numbers above have been set aside for private networks.
A nameserver and a default domain are also needed to establish a network connection. The nameserver is used to translate hostnames, such as private.network.com, to corresponding IP addresses, such as 192.168.7.3.
The default domain tells the computer where to look if a fully qualified hostname is not specified. "Fully qualified" means that the full address is given, so foo.redhat.com is the fully qualified hostname, while the hostname is simply foo. If you specified your default domain as redhat.com, then you could use just the hostname to connect successfully. For example ftp foo would be sufficient if your search domain is redhat.com, while ftp foo.redhat.com would be required if it was not.
To specify the nameserver, open Config => Networking => Client tasks => Name server specification (DNS).
Nameservers are ranked according to the order in which they are accessed. It is not unusual to see nameservers referred to as primary, secondary, tertiary and so on down the list if more than one is specified. Each of these must be an IP address and not a name, since the computer has no way to resolve the name until it connects to a nameserver.
In addition to a default domain, you can also specify up to six search domains. Search domains are useful if you want to specify many hostnames with the same domain but do not want to type the domain name. For example, if your search domain is redhat.com, the hostname falcon would resolve to falcon.redhat.com. Search domains take precedence over the default domain.
You can add, modify, or delete entries from the /etc/hosts file using Linuxconf. Open Config => Networking => Misc => Information about other hosts.
To modify or delete an entry select it. To delete the entry, select Del at the bottom of the host/network definition screen.
To modify it, change the information as necessary. To add a new entry, select Add at the bottom of the /etc/hosts screen. This will also open the host/network definition screen.
Required fields:
Primary name + domain — The primary name is the name of the computer, while the domain is how the network is specified. For example, in foo.bar.com, foo is the primary name and bar.com is the domain.
IP number — Also referred to as IP address; this is the address of the machine and will follow the pattern of x.x. x.x. For example, 192.168.0.13.
Optional fields:
Aliases — A shorthand for the fully qualified domain name. This is often the same as the primary name. So, for example, if the fully qualified domain name is foo.bar.com, you could set foo as an alias.
Comment — A comment about the machine. For example, "The remote nameserver."
Once finished, select Accept.