MandrivaUsers.org : Tips&Tricks making dialup and LAN work together - MandrivaUsers.org

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Tips&Tricks making dialup and LAN work together

#1 User is offline   aru 

  • Mandriva Guru
  • Group: Members
  • Posts: 2,150
  • Joined: 04-December 02

Posted 15 January 2003 - 12:30 AM



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....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).
The text you've read above is supposed to be in english;
oops! btw, the code in this post -if any- is released under the GNU GPL v2 or later, that means among other things that it hasn't any warranty.


- The Unix philosophy in one lesson: KEEP IT SIMPLE, STUPID! -- ES. Raymond. "TAOUP"

You might want to take a look to our Musb FAQs and to "THE" FAQs... and remember "/usr/bin/man" is your best friend, use it!

:wq
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users