Книга: Fedora™ Unleashed, 2008 edition

Configuring a PPPoE Connection Manually

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

Оглавление книги


Генерация: 0.269. Запросов К БД/Cache: 3 / 0
поделиться
Вверх Вниз