LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   creating multiple connections (https://www.linuxquestions.org/questions/linux-newbie-8/creating-multiple-connections-673072/)

ritam_bkp 09-29-2008 09:23 AM

creating multiple connections
 
i use dsl connection to cnnct to the internet through my ubuntu pc.
In ubuntu,at first i had to run pppoeconf command to enter my user name and password(this edits the dsl-provider file)..now each time i connect to the net i use the pon dsl-provider command..
what i want to know is stated below -

# i have three username-passwrds that cnnct to the internet..
only the 1st one has unlimited broadband priviledge but it is much slower than the others

each time if i wish to cnnct by different usernames, i have to run the pppoeconf command and scan my devices and provide my 2nd or 3rd username and paswrd ..
when i will shift to my 1st one...i have to repeat this tedious procedure again....
i guess ..u all will agree with me that this is a frustrutaing thing to do all the time...
in windows xp i can create many simultaneous connections (eg. MyConnection1,MyConnection2,MyConnection3 etc)...and cnnct through wichever i wish with just 2 piece of clicks


---- so,how can i keep simultaneous 2,3 connection files and cnnct through which ever i like without the pppoeconf shit all the time??

mk27 09-29-2008 09:43 AM

Do you mean you are using the connections at the same time? Or just that you use one or another at different times? I suspect the later...

I use multiple connections (but not at the same time) which creates a problem because the connections have different nameservers in /etc/resolv.conf. Rather than reconfiguring each time, make different copies of your "dsl-provider file" and run the whole thing with a script that copies the correct one in first:

Code:

#!/bin/sh

cp /etc/pppoe/providerfile.copy1 /etc/pppoe/providerfile &&
pppoe-up (or whatever command you use)

Just call that script "connect1" and that's all you'll have to type next time. I don't use pppoe so I'm not familiar with how to launch it, but hopefully the logic here is clear: the destination file of the copy is the real name of the file that pppoe uses, the source file is one version of what it should look like.

Important: use the double ampersand (&&) after the cp command to make sure it completes successfully before you attempt to connect.

ritam_bkp 09-29-2008 09:58 AM

that was nice..
let me try first


All times are GMT -5. The time now is 08:49 AM.