This is an archive of past FreeBSD releases; it's part of the FreeBSD Documentation Archive.
Contributed by Jim Mock <jim@FreeBSD.org> (from node.to) 10 Jan 2000.
The following describes how to set up PPP over Ethernet, a.k.a, PPPoE.
There are a few requirements that your system will need to meet in order for PPPoE to function properly. They are:
Kernel source for FreeBSD 3.4 or later
ppp from FreeBSD 3.4 or later
You will need to set the following options in your kernel configuration file and then compile a new kernel.
options NETGRAPH
Optionally, you can add
options NETGRAPH_PPPOE
options NETGRAPH_SOCKET
although if this functionality is not available at runtime, ppp will load the relevant modules on demand
Here is an example of a working ppp.conf:
default: # or name_of_service_provider
set device PPPoE:xl1 # replace xl1 with your ethernet device
set mru 1492
set mtu 1492
set authname YOURLOGINNAME
set authkey YOURPASSWORD
set log Phase tun command # you can add more detailed logging if you wish
set dial
set login
set ifaddr 10.0.0.1/0 10.0.0.2/0
add default HISADDR
nat enable yes # if you want to enable nat for your local net
papchap:
set authname YOURLOGINNAME
set authkey YOURPASSWORD
Care should be taken when running PPPoE with the -nat option.
Add the following to your /etc/rc.conf file:
ppp_enable="YES"
ppp_mode="ddial"
ppp_nat="YES"
ppp_profile="default" # or your provider
Contributed by Mário Sérgio Fujikawa Ferreira<lioux@FreeBSD.org>, 07 Apr 2001.
In short, it does not work. It should, but unfortunately, that is not the case. For whatever reason, this modem does not follow RFC 2516 (A Method for transmitting PPP over Ethernet (PPPoE), written by L. Mamakos, K. Lidl, J. Evarts, D. Carrel, D. Simone, and R. Wheeler).
Since it does not follow the specification, FreeBSD's PPPoE implementation will not talk to it. It is very likely that it will not work under other unixes for that same reason. Complain to 3Com if you think it should comply with the PPPoE specification.
If you absolutely want to use your ADSL connection with FreeBSD and are stuck with this modem, you can either:
Try replacing the modem with a different brand or model if your DSL provider permits you to do so. If you are not sure which brand(s) will work, the FreeBSD general questions mailing list <freebsd-questions@FreeBSD.org> is a good place to ask.
Try to get it working. Keep in mind that there is no guarantee it will work, your mileage may vary.
If you want to try to make it work, you can do the following, but please keep in mind that you do this at your own risk! Just because it worked for me does not mean it will work for you.
There are three steps to the process. They are:
Make sure you already have ppp.conf set up. See the beginning of this chapter for more details on doing so.
Since the modem does not speak the correct protocol, we need to learn how to speak its variant of the protocol. This information was obtained from a DSLreports forum message.
The modem speaks 0x3c12 for DISCOVERY, and 0x3c13 for PAYLOAD identifiers instead of 0x8863 and 0x8864 respectively, as mandated by the PPPoE specification.
So, now what? You need to recompile the NETGRAPH_PPPOE code with the modem's codes. For this, you should have installed the full kernel sources.
Find the /usr/src/sys/netgraph/ng_pppoe.h file. Be careful while editing this file. You have to modify both the little and the big endian entries.
For big endian, find the line with 0x8863 in it, and replace the number with 0x3c12. Do the same with 0x8864, replacing it with 0x3c13.
For little endian, find the line with 0x6388in it, and replace the number with 0x123c. Do the same with 0x6488, replacing it with 0x133c.
Here is a diff of how the new file should look:
% diff -u ng_pppoe.h.orig ng_pppoe.h
--- ng_pppoe.h.orig Thu Apr 12 13:42:46 2001
+++ ng_pppoe.h Thu Apr 12 13:44:47 2001
@@ -148,8 +148,8 @@
#define PTT_SYS_ERR (0x0202)
#define PTT_GEN_ERR (0x0203)
-#define ETHERTYPE_PPPOE_DISC 0x8863 /* pppoe discovery packets */
-#define ETHERTYPE_PPPOE_SESS 0x8864 /* pppoe session packets */
+#define ETHERTYPE_PPPOE_DISC 0x3c12 /* pppoe discovery packets */
+#define ETHERTYPE_PPPOE_SESS 0x3c13 /* pppoe session packets */
#else
#define PTT_EOL (0x0000)
#define PTT_SRV_NAME (0x0101)
@@ -162,8 +162,8 @@
#define PTT_SYS_ERR (0x0202)
#define PTT_GEN_ERR (0x0302)
-#define ETHERTYPE_PPPOE_DISC 0x6388 /* pppoe discovery packets */
-#define ETHERTYPE_PPPOE_SESS 0x6488 /* pppoe session packets */
+#define ETHERTYPE_PPPOE_DISC 0x123c /* pppoe discovery packets */
+#define ETHERTYPE_PPPOE_SESS 0x133c /* pppoe session packets */
#endif
struct pppoe_tag {
Then do the following as root:
# cd /usr/src/sys/modules/netgraph/pppoe
# make clean depend all install
# make clean
Now you can speak the modem's variant of the PPPoE specification.
The third step is to figure out the name of the profile your ISP assigned to the modem. The information for this step was obtained from the Roaring Penguin PPPoE program which can be found in the ports collection. If you still are not able to find it, ask your ISP's tech support.
If they do not know it either, and you are feeling bold (this may de-program your modem and render it useless, so think twice about doing it).
Install the program shipped with the modem by your provider. Then, access the System menu from the program. The name of your profile should be listed there. It is usually ISP.
The profile name will be used in the PPPoE configuration inside ppp.conf as the provider parameter. See the ppp(8) manual page for more information.
The PPPoE line in your ppp.conf should look like this:
set device PPPoE:xl1:ISP
Do not forget to change xl1 to the proper device for your ethernet card.
Do not forget to change ISP to the profile you have just found above.
For additional information, you can try:
Cheaper Broadband with FreeBSD on DSL by Renauld Waldura in Daemon News.
Another PPPoE tutorial by Sympatico Users Group.
This, and other documents, can be downloaded from ftp.FreeBSD.org/pub/FreeBSD/doc/.
For questions about FreeBSD, read the
documentation
before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.