DSL HOWTO for Linux Hal Burgiss      hal@foobox.net      Original Author: David Fannin Edited by Greg LeBlanc v1.71, 2002-07-21 Revision History Revision v1.71 2002-07-21 Revised by: hb Add another supported modem only. Revision v1.7 2002-07-14 Revised by: hb More small updates. Revision v1.6 2002-05-23 Revised by: hb Various small updates. Revision v0.92 1999-04-10 Revised by: df First release (ADSL mini HOWTO). This document examines the DSL family of high speed Internet services now being deployed in various markets worldwide. Information is included on the technology behind DSL as well as subscribing, installing, configuring, and troubleshooting, with an emphasis on how this impacts Linux users. ----------------------------------------------------------------------------- Table of Contents 1. Introduction 1.1. Document Structure and Reading Guidelines 1.2. What's New 1.3. Copyright 1.4. Credits 1.5. Disclaimer 1.6. Feedback 1.7. Conventions, Usage and Terminology 2. Installation 2.1. Pre-Installation 2.2. Installation Options -- Self Install or Not 2.3. Wiring/Installation Options 2.4. Self Install - Wiring 2.5. Wire the Splitter 2.6. Wire the DSL Jack 2.7. Installing Microfilters 2.8. Installing an Ethernet Modem 2.9. Installing a USB Modem 3. Configuring Linux 3.1. Bridged vs PPPoX Networks 3.2. Configuring the WAN Interface 3.3. Connect 4. Securing Your Connection 4.1. Security Quick-start 5. Performance Tuning and Troubleshooting 5.1. Tuning 5.2. Installation Problems 5.3. Sync Problems 5.4. Network and Throughput Problems 5.5. Measuring Throughput 6. Appendix: DSL Overview 6.1. The DSL Family 6.2. The DSLAM 6.3. DSL Modems 6.4. The ISP Connection 6.5. Availability 6.6. Choosing Providers 7. Appendix: FAQ 8. Appendix: Miscellaneous 8.1. Links 8.2. Glossary 8.3. Other Consumer Class High Speed Services 8.4. Compatible Modems 8.5. Setting up Linux as a Router 9. Appendix: The Alcatel SpeedTouch USB ADSL Modem 1. Introduction DSL, or Digital Subscriber Loop, is a high-speed Internet access technology that uses a standard copper telephone line (a.k.a. "loop" in telco parlance). DSL provides a direct, dedicated connection to an ISP via the existing telco network. DSL is designed to run on up to 80% of the telephone lines available in the United States. By using line-adaptive modulation, DSL is capable of providing data speeds of 8 Mbps or more. DSL services are now being aggressively marketed for home and small business use. DSL is typically priced below ISDN, and well below T1 service, yet can provide potentially even greater speeds than T1 without the cost, complexity, and availability issues of T1. Since DSL is a dedicated, often "always on" service, it avoids the delays and use charges that are common with ISDN. Making this quite a nice technology for the bandwidth starved masses. While all this sounds exciting, DSL does have some drawbacks. The quality of the DSL signal, and thus the connection, depends on distance (the length of the copper "loop") and various other factors. Also, there is no such thing as standard "DSL". There are various flavors of DSL, and many, many ways DSL providers are implementing their networks. In typical fashion, Linux users are often left to fend for themselves, since the DSL providers are often taking the easy way out, and catering only to "mainstream" Operating Systems. The topics included in this HOWTO include qualification and pre-installation, installation, configuration, troubleshooting and securing a DSL connection. As well as other related topics. There are also appendices including a comprehensive DSL Overview, Frequently Asked Questions, a listing of related links, and a glossary. Due to the fast pace of change in the telco and DSL industries, please make sure you have the latest version of this document. The current official version can always be found at [http://www.tldp.org/HOWTO/DSL-HOWTO/] http:// www.tldp.org/HOWTO/DSL-HOWTO/. Pre-release versions can be found at [http:// feenix.burgiss.net/ldp/adsl/] http://feenix.burgiss.net/ldp/adsl/. ----------------------------------------------------------------------------- 1.1. Document Structure and Reading Guidelines This document attempts to give a comprehensive discussion of DSL. All aspects are hopefully addressed to one degree or another with what can be a complex topic since it deals with networking, hardware, new fangled technologies, and various approaches taken by various vendors. The core components of this document are:   * The Installation section covers installation of DSL hardware and related components, including wiring considerations, splitter or microfilter installation, modem and Network card installation.   * The Configuring Linux section covers mostly client and software aspects of getting the connection up and running. The Network card configuration is actually covered mostly in the above Installation section.   * The Securing Your Connection section covers Security implications that are even more important with a full-time connection. Linux users seem especially targeted by crackers, because quite frankly, some don't understand how important security is, or don't understand the finer points of this. And who wants to "own" a Windows box?   * The Tuning and Troubleshooting section covers post-installation topics like how well is our connection performing, and how to track down any show-stoppers or intermittent problems.   * There is also a lengthy Appendix that covers various topics relating to Linux and DSL. None of these are directly related to simply getting that connection up and running, but may be of interest nonetheless. To simplify the navigation of this document, below is a suggested reading guideline. Everyone should read the Introduction. Please pay special attention to the Conventions and Terminology section, as some of this terminology may be used somewhat differently in other contexts. Also, there is a Glossary if you get lost in the world of TA (telco acronyms) ;-).   * If you don't know anything about DSL, you should probably read the entire document. You may want to start with the DSL Overview section in the Appendix, and then the FAQ. The DSL Overview explains how the various pieces of the puzzle fit together. DSL network implementations are more complex than traditional dialup networks.   * If you have already done some homework, but have not ordered service from anyone yet, read the Choosing Providers section. Also, you might get a head start by reading the Configuring Linux section so you know what lies ahead.   * If you have ordered service already, and are awaiting delivery, you can skip the sections on choosing a Provider. If you will be doing a self-install, you should read the pertinent parts of the Installation section, the Configuring Linux section, and the Securing Your Connection section.   * If the installation is complete, and you can't get a working connection, skip right to the Troubleshooting Section. If you are not clear on what protocols are required, or what software you need to have installed, also read the Configuring Linux section. If not sure what terms like "sync" mean in this context, then be sure to read the DSL Overview section first so you know how it all fits together.   * If trying to decide between cable and DSL, read the Cable vs DSL section, and possibly the DSL Overview section.   * If you have never had a full-time Internet connection, or are not absolutely sure you fully understand how to secure you connection, be sure to read The Securing Your Connection section. If you don't understand some aspect of this, re-read it, or start looking for other references.   * There is a comprehensive Links section that has references to some topics not touched on in the main body of the Document itself. ----------------------------------------------------------------------------- 1.2. What's New 1.71: Add info on the IteX PCI ADSL modem only. 1.7: Added comments on ISDN line filters being different than POTS, and other additions related to ADSL over ISDN in various places. Add another supported modem: Eci Hi Focus ADSL Modem (and various related chipsets). Removed the 'Linux Friendly ISP' section. The landscape has changed much since this section was started. Back then there were few options for DSL in many places, and all too often a non-compatible modem was the only thing available. Also, the advent of microfilters and self-installation has helped with the "do-it-yourselfer" approach, giving everybody more freedom. Then, maintaining this number of links was a PITA too. I still encourage new subscribers to shop their local markets if there are options. Many large ISPs and telcos have very poor ideas of what an Internet connection is and restrict severely what you can do with Linux. Or at least try to ;-) Updated LDP links to tldp.org (from linuxdoc.org). 1.6: Several new Linux Friendly ISPs. Clarification on problems with alarm systems. Minor touch ups to other sections, and fix some broken links (never ending job :). 1.5: New Tuning sub-section using iproute. Hot stuff! Other additions to the Tuning section. A few new ISPs. Alcatel SpeedTouch USB section updates. Thanks to Alex Bennee for clarifying things. Other minor updates to FAQ, Glossary and Tuning. 1.4: A few new and updated URLs, and catch ups. The Alcatel USB modem section is revamped. A few new ISPs. Version 1.3: Updates to the SpeedTouch USB HOWTO in the appendix. Minor update to PPPoE section, and two new Linux Friendly ISPs. A feeble attempt to make the document a little less U.S.-centric. Various minor updates. Version 1.2 adds PPTP configuration section for Alcatel ethernet modems. Also, added are two additional sections in the "Tuning" section for the TCP Receive window, and ADSL/DMT interleaving. And the big news is the release of open source drivers for the Alcatel USB modem as of March 2001. There is an Alcatel SpeedTouch USB mini HOWTO in the appendix by Chris Jones. A number of miscellaneous updates as well. Version 1.1 included quite a few minor corrections, updates, and additions. Not much that is substantially new. There are finally two Linux compatible DSL PCI modems from Xpeed. The drivers are now in the kernel 2.2.18 source (not ported to 2.4 as of this writing 05/23/02). Version .99 addresses some of the many changes that have occurred since the original ADSL mini HOWTO was published. Originally, ADSL was the primary DSL technology being deployed, but more and more some of the other DSL flavors are entering the picture -- IDSL, SDSL, G.Lite, and RADSL. Thus the renaming from "ADSL mini HOWTO" to the "DSL HOWTO". There have been many other changes in DSL technology as well. PPPoE/A encapsulation has become more and more common as many ISPs are jumping on this bandwagon. ----------------------------------------------------------------------------- 1.3. Copyright DSL HOWTO for Linux (formerly the ADSL mini HOWTO) Copyright © 1998,1999 David Fannin. This document is free; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This document is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You can get a copy of the GNU GPL at at [http://www.gnu.org/copyleft/ gpl.html] GNU GPL. ----------------------------------------------------------------------------- 1.4. Credits Thanks to all those that contributed information to this HOWTO. I have anti-spammed their email addresses for their safety (and mine!). Remove the X's from their names.   * B Ediger (Xbediger@csn.net) Great Description of loop impairment.   * C Wiesner ( Xcraig@wkmn.com) List of many ADSL URLs.   * J Leeuw ( Xjacco2@dds.nl) Many tips on ADSL, especially in Europe   * N Silberstein ( Xnick@tpdinc.com) Info on Netrunner and his experience with US Worst.   * Many and various posters from comp.dcom.xdsl and bellsouth.net.support.adsl, too numerous to mention individually. (HB)   * Juha Saarinen for suggestions and explanations on the TCP Receive Window, and related tuning topics.   * Chris Jones for his Alcatel SpeedTouch USB mini HOWTO which was previously incorporated into the Appendix. Also, Alex Bennee for clarifying the driver situation for this modem. ----------------------------------------------------------------------------- 1.5. Disclaimer The authors accept no liability for the contents of this document. Use the concepts, examples and other content at your own risk. As this is a new edition, there may be errors and inaccuracies. Hopefully these are few and far between. The author(s) do not accept any responsibility for incorrect or misleading information, and would certainly appreciate any corrections. Also, this type of technology dates itself very quickly. What may be true today, is not guaranteed to be true tomorrow. All copyrights are held by their respective owners, unless specifically noted otherwise. Use of a term in this document should not be regarded as affecting the validity of any trademark or service mark. References to any particular product, brand, service or company should not be construed as an endorsement or recommendation. Excepting Linux itself, of course! ----------------------------------------------------------------------------- 1.6. Feedback Any and all comments on this document are most welcomed. Please make sure you have the most current version before submitting corrections! These can be sent to ----------------------------------------------------------------------------- 1.7. Conventions, Usage and Terminology For the sake of simplicity and sanity, let's clarify some of the terminology that we will be using in this document, so that we are all on the same page. While many of the definitions below are not always 100% technically correct, they are close enough for our purposes here. In fast moving technologies like DSL, there are so many "ifs, ands, and buts" that it is difficult to say anything with any degree of certainty and have it stick. And there are exceptions to almost every rule. And sometimes exceptions to the exceptions. We will be dealing with generalities to a large degree here, please keep that in mind.   * "DSL" will be used to refer to the entire family of DSL technologies now available -- ADSL, SDSL, IDSL, RADSL, etc. ADSL still seems to be the most prevalent at this time, but the others are being deployed as well. Where it is important to differentiate one type of DSL from another, the full proper name will be used: e.g. RADSL. xDSL is also commonly used to refer to the various DSL technologies as a group, but we will be using just "DSL" here.   * The term "telco" here refers to any potential DSL provider. This includes the ILECs (Incumbent Local Exchange Carriers), a.k.a. the old guard phone companies or state run phone companies, and where the monopolies now have competition, the CLECs (Competitive Local Exchange Carriers), or independent providers such as Covad in the U.S.   * "CO" is the telco acronym for "Central Office". Traditionally this is a building where one end of your phone line physically terminates. The other end terminates at your home, office, or wherever. It will be used here to refer to the telco end termination point, regardless of whether it is a traditional Central Office building or another, smaller, remote structure or device.   * "Loop" is telco speak for "phone line". Essentially, you should think of your loop as one dedicated pair of copper wires that run uninterrupted from your residence or office directly to the CO. This is perhaps an oversimplification, but will serve our purposes. DSL availability, and signal quality, is tied directly to the characteristics of your physical line -- or "loop" as they say.   * "POTS" is the acronym for Plain Old Telephone Service. In other words, traditional, non-digital devices like analog phones, faxes and answering machines. ISDN is used for DSL in some areas, so POTS is not the only way to piggy-back DSL. But certainly the most common in many places.   * "NID", or Network Interface Device, is the small telco housing that is often typically attached to the outside wall of your house, and is the service entrance for telco services, though may be placed elsewhere depending on the phone company. This may variously also be referred to as "ONI", "SNI", "NIU", "TNI" or other creative telco acronyms. It represents the "demarcation" point that divides the customer's realm of responsibility from the telco's. Commercial structures, and multi-family housing will likely have something more sophisticated, and probably located inside somewhere.   * "DSLAM" is the sophisticated hardware device in the telco's CO where your phone line physically terminates, and thus makes DSL happen. Increasingly, telcos are making use of smaller devices like the "mini-RAM" in remote locations. We'll use "DSLAM" here as a catch-all for any device that enables DSL service from a telco. These are now being manufactured by a number of companies.   * "Modem" will be used to refer to the end user device that enables a DSL connection. Your "modem" is connected to the telco's DSLAM in the CO via your copper loop. When they are "talking" DSL to each other, they are in "sync". Without "sync", no connection to your ISP is possible. "Modem" is indeed the correct terminology since there is MOdulation and DEModulation of the signal, even though it doesn't resemble an analog 56K modem like many of us have had before. These modems incorporate other features too -- so they are more than just a "modem". Some ISPs and manufacturers may be marketing simply "routers", "bridges", or even "brouters" for this purpose. These are essentially DSL modems with enhancements. A compatible "modem" of some kind is the minimum hardware requirement at the customer's end of the connection. The most commonly supplied modem is actually a combination bridge and modem. One distinction here may be where ADSL is provided over ISDN lines. In this case, the term "modem" is not appropriate and the only physical difference is that the ISDN Network Terminator (NT), is equipped to handle DSL, but is still an NT. In any case, for brevity, we will take license here to refer to all such devices as "modems". Unless stated otherwise, we will also be assuming the "modem" has an ethernet interface, and will connect to a standard ethernet Network Card (NIC). This is far and away the most prevalent configuration for Linux users, at least until more Linux drivers are available for PCI and USB modems. USB modem are quite popular otherwise, because they are "plug 'n play", and arguably less expensive. It is worth noting that "routers" as supplied by DSL providers are typically modem/router combination devices. In our context, "router" will refer to these devices as such. There are also SOHO broadband routers available that are only dedicated routers and lack the modem functionality.   * Previous versions of this document referred to the modem as an "ANT" (ADSL Network Termination). While this may be technically correct terminology, it is not used by ISPs, manufacturers, telcos, or most users to any extent. The "modem" will be just called a modem, regardless of whatever other features it may incorporate (i.e. router, bridge, etc.).   * PPPoX will be used to refer to PPPoE (PPP over Ethernet) and PPPoA (PPPoATM, or PPP over ATM) collectively. These protocols are being used by many DSL providers now.   * The information provided in this document is based mostly on the current state of DSL in the U.S. I will assume there are enough similarities with DSL services outside of the US that this document would still have some merit for everyone. Correct me if I am wrong by emailing .   * A "#" will be used to denote a command that typically is run by the root user. Otherwise, a "$" will be used as the prompt for non-root users. ----------------------------------------------------------------------------- 2. Installation Before actually ordering service, there are several things you may want to explore. Please note, that there are many ways any given telco might decide to handle qualification and installation procedures. Much of what is described in this section, is how it is commonly done in the U.S. ----------------------------------------------------------------------------- 2.1. Pre-Installation In many parts of the world, there is no choice on who you get DSL from: your friendly local telco, of course! They own the copper wires, and thus they hold all the cards. However, in the U.S. de-regulation has opened this up somewhat. Beyond the obvious consideration of price, there are reasons to investigate which alternate providers may be offering DSL services in your area. The large Telephone companies are everywhere, and may advertise the most. But increasingly smaller ISPs and independents are getting into the act. This has created some diversity in the DSL marketplace. A good thing of course, but possibly creating a little confusion too. Conversely, in areas where there is only one choice, then we have no choice but to accept whatever service is being offered. If your telco has a monopoly on phone service and DSL, you may skip the rest of this section. And probably the next few sections. They will probably control the installation and qualification processes, and you just wait for them to get finished. Not all DSL services are alike. Just because two local companies are offering "ADSL", does not mean that necessarily there is much in common at all. In fact, there are potentially a number of factors that make one ADSL provider's service significantly different from another's. Some things to consider:   * Speed vs Price.   * What hardware is provided, i.e. modem or router. It is best if this is external ethernet in either case.   * The ISP's Network architecture. PPPoX? Static IP? Servers allowed?   * Is it an "always on" service, at least theoretically? Are there supplemental usage fees, or idle timeouts?   * Linux friendly, Linux hostile, or Linux agnostic? This is not as much of a problem as it used to be in most areas. Some providers are still very restrictive on allowing "servers", and possibly even LAN connections. Buyer beware. Talk to other users, and read their TOS (Terms of Service) to get a feel for their attitude.   * Quality of service. How is news, mail, etc.? News particularly seems to be inconsistent with low-end broadband providers. Probably because of the dramatic increase in binary news content, which is compounded by the higher bandwidth and increased usage of such groups. For a more lengthy discussion on some of these considerations and related issues, see the DSL Overview appendix for more on modems, qualifying for service, and choosing a provider. Once you have chosen a provider, and ordered service, the next step is for the telco to "qualify" your loop. This essentially means testing your line to make sure it can handle the DSL signal, and possibly what level of service may be available to you. This may take some time, especially if the telco encounters problems with the loop. If no problems are found during this phase, then possibly there will be a one to three week wait for the installation. YMMV. After the telco has qualified the loop and readied their end of the connection, the next step is installation of the necessary components at the customer's end of the connection: wiring modifications, splitter or filters, and, of course the modem and any necessary software. ----------------------------------------------------------------------------- 2.2. Installation Options -- Self Install or Not You may or may not have a choice on how the installation is done, or who does it. This is totally at the discretion of the provider. In much of the world, this is done by the telco, and there is little flexibility. Many providers in the U.S. offer a "self install" option where you do all the work. In this scenario, the provider will send a kit in order to save them from sending a tech, and thus reducing cost. Typically, self install kits will include microfilters for the POTS (Plain Old Telephone Service) or ISDN (where ADSL over ISDN is used) phone jacks, the modem (and maybe a NIC), and a CDROM with drivers, etc. on it. In some cases, a splitter may be included instead of microfilters. In any case, some type of filtering is necessary on the non-DSL lines. If not the noise generated by the DSL signal may interfere with regula telco devices such as phones and answering machines. The other possibility is for the provider to do the installation. Again, this may be your only option. Obviously, the cost is higher here, but it may have the advantage of having a trained tech do any wiring. There is also a better chance of getting a "splittered" installation with this option (a good thing!). Another benefit is that if something is wrong with the line, or the telco has not provisioned the line properly, an on-site tech may be able to help sort out certain kinds of problems quickly. The self-install kit should come with full instructions, regardless of whether the installation will be splittered or filtered. So we won't go into much detail on this aspect. ----------------------------------------------------------------------------- 2.3. Wiring/Installation Options There are various wiring schemes depending on how your service is being provided, who is providing it, and which DSL service is being provided. If your telco is performing the installation, you may skip this section.   * Dedicated Line. Some DSLs require a dedicated, or "dry", wire pair, e.g. IDSL. This means a separate, physical line without dial-tone for DSL and Internet connectivity. Also, DSL services from CLECs (independent telcos like Covad), may use a dedicated line, depending on their line sharing agreement with the local incumbent carrier. (Instead the CLEC will actually lease a loop from the ILEC.) On your end, this simply means using one of the unused wire pairs in the telco wire bundle, and connecting it to the DSL jack.   * Shared Line with Splitter. For DSLs like ADSL, that are provided over the same line as regular voice service, the signal must be filtered somehow so that voice services are not adversely effected. Installing a splitter splits the line into two pairs, and filters the DSL signal from one of them. This results in a inside wiring scheme where DSL goes to only one jack, and then regular voice type service to all other jacks. This is considered by many to be a better type of installation than "splitterless", i.e. with microfilters instead. See below. Splitters are available from various manufacturers and come in various shapes and sizes. Some are small enough to fit in the NID itself (sometimes called SNI, this is the telco phone box on the outside of your house), while others have a housing as large as the NID itself. Typically this is mounted near the NID, on the customer's side of the demarcation point.   * Shared Line with Filters. Again, for some DSLs that piggyback on the POTS (or ISDN) line, the signal must be filtered or split at some point. This is not necessary for g.lite or RADSL however. The other way of doing this is by placing RJ11 "microfilters" in each phone jack -- except where the DSL modem will be. These filters are relatively small, plug-in devices and remove the higher frequencies associated with DSL. This is obviously much easier since no tools or wiring is required. This is often what is included in self-install kits, and is often referred to as a "splitterless" installation. This is a very common approach in the U.S. Note that in areas where ADSL over ISDN is provided, filtering is required also, but the filters themselves are quite different and are not interchangeable with POTS filters! Similar microfilters are sometimes used by some telcos to reduce the excessive "whine" on the line that is produced by some modems. This is a little different approach as the filter is put on the same jack as the modem.   * Shared Line, Splitterless and Filterless. Some newer DSLs, like G.Lite, have no adverse effect on regular POTS devices and thus require no filters or splitters. This would seem to be the wave of the future. Just plug and play. Though still not very common. Figure 1: DSL Block Diagram with Splitter (NID not shown)        <--------Home/Office-----><---Loop---><--Central Office-->  POTS  X-------+  phone,        |   fax,          |   etc,          |                 |                                 CO                |                               -------                |                               |     |                |                               |     |                |            -----              |     |  POTS  X-------+----Voice--=| S |              |  D  |                             | P |              |  S  |=- Voice Switch                             | L |    2 wire    |  L  |                             | I |=------------=|  A  |                             | T |  Local Loop  |  M  |=- ISP --> INET            ---------        | T |              |     |  Linux X--=| Modem |=-Data-=| E |              |     |            ---------        | R |              |     |                             -----              |     |                                                -------      Figure 2: DSL Splitterless (a.k.a. filtered) Block Diagram        <--------Home/Office-------><----Loop---><--Central Office-->                                           POTS  X--Voice---[RJ11]------+  phone,          (filter)     |   fax,                         D                      CO  etc,                         a                    -------                               t                    |     |                               a                    |     |  POTS  X--Voice---[RJ11]----- &                    |  D  |                  (filter)     V  -----             |  S  |=- Voice Switch                               o  | N |   2 wire    |  L  |                               i-=| I |=-----------=|  A  |                               c  | D |  Local Loop |  M  |=- ISP --> INET                               e  -----             |     |            -----------        |                    |     |  Linux X--=|  Modem  |=-------|                    |     |            -----------                             -------          ----------------------------------------------------------------------------- 2.4. Self Install - Wiring If you are not doing a self-install, then you may skip this section and move to Configuring Linux. If you are doing a self-install with microfilters, skip to the mircofilter section. The following procedures are meant to illustrate the wiring process. Please note that your procedures may be different at your location. Make sure you follow any warnings or safety instructions provided, that you RTFM, and that you are familiar with telco wiring procedures. The first step will be to wire up the connections from your provider. Identify the line on which service will be installed, and the locations of your splitter and DSL jack(s). (For perhaps a better wiring scheme, see the Homerun section immediately below.) Be aware that typical telco wire has more than one pair per bundle. Often, two pairs, but sometimes more. If you have but one phone line, the other pair (s) are unused. This makes them available for use with wiring for DSL. Wire pairs are color coded for easy identification. SDSL and IDSL require a dedicated, or "dry", pair. If an unused pair is available, then no real re-wiring is required. It is just a matter of re-wiring an existing jack for the correct pair of wires, and attaching the modem. ----------------------------------------------------------------------------- 2.4.1. The Homerun   " I would not use microfilters if I lived across the street   from my CO. A splitter is the only way to go. " --A retired BellSouth ADSL installer   The optimum method of wiring for the DSL modem is sometimes called a "homerun". It is called this because it is one, straight shot from the splitter to the modem's DSL jack. What this does is bypass the existing inside wiring altogether, and any problems that might be lurking there -- like a corroded connection somewhere on a voice jack. Inside wiring deficiencies can cause a degradation of the DSL signal. This also allows you to route the cable to avoid any potential RFI (Radio Frequency Interference) sources. RFI anywhere in the circuit can be a DSL killer. Routing the cable away from items that may have electric motors, transformers, power supplies, high intensity lighting fixtures, dimmer switches and such, is a smart way to go. And you are also less likely to have a failing microfilter cause problems -- one potential point of failure instead of several. You can also use a better grade of cable such as CAT 5. If your existing installation is "splitterless" (i.e. using microfilters) now, converting to a homerun will entail purchasing a splitter. And, of course, will also mean some new wiring will need to be run. Microfilters also add to the effective loop length -- as much as 700 ft per filter in some cases! So if you have several microfilters installed, and your sync rate or distance is marginal, eliminating these filters may result in a significant improvement. A poor man's splitter can be rigged by using a microfilter inside the NID. This is not "by the book", but seems to work just fine for many. ----------------------------------------------------------------------------- 2.5. Wire the Splitter If you have the splitterless design (i.e. using "microfilters") or a dedicated line, you may skip this part. The splitter will typically consist of two parts, the splitter and a small outdoor housing. Mount the splitter and accompanying housing per the telco's instructions at the Network Interface Device (NID) point (also sometimes called the SNI or ONI), usually the side of your house where the phone line is located. Put it on your side of the NID. The phone company may need to access the splitter for maintenance, so its advisable to locate it on the outside where they can get at it, but outside is not absolutely necessary. The wire bundle should have at least two separate wire pairs. The splitter takes one pair, and separates the signal onto two pairs. One pair in the bundle will then go to all phone jacks, and the other to the modem's DSL wall jack. So connect the incoming telco line to the LINE side of the splitter. Then wire the inside pair for your telephone to the VOICE, and your inside wire pair for the modem to DATA. Checkstep At this point, you should be able to pull dial tone off the voice side of the splitter. If this doesn't work, then you've wired it wrong. You can also plug the modem into the test jack in the NID box (most should have this). Plug in the modem's power cord, and if the line is provisioned correctly, you should "sync" in less than a minute. This test only requires the modem. (Internal and USB modems will require a driver to be loaded before syncing. This would mean having the computer there too.) ----------------------------------------------------------------------------- 2.6. Wire the DSL Jack Wire the DSL wall jack (RJ11) at your computer location, which should already be connected to the DATA side of the splitter. The specifics differ for each situation, but basically you will have a wire pair that you will connect to the DSL jack. Make sure you read the directions, as the DSL-RJ11 wiring may be different for phones and DSL jacks. AND -- different modems may expect the signal on different pairs -- most on the inside pair, but some on the outside pair. Figure 3: RJ11 Wiring options       ||     ||     ||    /  \   |RJ11|      |    |      ----    ||||         ^^  <-- Inside     Most modems on inside pair    ^  ^ <-- Outside    Some on outside, e.g. Alcatel 1000, SpeedTouch Home     ----------------------------------------------------------------------------- 2.7. Installing Microfilters Pretty much a no-brainer here. If you are doing a "splitterless", self-install installation, then install the provided microfilters in all phone jacks except the one where the DSL modem will be connected. Don't forget devices like fax machines and analog modems. The filters filter out the higher DSL frequencies and will keep the DSL noise from interfering with POTS (or ISDN) equipment. Warning! Alarm systems can present various problems, depending on the type of alarm and how it is installed. This may require telco help for proper installation so the one does not interfere with the other. Common microfilters tend not to work because most alarm boxes use a different size jack. Filters are now available just for alarm boxes, though traditionally this has been handled with a splitter type installation. ----------------------------------------------------------------------------- 2.8. Installing an Ethernet Modem To install, connect the modem's (or router's) power cord, and connect the phone line between the DSL wall jack and the modem. This cable should be provided. If not, a regular phone cord will suffice. With the ethernet interfaced modems, you may also connect the ethernet cable between the NIC and the modem (but not really necessary at this point just to verify an ethernet modem is working). Checkstep At this point, verify that the modem syncs with the telco's DSLAM signal. Most modems have a green LED that lights up when the signal is good, and red or orange if not in sync. The modem's manual will have more details on the LEDs. If it doesn't sync, then check your wiring, or make sure that the DSL signal is being sent. Do this by calling your telco and verifying they have activated the service. Or by testing the modem at the test jack on the NID (see above). Note that having dial tone on the line does NOT confirm the presence of the DSL data signal. And vice versa -- perfectly possible to have dial tone and no DSL, or DSL and no dial tone. There should also be no static or noise on the voice line when everything is installed and functioning properly. ----------------------------------------------------------------------------- 2.8.1. Installing the Ethernet Network Card (NIC) Ethernet modems will, of course, require an ethernet network card. If you haven't already done so, install the NIC in your Linux machine, configure the kernel, or load modules, etc., etc. This is sometimes the biggest stumbling block -- getting the NIC recognized and working. See the various Linux references for doing this, such as the Ethernet HOWTO for more information. Also, see the Troubleshooting Section below. This is certainly something you could conceivably do ahead of time if you already have the NIC. Be sure the RJ45 cable between the NIC and the modem is now connected. You can "hot plug" this cable, meaning there is no need to power down to do this. We can do a few quick tests now to see if the NIC seems to be functioning properly. First we'll attempt to bring up the interface. Then we'll see how well it is responding by pinging it. And lastly use ifconfig to check for errors: +---------------------------------------------------------------------------+ |# ifconfig eth0 10.0.0.1 up | | | | | |$ ping -c 50 10.0.0.1 | |PING 10.0.0.1 (10.0.0.1) from 10.0.0.1: 56(84) bytes of data. | |64 bytes from 10.0.0.1: icmp_seq=0 ttl=255 time=0.2 ms | |64 bytes from 10.0.0.1: icmp_seq=1 ttl=255 time=0.2 ms | |64 bytes from 10.0.0.1: icmp_seq=2 ttl=255 time=0.1 ms | | | | | |- 10.0.0.1 ping statistics - | |50 packets transmitted, 50 packets received, 0% packet loss | |round-trip min/avg/max = 0.1/0.1/0.2 ms | | | | | |$ ifconfig eth0 | |eth0 Link encap:Ethernet HWaddr 00:50:04:C2:09:AC | | inet addr:10.0.0.1 Bcast:10.255.255.255 Mask:255.0.0.0 | | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | | RX packets:428 errors:0 dropped:0 overruns:0 frame:0 | | TX packets:421 errors:0 dropped:0 overruns:0 carrier:0 | | collisions:0 txqueuelen:100 | | Interrupt:10 Base address:0xc800 | | | | | +---------------------------------------------------------------------------+ If "eth0" comes up without errors, and you can ping it without errors, and ifconfig shows no errors, we most likely have all our hardware in working order now, and are ready to start configuring Linux. If not, see the Troubleshooting section below. Gotcha: A few modems may already be wired as a 10baseT crossover, and require a direct Category 5 cable for a direct connection to a NIC, rather than a crossover cable. I lost around 12 hours figuring this one out, so don't make the same mistake - make sure you RTFM first. ----------------------------------------------------------------------------- 2.9. Installing a USB Modem The physical installation of a USB modem is similar to an ethernet modem. There is no ethernet card necessary obviously. So connect the phone line between the DSL wall jack and the modem's DSL port, and attach the USB cable to the computer's USB port. USB modems will require vendor and model specific drivers in order to sync and function properly. Assuming you are using the Alcatel SpeedTouch USB, this will require both a binary firmware driver available from Alcatel's driver page: [http://www.speedtouchdsl.com/support.htm] http:// www.speedtouchdsl.com/support.htm, and a separate modem driver. This driver also supports both PPPoE and PPPoA, though the steps for getting either to work are quite different. See the Appendix for more on this modem. The Eci Hi Focus ADSL Modem has some support in Linux now too. See [http:// eciadsl.sourceforge.net/] http://eciadsl.sourceforge.net/. ----------------------------------------------------------------------------- 3. Configuring Linux After you have connected the modem and it's getting sync, then you're ready to configure Linux and verify your connection to your ISP. Although I will refer to a Linux System, you could conceivably connect any type of 10baseT device to the modem. This includes a router, hub, switch, PC, or any other system that you wish to use. We'll just cover the Linux aspects here. Warning Before you connect to your ISP, make sure you understand all security issues of having a direct connection to the Internet via DSL. Depending on your ISP, most outside users can access your system, and you should setup any firewalls, deactivate ports/services, and setup any passwords prior to connecting your machine to the world. See the Security section below, and the links section for more on this very important topic. Do not make this an afterthought! Be ready. ----------------------------------------------------------------------------- 3.1. Bridged vs PPPoX Networks Before we get too far into the final stages of installing and configuring our system, let's look at how various DSL ISPs set up their networks. It will be very important for you to know how your ISP does this, as there is more than one possibility and the steps involved are quite different for each. This may not be the kind of thing the ISP is advertising, and since you are not using Windows, you may not have access to the setup disk that the ISP provides. If you're not sure, ask the ISP's tech support staff, or better, find other knowledgable users of the same service. To muddy the waters even more, some ISPs may be offering more than one kind of service (over and above the various bit rate plans). Example: Verizon (formerly Bell Atlantic) originally offered static IPs with a Bridged connection. Now all new installs use PPPoE with dynamic IPs. For installation and configuration purposes, this is very different. The two most common DSL network implementations are Bridged/DHCP and PPPoX. Both have mechanisms for obtaining an IP address and other related networking configuration details so we shouldn't have to worry about this. But there are indeed other, less common, means of connecting. Our job will be finding the right client, and doing what we have to, to get it up and running. The most common ones are discussed below. Important! You need to know beforehand how your ISP is setup for connecting to his network. To re-iterate, the two main possibilities are Bridged/DHCP and PPPoE. These are mutually exclusive implementations. And there are indeed other possibilities as well. So you will need to know exactly what this is beforehand. And it must be the right one or you will waste a lot of time and effort. You cannot choose which one either. It is a matter of how the ISP is doing his network. Note that PPPoE can run over Bridged networks, so just knowing whether you are Bridged or not, is not necessarily good enough. If your provider is giving you a router, there is a good chance that the router's firmware will handle all of this for you. If you are subscribing with one of the Baby Bells in the U.S., you can count on that being PPPoE, and thus you will need a PPPoE client. There are a few provider specific FAQs and HOWTOs in the Links section below. ----------------------------------------------------------------------------- 3.1.1. Bridged/DHCP In the good old days of a year or two ago, purely "Bridged" connections were the norm. PPPoE had not been invented yet. This type of network puts you on a local subnet just like a big LAN. You are exposed to much of the local subnet traffic, especially ARP and broadcast traffic. The typical means of authenticating in this set up, is via DHCP. DHCP is a standard, established networking protocol for obtaining an IP address and other important network parameters (e.g. nameservers). This is a standard, well documented networking scheme and is very easy to set up from the end user's perspective. It is also a very stable connection. You can actually unplug the modem for say 10 minutes, plug it back in, let it re-sync, and the connection is still there -- same IP and everything. ----------------------------------------------------------------------------- 3.1.2. PPPoX The main alternative now is PPPoX, meaning either PPPoE (PPP over Ethernet) or PPPoA (PPP over ATM, aka PPPoATM). Both of these related protocols are currently being deployed, but at the moment, PPPoE seems to be the more common of the two. PPPoX is a relative newcomer, and, as the name implies, is a variation of Point-to-Point Protocol that has been adapted specifically for DSL networks. There are several PPPoE clients for Linux (see below). PPPoX simulates a dialup type environment. The user is authenticated by user id and password which is passed to a RADIUS server, just like good ol' dialup PPP. A routable IP address, and other related information, is returned to the client. Of course, no actual dialing takes place. The mechanics of how this is handled, will vary from client to client, so best to RTFM closely. Typically you will set up configuration files like pap-secrets, etc. It is worth noting that PPPoE will also work on non-ethernet devices like USB, provided the correct drivers are installed. From the ISPs perspective, PPP is much easier to maintain and troubleshoot. From the end user's perspective, it is often more work to set up, often uses more CPU, and the connection is maybe not as stable. So anyway, this seems to be the coming trend. Many of the large telcos around the world, especially the RBOCs (Baby Bells) in the U.S., have committed to PPPoX already. Setting up a PPPoX connection is completely different from setting up a bridged/DHCP connection. ----------------------------------------------------------------------------- 3.1.3. ATM Since the traffic on the wire from the DSLAM to the modem is typically ATM, a raw ATM connection would seem to make sense. While possible, this is rare, if it exists at all in the U.S, and would require a modem in addition to a PCI ATM card, such as the Efficient Networks 3010. Recent 2.4 kernels do have ATM support. (See the Links section for more information.) This may be a viable solution at some point, but it is just not "there" yet, mostly because this is more costly to implement. ----------------------------------------------------------------------------- 3.2. Configuring the WAN Interface The most common configuration is a DSL modem in "bridging" mode. Both PPPoX and DHCP can use this setup. In this scenario, the WAN interface typically means your NIC. This is where your system meets the outside world. (If you have a router see below for router specific instructions.) So essentially we will be configuring the NIC, typically "eth0" since it is an ethernet interface. With PPPoX, once the connection comes up, there will be a "ppp0", or similar, interface, just like dialup. This will become the WAN interface once the connection to the PPP server is up, but for configuration purposes we will we be concerned with "eth0" initially. There are various ways an ISP may set up your IP connection:   * Static IP.   * Dynamic IP on Bridged Network via DHCP.   * Dynamic IP via PPPoX.   * Static IP via PPPoX. Let's look at these individually. ----------------------------------------------------------------------------- 3.2.1. Static IP Configuration A "static" IP address is an IP that is guaranteed not to change. This is the preferred way to go for those wanting to host a domain or run some type of public server, but is not available from all ISPs. Note that while there are some noteworthy benefits to having a static IP, the disadvantage is that is more difficult to remain "invisible". It is harder to hide from those with malicious intentions. Skip this section if you do not have a static IP, or if you have a router, and the router will be assigned the static IP. Configure the IP address, subnet mask, default gateway, and DNS server information as provided by the ISP. Each Linux Distribution (Redhat, Debian, Slackware, SuSE, etc.) has a different way of doing this, so check on your distro's docs on this. Each may have their own tools for this. Redhat has netcfg for example. You can also do this manually using the ifconfig and route commands. See the man pages on these or the [http://www.tldp.org/HOWTO/ Net-HOWTO] Net HOWTO for more information and specifics. A quick command line example with bogus IPs: +---------------------------------------------------------------------------+ | # ifconfig eth0 111.222.333.444 up netmask 255.255.255.0 | | # route add default gw 111.222.333.1 dev eth0 | | | | | +---------------------------------------------------------------------------+ Be sure to add the correct nameservers in /etc/resolv.conf. ----------------------------------------------------------------------------- 3.2.2. Bridged/DHCP Configuration ISPs that have Bridged networks typically use DHCP to assign an IP addresses, and authenticate the user. All distributions come with one or more DHCP clients. dhcpcd seems to be the most common. pump comes with Redhat based distributions as of Redhat 6.0. The DHCP client will obtain an IP "lease" from the ISP's server as well as other related information: gateway address, DNS servers, and network mask. The lease will be "renewed" at regular intervals according to the ISP's configuration. You will want the DHCP client started on boot, so use your distribution's means of doing this. There generally is little to configure with DHCP as it is fairly straightforward and easy to use. You may need to tell it which interface to listen on if the NIC is something other than "eth0". You can also start it from the command line to get started. See the respective man pages for more. Unless you have a static IP, the ISP will need some way to know who you are when you connect. There are two ways this authentication process is accomplished with DHCP. The first and most common method is via the MAC (or hardware) address of the network device. Typically this would be the NIC. The MAC address is a unique identifier and can be found among the boot messages, or with ifconfig, and looks something like 00:50:04:C2:19:BC. You will need to give the ISP the MAC address before your first connection. The other DHCP authentication method is via an assigned hostname. In this case, the ISP will have provided you with this information. Your DHCP client will need to pass this information to the server in order for you to connect. Both dhcpcd and pump accept the "-h" command line option for this purpose. See the client's man page, or your distribution's documentation, for specifics. Note Note   If your ISP uses MAC address authentication, and you change your network device (e.g. NIC), you will need to register the new address with the ISP or you won't be able to connect. ----------------------------------------------------------------------------- 3.2.3. PPPoE Configuration PPPoE (PPP over Ethernet) is an alternate way for ISPs to control your connection, and is becoming increasingly popular with ISPs. Setting this up is quite different, and may be a little more work than with static IPs or DHCP above. Recent distro releases are now shipping PPPoE clients. If this is not the case for you, then you will have to download one. Check any Linux archive site like [http://freshmeat.net] http://freshmeat.net, etc. or look below. Some of the current GPL PPPoE clients available:   * The Roaring Penguin (rp-pppoe): [http://www.roaringpenguin.com/pppoe/] http://www.roaringpenguin.com/pppoe/, by David F. Skoll. Reportedly very easy to set up, and get started with. This is a popular Linux PPPoE clients due to it's reputation for ease of installation, and is now being bundled with some distributions. rp-pppoe works as a user-mode client on 2.0 and 2.2 kernels, and in kernel-mode on 2.4 kernels.   * PPPoEd: [http://www.davin.ottawa.on.ca/pppoe/] http:// www.davin.ottawa.on.ca/pppoe/ by Jamal Hadi Salim is another popular Linux client and is also bundled with some distros. This is a kernel based implementation for 2.2 kernels. A setup script is now included so no patching is required, making installation quick and easy. Also, less CPU intensive than user space alternatives like rp-pppoe (2.0/2.2 kernels).   * PPPoE Redirector: [http://www.ecf.toronto.edu/~stras/pppoe.html] http:// www.ecf.toronto.edu/~stras/pppoe.html. This is a redirector which allows the use of PPPoE with pppd-2.3.7 or later. No recompiling of other system components are required. It is meant as an interim solution until the 2.4.x series, which will include kernel support of PPPoE/A. (Does not seem to be under active development at this time.)   * 2.4.x kernels include native PPPoE support. The PPPoE for 2.4 page is [http://www.shoshin.uwaterloo.ca/~mostrows/] http:// www.shoshin.uwaterloo.ca/~mostrows [link is dead, sorry, can't find new page] and is by Michal Ostrowski, the maintainer for kernel PPPoE. This includes detailed instructions for installing and configuring kernel mode PPPoE.   * EnterNet is a non-GPL'd PPPoE client from NTS, [http://www.nts.com] http: //www.nts.com, that is being distributed by some ISPs as the Linux client. It does come with source code but the it is not available for free download. (I haven't found anyone that is impressed by this one.) Depending on which client you have chosen, just follow the INSTALL instructions and other documentation included with that package (README, FAQ, etc.). Once a PPPoE client connects, your connection should look something like the below example from Roaring Penguin, where "eth0" is connected to the modem: +---------------------------------------------------------------------------+ |$ route -n | | | |Kernel IP routing table | |Destination Gateway Genmask Flags Metric Ref Use Iface | |192.168.0.254 * 255.255.255.255 UH 0 0 0 eth1 | |208.61.124.1 * 255.255.255.255 UH 0 0 0 ppp0 | |192.168.0.0 * 255.255.255.0 U 0 0 0 eth1 | |127.0.0.0 * 255.0.0.0 U 0 0 0 lo | |default 208.61.124.1 0.0.0.0 UG 0 0 0 ppp0 | | | | | |$ ifconfig | | | |eth0 Link encap:Ethernet HWaddr 00:A0:CC:33:74:EB | | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | | RX packets:297581 errors:0 dropped:0 overruns:0 frame:0 | | TX packets:266104 errors:1 dropped:0 overruns:0 carrier:2 | | collisions:79 txqueuelen:100 | | Interrupt:10 Base address:0x1300 | | | |eth1 Link encap:Ethernet HWaddr 00:A0:CC:33:8E:84 | | inet addr:192.168.0.254 Bcast:192.168.0.255 Mask:255.255.255.0 | | UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 | | RX packets:608075 errors:0 dropped:0 overruns:0 frame:0 | | TX packets:578065 errors:0 dropped:0 overruns:0 carrier:0 | | collisions:105408 txqueuelen:100 | | Interrupt:9 Base address:0x1200 | | | |lo Link encap:Local Loopback | | inet addr:127.0.0.1 Mask:255.0.0.0 | | UP LOOPBACK RUNNING MTU:3924 Metric:1 | | RX packets:1855 errors:0 dropped:0 overruns:0 frame:0 | | TX packets:1855 errors:0 dropped:0 overruns:0 carrier:0 | | collisions:0 txqueuelen:0 | | | |ppp0 Link encap:Point-to-Point Protocol | | inet addr:208.61.124.28 P-t-P:208.61.124.1 Mask:255.255.255.255 | | UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1 | | RX packets:297579 errors:0 dropped:0 overruns:0 frame:0 | | TX packets:266102 errors:0 dropped:0 overruns:0 carrier:0 | | collisions:0 txqueuelen:10 | | | | | +---------------------------------------------------------------------------+ Note Note   PPPoE adds 8 bytes of extra overhead to the ethernet frames and the correct initial maximum setting for the ppp0 interface MTU is 1492. If the MTU is set too high, it may cause a fubar packet fragmentation scenario, known as the Path MTU Discovery blackhole where the two ends of the connection fail to communicate. A typical symptom would be the failure of some web pages to load properly, and possibly other annoying problems. You may need to also set the MTU for interfaces on any masqueraded LAN connections MTU to 1452. This does not apply to PPPoA, bridged, or routed configurations, just PPPoE! See rfc2923 for a technical explanation. Actually, for PPPoE the real setting should be at least 8 bytes less (the extra PPPoE protocol overhead) than any interface between you and the ultimate destination. All routers normally would be set to 1500, thus 1492 is correct from your end. But, it may happen that somewhere a router is configured at a lower setting, and this can cause problems, especially with web pages loading, and other traffic failures. The way to test this is to keep dropping the MTU until things 'work'. ----------------------------------------------------------------------------- 3.2.4. PPPoA PPPoA (PPPoATM, or PPP over ATM) is a cleaner solution than PPPoE since most of the work is done in hardware, and since the raw DSL traffic is ATM. There is no user space client necessary to manage the connection as with PPPoE, and the additional ethernet protocol layer is not required. Authentication is still the same: user id and password to connect, but the mechanics are different since no ethernet encapsulation takes place. PPPoA is either done completely in hardware or is implemented as a device specific driver. There is no such thing as a generic PPPoA software client like there is for PPPoE. There is an ATM patch for 2.2 kernels, support for ATM in the 2.4.x kernel, and a project based on the Efficient Networks 3010, as well as other ATM cards. The ATM on Linux homepage is here: [http:// linux-atm.sourceforge.net/] http://linux-atm.sourceforge.net/. And even more info is at [http://www.sfgoth.com/~mitch/linux/atm/pppoatm/] http:// www.sfgoth.com/~mitch/linux/atm/pppoatm/ from the kernel developer of this project. Existing PPPoA implementations are hardware/driver based, and Linux PPPoA modem drivers are scarce as hen's teeth at this time. The above modem does not seem to be available through normal retail channels. This may be a problem, if this is the only protocol an ISP delivers, and an external modem that supports PPPoA is not available. If PPPoA is your ISP's only option, you might consider one of the router/ modems that can handle PPPoA connections, and let the hardware handle everything. ----------------------------------------------------------------------------- 3.2.5. PPTP/PPPoA with Alcatel Ethernet Modems Alcatel SpeedTouch Home ethernet modems (supersedes the Alcatel 1000) support both bridged and PPPoA connections. The modem itself handles the PPPoA protocol internally. When in PPTP/PPPoA mode (as opposed to RFC1483 bridging mode), Linux will connect to the modem via PPTP (MS VPN). The Linux PPTP homepage is [http://cag.lcs.mit.edu/~cananian/Projects/PPTP/] http:// cag.lcs.mit.edu/~cananian/Projects/PPTP/, and works well with this modem. In addition to installing pptp, your kernel must also have support for PPP. The modem has internal configuration pages than can be reached by pointing a browser to the default IP address of http://10.0.0.138. (You will of course have to have your NIC set up for a 10.0.0.0 network with similar IP such as 10.0.0.1, in order to reach the modem's configuration pages.) For PPPoA, the connection type is 'PPTP'. You will have to get the other settings from your provider if the defaults do not work. Settings such as 'VPI/VCI' and 'encapsulation' can vary from provider to provider. Of course, if the modem is coming from your provider, all this should be already configured. The next step is to configure pptp, which is done by configuring the pppd files /etc/ppp/pap-secrets (or chap-secrets) and /etc/ppp/options. This is where the username and password is entered. For example: /etc/ppp/pap-secrets: # client secret server IP address  login@isp.com  *    my_password_here    *     and /etc/ppp/options:   name "login@isp.com" noauth noipdefault defaultroute     Once everything is configured properly, it should be just a matter of starting pptp, pointing it to the modem's address: +---------------------------------------------------------------------------+ | #pptp 10.0.0.138 | | | | | +---------------------------------------------------------------------------+ Note Note   Alcatel supplies many sub-models of these modems. These features may not be available on all models, or may be altered from the defaults. This is something to be aware of, if buying a used modem. This modem only supports one concurrent PPTP connection. ----------------------------------------------------------------------------- 3.2.6. Modem/Router Configuration Some ISPs are providing "routers" as the connection device. Essentially these are mini routers with built in modems. These are all ethernet based devices too, so Linux should be good to go here as well. Again, a compatible, working NIC should be all that is required to make this work. A "router" has many advantages. The better ones can handle the connection management, IP encapsulation, and authentication, as well as providing a means of segregating your LAN from outside traffic, and possibly other features too. In short they can do it all. One big advantage is that they can handle whatever protocols your ISP requires in order to connect. If the ISP is requiring PPPoX, then this makes life a little easier since you will not have to install or configure any additional software just to use their network. The modem's firmware will handle this. The downside is that most of these do not have the flexibility of a Linux router, or other software solution. Of course, you could set up a Linux router behind the router, and have the best of both worlds. The ones with more and better features are also going to cost significantly more. While the physical installation of a router is very similar to the modem installation (see above), the router configuration itself is different since your first "hop" will be the router's interface and not the ISP's gateway. Routers will actually have two interfaces -- one that you connect to from the LAN side, and one that connects to your ISP on the WAN side. Your point of exposure here is the WAN interface of the router. The router will also have a pre-configured, private IP address that you will connect to from the LAN side. This will be your gateway. The public IP address will be assigned to the WAN side interface. Typically these devices also act as DHCP servers for the LAN side as well. So possibly all you have to do is to start a DHCP client such as dhcpcd or pump (Redhat based distros) to get up and running. Just make sure the modem/router is syncing first. The appropriate steps and configuration should be in the owner's manual, or available from your provider. If you are a PPPoX customer, and the router is handling this part of the connection, then you will have to configure at least your user id and password before connecting. If a Bridged/DHCP customer, you should just have to activate DHCP on the router, and possibly register the MAC (hardware address) of the router with your provider. Some routers have "MAC cloning" which means that they will report the MAC address of the attached NIC. If static IP, then you will have to configure this as well. If you need to access the router directly, you will need to know the manufacturer's default setting for its IP address. See the owner's manual, or ask your provider. You will then have to set your NIC's interface to the same network as the router. For instance, if the router has an IP of 10.0.0.1, set your interface's address to 10.0.0.2 (typically eth0), and netmask to 255.0.0.0. +---------------------------------------------------------------------------+ | # ifconfig eth0 10.0.0.2 up netmask 255.0.0.0 | | # route add -net 10.0.0.0 | | $ ping 10.0.0.1 | | | | | +---------------------------------------------------------------------------+ If everything is in working order, the router should respond to pings. How to configure this permanently will vary from distro to distro. So check your distribution's documentation. Now you should be able to ping the modem/ router, and, if all is well, beyond. Then use telnet or a web browser to do any further configuration of the router. Even if the ISP is not offering any router options, there are quite a few available from third party manufacturers such as Netgear, Linksys, Cisco, Zyxel, Cayman, Alcatel and others. These will have all the features already mentioned and maybe more. Just make sure it matches your provider's DSL. This is one good way around the PPPoX bugaboo. Caution Some manufacturers may be marketing these as having "firewall" capabilities. In some cases, this amounts to nothing more than basic NAT (Network Address Translation or masquerading). Not a full, true firewall by most measures. Be sure to read the fine print before buying and make sure you know how much real firewalling is included. ----------------------------------------------------------------------------- 3.3. Connect Everything should be in place now. You probably have already tested your connection. You should be seeing ping roundtrip times of 10-75 ms to the ISP's gateway. If something has gone wrong, and you cannot connect, either retrace the above steps, or see the Troubleshooting Section below. ----------------------------------------------------------------------------- 4. Securing Your Connection This section is intended for those who have not previously dealt with the security implications of having a full-time Internet connection. Or may not understand some of the basic concepts of security. This is meant to be just a quick overview, not a comprehensive examination of all the issues! Just enough to give you a gentle shove in the right direction. Please see the Links section for sites with more details. Also, your distribution surely has plenty of good information as well. ----------------------------------------------------------------------------- 4.1. Security Quick-start Before going on-line full-time, do not underestimate the need for securing your connection. You will have two things that mischief makers and crackers of the world are looking for: bandwidth, and a Unix-like OS. You instantly become an inviting target. It is just a matter of time before someone comes knocking. Possibly a very short time. A quick start:   * Turn off any daemons and services that aren't absolutely essential, and can be accessed from outside. You can't get compromised through a port that isn't open. Use ps and netstat to see what services are running. (See man pages for specifics). Do you really need named, sendmail, telnet , ftp running and accessible to one and all? If not sure, then they should not be running. Then take whatever steps necessary to make sure they don't start again on the next boot. See your distribution's documentation on this. Many distributions start some well known services by default. You may not have done anything yourself explicitly to start these. And may not even realize these are indeed running. But it is up to you to know what is running, and how safe it is. Don't rely on a "default" installation of any distribution to do this for you, or to be secure. Chances are it isn't.   * If you decide some services are essential, make sure you are running the most current version. Exploits are found, and then get fixed quickly. Don't get caught with your pants down. A full-time connection makes staying updated very easy -- and very important. Check with your distribution to see what new packages are available. Then stay in touch. If they have a security mailing list, get on it.   * Take passwords seriously, using non-dictionary "words". Use shadow passwords (this should be a standard feature of newer distributions). Do not allow remote root logins. See the Security HOWTO for more details and ideas.   * Use ssh instead of telnet or rsh.   * Set up a firewall to limit access, and log connection attempts. This will be different depending on which kernel series you are using: ipfwadm for 2.0, ipchains for 2.2, and iptables for 2.4. See the below HOWTOs for a more in depth discussion on this and other security related topics:   *    + [http://tldp.org/HOWTO/Security-Quickstart-HOWTO/index.html] Security-Quickstart-HOWTO and for Redhat based distros [http:// tldp.org/HOWTO/Security-Quickstart-Redhat-HOWTO/index.html] Security-Quickstart-Redhat-HOWTO   + Firewall HOWTO   + Security HOWTO   + IPCHAINS HOWTO   + [http://netfilter.samba.org] Netfilter/Iptables docs   + IP Masquerade HOWTO Additional references are in the Links Section below. ----------------------------------------------------------------------------- 5. Performance Tuning and Troubleshooting 5.1. Tuning OK, now we are up and running, and we want to be running at warp factor nine. No such thing as too fast, right? Linux networking is pretty robust, even a default installation with no "tuning". You may well not need to do anything else. But if your connection is not performing up to what you think it should be, then possibly there is a problem somewhere. This may be a more worthwhile approach than the pursuit of any magical "tweak". A very rough guideline on what you might reasonably expect as a maximum sync rate, based on distance from DSLAM/CO: +-------------------+-----------------------+ | 0-12 K ft  (0-3.6|      2000 Kbps or more| | km)   |(8100 max for ADSL) | +-------------------+-----------------------+ |12-16 K ft (3.6-4.6|      1500 Kbps to 1000| | km)   |Kbps | +-------------------+-----------------------+ |16-18 K ft (4.6-5.4|      1200 Kbps to 512 | | km)   |Kbps | +-------------------+-----------------------+ | 18-?? K ft (5.4-??|      512 Kbps to  128 | | km)   |Kbps or less :( | +-------------------+-----------------------+ There are many conceivable factors that could effect this one way or the other. Newer generations of DSL will surely improve this, as will related technologies like repeaters. You will loose 10-20% of the modem's attainable sync rate to networking overheads (TCP, ATM, ethernet). So a 1500 Kbps connection, is only going to realize about 1100-1300 Kbps or so of real world throughput. No tweaking is going to change the built-in protocol overheads. Also, if your service is capped at a lesser speed by your provider, then you can't get above that speed no matter what. AND -- that there are numerous variables that can effect your loop/signal quality, and subsequently your speed (aka sync rate). Some of these may be beyond your control. But there are a few things that you might want to look at. ----------------------------------------------------------------------------- 5.1.1. TCP Receive Window For many of us, a default Linux installation is going to give something close to optimum performance. Windows 9x users often get a big boost by increasing their TCP Receive Window (RWIN). But this is because it is too small to start with. This is just not the case with Linux where the default value is 32KB. The exception here is if you have to routinely deal with a high latency connection. For instance, if your provider has a satellite uplink that is consistently adding unusual latency (250ms or greater?). Then a larger TCP Window will likely help. For more on TCP Receive Window and related issues, look at [http://www.psc.edu/networking/perf_tune.html] http://www.psc.edu/ networking/perf_tune.html. The Receive Window is a buffer that helps control the flow of data. If set too low, it can be a bottleneck and restrict throughput. The optimum value for this depends completely on your bandwidth and latency. Latency being what you would find as average roundtrip time (RTT) based on your typical destinations and conditions. This can be determined with ping. For example, the Linux default of 32KB is acceptable up to speeds of 2 Mbps and a typical latency of 125ms or so, or 1.0 Mbps and latency of 250ms. Setting this value too high can also adversely effect throughput, so don't over do it. An example courtesy of Juha Saarinen of New Zealand: The commonly used formula for working out the the tcp buffer is the "bandwidth delay product" one:       Buffer size = Bandwidth (bits/s) * RTT (seconds) In my case, I have roughly 8Mbps downstream, but the ATM network can only support ~3.5Mbps sustained. I'm far away from the rest of the world, so to squeeze in a sufficient amount of 1,500 byte packets, with average RTTs of 250ms, I should probably have a buffer of (3,500,000/8)*.25 = 106KB. (I've got 128KB at the moment, which works fine.) The Receive Window can be dynamically set in the /proc filesystem. This requires entering a value that is twice the desired buffer size: +---------------------------------------------------------------------------+ | #echo 262144 > /proc/sys/net/core/rmem_default | | #echo 262144 > /proc/sys/net/core/rmem_max | | | | | +---------------------------------------------------------------------------+ The above example actually sets the value to 128K. The Send Window can also be set, but is not as likely to be a limiting factor on DSL connections as the Receive Window: +---------------------------------------------------------------------------+ | | | #echo 262144 > /proc/sys/net/core/wmem_default | | #echo 262144 > /proc/sys/net/core/wmem_max | | | | | +---------------------------------------------------------------------------+ These values can also be set using the sysctl command. See the man page. Other suggested kernel options for those who want to squeeze every last bit out of that copper (selected entries only): +---------------------------------------------------------------------------+ | # sysctl -a | | net.ipv4.tcp_rfc1337 = 1 | | net.ipv4.ip_no_pmtu_disc = 0 | | net.ipv4.tcp_sack = 1 | | net.ipv4.tcp_fack = 1 | | net.ipv4.tcp_window_scaling = 1 | | net.ipv4.tcp_timestamps = 1 | | net.ipv4.tcp_ecn = 0 | | | | | +---------------------------------------------------------------------------+ A brief description of these, and other, options may be found in /usr/src/ linux/Documentation/networking/ip-sysctl.txt, in the kernel source directory. ----------------------------------------------------------------------------- 5.1.2. Interleaving "Interleaving" is an error control mechanism of ADSL with DMT line encoding. DMT is now the standard for ADSL, and is by far and away the most prevalent form of ADSL. Interleaving buffers the raw data and corrects errors on the fly at the DSLAM. This can significantly help marginal loops that may be prone to line errors. The downside is that this buffering also adds significant latency to the connection. So for those with reasonable quality lines, interleaving is of no real benefit, and may actually add unnecessary latency. Interleaving is an adjustable parameter and can be turned on or off by the telco. Many telcos seem to like to have this on by default, since it probably reduces tech support calls in those cases where it does help stabilize a line. But everyone else pays a price. How to know if your line is interleaved or not, and how to change it? Good question. Generally speaking, if your first hop or two on a traceroute is less than 25ms or so, you can pretty much figure that interleaving is off. But there may be other factors such as how far away those hops actually are. Unless your modem accurately reports this, the only other real way to know is to talk to someone at the telco. This may prove easier said than done. "FastPath" DMT is synonymous with "interleaving off". Again, this only applies to ADSL/DMT. ----------------------------------------------------------------------------- 5.1.3. TCP Bottlenecks DSL connections may suffer performance degradations under certain circumstances. Thankfully, Linux has very robust and flexible networking tools to help us deal with these. One such common situation is where traffic bottlenecks are created whenever data from a fast network segment hits a slower one. Such as ethernet hitting a DSL modem/router. This can cause short term traffic backlogs, known as "queues" in the device. Queuing can result in degraded performance, particularly for interactive protocols (like telnet or ssh) and streaming protocols (like RealAudio), and increased latency for ICMP and other network protocols. This is most evident when the upstream link is saturated (since downstream data is queued at the ISP's end and we can't do as much about that). The queued traffic is processed such that lower volume traffic protocols (like ssh) often get drowned out so to speak, by the higher volume, bulk traffic (like http or ftp), as there isn't any special prioritizing in default usage. And if the upstream queuing, or other factors, causes enough of a delay, it can even decrease downstream bandwidth utilization by slowing the ACKnowledgements (which are heading upstream), that are required to keep a download moving at optimal rates. So it is possible that an upload can hurt a simultaneous download. Such effects can be largely mitigated with Linux's built-in traffic shaping abilities. The user space tool for manipulating the kernel's advanced traffic routing features is iproute, sometimes packaged as iproute2. This includes various tools that can classify and prioritize traffic with a considerable degree of flexibility. It also requires various kernel config options to be turned on. And is also fairly close to Black Magic ;-) The definitive document on this is the Advanced Routing and Traffic Control HOWTO ([http:// tldp.org/HOWTO/Adv-Routing-HOWTO.html] http://tldp.org/HOWTO/ Adv-Routing-HOWTO.html). Pay particular attention to the "Cookbook" Section # 15, and in particular #15.8, "The Ultimate Traffic Conditioner: Low Latency, Fast Up & Downloads". A great read! ----------------------------------------------------------------------------- 5.1.4. Dropped PPP Connections PPPoE and PPPoA both rely on the venerable PPP protocol. This protocol incorporates the Link Control Protocol (LCP), which is used to maintain the viability of the connection. Each end can send LCP echoes to other end, and if there is no response in the alloted time frame, the session is presumed dead, and is torn down. Again, either end can initiate this process. The client should then negotiate a new connection. But, this normally means a new IP address is assigned along with the new session. Perhaps this is undesirable? While you certainly can't control what happens on the remote end in this regard, you can adjust PPP's very flexible way of dealing with LCP echoes on your end, to increase the number of echoes, extend the interval and timeout period on your end. This might help prolong the life of an unstable connection in situations with marginal line conditions, or a buggy peer on the other end. Read your client's documentation. YMMV. Some providers may deliberately enforce some time limit. There is not much you can do about this. Also, frequently dropped connections are often an indication of a line problem of some kind. This is something the telco should investigate. ----------------------------------------------------------------------------- 5.2. Installation Problems Read this section, if you have no sync at all or are completely unable to connect. See your modem's owner's manual for interpreting the modem's LEDs. (Many will show a solid red (or orange) light if not in sync.) ----------------------------------------------------------------------------- 5.2.1. No sync The modem sync LED has never been green.   * If doing a self-install, the DSL jack may be wired wrong, or the splitter may be wired wrong. Also, the modem may be wired differently than standard telco devices. See above.   * Is the modem Linux compatible? If ethernet interfaced, this should not be a problem. But PCI or USB modems may require drivers just to achieve sync. This could be a show stopper since many PCI and USB modems are not Linux compatible.   * Call your provider and make sure the line was provisioned. It is always possible someone dropped the ball. They may even be able to run a remote test on your line just to verify. There is a also remote possibility that the DSLAM is down. They should know this as well.   * Disconnect the modem power cord and disconnect the DSL cord from the wall jack. Plug it into the test jack inside the NID (outside phone box), and run an extension cord if necessary for power. Temporarily disconnect the wiring to the inside phone circuit. This should effectively bypass any inside wiring and environmental issues. The ethernet cable to the NIC does not need to be connected to run this test (true only for ethernet modems). The modem will sync fine without it. (Easier said than done, I know.) But if possible, move enough of your system where you can view the modem's diagnostics (if available) and get the sync rate. If this works, there is probably something wired incorrectly inside, or a short in a connection somewhere, or there is severe electrical interference on the DSL line. Double check the splitter and wall jack connections. If a splitterless installation, look for bad wiring, bad (e.g. corroded) connections on all jacks, bad splices, or defective microfilters! If no sync on the above test, either the line was not readied, the modem is defective, or the DSLAM is down. Note that PCI and USB modems will need to load drivers before syncing, and thus make this test a little more complicated.   * If you installed microfilters, remove these temporarily and unplug all telco devices, such as fax machines, etc. Possibly a mircofilter is defective and shorting out the line. ----------------------------------------------------------------------------- 5.2.2. Network Card (NIC) Problems Symptoms here are: NIC is not recognized, modules won't load, or ifconfig shows the interface is not up, or is generating lots of errors, etc.   * Turn off Plug 'n Pray in BIOS. This may be labeled as "non-Microsoft OS" or similar. A sometimes symptom here is that the NIC is assigned IRQ 0. Or there may be an error message like "resource temporarily unavailable".   * Check for IRQ conflicts with cat /proc/interrupts. If the NIC is sharing an IRQ, try moving cards around in slots, or tinker with BIOS IRQ settings. If an ISA card, you may need to get the setup utility from the manufacturer and use it to set IRQ, etc. This may require booting to DOS. Modern systems should theoretically be able to handle IRQ sharing, so it is not necessarily a problem in and of itself. Only if something is misbehaving.   * Possibly the wrong module is being loaded. Look through the kernel source documentation in /usr/src/linux/Documentation/* for your card or chipset. Also, for comments and update information in /usr/src/linux/drivers/net/ *.c for your respective chipset. It is worth noting that there is more than one module for some card types. This seems to be true of tulip and 3Com cards. Check boot messages or use lspci -v to see how the kernel is identifying your card. You can use insmod, rmmod, and modprobe to test different modules. See the respective man pages for more information.   * Check the manufacturer's web site for Linux documentation. Or look at Donald Becker's informative site at [http://www.scyld.com/network/] http: //www.scyld.com/network/.   * Some Linux NIC drivers reportedly work better as non-modular. In other words, compile them into the kernel instead of as a module.   * It is also possible that the card is bad, or the drivers just aren't up to snuff. Try another card. And you don't need an expensive, high quality card necessarily either. ----------------------------------------------------------------------------- 5.2.3. IP Connection Problems Read this section if you are sure the modem is syncing, the NIC is recognized and seems to be working properly, client software is installed and running without error, but the connection to the ISP fails. Verify the modem is indeed syncing by the LED(s). An IP connection failure may be evidenced by ifconfig not showing an active eth0 interface (or ppp0 for PPPoX), or pinging gateway and other destinations generates 'network unreachable' or similar errors.   * Make sure you know which protocol your ISP is using. Are they using DHCP? PPPoX? It is critical that you have this right. You may have to ask tech support.   * If you are using DHCP, does the ISP require MAC address authentication, and if so, do they have the right address? Did they or you typo it? If the ISP requires hostname authentication, is your DHCP client passing the required hostname? This is done with the "- h" command line option.   * Look at /var/log/messages and see if any useful clues are there. Also, run tcpdump while trying to initiate the connection. tcpdump output is fairly cryptic, but you should be able to determine if there is any response at all.   * If PPPoX, is the ISP using username as an id, or username@isp.com?   * CHAP, PAP, or other? I would set up both CHAP and PAP (see man pppd) just to be safe.   * Try pinging the default gateway's address. Get this with 'route -n'. If you can ping by IP address (i.e. 111.222.333.444), but not by hostname, then likely nameservers are not correctly setup in /etc/resolv.conf. This is configurable as to whether your connection protocol (e.g. PPPoE) does this automatically or not. And different distributions may have their own way of setting this up, so check their documentation first. In a pinch, just add them manually to /etc/resolv.conf. pppd also has the "usepeerdns" option that can be enabled.   * For rp-pppoe, let the PPPoE client bring up the ethernet interface. Do not have it come up on boot. Make sure there is no existing default route before starting PPPoE. For rp-pppoe, David Skoll recommends that /etc/ppp /options be left empty.   * If running a firewall (e.g. with ipchains), try temporarily taking it down. Possibly this is misconfigured, and not allowing packets through.   * Roaring Penguin has a very nice debug output with all kinds of system info, and even tips for correcting problems. See the docs for turning this well-done feature on.   * If the modem was purchased from a source other than your ISP, it may the wrong kind of modem. SDSL needs an SDSL modem, for instance. Also, for ADSL there are CAP and DMT encodings, and these are incompatible with each other. The modem may need to be configured for your ISP's service. All modems have configurations for VCI, VPI, encapsulation, etc. Call tech support for this information. Modem configuration is usually done by either telnetting or web browsing to the modem's IP address. ----------------------------------------------------------------------------- 5.3. Sync Problems Read this section if you have had a working connection, but now have lost sync, are intermittently losing sync, your sync rate has dropped significantly, or are getting a "sync/no surf" condition. (Better quality modems will have a way to report sync rate, usually via telnet or a web browser interface. See the owner's manual.) A loss of sync indicates a problem with the DSLAM, your line (inside or outside) or your modem. DSLAMs typically have "shelves" with "cards". Alcatel DSLAM cards, just for instance, have a capacity of four connections each. If the card goes bad, at most four customers are effected. The point being that sync loss outages can be very isolated. Unlike network outages that tend to effect large numbers of users. Sync outages are a telco problem, not an ISP problem. If your service agreement is with the ISP, you will need to contact them, who will in turn contact the telco. Degraded sync rates, and disruption of the DSL signal, can cause various problems. Obviously, you will never get your maximum throughput under these conditions. But, the symptoms are not always obvious as to whether the problem is on your end or the provider's. For instance, a poor inside wire connection may result in retransmissions of packets that have been dropped. This can really reduce throughput and slow a connection down. It is tempting to think of packet loss as a traditional networking problem, but with DSL it is possible to be the result of a bad line, impaired signal, or even the modem itself. Some things to try:   * Power cycle the modem. Turn off the power button/switch, and physically unplug the cable to the wall jack for 30 seconds or so. Turn back on, and re-attach to the wall jack. This will force a resync. Unfortunately, the only way to power down a PCI modem, is to reboot. This may fix a "sync/no surf" condition that is caused by the modem, and maybe other conditions too.   * See the above section on moving the modem lock, stock and barrel to the NID and thus bypassing all inside wiring. If the situation is improved there, then the problem is inside somewhere. If not, it is a telco problem.   * RFI Bear-hunt: The DSL signal is fragile. There are a number of things that can degrade it. RFI, or Radio Frequency Interference, from sources in and around the home/office is one common source of reduced signal strength, intermittent sync loss, low sync rates and high line error rates that can cause retransmissions and slow things down. DSL frequencies just happen to be in a range that is susceptible to many potential RFI sources. Our test tool here is simply a portable AM radio. Tune it to any channel where you can get clear reception -- it makes no difference where. The AM radio will pick up RFI that is in the same frequency range as the DSL signal. It will sound like "frying bacon" type static. Put it against your computer's power supply. You should hear some static. Move it away and the static should fade pretty quickly. This will give you an idea of what RFI sounds like. A decent quality power supply should produce only weak RFI -- probably not enough to cause a problem. Use the radio like a Geiger counter and move it around your modem and DSL line. If you hear static, follow it to the source. Things to be suspicious of: power supplies, transformers, ballasts, electric motors, dimmer switches, high intensity lighting. Moving the modem, or rerouting cables is sometimes enough. Keeping the line between the modem and the wall jack as short as possible is a good idea too.   * Chronic sync problems are often due to a line problem somewhere. Sometimes it is something as simple as a bad splice or corroded jack, and easily remedied if it can be found. Most such conditions can be isolated by a good telco tech. Check with your provider, and politely harass them if you have to. If you get the run-around, ask to go over their heads.   * If you are near the distance limits of DSL, and having off and on sync problems, try the "Homerun" installation. See above. This can be effective in improving marginal signal/sync conditions.   * If using a surge protector, try it without the surge protector. Some may interfere with the DSL signal. Another possibility is a nearby AM radio station, or bandit ham radio operator that are disrupting the DSL signal since they operate in a similar frequency range. These may only cause problems at certain times of day, like when the station boosts its signal at night. A good telco DSL tech may be able to help minimize the impact of this. YMMV. ----------------------------------------------------------------------------- 5.4. Network and Throughput Problems Read this section if your connection is up, but are having throughput problems. In other words, your speed isn't what it should be based on your bit rate plan, and your distance from the CO. "Network" here is the WAN -- the ISP's gateway and local subnet/backbone, etc. Remember that a marginal line can cause a reduced sync rate, and this will impact throughput. See above. The two factors we will be looking for are "latency" and "packet loss". Both are pretty easy to track down with the standard networking tools ping and traceroute. If either of these occur in our path, they will impact performance. Latency means "responsiveness" or "lag time". Actually what we are interested in is abnormally high latency, since there is always some latency. Packet loss is when a packet of data gets dropped somewhere along the way. TCP/IP will know it's been "lost", and there will be a retransmission of the lost data. Enough of this can really slow things down. Ideally packet loss should be 0%. What we really need to be concerned about is that part of the WAN route that we routinely traverse. If you do a traceroute to several different sites, you will probably see that the first few "hops" tend to be the same. These are your ISP's local backbone, and your ISP's upstream provider's gateway. Any problem with any of this, and it will effect everywhere you go and everything you do. We can start looking for packet loss and latency by pinging two or three different sites, hopefully in at least a couple of different directions. We will be looking for packet loss and/or unusually high latency. +---------------------------------------------------------------------------+ | $ ping -c 12 -n www.tldp.org | | PING www.tldp.org (152.19.254.81) : 56(84) bytes of data. | | 64 bytes from 152.19.254.81: icmp_seq=0 ttl=242 time=62.1 ms | | 64 bytes from 152.19.254.81: icmp_seq=1 ttl=242 time=60.8 ms | | 64 bytes from 152.19.254.81: icmp_seq=2 ttl=242 time=59.9 ms | | 64 bytes from 152.19.254.81: icmp_seq=3 ttl=242 time=61.8 ms | | 64 bytes from 152.19.254.81: icmp_seq=4 ttl=242 time=64.1 ms | | 64 bytes from 152.19.254.81: icmp_seq=5 ttl=242 time=62.8 ms | | 64 bytes from 152.19.254.81: icmp_seq=6 ttl=242 time=62.6 ms | | 64 bytes from 152.19.254.81: icmp_seq=7 ttl=242 time=60.3 ms | | 64 bytes from 152.19.254.81: icmp_seq=8 ttl=242 time=61.1 ms | | 64 bytes from 152.19.254.81: icmp_seq=9 ttl=242 time=60.9 ms | | 64 bytes from 152.19.254.81: icmp_seq=10 ttl=242 time=62.4 ms | | 64 bytes from 152.19.254.81: icmp_seq=11 ttl=242 time=63.0 ms | | | | --- www.tldp.org ping statistics --- | | 12 packets transmitted, 12 packets received, 0% packet loss | | round-trip min/avg/max = 59.9/61.8/64.1 ms | | | | | +---------------------------------------------------------------------------+ The above example is pretty normal from here. (You probably have a very different route to this site, and your results may thus be quite different.) Apparently no serious underlying problems that would slow me down. The below example reveals a problem: +---------------------------------------------------------------------------+ | $ ping -c 20 -n www.debian.org | | | | PING www.debian.org (198.186.203.20) : 56(84) bytes of data. | | 64 bytes from 198.186.203.20: icmp_seq=0 ttl=241 time=404.9 ms | | 64 bytes from 198.186.203.20: icmp_seq=1 ttl=241 time=394.9 ms | | 64 bytes from 198.186.203.20: icmp_seq=2 ttl=241 time=402.1 ms | | 64 bytes from 198.186.203.20: icmp_seq=4 ttl=241 time=2870.3 ms | | 64 bytes from 198.186.203.20: icmp_seq=7 ttl=241 time=126.9 ms | | 64 bytes from 198.186.203.20: icmp_seq=12 ttl=241 time=88.3 ms | | 64 bytes from 198.186.203.20: icmp_seq=13 ttl=241 time=87.9 ms | | 64 bytes from 198.186.203.20: icmp_seq=14 ttl=241 time=87.7 ms | | 64 bytes from 198.186.203.20: icmp_seq=15 ttl=241 time=85.0 ms | | 64 bytes from 198.186.203.20: icmp_seq=16 ttl=241 time=84.5 ms | | 64 bytes from 198.186.203.20: icmp_seq=17 ttl=241 time=90.7 ms | | 64 bytes from 198.186.203.20: icmp_seq=18 ttl=241 time=87.3 ms | | 64 bytes from 198.186.203.20: icmp_seq=19 ttl=241 time=87.6 ms | | | | --- www.debian.org ping statistics --- | | 20 packets transmitted, 13 packets received, 35% packet loss | | round-trip min/avg/max = 84.5/376.7/2870.3 ms | | | | | +---------------------------------------------------------------------------+ High packet loss at 35%, and some really slow roundtrip times in there as well. A little digging on this showed that it was a backbone router 13 hops into the traceroute that was the problem. While making this site really slow from here, it would only effect those routes that happen to hit that same router. Now what would really hurt us is if something similar happens with a router that we tend to go through consistently. Like our gateway, or maybe the second hop router too. Find these with traceroute, by just picking a random site: +-----------------------------------------------------------------------------+ | $ traceroute www.bellsouth.net | | | | traceroute to bellsouth.net (192.223.22.134), 30 hops max, 38 byte packets | | 1 adsl-78-196-1.sdf.bellsouth.net (216.78.196.1) 14.86ms 7.96ms 12.59ms | | 2 205.152.133.65 (205.152.133.65) 7.90ms 8.12ms 7.73ms | | 3 205.152.133.248 (205.152.133.248) 8.99ms 8.52ms 8.17ms | | 4 Hssi4-1-0.GW1.IND1.ALTER.NET (157.130.100.153) 11.36ms 11.48ms 11.72ms | | 5 125.ATM3-0.XR2.CHI4.ALTER.NET (146.188.208.106) 14.46ms 14.23ms 14.40ms | | 6 194.at-1-0-0.TR2.CHI2.ALTER.NET (152.63.65.66) 16.48ms 15.69ms 16.37ms | | 7 126.at-5-1-0.TR2.ATL5.ALTER.NET (152.63.0.213) 65.66ms 66.18ms 66.39ms | | 8 296.ATM6-0.XR2.ATL1.ALTER.NET (152.63.81.37) 66.86ms 66.42ms 66.40ms | | 9 194.ATM8-0.GW1.ATL3.ALTER.NET (146.188.233.53) 67.87ms 68.69ms 69.63ms | | 10 IMVI-gw.customer.ALTER.NET (157.130.69.202) 69.88ms 69.25ms 69.35ms | | 11 www.bellsouth.net (192.223.22.134) 68.74ms 69.06ms 68.05ms | | | | | +-----------------------------------------------------------------------------+ The first hop is the gateway. In fact, for me the first two hops are always the same, and the first three or four are often the same. So a problem with any of these may cause a problem anywhere I go. (The specifics of your own situation may be a little different than this example.) A "normal" gateway ping (normal for me!): +---------------------------------------------------------------------------+ | | | $ ping -c 12 -n 216.78.196.1 | | | | PING 216.78.196.1 (216.78.196.1) : 56(84) bytes of data. | | 64 bytes from 216.78.196.1: icmp_seq=0 ttl=64 time=14.6 ms | | 64 bytes from 216.78.196.1: icmp_seq=1 ttl=64 time=15.4 ms | | 64 bytes from 216.78.196.1: icmp_seq=2 ttl=64 time=15.0 ms | | 64 bytes from 216.78.196.1: icmp_seq=3 ttl=64 time=15.2 ms | | 64 bytes from 216.78.196.1: icmp_seq=4 ttl=64 time=14.9 ms | | 64 bytes from 216.78.196.1: icmp_seq=5 ttl=64 time=15.3 ms | | 64 bytes from 216.78.196.1: icmp_seq=6 ttl=64 time=15.4 ms | | 64 bytes from 216.78.196.1: icmp_seq=7 ttl=64 time=15.0 ms | | 64 bytes from 216.78.196.1: icmp_seq=8 ttl=64 time=14.7 ms | | 64 bytes from 216.78.196.1: icmp_seq=9 ttl=64 time=14.9 ms | | 64 bytes from 216.78.196.1: icmp_seq=10 ttl=64 time=16.2 ms | | 64 bytes from 216.78.196.1: icmp_seq=11 ttl=64 time=14.8 ms | | | | --- 216.78.196.1 ping statistics --- | | 12 packets transmitted, 12 packets received, 0% packet loss | | round-trip min/avg/max = 14.6/15.1/16.2 ms | | | | | +---------------------------------------------------------------------------+ And a problem with the same gateway on a different day: +---------------------------------------------------------------------------+ | $ ping -c 12 -n 216.78.196.1 | | | | PING 216.78.196.1 (216.78.196.1) : 56(84) bytes of data. | | 64 bytes from 216.78.196.1: icmp_seq=0 ttl=64 time=20.5 ms | | 64 bytes from 216.78.196.1: icmp_seq=3 ttl=64 time=22.0 ms | | 64 bytes from 216.78.196.1: icmp_seq=4 ttl=64 time=21.8 ms | | 64 bytes from 216.78.196.1: icmp_seq=6 ttl=64 time=32.0 ms | | 64 bytes from 216.78.196.1: icmp_seq=8 ttl=64 time=21.7 ms | | 64 bytes from 216.78.196.1: icmp_seq=9 ttl=64 time=42.0 ms | | 64 bytes from 216.78.196.1: icmp_seq=10 ttl=64 time=26.8 ms | | | | --- adsl-78-196-1.sdf.bellsouth.net ping statistics --- | | 12 packets transmitted, 7 packets received, 41% packet loss | | round-trip min/avg/max = 20.5/25.6/42.0 ms | | | | | +---------------------------------------------------------------------------+ 41% packet loss is very high, to the point where many services, like HTTP, come to a screeching halt. Those services that were working, were working very, very slowly. It's a little tempting on this last real-life example to think this gateway router is acting up. But, as it turned out, this was the result of a problem in the DSLAM/ATM segment of the telco's network. So any first hop problem with packet loss or high latency, may actually be the result of something occurring before the first hop. We just don't have the tools to isolate where it is starting well enough. Packet loss can be a telco problem, just as much as an ISP/NSP problem. Or conceivably, even a modem problem. In which case try resetting the modem by power cycling and by unplugging/replugging the DSL cable (from the wall jack). It is also quite possible for the modem itself to cause packet loss. The fix here is to power cycle the modem, and resync by unplugging the DSL connection for 30 seconds or so. In fact, any part of the connection can be a source of packet loss -- modem, DSLAM, ATM network, etc. If you do find a problem within your ISP's network, it's time to report the problem to tech support. ----------------------------------------------------------------------------- 5.4.1. Miscellaneous Network Problems Some odds and ends:   * Some Web pages won't load. For PPPoX users, the MTU value could be too high. This will cause packet fragmentation, and likely will cause misbehaving routers to fail to route your requests per Path MTU Discovery specs.The correct ppp0 device setting should be a maximum of 1492, but actually it needs to be 8 bytes less than any router you pass through on the way to the site. If a router somewhere is misconfigured, you could have problems. Try experimenting with lower MTU values. Any LAN hosts behind the connection, may even need to be even lower -- 1452 or maybe even 1412. If ECN is enabled, it might also cause this problem. Cured with "echo 0 > cat /proc/sys/net/ipv4/tcp_ecn".   * Ping by IP address works, but not hostname. The nameservers are not being setup correctly in /etc/resolv.conf. Check your client's (DHCP, PPPoX) documentation or enter these manually with a text editor. Get the correct DNS server addresses from your ISP.   * PPPoX disconnects. Unfortunately, PPPoX is more likely to drop connections than routed or bridged networks. PPP can be sensitive to any line condition which results in a temporary interruption of the connection. This may not be completely solvable, depending on what and where the problem is. Check your client's docs for "LCP Keepalive" features. There generally is a timeout on each end of the connection if the other end does not respond. If worse comes to worse, set up a cron job to watch the connection, and re-establish if necessary. Some providers may also be enforcing idle timeout disconnects. This is a different issue altogether, since it is deliberate. The solution here is to switch providers if you can.   * Interface or route goes down for no reason. If ifconfig and/or route show the interface and/or route has automagically disappeared, it may be due to a buggy NIC driver.   * Sub-par performance, or errors with the interface (e.g. eth0), may possibly be caused by a duplex mismatch. This would be most apparent when maxing out the connection. Most DSL modems and routers typically are set to half duplex, and your NIC that interfaces with the modem should be set likewise. ----------------------------------------------------------------------------- 5.5. Measuring Throughput One of the first things most of us do is check our speeds to make sure we aren't getting short changed, and that our system is up to snuff. Doing this accurately is easier said than done however. First, remember you are losing 10-20% right off the top due to networking protocol overhead. Just how much is "lost" here depends on your provider's network architecture, where and how you are measuring this and other considerations. Most of us may wind up being closer to 20% than 10%. Then, any time you hit the Internet, there is some slight degradation of performance with each hop you take. Now this may not amount to much, as long as you are not taking too many hops and all the components -- your system, your ISP's network, your ISP's upstream provider, and the destination itself -- are all working like well oiled machines. But there's the rub -- how do you really know with so many variables in the mix? One flaky interface, on one router, on one hop along the path, may cause misleading results. Your absolute max speed is going to be at your point of connection to your ISP -- the ISP's gateway. It can only go downhill from there, not up! So the ideal test is as close to home as possible. This eliminates as many unknown variables as possible. If your ISP has a local ftp server, this is an excellent place to run your own tests. (Run a traceroute though just to see how local it really is.) If your ISP does not have this, look for an ftp site that is close -- the fewer the hops, the better. And look for one that isn't too busy, or you will get misleading results. Find a large file -- like 10 Megs -- and time the download. Try this over several days, and at different times of day. The server, and the backbone, are going to be busier at certain times of day, which can skew results and you want to eliminate these variables as much as possible. Your provider cannot compensate for heavy backbone traffic, backbone bottlenecks, slow or busy servers, etc. There are many test sites scattered around the web. Some are better than others, but take these with a grain of salt. There are just too many variables for these tests to reliably give you an accurate snapshot of your connection and throughput. They may give you a general picture of whether you are in the ballpark of where you think you should be or not. One good speed test is [http://www.dslreports.com/stest/0] http://www.dslreports.com/stest/ 0. Another test is [http://speedtest.mybc.com/] http://speedtest.mybc.com/ (both are Java). I find these to be better than some of the others out there. Now keeping in mind that we are limited by the ~10-20% networking overhead rule, here is an example. My speed is capped at 1472 Kbps sync rate. Minus the ~15% is 1275 Kbps. My sync rate is known to be good and my distance to the CO is about 11,000 Ft, which is close enough that I should be able to hit my real world maximum throughput of 1275 Kbps or roughly 1.2-1.3 Mbps -- all other things being equal. From dslreports.com speed test: +---------------------------------------------------------------------------+ | Test running..Downloaded 60900bytes in 5918ms | | Downloaded 696000bytes in 4914ms | | First guess is 1133kbps | | fairly fast line - now test 2mb | | Downloaded 1679100bytes in 11090ms | | Upload got ok 1 bytes uploaded | | Uploaded 1bytes in 211ms | | Upload got ok 1 bytes uploaded | | Uploaded 1bytes in 205ms | | Upload got ok 1 bytes uploaded | | Uploaded 1bytes in 207ms | | Upload got ok 50000 bytes uploaded | | Uploaded 50000bytes in 2065ms | | Upload got ok 100000 bytes uploaded | | Uploaded 100000bytes in 3911ms | | | | ** Speed 1211(down)/215(up) kbps ** | | (At least 24 times faster than a 56k modem) | | Finish. | | | | | +---------------------------------------------------------------------------+ 1.211 Mbps is probably about as good as I can realistically expect based on my service. There is no reason for me to go troubleshooting or looking for tweaks. Big Caution: my ISP uses a caching proxy server for web pages. This is a big equalizer for these kinds of web based tests. Without that, I surely would have been significantly slower on this test. The effect of the proxy is that you are actually testing throughput from the proxy -- NOT the test site. Just FYI. Another note: at the same time I tried another test site and was consistently getting 600-700 Kbps. So YMMV with these tests. (Usually I get the same on each, more or less.) Timing a large ftp download from two different sites, I calculated about 1.25 Mbps. ----------------------------------------------------------------------------- 6. Appendix: DSL Overview DSL is a telephone loop technology that uses existing copper phones lines, and provides a dedicated, high speed Internet connection. One of the big advantages of some DSLs (notably ADSL), are that they can co-exist on the same line with a traditional voice service such as "POTS" (Plain Old Telephone Service), and even ISDN. This is accomplished by utilizing different frequency ranges above the voice range (voice is up to 4KHz). Essentially, this gives two lines in one: one for voice, and one for Internet connectivity. When all is working normally, there should be no interference between the two "lines". This gives DSL a potentially broad consumer base, and helps minimize costs for service providers. DSL is positioned for the Home and Small Office (SOHO) market that is looking for high speed Internet access at reasonable prices. Since it also typically provides dedicated, "always on" access, it can be used for interconnecting low to mid range bandwidth servers, and provides a great access solution for small LANs. It is also great for those Linux power users that just want a fat pipe :-). Phone companies, and other independent telecommunications providers (CLECs), are now deploying DSL to stay ahead of the Cable companies -- the main consumer and SOHO competition for DSL providers. This mad rush to get "a piece of the pie", is bringing much competition (a good thing!), much diversity, and some confusion, into the consumer market. The DSL provider (often, but not always, the phone company) will provide the DSL infrastructure. This would include your line, the DSLAM, and physical connection to the outside world. From there it is typically picked up by an ISP, who provides the traditional Internet services. Consumer DSL plans are typically "best effort" services. While boasting speeds approaching T1, and even surpassing that in some cases, it is not necessarily as reliable as T1 however. Business class DSL offers more reliability at a higher cost than consumer plans, and is a good compromise where both reliability and bandwidth are at a premium. All in all, the cost of DSL compared to traditional telco services, such as T1, is attractive and substantially more affordable for home and small business users. DSL providers often do not have service contracts for home users, while business class DSL services typically do include similar SLAs (Service Level Agreements) to that offered for a T1 line. The downside is that DSL is not available everywhere. Availability, and available bit rate (speed), are purely a function of where you live, where the telco has installed the prerequisite hardware, how far you are from the DSLAM/CO, and the quality of your phone line (loop). Not all loops are created equal, unfortunately. The primary limitation is distance. ----------------------------------------------------------------------------- 6.1. The DSL Family   * ADSL Asymmetric Digital Subscriber Loop currently supports downstream rates up to 8 Mbps, and upstream of 1024 Kbps, hence the "asymmetric". ADSL is far and away the most widely deployed consumer DSL, and was specifically developed for the home and SOHO markets. The higher downstream rates lends itself to those not running serious servers -- at least anything more than a small, personal web site. ADSL is capable of sharing data with a POTS (or ISDN) voice line, so an additional line is not required. A big selling point. ADSL, like other DSLs, is limited by distance. 18,000 ft (5.5 km) is a typical cut-off point for telcos. ADSL does typically require either a splitter or filters to isolate the DSL signal from POTS. Sometimes referred to as "full rate" ADSL in order to differentiate it from G.Lite DSL. There are two line encodings for ADSL: DMT and CAP. DMT (a.k.a. Alcatel compatible) has won the standards battle and is now the standard and the most common. Also, note that modems must be compatible with the encoding. In other words, a CAP modem will not work with a DMT service, and vice versa. Also, ISDN requires "modems" (NTs), and related hardware such as filters, that are specific to that type of line since the signal on the line is very different for POTS and ISDN.   * G.Lite G.Lite is sometimes referred to as "DSL Lite", "Universal DSL" or "splitterless ADSL", is a slower version of ADSL that requires no splitters or filters. G.lite uses a "fast retrain" technique to negate the various signal disturbances caused by normal POTS usage. Currently G.Lite supports speeds up to 1.5 Mbps/512 Kbps, and at one time was expected to become the dominant consumer DSL service. As of this writing, it is not nearly as wide spread as "full rate" ADSL however.   * SDSL Single-pair Digital Subscriber Loop, or also sometimes referred to as "Symmetric Digital Subscriber Loop" since it is indeed symmetric with a current maximum rate of 1.5 Mbps/1.5 Mbps. SDSL requires a dedicated line, and thus true SDSL is not as readily adaptable to the consumer market as ADSL. SDSL also uses a 2B1Q encoding (same as ISDN and some T1) which is considered more robust than the DMT or CAP encoding of ADSL. True SDSL is generally considered more of a server quality DSL, and is typically marketed as a business class service. It is worth noting that some providers may be promoting a "SDSL" service that is really ADSL pinched so that upstream/downstream are the same. Or vice versa, SDSL with asymmetrically allocated bandwidth. Wasn't all this confusing enough already?   * IDSL ISDN Digital Subscriber Loop, 144 Kbps/144 Kbps is really a new and improved ISDN from Lucent Technologies and uses the same 2B1Q line encoding as ISDN, SDSL and others. IDSL does require a dedicated line however. The benefits are that it is an "always on" technology, like other DSLs, and provides an additional 16 Kbps over traditional ISDN. It is being marketed by some DSL providers as a low end bit rate option, where line quality is not sufficient for higher speeds such as that of ADSL. Ironically, IDSL is generally priced significantly higher than ADSL.   * RADSL Rate Adaptive Digital Subscriber Loop was developed by Westell and has a potential of 2.2 Mbps downstream and 1.0 Mbps upstream. What makes RADSL more flexible is that the sync rate can be dynamically adjusted up or down as line conditions change. This makes it more of a viable alternative where line conditions are marginal due to distance or other factors. In many respects, RADSL is an enhanced ADSL to meet a more diverse set of line conditions. Like ADSL, RADSL can piggyback on the POTS line. RADSL does not require any splitters or filters.   * HDSL High bit-rate DSL was one of earliest versions of DSL. HDSL requires multiple, dedicated wire pairs, and is symmetric at 1.5 Mbps/1.5 Mbps (the speed actually depends on number of wire pairs used). Not a viable alternative for the consumer or SOHO markets.   * VDSL Very high rate Digital Subscriber Loop is a DSL still in development with a current downstream capacity of 52.8 Mbps, and upstream of 2.3 Mbps. At this time, VDSL is limited to very short loop lengths, and is not yet a viable alternative. It may find application where there is fiber to the neighborhood, and thus the copper loop segment is relatively short.   * UDSL Unidirectional Digital Subscriber Loop is a proposal from Europe that is not yet in use.   * G.SHDSL The standards for G.SHDSL have just recently been finalized. SHDSL includes many enhancements, including better reach, better rate adaptation, and better upstream bandwidth. G.SHDSL is symmetric with speeds up to 2.3 Mbps, and will more than likely be marketed as an SDSL alternative. ----------------------------------------------------------------------------- 6.2. The DSLAM This technology is made possible by the placement of DSLAMs, or Digital Subscriber Loop Access Multiplexers, from such suppliers as [http:// www.alcatel.com] Alcatel and [http://www.cisco.com/warp/public/cc/pd/si/6000/ prodlit/c6160_ds.htm] Cisco, in the telco's Central Office, or sometimes a suitable remote location. DSLAMs come in various shapes and sizes, and are the one, single complex and costly component of a DSL connection. When a qualified phone line is connected to a modem at the user's end of the loop, a high speed digital connection is established, typically over ATM, or sometimes frame relay. The DSLAM splits the signal back into separate voice and data channels