Copyright © 2000, 2001, 2002, 2003 Paul Hoadley
This document describes how to set up a
FreeBSD system for connection to
ADSL Network. The information is
claimed only to be sufficient—there are bound to be
other ways to do it. The information may not be applicable to
ISPs other than Telstra (Australia).
Table of Contents
Parts of this document assume that the reader is able to recompile a kernel. In particular, if any of the following are true, recompilation of the kernel will be required:
Support for the
device driver has not previously been compiled into the
does have support for this
The system runs a version of
FreeBSD prior to 4.2-RELEASE, in
which case the modifications to the kernel source described
below must be made.
Recompiling a kernel is relatively straightforward, and is
well described by the
FreeBSD Handbook. All of the changes to configuration
files described throughout should obviously be made as the
Telstra does not support the connection of machines
FreeBSD to the
Bigpond ADSL network. In practice, this means
only two things:
You will need a machine that runs one of the supported
systems present when the installer arrives to make the
You will be unable to obtain help from the Bigpond
telephone Helpdesk if a problem arises with your
FreeBSD system. If a problem
occurs and you believe it to be distal to your
ADSL modem, it is often useful to have
available on which you can test the connection while
conversing with the Helpdesk staff.
The hardware used was that supplied by Telstra: an SMC EZ Card 10/100 NIC, and an Alcatel SpeedTouch Home ADSL modem. Telstra has begun to push the use of USB-Ethernet adapters between the machine and the modem. Due to lack of such an adapter to test on, this document does not apply to that hardware.
The appropriate device driver for this
rl. If it is not present, adding
to your kernel configuration file will be sufficient for this PCI card to be found at startup.
Don't recompile the kernel yet—more changes may be made below.
rl0 to the list of network
# You may have more than two interfaces network_interfaces="rl0 lo0" # There is no need to supply rl0 with an IP address ifconfig_rl0="media 10baseT/UTP up"
For comparison, this is the output of
ifconfig rl0 on my machine:
rl0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500 inet6 fe80::2e0:29ff:fe66:305f%rl0 prefixlen 64 scopeid 0x1 ether 00:e0:29:66:30:5f media: Ethernet 10baseT/UTP status: active
Connecting the ADSL modem is simple, but differs from connecting a standard serial modem:
This diagram shows how you would set up a
FreeBSD machine to be the gateway
for your own LAN.
is shown as the internal interface as a demonstration
only. You may have a different NIC
requiring a different device driver. If you don't have a local
network, only the connection to
According to the FreeBSD Handbook, netgraph support no longer needs to be compiled into the kernel. If netgraph support is not found, ppp can load it into the kernel at runtime.
This modification needs to be made only for systems
This section can be safely skipped if you are not interested to know why the source needs to be modified.
A description of the PPP over Ethernet Protocol can be
found in RFC
2516. For some reason, Telstra's Access
Concentrators are sensitive to the order in which
the tags are placed in the initial PADI packet. A simple
modification to the source to swap the order of the
[Host-Uniq] tags is all that is
required. If you're interested in watching the discovery
process fail, and you haven't done this already, run
tcpdump in another window or on another
console. If you're running X
Windows, fire up a spare
xterm with xterm
&. If you're at the console, switch between
virtual terminals using Alt+F1,
Alt+F2 and so on. As
tcpdump -e -i rl0 -s 1500 not ip
Depending on which version of
FreeBSD you are running, and
which city you live in, the process will die at some point
before a session is set up.
Save the appropriate diff from one of the three
links below into the file
/tmp/ng_pppoe.diff. Diffs from the
original 3.4-R, 4.0-R and 4.1.1-R source are linked
here, but Aaron Hill is willing to create diffs for any
other versions that people may require. See the section
on Contacting the Author
Go to the required directory:
Make a backup of the original source:
cp ng_pppoe.c ng_pppoe.c.bak
Apply the diff:
patch < /tmp/ng_pppoe.diff
If any modifications to the kernel configuration file, or to the kernel source itself, have been made as described above, the kernel should now be recompiled as described in the FreeBSD Handbook. The machine should then be rebooted.
sufficient to connect to the Telstra Bigpond
default: set device PPPoE:rl0:bigpond set speed sync set mru 1492 set mtu 1492 set ctsrts off enable lqr add default HISADDR set timeout 0 set redial 0 0 # Network Address Translation (NAT) nat enable yes nat log yes nat same_ports yes nat unregistered_only yes enable dns bigpond: set authname yourname@bigpond set authkey yourpassword
/etc/rc.conf can be modified to
enable automatic connection at boot-time:
ppp_enable="YES" ppp_profile="bigpond" ppp_mode="ddial"
Add the IP addresses of the nameservers that were entered into your Windows or Mac configuration by the installation technician. For example, in Adelaide the numbers entered by my installer were:
nameserver 188.8.131.52 nameserver 184.108.40.206
The numbers for your location may be different.
For testing, use ppp's interactive mode:
This should bring up the familiar interactive prompt:
ppp ON yourhost>
At the prompt, type
and ppp should connect in the standard
ppp ON yourhost>
Ppp ON yourhost> PPp ON yourhost> PPP ON yourhost>
As each successive
ppp changes to a
indicates that the negotiation is progressing. Specifically, the
P indicates that
LCP is complete, the second that
authentication is complete, and the third than an
IP number has been assigned. More information
can be found in man
I found initially that it may take one or two attempts to
make a connection. Since modifying
and getting ppp to run quietly at boot time,
though, I haven't had this problem.
Finally, try to contact a host on Telstra's network, first by number:
PING 220.127.116.11 (18.104.22.168): 56 data bytes 64 bytes from 22.214.171.124: icmp_seq=0 ttl=229 time=49.518 ms 64 bytes from 126.96.36.199: icmp_seq=1 ttl=229 time=49.758 ms 64 bytes from 188.8.131.52: icmp_seq=2 ttl=229 time=50.274 ms ^C --- 184.108.40.206 ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 49.518/49.850/50.274/0.315 ms
And then by name:
PING telstra.com (220.127.116.11): 56 data bytes 64 bytes from 18.104.22.168: icmp_seq=0 ttl=229 time=48.037 ms 64 bytes from 22.214.171.124: icmp_seq=1 ttl=229 time=49.454 ms 64 bytes from 126.96.36.199: icmp_seq=2 ttl=229 time=49.913 ms ^C --- telstra.com ping statistics --- 3 packets transmitted, 3 packets received, 0% packet loss round-trip min/avg/max/stddev = 48.037/49.135/49.913/0.798 ms
Note that some FAQs suggest pinging your nearest neighbour, but Telstra configures some of its hosts not to respond to ICMP requests. Pinging my nearest neighbour makes it look like there is a problem when there's not:
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1454 inet 188.8.131.52 --> 172.31.28.3 netmask 0xff000000 #
PING 172.31.28.3 (172.31.28.3): 56 data bytes 36 bytes from GigabitEthernet4-0.wel-gw1.Perth.telstra.net (184.108.40.206): Destination Host Unreachable Vr HL TOS Len ID Flg off TTL Pro cks Src Dst 4 5 00 5400 075d 0 0000 f5 01 3199 220.127.116.11 172.31.28.3 ^C --- 172.31.28.3 ping statistics --- 1 packets transmitted, 0 packets received, 100% packet loss
This does not indicate a problem.
The author of this document is Paul Hoadley. This
document only describes what I did to get PPPoE
functioning on my
machine. Your mileage may vary. If you notice any errors in this
document, or your experience with Telstra's
ADSL network was vastly different, please
I'm willing to help troubleshoot problems related to the setup described in this document. You will need, however, to send me actual verbatim copies of error messages, as well as actual copies of the files involved (with username and password information deleted). Email claiming that “My rc.conf is just like the one on your page, and it doesn't work” will no longer receive any reply.
Many thanks to Aaron
Hill for comments, and for the original modifications to
the kernel source that were required prior to
FreeBSD 4.2-RELEASE. If you
need to run an older version of
FreeBSD Aaron is willing to make diffs
for any other versions of
people have floating around. Email a copy of your
ng_pppoe.c, and Aaron will send back the
Thanks to Ryan Trainor for information regarding the USB-Ethernet adapters supplied by Telstra.