The term broadband vaguely refers to connections faster than a conventional modem link. For most users, this means a DSL or cable modem connection. One of the most frustrating things about broadband providers is that they don't tend to tell you what kind of technology they use.
Most DSL or cable modems have an Ethernet port, requiring you to have an Ethernet interface on your computer, and as you saw in Section 5.4, it's not hard to set up an Ethernet interface (in theory, at least). Unfortunately, not all providers send straight IP from the Ethernet port, so things can get more complicated.
For the most part, your setup depends on the kind of broadband connection you have. These rules generally apply:
Cable modem These devices usually speak straight IP, and you can do the network configuration with DHCP. Plug your Linux machine into the cable modem and look at Section 5.7. If you have a static (fixed) IP address, you should be able to set up the connection by hand as described in Section 5.4. You may need to perform some configuration on the cable modem before it will connect to the outside world, but that's usually done with a Web browser.
DSL with a dynamic IP address DSL providers usually send PPP over Ethernet (PPPoE) through their devices. This is the most common kind of DSL connection, and as luck would have it, it's the most complicated. See Section 5.9.2 for more information on PPPoE.
DSL with a static IP address Some DSL providers talk straight IP over Ethernet if you have a fixed IP address. In this case, you can use the manual configuration described in Section 5.4.
The preceding rules are based on the hardware available to service providers, but your provider may be different. Telephone companies prefer PPPoE because it's easier for them to monitor and authenticate, but cable companies tend not to care. You can probably determine the type of connection the ISP provides by looking at the setup instructions for Windows. If you see anything in the Windows screenshots with "pppoe" in the name, it's probably a PPP-over-Ethernet connection.
If a broadband service forces you to use a modem or another device that doesn't have an Ethernet port, you will probably have a very difficult time getting it to work under Linux. Evaluate alternative ISPs.
Don't expect your ISP's technical support to be very helpful to anyone running Unix. It doesn't matter that they're using technology that came straight from Unix machines — you're a fringe user, meaning that you have to figure it out yourself.
Before you connect your Linux machine directly to a broadband connection, you need to ask yourself this very important question: Is it really worth it?
The alternative is to purchase a small router. These very inexpensive devices not only speak straight IP and PPPoE, but often include a multi-port 10/100Base-T Ethernet switch and a wireless access point. They can do network address translation, route packets from the outside world to ports on their internal networks, and more. (Sometimes they even have pretty lights that serve as eye candy when you have nothing else to do.)
Routers are especially attractive for Linux users with PPPoE connections. PPPoE is a hassle, because you have to worry about several configuration files and daemons, not to mention possible trouble when upgrading. If you put a router between a DSL connection and your Linux machine, you can configure your machine's IP address statically or with DHCP.
You can also build a network with a router. Their built-in switches not only share the broadband connection with all of the machines on the network, but also link those machines with each other.
Of course, a Linux machine with two Ethernet cards and a hub or switch can do anything that a router can do. In fact, you have much finer control over a full-blown Linux machine acting as a router. However, very few people actually have a use for the fancy tricks you get with Linux, and the cost of a router is not much more than the cost of a switch.
If you decide to purchase a router, skip to Section 5.10 for Ethernet networking details. Otherwise, if you are using PPPoE to connect to your ISP and you want to do everything on your Linux machine, continue reading.
PPPoE support in Linux is still in a somewhat experimental stage. To use it, get the rp-pppoe package from http://www.roaringpenguin.com/ to extend pppd to full Asymmetric Digital Subscriber Line (ADSL) support. You also need a reasonably recent version of pppd, such as 2.4.1. All of this might come with your distribution, but as with most new software, it's a good idea to compile your own set from source code (see Chapter 9).
The easiest way to set up rp-pppoe is to run adsl-setup as root. This creates appropriate /etc/ppp/pppoe.conf and /etc/ppp/pap-secrets files for your machine. If you read through pppoe.conf, you'll find only two critical settings:
Most computers have only one Ethernet card, so you'll probably use eth0 as the ETH setting. USER is your username at your ISP. This must match the settings in pap-secrets (see Section 5.8.4 for information on PAP).
To manually start the connection, run this command:
After you verify that everything works correctly, you can put adsl-start in an init.d script to activate the connection at boot time. adsl-start is a shell script that processes pppoe.conf and then runs asdl-connect, which in turn runs a big, ugly pppd command line. In principle, you could put all of this into an options file, but it is almost certainly not worth the hassle.
To stop the connection, use adsl-stop.
Back up your /etc/resolv.conf if you put any kind of work into it, because adsl-connect may replace your DNS settings.