Jump to content

Tips&Tricks making dialup and LAN work together


aru
 Share

Recommended Posts

 

southernguy

Newbie

Joined: 27 Oct 2002

Posts: 3

Location: Louisiana

 

Post Posted: Mon Nov 04, 2002 3:02 am Post subject: making dialup and LAN work together

_________________________________________________________________

 

 

i had this problem and many other people apparently have too.

 

the problem: on a LAN, Mandrake likes to set you up by default to access the internet thru the LAN, using whatever machine on the LAN has a direct connection as the gateway. when you dial up, that gateway doesnt always get changed just because your modem is connected, which results in you still accessing the net over the LAN while your modem twiddles its thumbs.

 

the first ugly hack i found: disable the LAN interface before dialing, and re-enable it when you disconnect. that gets you on the net via modem but you lose LAN connectivity.

 

the fix, part one: edit or create a file /etc/ppp/ip-up.local, and in it put:

 

route del default

route add default gw $IPREMOTE

 

the first line deletes the LAN gateway, the second adds the gateway your ISP gave when pppd started. so far so good, you are modeming to the internet now and your LAN is still available.

 

problem part two: when you disconnect, this gateway is still set, so you then cannot go back to the internet over the LAN, even tho you can access the LAN for file sharing etc.

 

the fix, part two: you need to delete the modem-internet gateway and put the LAN one back. there may be a better place or file to put this but what i did was make a file /etc/ppp/routefix and let kppd execute it after disconnect, with these lines:

 

route del default

route add default gw 192.168.0.1

 

of course change that to suit how your LAN is numbered and which machine on it has internet access.

 

great thanks and gratitude to the other posts on here about this which led me to getting it working, and to the man pages. Smile

 

if anyone knows a better way to reset the LAN as gateway please post, this is just what i could do with my little thimble of knowledge.

 

--- EDIT ---

 

i have discovered since writing this that if i call the file 'ip-down.local' instead of my made-up name, it will automatically get executed when you disconnect the modem, and you dont have to tell kpppd to run it, like i did with my made-up file.

 

--- /EDIT ---

 

 

jtnelson

Newbie

Joined: 04 May 2002

Posts: 9

Location: UAE

Post Posted: Sun Nov 24, 2002 8:29 am Post subject: didn't work

_________________________________________________________________

 

 

Hey, this didn't work for me. Any ideas?

 

(Permissions aren't the problem.)

 

Jeff

 

 

delboy711

Senior user

Joined: 03 May 2002

Posts: 412

Location: Wokingham, UK

Post Posted: Thu Nov 28, 2002 2:41 pm Post subject: net_monitor

_________________________________________________________________

 

 

Another way of doing it is to define two different networking profiles and use net_monitor to switch between them

As described here:- http://www.jennings.homelinux.net/dialup.html

 

 

jtnelson

Newbie

Joined: 04 May 2002

Posts: 9

Location: UAE

Post Posted: Fri Nov 29, 2002 7:13 am Post subject:

_________________________________________________________________

 

 

How does that solve the problem of needing both LAN and dial-up access at the same time? If all I want to do is switch, I can simply issue "ifdown eth0" before dialing.

 

 

 

Editor's note: This thread was originally posted at the old MUB (Mandrake User Board at club-nihil). This post is the result of a 99% automatic backup, so due to its nature some text may be lost (improbable but possible).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...