< Day Day Up > |
Red Hat provides an easy-to-use network configuration and activation tool, which you can use to configure and control any kind of network connection, including Ethernet cards, modems, DSL and ISDN modems, and wireless connections (at this time, Bluetooth Personal Networks are not configured). All are supported with standard configuration panels like those for IP address settings, along with specialized panels used only for a particular kind of connection, such as Compression for modem connections or Wireless Settings for a wireless card. New connections are initially configured using the Internet Configuration Wizard, which will detect and prompt for basic configuration information and then place you in the redhat-config-network tool to let you refine your configuration, making or changing entries as you require. To control activation of your network connections, you use the Network Device Control tool. For more illustrations on how to configure network connections using the Red Hat's network tools, check the Official Red Hat Linux Customization Guide for Red Hat Linux.
You can access the redhat-config-network tool directly from the System Settings menu or window (Network entry). The redhat-config-network tool opens a Network Configuration window that has four tabbed panels: Devices, Hardware, IPsec, Hosts, and DNS (see Figure 5-1). These panels are used for configuring the network settings for your entire system. The Devices panel lists all your network connections, and Hardware lists all the network components on your system, such as Ethernet cards and modems. The DNS panel is where you enter your own system's hostname and your network's name server addresses. The Hosts panel lists static host IP addresses and their domain names, including those for your own system. The IPsec panel is used to create secure encrypted and authenticated network connections, using the Internet Protocol. It is commonly used to create Virtual Private Networks (VPN), creating secure connections between hosts and local networks across a larger network like the Internet.
The DNS panel has a box at the top, labeled Hostname (see Figure 5-2). Here, you enter your system's fully qualified domain name. There are boxes for entering the IP addresses for your system's primary, secondary, and tertiary DNS servers, and are needed for static configurations. You can then list your search domain. Both the search domain and the name server addresses are saved in the /etc/resolv.conf file.
You use the Hosts panel to associate static IP addresses with certain hosts. The panel has a single pane with New, Edit, Copy, and Delete buttons. This panel lists entries that associate hostnames with static IP addresses. You can also add aliases (nicknames). The Hosts panel actually displays the contents of the /etc/hosts file and saves any entries you make to that file. To add an entry, click New. A window opens with boxes for the hostname, IP address, and nicknames. When you finish, the entry is added to the Hosts list. To edit an entry, click Edit and a similar window opens, enabling you to change any of the fields. To delete an entry, select it and click Delete.
Note |
If you are having trouble connecting with an Ethernet device using a static network connection, make sure that the Hosts panel lists your hostname and IP address, not just localhost. If your hostname is not there, add it. |
To configure a particular connection, double-click its entry in the Devices panel, which opens up a new window where you can modify or add settings for that connection. Here you would enter information specific to a particular connection, such as the gateway and netmask for an Ethernet connection, or the username and password for a DSL connection. Making entries here performs the same function as ifconfig. The Devices panel will list the configured network devices on your system (see Figure 5-2). An entry shows the device name and its type. Use the New, Edit, Copy, and Delete buttons to manage the device entries. For example, when you edit an Ethernet device, you open a tabbed panel for configuring it, enabling you to specify its IP address, hostname, gateway, and the hardware device it uses (see Figure 5-3). The configuration panels will differ depending on the device you edit. For example, a modem device will add panels for provider, compression, and modem options, whereas a DSL connection will have panels for provider, route (gateway), and hardware device. An Ethernet connection will have only general, route, and hardware device panels.
When you finish and are ready to save your configuration, select the Save entry from the File menu. If you want to abandon the changes you made, you can close without saving. You can run redhat-config-network at any time to make changes in your network configuration.
The redhat-config-network tool also supports profiles. Profiles are commonly used for portable computers that may be moved from one environment to another. For example, at your office you could have an Office profile that uses an Ethernet card to connect to the office LAN. At home, you could use a Home profile that uses a modem to connect to the Internet. Profiles are integrated into the configuration process, with a Common profile functioning as the default configuration. The Common profile will be inherited by all other profiles, so make your basic configuration with that profile.
Profiles are accessed from the Profile menu. Select the profile you want, or select New to create a new profile. The name of the currently selected profile will be displayed at the bottom of the Network Configuration screen. The Delete entry in the Profile menu will delete the current profile. By default, the Common profile will be selected. To create a profile, click the New entry and enter the name of the profile. It will be added to the Profile menu. You can also remove or rename a profile. The new profile will inherit the setting of the common profile. Once you have selected a profile, you can then select devices or change DNS or host information. On the Devices panel of redhat-config-network, each device entry will have a check box. Selecting this check box selects the device for the current profiles. To select a device for a given profile, first be sure to select the profile you are configuring, and then click the device's check box. For other profiles, the device will be unchecked. Select the Save entry from the File menu when you are finished. The changes you make will be part of that profile, and not of any other.
If you change your Ethernet card or if your card is not supported and you need to manually load a driver for it, you will have to manually configure the card. For supported cards, Kudzu will automatically detect the card when your system starts up and prompt you to configure it. For dynamic connections, simply select DHCP to automatically determine your network configuration. For static connections, enter the required network information, such as your IP address and DNS servers.
If the device is not supported or if you elected not to configure it with Kudzu, you can use redhat-network-config to manually create a new device for the card. For unsupported devices, make sure you have first obtained the required Linux kernel module for it and have installed that module using modprobe as described in the preceding chapter. Then, start up redhat-network-config and click the New button in the Device panel. Select Ethernet as the type of device and then select the Ethernet card from the list provided. On the Configure Network Setting panel, click Automatically Obtain IP Address, and select the method from the drop-down menu, usually DHCP. Also click Automatically Obtain DNS Information. For static connections, enter the required information, such as your IP and DNS server addresses. Your new device will now appear in the Devices panel. To activate it, select it and then click Activate.
With the Network Device Control tool, you can activate or deactivate configured network connections. A pop-up menu will also let you select available profiles, automatically activating network connections associated with each profile, and deactivating those that are not. The Network Device Control tool is accessible in the System Tools menu. Selecting a device and clicking the Configure button will open the redhat-config-network tool. You can then select and configure any network device, as well as add new ones.
To configure a new network connection, you use the Internet Connection Wizard, accessible from the System Tools menu. If you already have redhat-config-network open and want to add a new network connection, clicking New will also start the Internet Connection Wizard. The wizard initially displays a list of all possible network connections (see Figure 5-4). When you select an entry, panels will prompt you to enter basic information about a connection; this will include phone number, username, and password for modem, DSL, and ISDN connections, whereas Ethernet connections will prompt only for IP addresses. The types of connections and devices currently supported are Ethernet (eth), ISDN (ippp), Modem (ppp), xDSL (ppp), Token Ring (tr), Crypto IP Encapsulation for Virtual Private Networks (cipcb), and wireless connections (eth). After completing your entries, the wizard will configure your connection setting and the new connection will be ready for use.
You can also use a modem with telephone lines to connect to a network. For a modem connection, the Internet Configuration Wizard will probe and detect your modem. A window will then display entries for the serial device, baud rate, hardware control, and modem volume, which you can modify. You are then prompted to enter the phone number, provider, username, and password for your ISP account. The redhat-config-network tool is then started up, listing your modem device as a ppp connection (ppp stands for the Point-to-Point Protocol [PPP] protocol that transmits IP communications across telephone lines). You can then edit the ppp device to modify your settings and enter any other settings; for instance, you can enter IP addresses for static connections, specify compression methods, or list your DNS servers.
To configure DSL, you will need to provide login and password information for DSL (Digital Subscriber Line) and ISDN. In other respects, DSL and ISDN connections operate much like a local area network (LAN), treating a host as an integrated part of a network. On Red Hat, you can use the Internet Configuration Wizard to set up a DSL or ISDN connection. For DSL, the Internet Configuration Wizard will display a dialog box with entries for entering your login name, your password, and the Ethernet interface your DSL modem is attached to. You will also need to enter the IP addresses for the DNS servers provided by your ISP. You can elect to have the connection automatically made up when your system starts up (depending upon your selected network profile).
A wireless connection operates much like a standard Ethernet connection, requiring only an IP address and DNS server information to connect to the Internet. In addition, you will have to specify wireless connection information such as the network name and channel used. To add a new wireless connection, you start the Internet Configuration Wizard (from the System Tools menu) and select the wireless connection. If redhat-config-network is open, you can click the Add button on the Devices panel to start the Internet Configuration Wizard. You are prompted to select your wireless card.
On the Configure Wireless Connection panel, you then configure your wireless connection, selecting the mode, network name, channel, transmit, and key information.
Mode Normally, you can leave this on Auto. For a simple network, one that does not require roaming, the mode is usually Ad Hoc. Managed networks allow roaming among different access points.
Network Name (SSID) Can be left on Auto for a simple network. The Network Name is used to identify a cell as part of a virtual network.
Channel Starting from 1, choose one with least interference.
Transmit Rate Usually set to Auto to adjust automatically to degraded transmissions. But you can set a specific rate such as 11M or 1M from the pop-up menu.
Key This is the encryption key for your wireless network. It must be the same for each cell on your network.
On the Configure Network Settings panel, you specify your IP address, whether it is obtained automatically with DHCP or one you enter yourself. For most company wireless networks, the IP address will be obtained automatically. Normally, the DNS servers are also provided. You can, if you wish, also specify a host name.
If you are setting up a local or home network, you will most likely use static IP addresses you select yourself from the private IP pool, beginning with 192.168, such as 192.168.0.1. The static subnet mask for a small local network is usually 255.255.255.0. The Gateway is the IP address for the computer on your network that connects to the Internet, or to a larger network.
You can later edit a wireless connection, making changes. Wireless configuration has the same General and Hardware Device panels as an Ethernet or DSL connection, but instead of a Route panel, it has a Wireless Settings panel, where you can set your mode and network name along with channel, transmit, and key information.
Your configuration setting will be saved in an Ethernet configuration file in the /etc/sysconfig/network-scripts directory. For example, if your wireless card is designated eth1, then its configuration information is saved in the ifcfg-eth1 file. Here you will find the standard Ethernet connection parameters such as the IP address and gateway, as well as wireless parameters such as the channel used, the mode specified, and the encryption key. The standard setting can be modified using redhat-config-network on that device. You could also modify this file directly to enter additional parameters, like the frequency (FREQ) or sensitivity level (SENS). You can also specify any of the iwconfig parameters using the IWCONFIG option. Enter IWCONFIG followed by an assignment of the option and any value. For example, the following option sets the fragment threshold for packets:
IWCONFIG="frag 512"
A virtual private network lets you create your own private logical network on top of physical network connections, such as the Internet. Using encryption, your private network transmissions are kept secure from the physical network. Though a virtual private network (VPN) has no physical connections of its own and is not a actual network, the secure transmissions it sends have the effect of operating as if the network did exist as a separate entity. VPNs make use of tunneling, in which secure transmissions are sent directly through interconnecting systems on a large network like the Internet without being intercepted and, at any point, translated. To implement a VPN, each node has to use the same encryption support software. On Red Hat you can choose to use either the newer IPsec tools or the older third-party Crypto IP Encapsulation (CIPE) tool. To use IPsec to set up a VPN, you click on the IPsec panel in redhat-config-network and create a new connection. This process is described in detail in Chapter 17. CPIE can still be configured using the Internet Configuration Wizard, where you can enter the IP addresses for the local and remote hosts.
Network configuration implemented by the Internet Configuration Wizard and redhat-config- network is saved in interface configuration scripts located in the /etc/sysconfig/network- scripts directory (see Chapter 38). You can edit these scripts directly, changing specific parameters, as discussed previously for wireless connection. Interface configuration files bear the names of the network interfaces currently configured, such as ifcfg-eth0 for the first Ethernet device, or ifcfg-ppp0 for the first PPP modem device. These files define shell variables that hold information on the interface, such as whether to start them at boot time. For example, the ifcfg-eth0 file holds definitions for NETWORK, BROADCAST, and IPADDR, which are assigned the network, broadcast, and IP addresses that the device uses. You can also manually edit these interface configuration files, making changes as noted previously for the wireless connection. A sample ifcfg-eth0 file is shown here using a DHCP address.
< Day Day Up > |
This HTML Help has been published using the chm2web software. |