The following describes how to set up PPP over ATM (PPPoA). PPPoA is a popular choice among European DSL providers.
The mpd application can be used to connect to a variety of services, in particular PPTP services. It can be installed using the net/mpd5 package or port. Many ADSL modems require that a PPTP tunnel is created between the modem and computer.
Once installed, configure mpd
to suit the provider's settings. The port places a set of
sample configuration files which are well documented in
/usr/local/etc/mpd/
. A complete guide to
configure mpd is available in HTML
format in /usr/ports/share/doc/mpd/
.
Here is a sample configuration for connecting to an ADSL
service with mpd. The
configuration is spread over two files, first the
mpd.conf
:
This example mpd.conf
only works
with mpd 4.x.
default: load adsl adsl: new -i ng0 adsl adsl set bundle authnameusername
set bundle passwordpassword
set bundle disable multilink set link no pap acfcomp protocomp set link disable chap set link accept chap set link keep-alive 30 10 set ipcp no vjcomp set ipcp ranges 0.0.0.0/0 0.0.0.0/0 set iface route default set iface disable on-demand set iface enable proxy-arp set iface idle 0 open
Information about the link, or links, to establish is found
in mpd.links
. An example
mpd.links
to accompany the above example
is given beneath:
adsl: set link type pptp set pptp mode active set pptp enable originate outcall set pptp self10.0.0.1
set pptp peer10.0.0.138
The IP address of FreeBSD computer running mpd. | |
The IP address of the ADSL modem.
The Alcatel SpeedTouch™ Home defaults to |
It is possible to initialize the connection easily by
issuing the following command as
root
:
#
mpd -b
adsl
To view the status of the connection:
%
ifconfig
ng0: flags=88d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST> mtu 1500 inet 216.136.204.117 --> 204.152.186.171 netmask 0xffffffffng0
Using mpd is the recommended way to connect to an ADSL service with FreeBSD.
It is also possible to use FreeBSD to connect to other PPPoA services using net/pptpclient.
To use net/pptpclient
to connect to a DSL service, install the port or package, then
edit /etc/ppp/ppp.conf
. An example section
of ppp.conf
is given below. For further
information on ppp.conf
options consult
ppp(8).
adsl: set log phase chat lcp ipcp ccp tun command set timeout 0 enable dns set authnameusername
set authkeypassword
set ifaddr 0 0 add default HISADDR
Since the account's password is added to
ppp.conf
in plain text form, make sure
nobody can read the contents of this file:
#
chown root:wheel /etc/ppp/ppp.conf
#
chmod 600 /etc/ppp/ppp.conf
This will open a tunnel for a PPP
session to the DSL router. Ethernet DSL modems have a
preconfigured LAN IP address to connect to.
In the case of the Alcatel SpeedTouch™ Home, this address is
10.0.0.138
. The
router's documentation should list the address the device
uses. To open the tunnel and start a PPP
session:
#
pptp
address
adsl
If an ampersand (“&”) is added to the end of this command, pptp will return the prompt.
A tun
virtual tunnel device
will be created for interaction between the
pptp and
ppp processes. Once the
prompt is returned, or the
pptp process has confirmed a
connection, examine the tunnel:
%
ifconfig
tun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500 inet 216.136.204.21 --> 204.152.186.171 netmask 0xffffff00 Opened by PID 918tun0
If the connection fails, check the configuration of
the router, which is usually accessible using
a web browser. Also, examine the output of
pptp
and the contents of the
log file,
/var/log/ppp.log
for clues.
All FreeBSD documents are available for download at https://download.freebsd.org/ftp/doc/
Questions that are not answered by the
documentation may be
sent to <freebsd-questions@FreeBSD.org>.
Send questions about this document to <freebsd-doc@FreeBSD.org>.