Linux Network Administratoramp;#039;s Guide (3rd Edition) [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Linux Network Administratoramp;#039;s Guide (3rd Edition) [Electronic resources] - نسخه متنی

Tony Bautts, Terry Dawson, Gregor N. Purdy

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







6.11. PPPoE Options in Linux


PPPoE has become much more important recently,
as it is the connection method of choice by a number of DSL
providers. Fortunately for Linux users, a number of functional
options are available, most of which are easily configurable. PPPoE
is nothing new; it is simply the same PPP as used over dial-up,
except it is used over Ethernet.

For the purposes of this section,
we'll assume that your DSL modem and equipment are
properly configured and ready for use. More information on how this
is accomplished can be found in the excellent Linux DSL
HOWTO, written by David Fannin and Hal Burgiss
(http://www.tldp.org/HOWTO/DSL-HOWTO).
Additionally, we'll assume that the Ethernet card in
your PC is installed and operational.



In most DSL environments the DSL modem is
configured to be a bridge, meaning that it won't
have an IP address. As a result of this, your server will be
configured with a WAN IP address. Before enabling the WAN interface,
you should make certain that you've patched all of
the listening services on your machine. Additionally, you should
consider using an IPtables or other firewall. Security when
connecting directly to the Internet should be of the utmost
importance. It has been reported that unpatched versions of some
Linux distributions survive only a few hours on the Internet before
they're compromised. Make sure
you've done as much as possible to ensure that this
doesn't happen to you!


6.11.1. PPPoE Clients



To
get started with configuring PPPoE, you will need to obtain a PPPoE
client. There are a number of clients available, including one from
Roaring Penguin that has become very popular with many users and
providers. It can be downloaded from http://www.roaringpenguin.com in both source
format and as pre-compiled RPMs. When you've
downloaded and compiled or installed the software, you are ready for
configuration. The client software comes with a very easy to use
configuration script called adsl-setup. It will
ask you a number of questions about your system, network, and PPPoE
user information. In some cases it will have already provided the
answers, requiring you to only confirm!

However helpful, the script isn't foolproof, so
we'll walk through a manual configuration.
It's also a good idea, especially from the network
administrator's viewpoint, to have a good idea of
how software is configured, just in case something goes wrong in the
future.

6.11.1.1 PPPoE manual client configuration


Configuring the client is pretty easy, especially if
you've previously set up a standard PPP
configuration. First, you'll need to edit the
/etc/ppp/pap-secrets file. You will need to
replace the default values with your PPPoE username and password. The
file will look something like this:

#User                   #Server         #Password       #IP
groucho@dslcompany.to * my_password *

Next, open the
/etc/ppp/pppoe.conf file in your text editor.
You will need to tell it both your WAN interface name, and your PPPoE
username. The relevant lines in the file appear as follows:

# Ethernet card connected to ADSL modem
ETH=eth0
# ADSL user name. You may have to supply "@provider.com"
USER=groucho@dslcompany.to

The file contains a number of additional configuration options.
Unless you're really certain that you need to change
these, you probably shouldn't. If you are determined
to make some changes, refer to the PPP manpages for more information.

Lastly, if you
haven't already configured your DNS servers in the
/etc/resolv.conf file, this should be done now.
Detailed information about DNS configuration can be found in Chapter 5.


When
you've finished with the configuration, you can now
test the connection to see if it works. The
adsl-start script is used specifically for this
purpose. You can call it from the command line, or, ideally, include
it in your system startup scripts. This is accomplished differently
for almost every distribution. Consult documentation specific to your
distribution for specifics on how to install startup scripts.

If the startup
script completes without errors, you should be connected to the
Internet. A quick and easy way to test this is to ping something that
will answer. Success will look like this:

vlager# ping www.google.com
PING www.google.akadns.net (66.102.7.99) 56(84) bytes of data.
64 bytes from 66.102.7.99: icmp_seq=1 ttl=245 time=5.94 ms
64 bytes from 66.102.7.99: icmp_seq=2 ttl=245 time=5.02 ms
64 bytes from 66.102.7.99: icmp_seq=3 ttl=245 time=5.02 ms
ctrl-c
--- www.google.akadns.net ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2009ms
rtt min/avg/max/mdev = 5.028/5.333/5.945/0.440 ms
vlager#

Additionally, you can check the
configuration by using ifconfig:

vlager# ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:08:02:F0:BB:0E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:8701578 errors:6090 dropped:0 overruns:0 frame:5916
TX packets:3888596 errors:0 dropped:0 overruns:0 carrier:0
collisions:6289 txqueuelen:100
RX bytes:1941625928 (1851.6 Mb) TX bytes:1481305134 (1412.6 Mb)
Interrupt:30
eth1 Link encap:Ethernet HWaddr 00:90:27:FE:02:A0
inet addr:10.10.0.254 Bcast:10.10.0.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:48920435 errors:0 dropped:0 overruns:0 frame:0
TX packets:55211769 errors:0 dropped:0 overruns:2 carrier:9
collisions:367030 txqueuelen:100
RX bytes:2018181326 (1924.6 Mb) TX bytes:1564406617 (1491.9 Mb)
Interrupt:10 Base address:0x4000
.
ppp0 Link encap:Point-to-Point Protocol
inet addr: 64.168.44.33 P-t-P:64.168.44.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets: 8701576 errors:0 dropped:0 overruns:0 frame:0
TX packets: 3888594 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:10


If something isn't
working properly at this point, check all of your connections, and
ensure the DSL gear is properly configured. Additionally, recheck
your username and password in the configuration filesa
mistyped password is one of the most common configuration
problems!


/ 121