If you are using DSL access or a cable modem, you might have a dynamic IP provided through DHCP, or you might be assigned a static IP. You might automatically be provided with the names of the DNS servers if you use DHCP, or you might have to set up DNS manually (in which case, you have to know the IP addresses of the DNS servers).
In all cases, you have to know your username, your password, and for the configuration of other services, the names of the mail servers and the news server. This information can be obtained from your ISP if you specifically ask for it.
NOTE
The information in this book will help you understand and avoid many connection issues, but you might experience connection problems. Keep the telephone number of the technical help service for your ISP on hand in case you are not able to establish a connection. But be aware that few ISPs offer Linux support, and you might need to seek help from a Linux-savvy friend or a Linux user's group if your special circumstances cannot be handled from the knowledge you gain from this book. Of course, the best place to look is on the Internet. Use Google's Linux page (http://www.google.com/linux) to research the problem and see whether any other users have found fixes or workarounds.
Fedora also supports the use of a DSL service. Although it refers to the different types of DSL available as xDSL, that name includes ADSL, IDSL, SDSL, and other flavors of DSL service; they can all be configured with the Internet Connection Wizard. DSL service generally provides 128Kbps to 24Mbps transfer speeds and transmits data over copper tele phone lines from a central office to individual subscriber sites (such as your home). Many DSL services provide asymmetric speeds with download speed greater than upload speeds.
NOTE
DSL service is an "always-on" type of Internet service, although you can turn off the connection under Fedora by using the Network Device Control, found under System, Administration. An always-on connection exposes your computer to malicious abuse from crackers who trawl the Internet attempting to gain access to other computer systems. In addition to the capability to turn off such connections, Fedora provides a firewall to keep crackers out; you configured a simple firewall during the original installation. The firewall can also be configured from the Security Level Configuration tool found in the System Settings menu selection as Security Level.
A DSL connection requires that you have an ethernet network interface card (sometimes a USB interface that is not easily supported in Linux) in your computer or notebook. Many users also configure a gateway, firewall, or other computer with at least two network inter face cards to share a connection with a LAN. We looked at the hardware and protocol issues earlier in this chapter. Advanced configuration of a firewall or router, other than what was addressed during your initial installation of Fedora, is beyond the scope of this book.
Understanding Point-to-Point Protocol over Ethernet
Establishing a DSL connection with an ISP providing a static IP address is easy. Unfortunately, many DSL providers use a type of PPP protocol named Point-to-Point Protocol over Ethernet (PPPoE) that provides dynamic IP address assignment and authentication by encapsulating PPP information inside ethernet frames. Roaring Penguin's rp-pppoe
clients are included with Fedora, and these clients make the difficult-to-configure PPPoE connection much easier to deal with.
Configuring a PPPoE Connection Manually
The basic steps involved in manually setting up a DSL connection using Fedora involve connecting the proper hardware and then running a simple configuration script if you use rp
-pppoe from Roaring Penguin.
First, connect your DSL modem to your telephone line, and then plug in your ethernet cable from the modem to your computer's network interface card. If you plan to share your DSL connection with the rest of your LAN, you need at least two network cards — designated eth0
(for your LAN) and eth1
(for the DSL connection).
The following example assumes that you have more than one computer and will share your DSL connection on a LAN.
First, log in as root and ensure that your first eth0 device is enabled and up (perhaps by using the ifconfig
command). Next, bring up the other interface, but assign a null IP address like this:
# ifconfig eth1 0.0.0.0 up
Now use the pppoe-setup
command to set up your system. Type the command like this:
# pppoe-setup
You are presented with a text script and are asked to enter your username and the ethernet interface used for the connection (such as eth1
). You are then asked to use "on-demand" service or have the connection stay up all the time (until brought down by the root operator). You can also set a timeout in seconds, if desired. You're then asked to enter the IP addresses of your ISP's DNS servers if you haven't configured the system's /etc/resolv.conf
file.
After that, you are prompted to enter your password two times, and have to choose the type of firewall and IP masquerading to use. (You learned about IP masquerading in the "Using IP Masquerading in Fedora" section, earlier in this chapter.) The actual configuration is done automatically. Using a firewall is essential nowadays, so you should choose this option unless you intend to craft your own set of firewall rules—a discussion of which is beyond the scope of this book. After you have chosen your firewall and IP masquerading setup, you are asked to confirm, save, and implement your settings. You are also given a choice to allow users to manage the connection, a handy option for home users.
Changes are then made to your system's /etc/sysconfig/network-scripts/ifcfg-ppp0
, /etc/resolv.conf
, /etc/ppp/pap-secrets
, and /etc/ppp/chap-secrets
files.
After configuration has finished, use the adsl-start
command to start a connection and DSL session, like this:
# adsl-start
The DSL connection should be nearly instantaneous, but if problems occur, check to make sure that your DSL modem is communicating with the phone company's central office by examining the status LEDs on the modem. Because this varies from modem to modem, consult your modem user's manual.
Check to make certain that all cables are properly attached, that your interfaces are properly configured, and that you have entered the correct information to the setup script.
If IP masquerading is enabled, other computers on your LAN on the same subnet address (such as 192.168.1. xxx ) can use the Internet, but must have the same /etc/resolv.conf
name server entries and a routing entry with the DSL-connected computer as a gateway. For example, if the host computer with the DSL connection has an IP address of 192.168.1.1, and other computers on your LAN use addresses in the 192.168.1.xxx range, use the route
command on each computer like this:
# route add default gw 192.168.1.1
Note that you can also use a hostname instead if each computer has an /etc/hosts
file with hostname and IP address entries for your LAN. To stop your connection, use the adsl-stop
command like this:
# adsl-stop
Configuring Dialup Internet Access
Most ISPs provide dialup connections supporting PPP because it is a fast and efficient protocol for using TCP/IP over serial lines. PPP is designed for two-way networking; TCP/IP provides the transport protocol for data. One hurdle faced by new Fedora users is how to set up PPP and connect to the Internet. It is not necessary to understand the details of the PPP protocol to use it, and setting up a PPP connection is easy. You can configure the PPP connections manually, using the command line, or graphically during an X session, using Fedora's Internet Configuration Wizard. Each approach produces the same results.
Читать дальше