Autoconnect DSL at Boot
CONVENTIONS USED

I just got DSL a few days ago, and I love it! But Mandrake has some flaky things about it in it's networking setup. My DSL wouldn't connect after the first time I set it up, so I set about finding out how to fix that problem. I got a Gtk GUI app that would connect for me, but that isn't what I was after. I wanted it to connect on bootup, so that my wife doesn't need to know how to connect if something happens to the server... Not that anything SHOULD happen to it, but just in case. So I eventually found out how to do it. My method is detailed here.

Please note, this is tested using Sympatico's High Speed Edition. This should work for any working ethernet card and any ISP that uses PPPoE. Email me any success stories. Thanks!

First of all, this tutorial will assume a few things: First, that your DSL modem is connected directly into your ethernet card. Secondly, that ethernet card is eth0. On my computer, I use eth1, so don't worry if your card is not eth0. Lastly, I will assume that you are using Mandrake 8.2. Maybe the necessary packages come with 8.1, but I am not 100% sure on that, so for purposes of this tutorial, it is 8.2. If you confirm that 8.1 has the package and that this works, then please contact me.

Firstly, connect your DSL modem and turn it on.

Next you must install the package rp-pppoe. To do this, either use Software Manager, if you know how, or open up a console and type su and press Enter. Then type in urpmi rp-pppoe and press Enter. You should then be prompted for the proper CD, and when you are, insert the disc and press Enter. After a short time, the program will be installed.

Now, in that same terminal, type adsl-setup and hit Enter. This will run the configuration for the pppoe dialer.

You should see this on the screen:

>>> Enter your PPPoE user name (default bxxxnxnx@sympatico.ca):

Here you enter your username given to you by your ISP and then press Enter.

Next you should see this on the screen:

>>> Enter the Ethernet interface connected to the ADSL modem
For Solaris, this is likely to be something like /dev/hme0.
For Linux, it will be ethn, where 'n' is a number.
(default eth0):

Now you need to input the ethernet device that is connected to your DSL modem. As outlined above, for this tutorial we will assume that you are going to use eth0, so type in eth0 and then press Enter.

Next, you should be asked about a permanent connection or on demand connections:

>>> Enter the demand value (default no):

Just press Enter at this prompt. We will be setting it up later on. The next step is to enter the DNS information. You will be prompted as shown:

>>> Enter the DNS information here:

You can try using typing in server, if you think that your ISP will support this feature. If not, or you aren't sure, you should locate the primary and secondary DNS server IP addresses. Then type in the first IP followed by Enter. You will then be prompted like this:

>>> Enter the secondary DNS server address here:

Now locate and type in the secondary DNS server IP address and then press Enter. You will then be required to input your password:

>>> Please enter your PPPoE password:

Do as it says, and type your password in, then press Enter. After this, you will be required to confirm your password:

>>> Please re-enter your PPPoE password:

Do so and press Enter when you are done.

The next step is to choose what type of firewalling you would like to have. If you are planning on sharing this connection with other PCs on your LAN, then you must select a MASQUERADE type of firewall. Otherwise, you can select a STANDALONE type of firewall. If you want to do the firewall setup yourself, you would select NONE.

>>> Choose a type of firewall (0-2):

At that prompt, type in 0 for NONE, 1 for STANDALONE, or 2 for MASQUERADE, followed by Enter.

You should then be shown a summary of all of the values you entered. You will be given the prompt:

>>> Accept these settings and adjust configuration files (y/n)?

If everything looks okay, then press y followed by Enter.

Congratulations, it should be all set up!

Now, we must make sure that it will work. To do this, type in adsl-start and press Enter. It should show you that it has connected. Test this out by opening a web browser, email client, or other Internet-based application. If it works, then everything is good. If it doesn't, then you need to figure out what went wrong.

Now, to make it conenct when your computer starts up, you must do the next part.

In the terminal, type cd /etc/init.d/ and press Enter. Now type in ls adsl and press Enter. You should one file listed called adsl. This is the script that needs to be run at startup.

Now, type in cd /etc/ and press Enter.

Now you need to find out what runlevel your system boots into. If you know already, you can skip the next step.

In the terminal, run this command (I recommend you copy and paste it):

grep :initdefault /etc/inittab | gawk -F: '{ print $2 }'

This will print a number on your screen. This number is your default runlevel.

Assuming your default runlevel is 3, type in cd rc3.d and then press Enter. If it is 5, type in cd rc5.d followed by Enter.

Now type in ln -s ../init.d/adsl S13adsl and press Enter. I chose the number 13 here because the network devices are initialized using S10 on my server. This is crucial that you make sure that the number is greater than the number of which your eth0 is brought up. Check this out by typing ls /etc/rc3.d/ | grep network. If you are unsure, you could just use 99 in place of the number 13.

Now, reboot the computer, and once it is started up again, try connecting to the Ineternet.

Should work just fine!


© D. Olson 2001-2003 -- Originally found on The Mandrake eXPerience