Configuring the Traverse Technology "Pulsar" ADSL PCI card in SME 5.6 & 6.0 Version 0.3, 28 Feb 2004 Copyright Rick Jones, Active Service Consulting Ltd, UK History: 0.1 05/01/04 First publication 0.2 15/01/04 Added kill-pppd script and associated notes 0.3 28/02/04 Changed "phone number" format to allow for variable delay, and NZ oddity. Also now tested on SME 6.0 Introduction: These notes describe how to setup ADSL using PPPoA on SME server. The hardware interface is a "Pulsar" PCI ADSL card manufactured by Traverse Technology in Australia (see notes below for availability). Note: the Pulsar card supports PPPoE as well as PPPoA, but the configuration described here is exclusively PPPoA. Refer to Traverse's documentation for PPPoE information. This configuration has been installed, tested, and runs reliably on SME 5.6 & 6.0. Concept: PPPoA is handled by telcos in a very similar way to dialup services, except there is no actual dialling phase in the connection. In other respects they operate the same way - the link is established using PPP, and there is an authentication to be negotiated. This makes it possible to manage the ADSL link using diald, giving the advantages of diald's connection control, and minimising the configuration changes required. Pre-requisistes: If you don't already have it, you need to install Cyrus Bharda's Dialup Control Panel contrib. You must do this first, because some of the files included here update the contrib. You should be able to find it at http://contribs.org/contribs/cbharda/contrib/dialup/. At present this contrib is only for 5.x. It can be installed on 6.0 but will give an error message at the end of installation. Everything appears to work, except the panel is not properly indexed. This should not prevent ADSL being configured. Install the new files: I could have scripted this, but I've kept it a manual process so you are aware of what you are changing! You can copy the following section to a script and run it if you want (logged in as root). # -------- start ----------- # Create directory /lib/modules/adsl mkdir /lib/modules/adsl # Copy the Pulsar driver for either SME 5.6 or 6.0 # - do only one of the following # (if scripting remove whichever line does not apply) cp 5.6/pulsar.o /lib/modules/adsl cp 6.0/pulsar.o /lib/modules/adsl # Update the Dialup Control Panel cp dialup /etc/e-smith/web/functions # Remove custom diald template installed by Dialup Panel rm -f /etc/e-smith/templates-custom/etc/diald.conf/* # Replace with new custom diald template cp diald.conf/* /etc/e-smith/templates-custom/etc/diald.conf # Add custom PPP options template mkdir -p /etc/e-smith/templates-custom/etc/ppp/options cp ppp-options/* /etc/e-smith/templates-custom/etc/ppp/options # Add pppd "suicide" event script (optional) cp kill-pppd /etc/e-smith/events/actions cd /etc/e-smith/events/ip-down ln -s ../actions/kill-pppd S80kill-pppd # --------- end ------------ SME configuration: SME must initially be configured as a Dialup Gateway using a modem. It doesn't matter what port number you pick, or that a modem is not connected, you will change some of these things later using the Dialup Control Panel. You can also enter junk for the phone number and ISP login details, you will enter these properly later. (Note: be sure to select "Modem", NOT "ISDN", in the initial configuration) After restart: Changing the SME configuration requires a restart, so use this as an opportunity to shut down and install the Pulsar card. After restart go to the Server Manager, and in the Dialup panel click Disable Modem to stop SME trying to connect. Update configuration: You can now complete the configuration using the Dialup Panel, as follows. Enter the ISP login and password for the ADSL connection. In the Phone Number box enter the ADSL link parameters. These are the values for the RFC 2364 parameters for Vpi & Vci. You need to enter 2 numbers separated by commas, the values are defined by the telco and should be available from your ISP or other online ADSL resources. E.g. in the UK the entry needs to be "0,38". For users in New Zealand, a third value is required. The correct entry for NZ is "0,100,1". A future version of the driver may handle this automatically (this is down to Traverse), but until then this third entry, which sets the 1483Vpi value, must be present. For the Serial Port select /dev/ttyI0 (the update to the panel file makes this option available). The other phone and modem settings can be ignored. Finally choose your connection time policy. The simplest for ADSL is obviously "continuous", and you need this if you host anything or accept incoming connections. If your usage is outgoing only you may want to use a shorter connection strategy as this will avoid being connected when idle, potentially lessening your exposure to hacking. Since "connecting" in fact merely involves authenticating, connection on demand should be very quick. Once everything is set, click Save. Enable the connection: Now click Enable Modem in the Dialup Panel, and the connection should fire up. You can monitor progress in the messages file (e.g. tail -f /var/log/messages). There should be some messages from the Pulsar driver like: kernel: pulsar: Traverse Pulsar ADSL pulsar.o v3.2.10 19-Aug-2003 kernel: pulsar: powered by GlobespanVirata ADSL Firmware Version: U51107 kernel: pulsar0: GSI ADSL, eth1, ttyG/cug, 00:0A:FA:10:01:A5 IRQ:9 ... kernel: pulsar0: Link established (576/288) (these are not necessarily adjacent) The last line means that the raw ADSL connection is working. If this never appears it indicates there's a physical link problem (cable maybe?). It can sometimes take up to a minute for the link to come up, but usually under 30 secs. (based on BT lines in the UK). The connection script waits 30 secs. before trying to bring up PPP, if the link takes longer to start the first attempt will fail, but diald will try to bring it up again every 20 secs. so it should get going eventually. Miscellaneous and known problems: The delay after loading the driver before the link gets established seems to be quite variable, probably depending on telco and location. In some cases it seems that if diald tries to establish connection too soon things go into an indefinite loop of retries and failures. If this is a problem, the delay time can be altered using another value in the "phone number" field. Appending ":x" to the phone number will use "x" seconds for the delay. So for example, if you are using UK parameters, and want to wait a full minute for the link to come up, use "0,38:60" for the phone number. The default delay is 30 secs. I've had a few problems with the link dying after an echo failure but pppd not terminating. The default configuration only allows 2 echo requests, so the update to ppp/options increases this to 10 at 30 sec. intervals. This may not be optimum, but as it happens only infrequently it's difficult to tune it! If the link does stop but pppd doesn't terminate, diald doesn't detect it as disconnection, so can't re-establish. However, the ip-down event still occurs. I've included a script that's added to the ip-down event list which attempts to kill pppd if it's still running. This is still experimental, but I check the logs from time to time and I've come across a few instances where it has correctly restored a lost link, so it does seem to work. Your link may not suffer this problem at all. If you do find the link's gone down and not re-started, using the Dialup Panel to disable then re-enable the "modem" should correct things. The pulsar driver module is loaded when pppd starts, and is unloaded when it stops. This ensures that stopping and restarting pppd re-initialises the driver, and hence the link. However, I've experienced situations where the driver does not unload, and refuses manual attempts at 'rmmod' complaining it's "busy". I don't know why this happens, but the only recourse seems to be a server re-boot. The Pulsar card: The card is made by Australian company Traverse Technology (www.traverse.com.au). It uses the same GlobespanVirata chipset as found in many external ADSL router boxes. It can be bought online direct from Traverse in Australia, and there are distributors in Europe, USA, and New Zealand - details on the Traverse site. Traverse were very helpful when I was getting this set up, without the help of their tech. specialist Guy Ellis I would probably have still been fumbling. There are other ADSL PCI cards available, but very few have Linux driver support. I know of one that does, and I hope to try it at some point to see if it's a viable alternative to the Pulsar. Finally: I've found this configuration makes for a very good ADSL gateway and server, and works better than the external router I was using previously. I hope it proves as good for you. If you have any problems, queries, comments, or suggestions, feel free to email me. Have fun! Rick Jones rick@activeservice.co.uk