Of all the tasks in FreeBSD, setting up a broadband connection is probably one of the easiest. All the various BSDs are built around networking, and most broadband connections operate pretty much like an extended LAN, using the same hardware, often called an "ethernet" connection: something that looks like fat phone lines, which plug into similarly fat-looking sockets which resemble telephone jacks.
If you are paying attention during initial installation, you'll see
an opportunity to setup networking. If you miss it, you can always go
back to the installer by invoking on the commandline (logged in as
root): /usr/sbin/sysinstall
. On the menu that opens, look
for Configuration
, which allows you to make changes after
installation. On the next menu, select Interfaces
, which
brings you to the same window you get when you say "yes" to that option
during the installation.
At this point, you will be presented with a list of interfaces which
FreeBSD has detected. These interfaces are a combination of letter
abbreviations followed by a number, always starting with zero. If there
is only one of each interface, each will have a zero on the end. If
your machine possess anything resembling a serial port, FreeBSD assumes
it can be used for networking, calling it a plip
interface. FreeBSD also assumes you could have a dialup modem on the
machine somewhere, and will offer a ppp
interface, as well
as the older sl
(slip) interface, but you aren't likely to
be using that.
If FreeBSD can detect an ethernet device or wireless device, it will
offer one of a long list of interfaces usually identified by a two- or
three-letter code. For example, a standard wireless card on a laptop
will be labeled as wi0
, and a second one would be
wi1
, and so forth. The "wi" means wireless. Most
of the time, the interface abbreviation will be based on the chipset
used. An example would be the "rl" (lowercase RL) interface,
which indicates RealTek 8129/8139 chips. The list of possible
abbreviations is quite long. If you see anything beyond the standard
interfaces listed previously, FreeBSD has decided it found something it
knows how to use. If you know you have an ethernet device and FreeBSD
doesn't see it, you'll have to research loading the driver module
manually, and there's no room to cover that here. Rest assured, FreeBSD
has a driver for most ethernet hardware.
When you have determined which item is your broadband connection
interface, use the arrow keys to highlight the item and hit
ENTER
. Running through the scripted process,
sysinstall
will ask a series of questions. Unless you
know, you can usually accept the default answer on each one. Most
broadband services require you to use something called DHCP, a protocol
whereby your computer periodically asks the ISP to supply an IP address
it should use when connecting to the Internet. If your broadband
provider says you need DHCP, make sure to answer "yes" to
that question. The last thing you'll see is a gray page with blocks to
be filled.
We discuss elsewhere the
Host
name you should give your machine (see #7 on that
page). To summarize, unless your provider has told you what to use,
it's best to choose something fake, something that is not recognized on
the Internet as a valid machine name. I recommend you choose a simple
four- to eight-letter nickname, followed by a dot, then
local.bsd
. My own machine at this time is
crunch.local.bsd
. Most likely the rest of the blocks will
be filled in, especially if your machine is already plugged into a
working broadband connection. If not, it's okay to leave the other
blocks blank. By using DHCP, most details are taken care of
automatically.
Once you are finished, hit the TAB
key until you
highlight the OK
button and hit ENTER
If you
are still in the initial installation of FreeBSD, the last question
should be asking if you want to bring up that interface. Unless you
have a good reason not to, you'll probably want to say "yes"
to that. You should also see some questions about whether this machine
will serve as a gateway, FTP server, etc. These are outside the scope
of this tutorial, so I'll advise you to say "no" to
everything.
If your connection does not have a router, or a smart modem which serves as a router, you may need a firewall. The firewall you'll use for your broadband service is similar to the dialup firewall with exceptions as noted. Those include the line which identifies your outside interface has to change to match the interface you configured above. For mine, that line near the top of the firewall file looks like this:
oif="vr0"
There is also an extensive discussion in the tutorial about determining if you are using a connection which places you on a virtual LAN, and what the IP range is for that. This matters only when your machine is sharing a connection with Windows machines. By opening your firewall to permit traffic from those within the internal IP range, you aren't actually risking much. However, the noise they make on a LAN will fill up your firewall logs pretty fast.
Halfway down, just above the line which says:
# Allow all local traffic
we need to add a new section:
# Allow all connections within our network.
$fwcmd add allow ip from any to 192.168.1.0/24
$fwcmd add allow ip from 192.168.1.0/24 to any
Please note these numbers are based on information I got from my DSL provider (AT&T Yahoo). Simply ask what internal IP range is used on your connection.
Everything else in your /etc/firewall.conf
should be
the same as the example. To engage the firewall, as root
go to the commandline and type:
/etc/netstart
and hit ENTER
. You should see a response indicating the
firewall has been loaded, with the rules listed in numerical order. At
that point, you should be online and ready to go.
Should you experience trouble connecting, it won't be a disaster to
turn off the firewall for a time by commenting out in your
/etc/rc.conf
file every line that begins with
"firewall" by inserting a hashmark (#) at the beginning.
Rerun the netstart
command as above and try again. Then
join any one of several BSD forums and ask for help. I recommend Screaming Electron, but there
are others.
Join the Conversation
Re: Desktop FreeBSD Part 9: FreeBSD and Broadband
Sysinstall only takes care of the interface. Unless you provide a valid rc.conf/ppp.conf you’re not going to connect to anything.
Re: Desktop FreeBSD Part 9: FreeBSD and Broadband
Thank you, Anonymous. We cover those items elsewhere in the series, this being Part 9.
Re: Desktop FreeBSD Part 9: FreeBSD and Broadband
Re: Desktop FreeBSD Part 9: FreeBSD and Broadband
Due to higher latencies would you suggest any stack tuning for broadband connections? Maybe increase the incoming buffer space?
Re: Desktop FreeBSD Part 9: FreeBSD and Broadband
Generally, no tweaking is needed; things take care of themselves. YMMV, of course.
Re: Desktop FreeBSD Part 9: FreeBSD and Broadband
plip is for parallel port internet, not serial. man plip for more info.
Re: Desktop FreeBSD Part 9: FreeBSD and Broadband
With firewall tuning showed in Desktop FreeBSD Part 2 it is impossible for client to download from ftp server. To help this people should use passive mode.
Re: Desktop FreeBSD Part 9: FreeBSD and Broadband
What about mobile brodaband?
Re: Desktop FreeBSD Part 9: FreeBSD and Broadband
Andrius, this article was written five years ago, and some months behind the date that version of FreeBSD was released. At this point you really need to use a search engine to find out if FreeBSD has drivers for any of the mobile broadband devices commonly used these days.