[SOLVED] Dial-up internet connection unavailable if ethernet connected to LAN router
Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
Dial-up internet connection unavailable if ethernet connected to LAN router
I have Ubuntu 10.04 LTS installed on an elderly HP laptop and a dialup internet connection with Dodo Australia. I also have a DLink router (which expects the internet connection to be ADSL with an ADSL modem connected to iys "input" ethernet connection).
When I connect an ethernet cable to the router, the dial-up connection becomes dormant and unavailable. I suspect that what is happening is that the defaults on the network settings preferentially use an ethernet internet connection, which, of course, we do not have.
I have read lots about networking and setup needs, but I cannot find how to fix this.
What I really want to do is set up this laptop as the internet connection for the router. I do not know how.
I use wvdial to connect to the internet in a BASH shell. That was an exercise in itself, but that is working moderately reliably.
Can anyone tell me how to keep my dial-up connection active when I connect an ethernet cable to my computer, please?
Secondly, are there tricks and tips to allow my dial-up connection to provide internet to the router. Perhaps the laptop has to pretend to the router that it is a logged-in ADSL modem?
I am pretty comfortable with using BASH (my first computers only worked at command line level) but some of the networking terminology is still a mystery to me.
Thanks in anticipation of a solution!
Last edited by LittleOldLady; 12-15-2013 at 09:34 PM.
Reason: Misspleeling in subject
Very likely what is happening is that the default route is being switched to use the ethernet connection - which doesn't have internet access.
I'm not sure how the Ubuntu setup would control this.
To have the system relay the internet connection requires a system flag to be set: (file should be sysctl.conf) and the parameter is: net.ipv4.ip_forward = 1
Any other host connected to the router will have to have its default route set to the IP number of Ubuntu system. When connections to internet hosts are to be made, the initial connection from that host will go to the router, then to the Ubuntu host due to the default route on that host. The Ubuntu host has its default route set to go to the modem, and the net.ipv4.ip_forward flag will direct the network stack to forward the request out the default route. In addition, any reply coming back would be forwarded to the other host.
Now frequently this has to be combined with NAT (network address translation) as the internal router is using IP numbers that are designated to be "non-routable". The Ubuntu host should be able to be configured for this so that when the request for an outside connection arrives, the port that is assigned to it by the Ubuntu host is recorded in a table. The IP destination number for the internal host is replaced by public IP number given by the modem so that replys can be forwarded appropriately.
Sometimes the modem itself is a NAT router and that can also introduce some complexity. But one step at a time. Get the Ubuntu system working allowing connections to the internet AND connections to the hosts attached to the router. This is the biggest issue - after that, it is just configuration controls on how you want the NAT forwarding to be handled.
Thank you, we are making excellent progress.
One result of making the physical ethernet connection was that the Gnome Network Manager (network-manager) was removing the DNS nameserver data in /etc/resolv.conf and replacing it with a little comment which took credit for the change and redirected DNS to the router.
When I found out about this behaviour, I uninstalled network-manager and it no longer does that. Whether the Ubuntu setup does something else to make the ethernet preferential, I have not yet discovered.
A review of /etc/sysctl.conf revealed that it consisted entirely of comments, including the lines:
# Uncomment the next line to enable packet forwarding for IPv4
So I have uncommented that line.
Plugging the laptop into the router now is not disconnecting my dial-up connection, which is brilliant. I am not certain whether the change to sysctl.conf was the solution (I think not) or the uninstallation of network-manager (I think this was the baddie). However, now that the major problem is resolved, only the minor one of how to relay the connection remains.
I shall follow the tutorials on how to manually establish an ethernet connection without network-manager and when I have sorted that out, will report my progress.
My configuration uses a double NAT - The internet router is a NAT device going between the ISP and 192.168.1.x local network.
I then use NAT to forward connections between 192.168.0.x (my internal network) to the internet. The area that controls this is the firewall. The 192.168 networks are designated "non-routable" which prevents Linux from automatically forwarding such connections - thus the use of NAT, which will forward them.