# Configuration file for PPP, using PPP over Ethernet (PPPOE)
# to connect to a DSL provider.
#
# This configuration file is automatically generated by the Vyatta
# configuration templates.  Please do not manually edit it.

# Default parameters not set by Vyatta templates:
#
# Require peer to provide the local IP address if it is not
# specified explicitly in the config file.
noipdefault

# Don't show the password in logfiles:
hide-password

# Standard Link Control Protocol (LCP) parameters:
lcp-echo-interval 20
lcp-echo-failure 3

# RFC 2516, paragraph 7 mandates that the following options MUST NOT be
# requested and MUST be rejected if requested by the peer:
# Address-and-Control-Field-Compression (ACFC)
noaccomp

# Asynchronous-Control-Character-Map (ACCM)
default-asyncmap

# Override any connect script that may have been set in /etc/ppp/options.
connect /bin/true

# Don't try to authenticate the remote node
noauth

plugin rp-pppoe.so
debug

# Parameters set or changed by the Vyatta templates go here:

# Use the serial port called ttyname to communicate with the peer.  If
# ttyname  does  not  begin  with  a  slash (/), the string "/dev/" is
# prepended to ttyname to form the name of the device to open.  If  no
# device  name  is  given, or if the name of the terminal connected to
# the standard input is given, pppd will use that terminal,  and  will
# not  fork  to put itself in the background.  A value for this option
# from a privileged source cannot be overridden  by  a  non-privileged
# user.
[% cfg.item('interface') %]

ifname [% cfg.item('pppname') %]

# Provides  an  extra  parameter  to  the ip-up, ip-pre-up and ip-down
# scripts.  If this option is given, the string supplied is  given  as
# the 6th parameter to those scripts.
ipparam pppoe-[% cfg.item('pppname') %]

[% IF cfg.item('local-address') or cfg.item('remote-address') %]
[% IF cfg.item('local-address') != '*:*' and cfg.item('remote-address') != '*:*' %]
### IPv4 Section
# Set the local and/or remote interface IP addresses.   Either  one  may  be
# omitted.  The IP addresses can be specified with a host name or in decimal
# dot notation (e.g. 150.234.56.78).   The  default  local  address  is  the
# (first) IP address of the system (unless the noipdefault option is given).
# The remote address will be obtained from the peer if not specified in  any
# option.   Thus,  in simple cases, this option is not required.  If a local
# and/or remote IP address is specified with  this  option,  pppd  will  not
# accept a different value from the peer in the IPCP negotiation, unless the
# ipcp-accept-local and/or ipcp-accept-remote  options  are  given,  respec‐
# tively.
[% cfg.item('local-address') %][% IF cfg.item('remote-address') %]:[% cfg.item('remote-address') %][% END %]
[% END %]
[% END %]

[% IF cfg.item('local-address') or cfg.item('remote-address') %]
[% IF cfg.item('local-address') == '*:*' or cfg.item('remote-address') == '*:*' %]
### IPv6 Section
# Set the local and/or remote 64-bit interface identifier. Either one may be
# omitted. The identifier must be specified in standard  ASCII  notation  of
# IPv6  addresses  (e.g.  ::dead:beef).  If  the ipv6cp-use-ipaddr option is
# given, the local identifier is the local IPv4  address  (see  above).   On
# systems which supports a unique persistent id, such as EUI-48 derived from
# the Ethernet MAC address, ipv6cp-use-persistent  option  can  be  used  to
# replace the ipv6 <local>,<remote> option. Otherwise the identifier is ran‐
# domized.
ipv6 [% cfg.item('local-address') %][% IF cfg.item('remote-address') %],[% cfg.item('remote-address') %][% END %]
[% END %]
[% END %]

[% IF cfg.item('user-id') %]
# Sets  the  name  used  for  authenticating the local system to the peer to name.
user [% cfg.item('user-d') %]
[% END %]

[% IF cfg.item('mtu') %]
# Set  the MTU [Maximum Transmit Unit] value to n.  Unless the peer requests
# a smaller value via MRU negotiation, pppd will  request  that  the  kernel
# networking  code send data packets of no more than n bytes through the PPP
# network interface.  Note that for the IPv6 protocol, the MTU  must  be  at
# least 1280.
mtu [% cfg.item('mtu') %]
[% END %]

[% IF cfg.item('default-route') %]
# Add a default route to the system routing tables, using the  peer  as  the
# gateway,  when  IPCP negotiation is successfully completed.  This entry is
# removed when the PPP connection is broken.  This option is  privileged  if
# the nodefaultroute option has been specified.
defaultroute
[% ELSE %]
# Don't try to proxy ARP for the remote endpoint. User can set proxy
# arp entries up manually if they wish.  More importantly, having
# the "proxyarp" parameter set disables the "defaultroute" option.
noproxyarp
[% END %]

[% IF cfg.item('service-name') %]
# Set the assumed name of the remote system for authentication  purposes  to
# name
rp_pppoe_service [% cfg.item('service-name') %]
[% END %]

[% IF cfg.item('name-server') %]
# Ask the peer for up to 2  DNS  server  addresses.   The
# addresses  supplied  by the peer (if any) are passed to
# the /etc/ppp/ip-up script in the environment  variables
# DNS1  and DNS2, and the environment variable USEPEERDNS
# will be set to 1.  In addition,  pppd  will  create  an
# /var/run/ppp/resolv.conf  file  containing  one  or two
# nameserver lines with the address(es) supplied  by  the
# peer.
usepeerdns
[% END %]

[% IF cfg.item('idle-timeout') %]
# Specifies that pppd should disconnect if  the  link  is
# idle  for  n  seconds.   The  link is idle when no data
# packets (i.e. IP packets) are being sent  or  received.
# Note:  it  is not advisable to use this option with the
# persist option  without  the  demand  option.   If  the
# active-filter  option  is given, data packets which are
# rejected by the specified activity filter also count as
# the link being idle
idle [% cfg.item('idle-timeout') %]
[% END %]

[% IF cfg.item('logfile') %]
# Append log messages to the file filename (as well as sending the log  mes‐
# sages  to syslog).  The file is opened with the privileges of the user who
# invoked pppd, in append mode.
logfile [% cfg.item('logfile') %]
[% END %]

[% IF cfg.item('connect-on-demand') %]
# Initiate the link only on demand, i.e. when data traf‐
# fic is present.   With  this  option,  the  remote  IP
# address  may  be  specified by the user on the command
# line or in an options file, or if not, pppd  will  use
# an arbitrary address in the 10.x.x.x range.  Pppd will
# initially configure the interface and enable it for IP
# traffic  without connecting to the peer.  When traffic
# is available, pppd will connect to the peer  and  per‐
# form  negotiation,  authentication, etc.  When this is
# completed, pppd will  commence  passing  data  packets
# (i.e., IP packets) across the link.

# The demand option implies the persist option.  If this
# behaviour is not desired,  use  the  nopersist  option
# after the demand option.  The idle and holdoff options
# are also useful in conjunction with the demand option.
demand
[% END %]

[% IF cfg.item('chap-user') %]
# Chap-resources configured for this connection
user [% cfg.item('chap-user') %]
[% END %]
