05.08-PPPoE ppp
Description: FreeBSD Installer Guide
Keywords: FreeBSD, freebsd, FBSD, fbsd, Installer Guide, how-to, book, manual, guide, installing, configuring, aide step by step, instructions, from scratch, Unix

# FreeBSD Stable Release 6.0 Installer Guide

______________________________________________________________________

# PPPoE, ppp.conf statements for DSL connection

Edit the ppp.conf file and add the following so this is all that is in the file.

Read the comments and do what they say.

cd /etc/ppp/ # move into directory

cp ppp.conf ppp.conf.org # Save copy of original

ee ppp.conf # Edit file add following

#################### start of DSL ppp.conf ###################
default:
set log Phase tun #use to avoid excessive log sizes
set timeout 0 # no idle time out, will not disconnect
dialisp:
set device PPPoE:XXX # replace xxx with your NIC device name
set authname YOURLOGINNAME # Replace with your ISP account username
set authkey YOURPASSWORD # Replace with your ISP account password
add default HISADDR # Add a (sticky) default route (Mandatory)
enable dns # Gets the ISP's DNS IP address & places them
# in resolv.conf for reference by FBSD box.
############### End of DSL ppp.conf #################################

Replace the XXX in the [set device PPPoE:XXX] statement with the NIC's FBSD interface name. Sometimes it will be necessary to use a service tag to establish your connection depending on how your ISP and/or the phone company has its DSL network configured. Service tags are used to distinguish between different PPPoE servers attached to a given network. You should have been given any required service tag information in the documentation provided by your ISP. If you cannot locate it there, ask your ISP's tech support personnel. This is the format of the command with the service tag added:

set device PPPoE:xxxx:service_tag

The xxxx is the FBSD interface name used by PPPoE. The interface must be UP (IE: enabled). It is only used as a transport, and does not need to be assigned an IP address. This can be done automatically at boot time by updating the /etc/rc.conf file. The format of the statement to add is ifconfig_xxxx=up where xxxx is the NIC's FBSD interface name used by PPPoE that you specified in the /etc/ppp/ppp.conf file.

ee /etc/rc.conf # add following statements

ifconfig_xxxx=up

ifconfig_tun0="DHCP" # get your ISP assigned IP address

To setup user ppp to dial your ISP automatically at FBSD boot time, you have to add the following statements to the rc.conf file. The ddial option means to redial every time the connection to the ISP gets dropped.

ee /etc/rc.conf

# Activate user ppp auto start at boot time
ppp_enable="YES" # Start User PPP task
ppp_mode="ddial" # ddial, auto, background
ppp_profile="dialisp" # section in ppp.conf to exec
#ppp_nat="YES" # only if you have LAN behind this PC.

# User PPP Logs

All of User PPP messages go to /var/log/ppp.log. This is specified in /etc/syslog.conf. Newsyslog.conf controls the frequency of rolling the log file off to the archive, as well as how many archive files to maintain. It's already configured for you.

# Stray irq 7 messages

The FBSD 5.22 FAQ entry says

5.24. What does ``stray IRQ'' mean?

Stray IRQs are indications of hardware IRQ glitches, mostly from hardware that removes its interrupt request in the middle of the interrupt request acknowledge cycle.

One has three options for dealing with this:

1. Live with the warnings. All except the first 5 per IRQ are suppressed anyway.

2. Break the warnings by changing 5 to 0 in isa_strayintr() so that all the warnings are suppressed.

3. Break the warnings by installing parallel port hardware that uses IRQ 7 and the PPP driver for it (this happens on most systems), and install an IDE drive or other hardware that uses IRQ 15 and a suitable driver for it.

********** End of FAQ # 5.22 *********************************

The number 3 item above is false, the ATA IDE standard is the primary IDE channel master and slave devices use IRQ 14 and the secondary IDE channel master and slave devices use IRQ 15. IRQ 15 is also used by many NIC cards. A printer attached to the parallel port uses IRQ 7, and the annoying bogus stray IRQ 7 messages still gets issued. So you are left with two options, learn to deal with it, or hack the code to make it go away.

To stop the annoying bogus stray IRQ 7 messages you can hack the source where these messages originate from and change the counter value 5 to 0 so the messages will no longer be issued.

isa_strayintr lives in /usr/src/sys/i386/isa/intr_machdep.c

cd /usr/src/sys/i386/i386/

cp intr_machdep.c intr_machdep.c.org # make backup of original

ee intr_machdep.c

Find isa_strayintr to locate the start of the stray IRQ 7 logic

change this

if (intrcnt[1 + intr] <= 5)

To this

if (intrcnt[1 + intr] <= 0)

Recompile your kernel source and those stray IRQ 7 messages are gone. Document this some place for yourself just in case you reinstall from CDROM. Remember that if you cvsup update your source to upgrade to next stable release, your 'stray IRQ 7 hack' will be stepped on and return back to the official FBSD version. You will have to reapply this hack.

______________________________________________________________________

This FreeBSD Installer Guide is an public domain HOW-TO. This content may be reproduced, in any form or by any means, and used by all without permission in writing from the author.