LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-18-2003, 10:57 PM   #1
ShakyJake
Member
 
Registered: Apr 2003
Location: USA
Distribution: Gentoo
Posts: 55

Rep: Reputation: 15
LAN connection interferes with modem/KPPP


Okay, finally found out how to install KPPP earlier today. The new Conexant drivers work like a charm.

HOWEVER, new issue: I have two machines networked. My secondary computer I usually use to dial out to the internet and share the connection (it's running Windows 2000). My primary machine running Linux (Mandrake 9.1) has worked fine accessing the internet over this network. Problem is, if I dial-out and connect to my ISP with the Linux box it still is trying to access the internet over the LAN connection to my other PC. The only way I've been able to get the modem connection to actually be used is to unplug the RJ45 cable from the Linux box and reboot.

Is there anyway to tell Linux to use the modem connection as default and switch to the LAN shared connection if the modem isn't connected?

Thanks!
 
Old 04-19-2003, 03:28 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
It can, but it requires you to write a script. The idea isn't hard. If the modem connection is up, you need to run (as root):
route del default
route add default ppp0
When the modem is down, you need:
route del default
route add default gw your_second_machine_IP
The simpliest solution is to make two scripts: net-modem(with first two commands) and net-eth (with second pair) and start them manually when you change connection.
 
Old 04-21-2003, 03:09 PM   #3
linuxfond
Member
 
Registered: Jan 2003
Location: Belgium
Distribution: Mandrake 9.2
Posts: 475

Rep: Reputation: 30
Re: LAN connection interferes with modem/KPPP

Quote:
Originally posted by ShakyJake
I have two machines networked.
Please, help! How did you get the machines to work together?
I am struggling with this already two weeks - no advance whatsoever.
I have two machines:
1. Desktop, Mandrake 9.0 with an ADSL connection that I want to share with my laptop, and eth0 on ttys0.
2. laptop, Mandrake 9.1, no internet connection, eth0 on ttyS0.
I got the cable, both eths run, I have shared folders on both computers yet I can not access neither box.
 
Old 04-22-2003, 03:16 AM   #4
echidna2001
LQ Newbie
 
Registered: Apr 2003
Posts: 4

Rep: Reputation: 0
ppp configuration

Ok, I have just solved what sounds like the same problem myself.

My problem was that if I had the local network connection
then my ppp internet connection would connect, but I
could never get anything from the net.

My solution:
edit the /etc/ppp/options file and ensure there is a line:
defaultroute

This will add a default routing to the routing table to send things
over the ppp connection unless the ip matches a local address.

Also check the file:
/etc/sysconfig/network and remove any gateway references.
(I'm not entirely sure this is necessary, but worth checking
if the first step didn't solve it)

Finally do the command:
route -n

This shows you the table used to route IP packets to network connections.
Firstly the IP address is and'ed with the Genmask, and if it matched the destination IP it will be sent out the Iface interface.
Generally for a simple home network you should see two
entries when you don't have ppp running. One for the eth0
interface and one for the lo interface. Once ppp starts
two more will be added. One for the direct ppp interface
and a 'default' one that will gateway to the ppp interface.

If this isn't correct read the route manpages and the networking howto that is available online.
 
  


Reply



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
Internet connection with KPPP dies (Modem HSP56MR) seraph-seph Slackware 11 07-09-2005 01:18 PM
kppp and modem connection Mandriva LE marcelsk Linux - Software 1 06-21-2005 01:43 PM
How can I use Kppp on a lan cothrige Linux - Networking 3 10-25-2004 09:03 AM
Connection to network interferes with xauthority? nouwen Linux - Newbie 0 03-24-2004 12:49 PM
Switching Between 'Modem' & 'LAN' Connection Types In Mandrake silburnl Linux - Networking 1 02-23-2004 07:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 08:47 PM.

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
Open Source Consulting | Domain Registration