LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-25-2008, 10:48 AM   #1
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 871

Rep: Reputation: 43
Question switching internet sources


Ladies & Gentlemen

I am sure that this has been discussed before and a work around is available. I don't know what search parameters to use. So I will describe what I want to do so that you can point me in the right direction.

I use both wifi and dial-up Internet access. Most of the time I connect via wifi but sometimes wifi is not available and my cell phone will give me access to check email. The issue is switching between the two seams problematic.

I am able two switch to the cell by disabling the wireless before I establish the cell connection via kppp. Switching back however seams to require a reboot.

What would be ideal is to be able to change a config file via a script that would point Internet access to one connection to the other with out having to kill either connection. Then I could run the script when I establish the connection with kppp.

Thanks
 
Old 03-25-2008, 09:16 PM   #2
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian Jessie 8.4
Posts: 5,873

Rep: Reputation: 348Reputation: 348Reputation: 348Reputation: 348
Quote:
I am able two switch to the cell by disabling the wireless before I establish the cell connection via kppp. Switching back however seams to require a reboot.
What do you do to disable the wireless?
 
Old 03-26-2008, 03:42 PM   #3
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 871

Original Poster
Rep: Reputation: 43
Thanks Bigrigdriver

I do that in two different ways. Bear in mind that I have done a reinstall because of a lot of broken parts to my system from when I first used this. What I did before the reinstall was that I controlled the wifi with kwifimanager and I would just disable the connection. More recently I am using knetworkmanager, and I like it better. It will also disable the wifi. My laptop has a wifi switch that will disable it also. When I try to bring it back I am not able to reestablish Internet access.

After a little searching I came across 'route' that sets the route data is sent on based on the ip it is sent to. This sounds like the kind of thing I need but what i have read talks about this being a static thing and not something to be changing on the fly.

The reason I don't want to disable the wifi is because that is how I control my server. I login to it with ssh and then I can make the config changes and updates that I need to. I also loose access to my printer.
 
Old 03-27-2008, 04:54 PM   #4
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 871

Original Poster
Rep: Reputation: 43
Thanks
bump
 
Old 03-30-2008, 08:22 PM   #5
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 871

Original Poster
Rep: Reputation: 43
More info some days later

I have spent the last two days connected to the internet via my cell through a bluetooth connection. I fliped the switch on the front of the laptop that turns off the wifi to disable it so that I could establish the ppp connection and use it. When I tried to bring the wifi back up to print today I was unable to reactivate the wireless card. The gui apps would not and I got this from
Code:
# ifdown eth0
ifdown: interface eth0 not configured
# ifup eth0
Ignoring unknown interface eth0=eth0.
#
I am thinking that because the card was down for so long that the module was unloaded but I am not sure about that. When I have time I will do some google.
 
Old 03-31-2008, 10:37 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285Reputation: 1285
Can't you bring down interfaces with 'ifconfig eth0 down' where eth0 is an interface. Then back up with 'up' instead of 'down'.
 
Old 03-31-2008, 11:30 AM   #7
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Willoughby, Ohio
Distribution: linuxdebian
Posts: 7,232
Blog Entries: 5

Rep: Reputation: 190Reputation: 190
Did you turn the switch on before booting the laptop ? or was the laptop already on... if the switch was off then the device was probably not detected during boot, so it not being detected after that point is not surprising to me.


A couple options for your other query..

Multiple Network Profiles.
http://stefans.datenbruch.de/interfaces/
http://muthanna.com/quickswitch/
http://linuxplanet.com/linuxplanet/tutorials/5779/1/
http://mady.n.free.fr/chris/linux/ti...les/index.html
 
Old 04-02-2008, 09:41 PM   #8
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 871

Original Poster
Rep: Reputation: 43
Thanks guys

I have not tried ifconfig eth0 down but I will when I get the chance. God blessed me with one of those memories that I have to use a command 50 odd times before I can remember it. So I end up searching for them on google and I had not gotten that far yet. Now I am in a motel room with wifi so I don't need to use the cell.

farslayer
When I initially set up the cell the last time to use the lappy was already up. I don't recall that I did a reboot with the wifi switched off but I may have.

I have looked at the links above and they don't seam to relate to the issue that i have. I am not having a problem switching wireless networks. The wireless manager I am using is easy to use and seams to work fine so far.

