443 446




Using Linux:Managing Network Connections






-->















Previous
Table of Contents
Next




CHAPTER 27Managing Network Connections

By Sriranga Veeraraghaven

Setting the hostname
Enabling the loopback interface
Adding a PPP interface
Adding a SLIP interface
Adding a PLIP interface
Adding an ethernet interface

Configuring Network Connections
Managing network connections with Red Hat Linux is straightforward, thanks to the user-friendly Network Configuration tool netcfg. This tool provides for the enabling and configuring of network connections in a graphical interface.
Using the Network Configuration Tool
To launch netcfg, type the following at root’s prompt:


# netcfg


When netcfg launches, the following is displayed in the terminal window:


Red Hat Linux netcfg 2.13
Copyright (C) 1996 Red Hat Software
Redistributable under the terms of the GNU General Public
License





Run netcfg as rootIt is important that root run netcfg; otherwise, the modifications made to the network will not be applied.


After the program finishes loading, the Network Configurator window (shown in Figure 27.1) is displayed.

Figure 27.1  This screen shows the main netcfg window.
Setting the Hostname and the Domain Name
When netcfg is running, setting a machine’s hostname is simple. Just click in the Hostname text field and type the name you want to give the machine. To save the hostname, click the Save button.
To set the domain name, click in the Domain text field and type your domain. To save the domain name, click the Save button.
In addition to setting the hostname and the domain name, the main window enables you to set the name servers that the local machine uses to translate hostnames into IP addresses. To add a name server, click in the Nameservers text area and type the IP address of your name server (this address should be given to you by your ISP or company).


Set the hostname and domain name correctly
For most people, hostnames and domain names are provided by their Internet service provider or their school/business. In such cases, it is important that the name entered in the Hostname and the Domain field is the same as the name provided by the ISP or other entity.

Enabling the Loopback Interface
The loopback interface is used by the computer to make connections to itself. Information requests made by computers using the Internet Protocol go through interfaces. If a computer wants to get information from itself, the fastest way to obtain this information is to have a software interface.

The easiest way to set up this interface is to use the ifconfig and route commands, like so:


# ifconfig lo 127.0.0.1
# route add -host 127.0.0.1 lo


The ifconfig command tells the computer to enable the interface lo (short for loopback) with an IP address of 127.0.0.1. The route command tells the computer to add a route to the host 127.0.0.1 through the interface lo. When these commands have been executed, you can test whether the loopback address is working by typing the following:


# ping 127.0.0.1


This results in the following output:



127.0.0.1 is alive


When the loopback interface has been configured, it must be named.



Make sure the loopback interface has the right IP address
The loopback interface is always assigned the IP address 127.0.0.1. This standardization means you can be sure that connections made to the IP address 127.0.0.1 are always made to the local computer, not some other computer.

Naming the interface

1.  Launch netcfg and click the Hosts button in the main window. You’ll see the screen shown in Figure 27.2.

Figure 27.2  This netcfg window is used to configure Host attributes.

2.  Click the entry for 127.0.0.1. The Edit/etc/hosts Window, shown in Figure 27.3, appears.

Figure 27.3  Give the loopback interface a name.
3.  Type localhost in the Name field. Optionally, type loopback in the Nicknames field.
4.  Click Done, and then click the Save button. The changes you made will be saved.

This process can be used to give names to other IP addresses as well, but very few IP addresses need to be named on systems using name servers.

Adding a PPP Interface
The Point-to-Point Protocol (PPP) is a method of creating and running IP over a serial link made using modems and phone lines. With PPP, a client connects to a PPP server. When connected, the client can access resources on the PPP server’s network as though it were connected directly to the network. PPP is one of the most common ways for personal computers to connect to the Internet.



TCP/IP connections over serial lines
The three common protocols for running TCP/IP on serial or parallel lines are the Point-to-Point Protocol (PPP), the Serial Line Internet Protocol (SLIP), and the Parallel Line Internet Protocol (PLIP).
Of these, SLIP is the oldest and has problems dealing with noisy low-speed telephone lines. SLIP predates the standardization process for protocols, so it is not considered one of the Internet standard protocols.

The Internet standard replacement for SLIP is PPP. This protocol provides similar functionality to SLIP, but in a reliable manner over all types of phone lines. Currently, PPP is the most widely used protocol for running TCP/IP over phone lines.
PLIP is a variant of SLIP, which enables TCP/IP to be run over the parallel port of a computer. PLIP is faster than PPP or SLIP but is not widely used for connecting computers over phone lines.





Previous
Table of Contents
Next














Wyszukiwarka

Podobne podstrony:
README (446)
446 a
441 443 6kku2knvjejrey2mwksri4nqksg5k5ygjyaosja
446 449
443 (2)
02 (446)
04 (443)
13 (446)
443 ac
443 Dopłaty bezzwrotne wniesione do spółki z o o

więcej podobnych podstron