This document may not be reproduced without permisson from author HOWTO setup an adsl connection with FreeBSD/i386 4.3 up to 4.8 (and probably higher) by Ole Henry Halvorsen (aka. Xcom) maintaied by Christer Solskogen (aka. dizzy tun3Z) This document describes howto setup an ADSL connection over PPPoE (Point to Point Protocol over Ethernet). this configuration is working 100% on an Alcatel ADSL modem. It should work with others as well, although this is not tested. to setup an adsl connection in freebsd you will need a working adsl line, adsl modem, and a network card, If youre going to use the bsd box as a gateway for other computers you will need two network cards. You must also have the ppp software installed. the first thing you will have to do is to compile a new kernel.. (make sure you have the kernel source) (this is not needed anymore from FreeBSD 4.4) # cd /usr/src/sys/i386/conf make a copy of the general configuration with the command # cp GENERIC MYKERNEL okay now you must use "vi" (or your favorite editor) to edit the MYKERNEL file you just created. # vi MYKERNEL now you would have to add the line: "options NETGRAPH" when youre done save the file.. and enter the command # /usr/sbin/config MYKERNEL followed by # cd ../../compile/MYKERNEL/ type # make depend ; make ; make install now, go out for a smoke or something, this may take a few moments. when the compiling is done, reboot with your new kernel. if something goes wrong consult the FreeBSD manual. I assume the kernel is compiled now... make sure the network card your'e going to use for the adsl modem is working. # ifconfig ed0: flags=8843 mtu 1500 ether 00:20:18:2e:de:02 make sure that the card is UP!!, it does not have to be assigned an ip address. You will also have make sure that you have the tunneling devices, if not please read the ppp manpages. # ls /dev/tun? crw------- 1 root wheel 52, 0 May 8 13:46 /dev/tun0 crw------- 1 root wheel 52, 1 May 3 23:01 /dev/tun1 crw------- 1 root wheel 52, 2 May 2 22:02 /dev/tun2 crw------- 1 root wheel 52, 3 May 2 22:02 /dev/tun3 So far so good?, let's continue. now we have to make a /etc/ppp/ppp.conf file. here's a working example config file. default: set device PPPoE:ed0 #ed0 is just the devicename. change it to your device(xl0, or something...) set speed sync set mru 1492 set mtu 1492 set ctsrts off enable lqr set log Phase tun add default HISADDR enable dns nat enable yes #remove this line if you dont wan't to share your internet connection to others in the lan. papchap: set authname yourusernamehere set authkey yourpasswordhere Make sure that this file is not readable to others as it contain your password. now lets test the connection. enter the following # ppp papchap > dial something like this should happen... >ppp >Ppp >PPp >PPP what the hell does this mean??? the first caps "P" means that the LCP (link control protocol) phase was completed sucssesfully on the next line you'll see two caps "PP" which indicate that the PAP authentification was completed sucssesfully the third line with three caps "PPP" tells you that you have been assigned an IP-address from the remote server. if some of the p's don't get captalized, check your /var/log/ppp.log for errors. Ok, I assume the test went okay, now type "quit" in the ppp console, and enter det following line: # ppp -ddial papchap wait a few seconds and try # ifconfig tun0 (or tun1 etc.) you should see something like this..... tun0: flags=8051 mtu 1492 inet 146.172.14.71 --> 130.67.127.37 netmask 0xffff0000 Opened by PID 247 now try # cat /etc/resolv.conf nameserver 130.67.15.194 nameserver 130.67.60.70 If your resolv.conf is blank or doesn't exist, you must enter the ip address of your name server manually. If you don't know what the address of your isp's name server is, try calling their support line, or check their website. now lets try pinging a internet site. # ping www.digi.no PING www.digi.no (195.159.135.98): 56 data bytes 64 bytes from 195.159.135.98: icmp_seq=0 ttl=250 time=23.464 ms 64 bytes from 195.159.135.98: icmp_seq=1 ttl=250 time=21.884 ms note! not all internet sites can be ping'ed because it's possible to disable it. if you don't get a reply, try some others, if you can't ping anyone at all, check the /etc/resolv.conf again and make sure you have the right address for the ISP's name servers. everything is working fine?? now lets add some stuff to the /etc/rc.conf file, so that we can have the ppp connection started automaticlly at booting time. ppp_enable="YES" ppp_mode="ddial" ppp_nat="YES" ppp_profile="papchap" again, remove the ppp_nat line if you don't wan't to share your internet connection with others in your lan. HOWTO share the dsl connection with other in your lan. if you wanna do this, you'll need two NIC's, as I mentioned above, one of the NIC's are already used for your DSL line, the other will have to be setup with an IP address & subnet mask matching your local lan.. then on the client machines, the default gateway, should be set to the ip-address of your freebsd box running DSL. and you must also specify a name server for the client machines. Also try looking at http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/pppoe.html