Typically when I have the problem it is when I am at home where I get my Internet through my cell. Normally via my local network. But sometimes I just want a quick connection without having to log into the server, hook up the data cable to the cell and establish the connection to check email or what ever when I can just slip the bluetooth adapter into the laptop and go. Sometime I want to print while the phone is connected but I have to disable the wifi before I can establish the Internet connection so I don't have access to my network printer and reestablishing the wifi connection to the local network with the ppp connection active is problematic.

What I would like is to have some kind of script that would use 'route' or some other command to route the Internet traffic to the ppp connection but still route the lan traffic to the lan. The big problem is that writing that script is beyond my ability with out help. I haven't had a chance to dig into the man's for route yet to see if I can figure out the syntax and what not.

Once again thanks
 
Old 04-18-2008, 06:56 PM   #9
rbees
Member
 
Registered: Mar 2004
Location: northern michigan usa
Distribution: Debian Squeeze, Whezzy, Jessie
Posts: 871

Original Poster
Rep: Reputation: 43
Thanks to all

I think I want to do some looking at the routing table durring different setups to see if I can establish what my new routes should look like when I connect the cell.

The internet service is down in the motel I am in so I had a chance to look at the routing table with the cell active and this is what I get.
Code:
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
75.116.230.196  *               255.255.255.255 UH    0      0        0 ppp0
default         *               0.0.0.0         U     0      0        0 ppp0
#
Leaving the cell active and reenabling the wifi I get

Code:
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
75.116.230.196  *               255.255.255.255 UH    0      0        0 ppp0
192.168.3.0     *               255.255.255.0   U     0      0        0 eth0
default         192.168.3.1     0.0.0.0         UG    0      0        0 eth0
default         *               0.0.0.0         U     0      0        0 ppp0
#
And after disabling the cell I get.

Code:
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.3.0     *               255.255.255.0   U     0      0        0 eth0
#
When I bring the cell back up I get.

Code:
# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
75.116.236.196  *               255.255.255.255 UH    0      0        0 ppp0
192.168.3.0     *               255.255.255.0   U     0      0        0 eth0
default         *               0.0.0.0         U     0      0        0 ppp0
#
It is interesting that days later the ppp0 route is the same in the Chicago ariprot as it was in the motel in Milwaukee. Another interesting thing I see, when I am using the cell via bluetooth and I reenable the wifi I loose my access to the internet. Disableing the wifi again gives me access back.

I have looked at iptables again but that route seames daunting. I do use firestarter on my server to share the internet connection to my network. There may be times I would wish to share the connection from my laptop, like last week the internet was down in the motel and my crew needed access. But sharing the connection is not the most important thing. I need the ppp0 connection and lan connections to coexist and provide their services dynamically. I came across shorewall and am checking it out.

Ok. I have been using the cell via bluetoothe for a couple of days with the wifi disabled via knetworkmanager and switching back and forth was working fine untill I didn't switch for several hours (over night + ). When I tried to reestablish the wifi connection this evening to my network I am unable to bring eth0 back up. I have tried what H_TeXMeX_H sugested but it didn't work. Could the kernel have unloaded the module and then not reload it? It is a broadcom card using the ndiswrapper and I am not sure what the module is called. I think the command is modprobe 'mod-name'. One more thing to search out.

Thanks guys. I have added pieces to this post over the last couple of weeks.

Ok. Another hard boot. When I came back up this time I decided to take the wifi down via command. So I 'ifconfig eth0 down' and the wifi was still active because I could still ssh into my server. So I 'ifdown eth0' with the same effect. I also tried eth1 with the same results and wlan0 which does not exist.

I am running kde. When I look at control-center > internet & network > network settings it reports that the wifi is on eth0 and the hard-wired is eth1. So I am confused as to what the name of my wifi card is. The knetwork-manager knows what it is and did disable it.

I have read most of the basic setup instructions for shorewall and I am not sure that is what I need to use to do what I want.

Once again thanks to all.

Thought?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How best to manage multiple internet sources woodslanding Linux - Newbie 1 12-21-2007 01:56 AM
Have internet connection, but router doesn't 'see' me after switching to static IP Ariox Ubuntu 4 05-06-2007 04:30 PM
Installing kernel-sources in Fedora 6 without internet access tm2383 Fedora 2 11-06-2006 04:57 AM
can't access to internet after switching from.... binary_0011 Ubuntu 4 10-13-2006 02:34 PM
linux sources on the internet graffitici Linux - Software 3 07-07-2003 07:57 AM


All times are GMT -5. The time now is 02:50 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration