pkgadd -d . package_name
/etc/ppp/pppoe.if
and put the interface you intend to run pppoe over in it. You don't need to include the "/dev/" so if you want to use iprb0 just have the file say exactly that and nothing more. This is so that when you reboot the pppd init script will know what interface to setup for pppoe (more on this later).touch /reconfigure
shutdown -i6 -g0 -y
ls /dev | grep ppp
grep sppp /etc/name_to_major
sppp 146
sppptun 147
/usr/lib/inet/pppoec
/usr/lib/inet/pppoed
/usr/sbin/sppptun
/usr/bin/pppd
/etc/ppp/peers/isp
. In that file you want to put something along the lines of:
sppptun # what device to use
plugin pppoe.so # initialize the
connect "/usr/lib/inet/pppoec INTERFACE" # connect string
persist # if the connection dies, bring it back up
user "USERNAME" # username
noauth # Do not make the other side authenticate itself
noipdefault # Let them give you what IP they want to give you
noccp # No compression
novj # No compression
noaccomp # No compression
nopcomp # No compression
defaultroute # add an appropriate default route
Where USERNAME is the username for your DSL connection, and INTERFACE is whatever interface you are using (such as hme0 or iprb0). The options above are commented. The "No compression" ones are there because ISP's almost never support such compressions and disabling them all here will prevent the compression module (spppcomp) from being put in the stream and should therefore improve performance. There are a ton of other options that can go in this file. Pretty much anything that you can pass directly to pppd on the command line can be put in your peers file. Check the pppd man page for more info./etc/ppp/chap-secrets
. Ensure that this is NOT world readable (and infact it should have perms 0600), because you're going to put your password in it. Now, open the file, and add a line like this:
"USERNAME" * "PASSWORD"
/etc/ppp/pap-secrets
. Note: If you know which authentication your ISP users, feel free to only create the appropriate file. However, if you don't know, having both files does no harm.sppptun query
INTERFACE:pppoe
INTERFACE:pppoed
/etc/ppp/pppoe.if
before you rebooted?). So assuming you've created the /etc/ppp/pppoe.if
file, you can run /etc/init.d/pppd start
or you can do it manually via:
sppptun plumb pppoed INTERFACE
sppptun plumb pppoe INTERFACE
pppoec
tool. With it's -i option we can have it tell us what services are available on the line:pppoec -i INTERFACE
/usr/bin/pppd call isp
/etc/ppp/peers
. Wait a second and you should be able to see your new sppp0 interface with an ifconfig -a
./etc/init.d/ppplink
and put this in it:
#!/sbin/sh
#
# This script compliments the Sun script /etc/init.d/pppd
# It goes the rest of the way and brings the link up.
# Written by Phil Dibowitz.
#
# This script is provided AS-IS. No warantee of ANY kind implied
# or stated. Use at your own risk.
#
case "$1" in
'start')
if [ ! -x /usr/bin/pppd -o ! -c /dev/sppp ] ; then
# User probably just received the warning
# From Sun's pppd script, don't bother them more
exit 1
fi
if [ -s /usr/sbin/sppptun -a -f /etc/ppp/pppoe.if ] ; then
# If same conditions are satisfied
# Bring up the link
/usr/bin/pppd call isp
fi
;;
'stop')
echo "Taking down PPP link..."
/usr/bin/pkill -x pppd
echo "done"
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
Make sure to replace isp with whatever you called your file in /etc/ppp/peers
. You may of course want to change the script to suit your needs, but this should do for most users. I use this myself. Next, give it the right owner, group and permissions:chmod 744 ppplink
chown root:sys ppplink
cd /etc/rc2.d
ln -s ../init.d/ppplink S48ppplink
/etc/ppp/ip-up
to setup your firewall rules. In that script $1
will be replaced with the interface name.
#!/bin/sh
( cat <<EOF
block in on $1 ipopts
block in on $1 udp port 137 <> 139
...
EOF
) | ipf -f -
/etc/ppp/ip-up
and put something like:ipfstat -io | grep " on $1 " | ipf -rf -
/etc/ppp/ip-down
./etc/ppp/ip-up
and /etc/ppp/ip-down
to set your rules as described above. The other option, if you want to keep your ruleset where it is, you can use the unit
option in your peers file. So if you have three links, you may have three peer files, isp0, isp1, and isp2. In the peer files you would specify unit 0
, unit 1
, and unit 2
respectively. This would ensure that the link specified by isp0 was always sppp0, the link specified by isp1 was sppp1 and so on.../etc/ppp/peers/isp
and change:connect "/usr/lib/inet/pppoec INTERFACE"
connect "/usr/lib/inet/pppoec -v INTERFACE"
debug
pkill pppd
/etc/ppp/connect-errors
to see what happens when you attempt to connect. This should help you track down the problem. I've also included a few problems that I ran into, including a known bug in Sun PPPoE.unrecognized option 'sppptun'
(in /etc/ppp/connect-errors
) when I try to connect.touch /reconfigure
before you reboot, or use the -r option at the OBP (SPARC) or boot options screen (Intel).PPPTUN_SCTL INTERFACE:pppoed: No such process
when I try to connect./etc/rc2.d/S47pppd
script if you have the interface you want listed in /etc/ppp/pppoe.if
. However, you can do it manually via:sppptun plumb pppoed INTERFACE
/usr/lib/inet/pppoec -i INTERFACE
shows seemingly valid information, by connect-errors
shows a lot of connecting information, but then says that it failed./usr/lib/inet/pppoec -i INTEFACE
. There should be something that says Svc
and then has the name of your service there (for example: Svc:"myisp.com"
). If you have more than one Svc
section that's ok, just pick one, usually the first will do. Add whatever that name is to your /etc/ppp/peers/isp
file by changing:connect "/usr/lib/inet/pppoec INTERFACE"
connect "/usr/lib/inet/pppoec INTERFACE SVC_NAME"
Svc
(in the above example it would be myisp.com). This is a known bug in PPPoE (the fact that Sun PPPoE doesn't notice the problem, and send the service name by itself). I've been told by Sun that this should be fixed very soon./etc/init.d/pppd stop
the link goes down but it doesn't unplumb the pppoe and pppoed like it's supposed to./etc/init.d/pppd stop
is pkill -x pppd which will kill any and all processes with the name pppd... but the script your running (/etc/init.d/pppd
) has that name, so not only does the ppp daemon die, but the script also kills itself! Thus it never moves on to do the other things it is supposed to do. To get around this use /etc/rc0.d/K50pppd stop
.ifconfig modinsert
on the PPP link.ifconfig modinsert
with the PPP link you need to specify the plink
option. Most people should be able to ignore this question, but certain applications such as Sun Bandwidth Manager and SunScreen may require this.