Announcement

Collapse
No announcement yet.

Start dsl connection after wifi is up

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Start dsl connection after wifi is up

    Hello!

    It's my first post here, so hello to all

    I have a Toshiba Satellite M70-309. Everything works fine, but i would like to add a little "finesse", if this is possible. Now, when I boot my pc i have to start dsl connection manually with "sudo pon dsl-provider". Note that my laptop is connected to my router via wi-fi.

    Now the question: it's possible to make the PC connect automatically to the internet after it has connected to my wireless network?

    Thank you and sorry for my poor english

    #2
    Re: Start dsl connection after wifi is up

    You can place something like this in /etc/rc.local
    if [ -f /etc/ppp/peers/dsl-provider ]; then
    pon dsl-provider
    fi

    where I am thinking that /etc/ppp/peers/dsl-provider is a file whose existence is needed for the connection. This will be run toward the end of the init scripts and it will test to see if the file exists, and if it does, run pon.

    Comment


      #3
      Re: Start dsl connection after wifi is up

      Originally posted by mando_hacker
      You can place something like this in /etc/rc.local
      if [ -f /etc/ppp/peers/dsl-provider ]; then
      pon dsl-provider
      fi

      where I am thinking that /etc/ppp/peers/dsl-provider is a file whose existence is needed for the connection. This will be run toward the end of the init scripts and it will test to see if the file exists, and if it does, run pon.
      Many thanks for your help!
      Unfortunately this doesn't work. The wi-fi connection needs a while to connect to the router after KDE is loaded (15-30 secs). I suppose that rc.local runs before that point, so it doesn't connect.

      Any other suggestion?

      Comment


        #4
        Re: Start dsl connection after wifi is up

        I suggest you clarify what is connecing to what and in which order. I thought I have made sense of that but obviously I was wrong.

        Do you have a laptop and a pc? Your pc has wireless and your laptop has wireless so they can talk to each other? The pc needs to run pon to connect to the internet and then the laptop connects to the internet through the PC? Is that your situation?

        Comment


          #5
          Re: Start dsl connection after wifi is up

          I thought that I was clear, sorry for confusing you!

          I have a wireless router, the standard one that my internet provider gives to it's users. I've configured my wi-fi with KNetworkManager and it works fine: I boot my laptop, and when KDE loads, KNetworkManager loads too and it automaticalli connects to my router's wi-fi connection.

          When this is done (so when I see that KNetworkManager's tray icon turned into four blue/gray bars) I have to open a console, launch "sudo pon dsl-provider" and enter the root's password.

          So... is there a way to do this automatically? It's annoying to start the dsl connection manually. I hope that this time I was better in explaining the problem Thanks!

          Comment


            #6
            Re: Start dsl connection after wifi is up

            I do not understand why you need to use pon if you have a wireless connection to a router that is NATing you to the internet.

            Comment


              #7
              Re: Start dsl connection after wifi is up

              Originally posted by mando_hacker
              I do not understand why you need to use pon if you have a wireless connection to a router that is NATing you to the internet.
              I know is hard to believe... so hard that before discovering this I was one month without internet, till I discovered this "trick". Maybe it's better if I explain to you:

              Unfortunately the router that the provider (Telecom Italia) gives to it's customers is remotely reconfigurable by Telecom... when they gave it to me there wasn't need to do such things... I just needed to connect to the wi-fi and I was connected to the internet too.

              When I've cancelled my web tv subscription they remotely reconfigured it without telling me anything (I'm 100% sure about that, because the configuration page of the router changed from one day to another, and reading forums about our provider confirmed this too)... the result was that I was normally connecting to the wi-fi (as usual), but internet wasn't working.

              After one month of calling the call center yelling that nothing was working I tried to launch a dsl connection after the pc was connected to the wi-fi and everything worked like a charm.


              I know... IT'S ABSURD! So absurd that I thinked this thing after 30 days of struggling with the provider.

              If you don't believe me i can make a video but I assure you that it's absolutely (and unfortunately) real.

              Comment


                #8
                Re: Start dsl connection after wifi is up

                Wow. That is even worse than Qwest. Actually it is worse than Qwest used to be, they have gotten much better.

                This sounds like your DSLmodem/wifi access point is not establishing a ppp connection but is forwarding it from your computer to the ISP. Before I get to your question let me ask a few. Did a cd come with your connection, or is software downloadable for Windows to access your ISP? It might be that if you hook up a windows computer and run their software it will program the DSL modem to establish the ppp connection itself.

                Alternatively, is there a web interface on your modem that would allow you to do that, or can you telnet to the modem and set it that way. Your life would certainly be easier if one of those would work.

                Then to your actual question. The ifupdown system includes the ability to run commands after bringing the network up. This is done by putting them in /etc/network/if-up.d. Network-Manager includes /etc/NetworkManager/dispatcher.d/01ifupdown which activates those scripts for interfaces configured with Network-Manager (which is what the KDE applets use) so youcan place a script in /etc/network/if-up.d/ to run pon after the wireless comes up.

                Comment


                  #9
                  Re: Start dsl connection after wifi is up

                  Originally posted by mando_hacker
                  Wow. That is even worse than Qwest. Actually it is worse than Qwest used to be, they have gotten much better.
                  Well... here in Italy a LOT of things are worse than in other places in the world I'm planning to go away from this horrible country...

                  Anyway:
                  Originally posted by mando_hacker
                  Did a cd come with your connection, or is software downloadable for Windows to access your ISP? It might be that if you hook up a windows computer and run their software it will program the DSL modem to establish the ppp connection itself.
                  Yes, there is a software CD with the modem, but I must confess... I never used it I've just checked the installation instructions: I don't know exactly what it does, but there is written that it installs a shortcut on the desktop to launch the connection manually... So if I install it or not it seems that anything will change.

                  Originally posted by mando_hacker
                  Alternatively, is there a web interface on your modem that would allow you to do that, or can you telnet to the modem and set it that way. Your life would certainly be easier if one of those would work.
                  Yes, it has a web interface (at the classical address 192.168.1.1) where I can change the wi-fi encryption (WEP/WPA-PSK), check the connected computers and enable the NAPT for the computers. Nothing more. I've forgotten to tell you that this router is Telecom-customized. With the original firmware i could do much more, but this one provided by Telecom is really limited.

                  Originally posted by mando_hacker
                  Then to your actual question. The ifupdown system includes the ability to run commands after bringing the network up. This is done by putting them in /etc/network/if-up.d. Network-Manager includes /etc/NetworkManager/dispatcher.d/01ifupdown which activates those scripts for interfaces configured with Network-Manager (which is what the KDE applets use) so youcan place a script in /etc/network/if-up.d/ to run pon after the wireless comes up.
                  I must confess that I'm not really practical with linux. I created a new file, called it "dslconn" and wrote in it:
                  Code:
                  #! /bin/sh
                  
                  if [ -f /etc/ppp/peers/dsl-provider ]; then
                     pon dsl-provider
                  fi
                  Is this ok?

                  Thank you again

                  Comment


                    #10
                    Re: Start dsl connection after wifi is up

                    Looks simple but effective to me. Let me know if it works.

                    Comment


                      #11
                      Re: Start dsl connection after wifi is up

                      Sorry for the delay, but for a couple of days I was unable to access the forum and then I was busy. Unfortunately it doesn't work I suppose that the script fires before knetworkmanager loads and/or the wi-fi connection is estabilished. Any other suggestion?

                      Thank you for the patience

                      Comment


                        #12
                        Re: Start dsl connection after wifi is up

                        Maybe. Looking back I notice that you said you have to run pon dsl-provider and then enter the root password. You probably need to set it to not need the password. I think that can be done with
                        /etc/ppp/pap-secrets.

                        Comment


                          #13
                          Re: Start dsl connection after wifi is up

                          After a week I'm back again!

                          Well, I think that we'll never know how this should be done: today's morning a Telecom's technician replaced my old wireless router with a new one. Now I don't have to do the "sudo pon dsl-provider" thing anymore, the router NATs me automatically, as every normal router does

                          Anyway, many thanks mando_hacker!

                          Comment


                            #14
                            Re: Start dsl connection after wifi is up

                            You are entirely welcome, and I expect relieved.

                            Comment


                              #15
                              Re: Start dsl connection after wifi is up

                              I was curious to know if Mando's script would have worked if a "sleep 30;" line was put in after the "if" and before the call to the dsl, but now I'll never know.
                              "A nation that is afraid to let its people judge the truth and falsehood in an open market is a nation that is afraid of its people.”
                              – John F. Kennedy, February 26, 1962.

                              Comment

                              Working...
                              X